CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
System
Application
ProcessingKernel.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2004 MUSIC TECHNOLOGY GROUP (MTG)
3
* UNIVERSITAT POMPEU FABRA
4
*
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
22
#ifndef __PROCESSINGKERNEL__
23
#define __PROCESSINGKERNEL__
24
25
namespace
CLAM
26
{
27
28
class
Thread;
29
30
class
ProcessingKernel
31
{
32
33
public
:
34
ProcessingKernel
();
35
36
virtual
~ProcessingKernel
() {}
37
38
39
//MRJ: For some reason with Visual Studio 6.0 ( cl version 12.00.8168 )
40
// is not able to resolve the correct pointer for a derived class
41
// when accessing to a BaseClass::PureVirtualMethod implemented in
42
// the derived. Possible culprits:
43
// + Most surely, since the functor constructor is a virtual one
44
// through a tricky template function, *IS* possible that during
45
// some compile-time conversion, the compiler discards qualifiers
46
// over the reference to the derived class, thus producing a
47
// "real pointer" (vcall) which seems to be some kind of compiler
48
// generated member pointer to identify pure virtual calls. Strange,
49
// huh? Nonethless, this works right for patched Micro$oft compilers and
50
// gcc...
51
52
virtual
void
ProcessingCleanup
(){};
53
54
virtual
void
ProcessingLoop
(){};
55
56
void
AttachToThread
(
Thread
& att_thread );
57
58
protected
:
59
60
bool
LoopCondition
();
61
62
virtual
bool
UserCondition
();
63
64
void
Cancel
();
65
66
private
:
67
bool
mShouldRun;
68
69
};
70
71
}
72
73
#endif // ProcessingKernel.hxx
74
Generated by
1.8.1