CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Flow
Controls
InControlBase.hxx
Go to the documentation of this file.
1
#ifndef InControlBase_hxx
2
#define InControlBase_hxx
3
4
#include <string>
5
#include <list>
6
#include <typeinfo>
7
8
namespace
CLAM {
9
class
Processing;
10
class
OutControlBase
;
11
13
typedef
float
TControlData
;
14
22
class
InControlBase
23
{
24
std::string mName;
25
protected
:
26
Processing
*
mProcessing
;
27
typedef
std::list<OutControlBase*>
Peers
;
29
Peers
mLinks
;
30
TControlData
mDefaultValue
;
31
TControlData
mUpperBound
;
32
TControlData
mLowerBound
;
33
bool
mBounded
;
34
bool
mHasDefaultValue
;
35
mutable
bool
_hasBeenRead
;
36
private
:
38
InControlBase
(
const
InControlBase
& toBeCopied ) {}
39
public
:
40
bool
HasBeenRead
()
const
{
return
_hasBeenRead
; }
46
InControlBase
(
const
std::string &name,
Processing
* processing = 0);
52
virtual
~InControlBase
();
62
virtual
const
std::type_info&
GetTypeId
()
const
= 0;
64
const
std::string&
GetName
()
const
{
return
mName; }
66
Processing
*
GetProcessing
()
const
{
return
mProcessing
; }
68
bool
IsConnected
()
const
{
return
not
mLinks
.empty(); }
70
bool
IsConnectedTo
(
OutControlBase
& out);
71
75
//{@
76
bool
IsBounded
()
const
;
77
TControlData
UpperBound
()
const
;
78
TControlData
LowerBound
()
const
;
80
TControlData
DefaultValue
()
const
;
81
void
SetDefaultValue
(
TControlData
val);
82
void
SetBounds
(
TControlData
lower,
TControlData
upper);
84
86
void
OutControlInterface_AddLink
(
OutControlBase
& outControl)
87
{
88
mLinks
.push_back(&outControl);
89
}
91
void
OutControlInterface_RemoveLink
(
OutControlBase
& outControl)
92
{
93
mLinks
.remove(&outControl);
94
}
95
virtual
const
std::string
GetLastValueAsString
()
96
{
97
return
"Non printable type"
;
98
}
99
};
100
}
// End namespace CLAM
101
#endif // InControlBase_hxx
Generated by
1.8.1