27{
29 {
31 WhiteBoardSvc *
const result
32 = dynamic_cast<WhiteBoardSvc*>(worker->getAlg ("WhiteBoardSvc"));
35 }
36
37
38
39 void WhiteBoardSvc ::
40 testInvariant () const
41 {
43 }
44
45
46
47 WhiteBoardSvc ::
48 WhiteBoardSvc ()
49 {
51 }
52
53
54
55 bool WhiteBoardSvc ::
56 hasVar (const std::string& name) const
57 {
59 return doHasVar (name);
60 }
61
62
63
64 float WhiteBoardSvc ::
65 getFloat (const std::string& name) const
66 {
68 return doGetFloat (name);
69 }
70
71
72
73 void WhiteBoardSvc ::
74 getArray (
const std::string& name, std::size_t&
size,
75 const float*& values) const
76 {
78 std::size_t tmpSize = 0;
79 const float *tmpValues = 0;
80 doGetArray (name, tmpSize, tmpValues);
83 }
84
85
86
87 TObject *WhiteBoardSvc ::
88 getTObject (const std::string& name) const
89 {
91 TObject *
result = doGetTObject (name);
94 }
95
96
97
98 void WhiteBoardSvc ::
99 setFloat (const std::string& name, float value)
100 {
102 doSetFloat (name, value);
103 }
104
105
106
107 void WhiteBoardSvc ::
108 setArray (const std::string& name, const std::vector<float>& value)
109 {
111 doSetArray (name,
value.size(), &value[0]);
112 }
113
114
115
116 void WhiteBoardSvc ::
117 setArray (
const std::string& name, std::size_t
size,
const float *values)
118 {
120 doSetArray (name,
size, values);
121 }
122
123
124
125 void WhiteBoardSvc ::
126 setTObject (TObject *object, bool swallow)
127 {
129 doSetTObject (object, swallow);
130 }
131
132
133
134 const char *WhiteBoardSvc ::
135 GetName () const
136 {
138 return "WhiteBoardSvc";
139 }
140
141
142
143 bool WhiteBoardSvc ::
144 doHasVar (const std::string& ) const
145 {
147 return false;
148 }
149
150
151
152 float WhiteBoardSvc ::
153 doGetFloat (const std::string& name) const
154 {
156
157 TObject *const object = getTObject (name);
163 }
164
165
166
167 void WhiteBoardSvc ::
168 doGetArray (
const std::string& name, std::size_t&
size,
169 const float*& values) const
170 {
172
173 TObject *const object = getTObject (name);
180 }
181
182
183
184 TObject *WhiteBoardSvc ::
185 doGetTObject (const std::string& ) const
186 {
188 return 0;
189 }
190
191
192
193 void WhiteBoardSvc ::
194 doSetFloat (const std::string& name, float value)
195 {
197
201 setTObject (
meta.release(),
true);
202 }
203
204
205
206 void WhiteBoardSvc ::
207 doSetArray (
const std::string& name, std::size_t
size,
const float *values)
208 {
210
213 std::vector<float> (values, values+
size).swap (
meta->value);
214 setTObject (
meta.release(),
true);
215 }
216
217
218
219 void WhiteBoardSvc ::
220 doSetTObject (TObject *object, bool swallow)
221 {
222 if (swallow)
225 }
226}
#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...