34{
36 {
38 WhiteBoardSvc *
const result
39 = dynamic_cast<WhiteBoardSvc*>(worker->getAlg ("WhiteBoardSvc"));
42 }
43
44
45
46 void WhiteBoardSvc ::
47 testInvariant () const
48 {
50 }
51
52
53
54 WhiteBoardSvc ::
55 WhiteBoardSvc ()
56 {
58 }
59
60
61
62 bool WhiteBoardSvc ::
63 hasVar (const std::string& name) const
64 {
66 return doHasVar (name);
67 }
68
69
70
71 float WhiteBoardSvc ::
72 getFloat (const std::string& name) const
73 {
75 return doGetFloat (name);
76 }
77
78
79
80 void WhiteBoardSvc ::
81 getArray (const std::string& name, std::size_t& size,
82 const float*& values) const
83 {
85 std::size_t tmpSize = 0;
86 const float *tmpValues = 0;
87 doGetArray (name, tmpSize, tmpValues);
88 size = tmpSize;
90 }
91
92
93
94 TObject *WhiteBoardSvc ::
95 getTObject (const std::string& name) const
96 {
98 TObject *
result = doGetTObject (name);
101 }
102
103
104
105 void WhiteBoardSvc ::
106 setFloat (const std::string& name, float value)
107 {
109 doSetFloat (name, value);
110 }
111
112
113
114 void WhiteBoardSvc ::
115 setArray (const std::string& name, const std::vector<float>& value)
116 {
118 doSetArray (name,
value.size(), &value[0]);
119 }
120
121
122
123 void WhiteBoardSvc ::
124 setArray (const std::string& name, std::size_t size, const float *values)
125 {
127 doSetArray (name, size, values);
128 }
129
130
131
132 void WhiteBoardSvc ::
133 setTObject (TObject *object, bool swallow)
134 {
136 doSetTObject (object, swallow);
137 }
138
139
140
141 const char *WhiteBoardSvc ::
142 GetName () const
143 {
145 return "WhiteBoardSvc";
146 }
147
148
149
150 bool WhiteBoardSvc ::
151 doHasVar (const std::string& ) const
152 {
154 return false;
155 }
156
157
158
159 float WhiteBoardSvc ::
160 doGetFloat (const std::string& name) const
161 {
163
164 TObject *const object = getTObject (name);
170 }
171
172
173
174 void WhiteBoardSvc ::
175 doGetArray (const std::string& name, std::size_t& size,
176 const float*& values) const
177 {
179
180 TObject *const object = getTObject (name);
185 size =
meta->value.size();
187 }
188
189
190
191 TObject *WhiteBoardSvc ::
192 doGetTObject (const std::string& ) const
193 {
195 return 0;
196 }
197
198
199
200 void WhiteBoardSvc ::
201 doSetFloat (const std::string& name, float value)
202 {
204
208 setTObject (
meta.release(),
true);
209 }
210
211
212
213 void WhiteBoardSvc ::
214 doSetArray (const std::string& name, std::size_t size, const float *values)
215 {
217
220 std::vector<float> (values, values+size).swap (
meta->value);
221 setTObject (
meta.release(),
true);
222 }
223
224
225
226 void WhiteBoardSvc ::
227 doSetTObject (TObject *object, bool swallow)
228 {
229 if (swallow)
232 }
233}
#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)
WhiteBoardSvc * getWhiteBoardSvc(IWorker *worker)
effects: get the whiteboard service for this worker guarantee: strong failures: formula service not c...