CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Processing
Controls
OutControlSender.hxx
Go to the documentation of this file.
1
2
#ifndef __OutControlSender_hxx__
3
#define __OutControlSender_hxx__
4
5
#include "
OutControl.hxx
"
6
#include "
Processing.hxx
"
7
#include "
ProcessingConfig.hxx
"
8
#include "
Enum.hxx
"
9
10
namespace
CLAM
11
{
12
13
class
OutControlSenderConfig
:
public
ProcessingConfig
14
{
15
public
:
16
17
class
EControlRepresentation
:
public
Enum
18
{
19
public
:
20
21
static
tEnumValue
sEnumValues
[];
22
static
tValue
sDefault
;
23
EControlRepresentation
() :
Enum
(
sEnumValues
,
sDefault
) {}
24
EControlRepresentation
(
tValue
v) :
Enum
(
sEnumValues
, v) {};
25
EControlRepresentation
(std::string s) :
Enum
(
sEnumValues
, s) {};
26
27
typedef
enum
{
28
eUndetermined
,
29
eVerticalSlider
,
30
eHorizontalSlider
,
31
eKnot
,
32
eSpinBox
33
}
tEnum
;
34
35
Component
*
Species
()
const
36
{
37
return
new
EControlRepresentation
;
38
};
39
40
};
41
42
class
EMapping
:
public
Enum
43
{
44
public
:
45
46
static
tEnumValue
sEnumValues
[];
47
static
tValue
sDefault
;
48
EMapping
() :
Enum
(
sEnumValues
,
sDefault
) {}
49
EMapping
(
tValue
v) :
Enum
(
sEnumValues
, v) {};
50
EMapping
(std::string s) :
Enum
(
sEnumValues
, s) {};
51
52
typedef
enum
{
53
eLinear
,
54
eInverted
,
55
eLog
,
56
eReverseLog
57
}
tEnum
;
58
59
Component
*
Species
()
const
60
{
61
return
new
EMapping
;
62
};
63
64
};
65
66
DYNAMIC_TYPE_USING_INTERFACE
(
OutControlSenderConfig
, 6,
ProcessingConfig
);
67
DYN_ATTRIBUTE
(0,
public
,
TControlData
, Min );
68
DYN_ATTRIBUTE
(1,
public
,
TControlData
, Default );
69
DYN_ATTRIBUTE
(2,
public
,
TControlData
, Max );
70
DYN_ATTRIBUTE
(3,
public
,
TControlData
, Step );
71
DYN_ATTRIBUTE
(4,
public
, EControlRepresentation, ControlRepresentation );
72
DYN_ATTRIBUTE
(5,
public
, EMapping,
Mapping
);
73
74
75
protected
:
76
void
DefaultInit
(
void
);
77
};
78
79
class
OutControlSender
:
public
Processing
80
{
81
OutControlSenderConfig
mConfig;
82
FloatOutControl
mOutput;
83
TControlData
mLastValue;
84
bool
mFirstDoAfterStart;
85
public
:
86
OutControlSender
();
87
OutControlSender
(
const
OutControlSenderConfig
& );
88
89
bool
Do
();
90
const
char
*
GetClassName
()
const
{
return
"OutControlSender"
;}
91
92
const
ProcessingConfig
&
GetConfig
()
const
{
return
mConfig;}
93
void
SendControl
(
TControlData
value);
94
protected
:
95
bool
ConcreteConfigure
(
const
ProcessingConfig
& c);
96
bool
ConcreteStart
();
97
};
98
99
}
//namespace CLAM
100
101
#endif //__OutControlSender_hxx__
102
103
104
Generated by
1.8.1