CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Flow
Controls
InControlPublisher.hxx
Go to the documentation of this file.
1
#ifndef _INCONTROL_PUBLISHER_HXX_
2
#define _INCONTROL_PUBLISHER_HXX_
3
4
#include "
InControl.hxx
"
5
#include <string>
6
7
// TODO: Refactoring...
8
// Extract common interface from InControlPublisher, InControl and create a common base class
9
namespace
CLAM
10
{
11
class
InControlPublisher
:
public
FloatInControl
12
{
13
FloatInControl
* mPublished;
//TODO should be a list, in the future
14
15
public
:
16
InControlPublisher
()
17
:
FloatInControl
(
"InControlPublisher"
, 0 )
18
{
19
mPublished=
NULL
;
20
}
21
22
InControlPublisher
(
const
std::string& name,
Processing
* father )
23
:
FloatInControl
( name, father )
24
{
25
mPublished=
NULL
;
26
}
27
28
void
PublishInControl
(
FloatInControl
& in )
29
{
30
mPublished = ∈
31
}
32
void
DoControl
(
const
TControlData
& val)
33
{
34
if
(mPublished)
35
mPublished->
DoControl
(val);
36
else
37
FloatInControl::DoControl
(val);
38
}
39
const
TControlData
&
GetLastValue
()
const
40
{
41
if
(mPublished)
42
return
mPublished->
GetLastValue
();
43
return
mLastValue
;
44
}
45
46
};
47
48
}
// namespace CLAM
49
50
#endif
51
Generated by
1.8.1