27{
29 {
31 WhiteBoardSvc *
const result
32 = dynamic_cast<WhiteBoardSvc*>(worker->getAlg ("WhiteBoardSvc"));
35 }
36
37
38
39 void WhiteBoardSvc ::
40 testInvariant () const
41 {}
42
43
44
45 WhiteBoardSvc ::
46 WhiteBoardSvc ()
47 {
49 }
50
51
52
53 bool WhiteBoardSvc ::
54 hasVar (const std::string& name) const
55 {
57 return doHasVar (name);
58 }
59
60
61
62 float WhiteBoardSvc ::
63 getFloat (const std::string& name) const
64 {
66 return doGetFloat (name);
67 }
68
69
70
71 void WhiteBoardSvc ::
72 getArray (
const std::string& name, std::size_t&
size,
73 const float*& values) const
74 {
76 std::size_t tmpSize = 0;
77 const float *tmpValues = 0;
78 doGetArray (name, tmpSize, tmpValues);
81 }
82
83
84
85 TObject *WhiteBoardSvc ::
86 getTObject (const std::string& name) const
87 {
89 TObject *
result = doGetTObject (name);
92 }
93
94
95
96 void WhiteBoardSvc ::
97 setFloat (const std::string& name, float value)
98 {
100 doSetFloat (name, value);
101 }
102
103
104
105 void WhiteBoardSvc ::
106 setArray (const std::string& name, const std::vector<float>& value)
107 {
109 doSetArray (name,
value.size(), &value[0]);
110 }
111
112
113
114 void WhiteBoardSvc ::
115 setArray (
const std::string& name, std::size_t
size,
const float *values)
116 {
118 doSetArray (name,
size, values);
119 }
120
121
122
123 void WhiteBoardSvc ::
124 setTObject (TObject *object, bool swallow)
125 {
127 doSetTObject (object, swallow);
128 }
129
130
131
132 const char *WhiteBoardSvc ::
133 GetName () const
134 {
136 return "WhiteBoardSvc";
137 }
138
139
140
141 bool WhiteBoardSvc ::
142 doHasVar (const std::string& ) const
143 {
145 return false;
146 }
147
148
149
150 float WhiteBoardSvc ::
151 doGetFloat (const std::string& name) const
152 {
154
155 TObject *const object = getTObject (name);
161 }
162
163
164
165 void WhiteBoardSvc ::
166 doGetArray (
const std::string& name, std::size_t&
size,
167 const float*& values) const
168 {
170
171 TObject *const object = getTObject (name);
178 }
179
180
181
182 TObject *WhiteBoardSvc ::
183 doGetTObject (const std::string& ) const
184 {
186 return 0;
187 }
188
189
190
191 void WhiteBoardSvc ::
192 doSetFloat (const std::string& name, float value)
193 {
195
199 setTObject (
meta.release(),
true);
200 }
201
202
203
204 void WhiteBoardSvc ::
205 doSetArray (
const std::string& name, std::size_t
size,
const float *values)
206 {
208
211 std::vector<float> (values, values+
size).swap (
meta->value);
212 setTObject (
meta.release(),
true);
213 }
214
215
216
217 void WhiteBoardSvc ::
218 doSetTObject (TObject *object, bool swallow)
219 {
220 if (swallow)
223 }
224}
#define RCU_ASSERT2_SOFT(x, y)
#define RCU_NEW_INVARIANT(x)
#define RCU_ASSERT0_NOIMP(y)
#define RCU_REQUIRE_SOFT(x)
#define RCU_READ_INVARIANT(x)
size_t size() const
Number of registered mappings.
WhiteBoardSvc * getWhiteBoardSvc(IWorker *worker)
effects: get the whiteboard service for this worker guarantee: strong failures: formula service not c...