1 // This file may be redistributed and modified only under the terms of
2 // the GNU Lesser General Public License (See COPYING for details).
3 // Copyright 2000-2001 Stefanus Du Toit and Aloril.
4 // Copyright 2001-2005 Alistair Riddoch.
5 // Automatically generated using gen_cpp.py.
6 
7 #include <Atlas/Objects/Operation.h>
8 
9 using Atlas::Message::Element;
10 using Atlas::Message::MapType;
11 
12 namespace Atlas { namespace Objects { namespace Operation {
13 
~AppearanceData()14 AppearanceData::~AppearanceData()
15 {
16 }
17 
copy() const18 AppearanceData * AppearanceData::copy() const
19 {
20     AppearanceData * copied = AppearanceData::alloc();
21     *copied = *this;
22     copied->m_refCount = 0;
23     return copied;
24 }
25 
instanceOf(int classNo) const26 bool AppearanceData::instanceOf(int classNo) const
27 {
28     if(APPEARANCE_NO == classNo) return true;
29     return SightData::instanceOf(classNo);
30 }
31 
32 //freelist related methods specific to this class
33 AppearanceData *AppearanceData::defaults_AppearanceData = 0;
34 AppearanceData *AppearanceData::begin_AppearanceData = 0;
35 
alloc()36 AppearanceData *AppearanceData::alloc()
37 {
38     if(begin_AppearanceData) {
39         AppearanceData *res = begin_AppearanceData;
40         assert( res->m_refCount == 0 );
41         res->m_attrFlags = 0;
42         res->m_attributes.clear();
43         begin_AppearanceData = (AppearanceData *)begin_AppearanceData->m_next;
44         return res;
45     }
46     return new AppearanceData(AppearanceData::getDefaultObjectInstance());
47 }
48 
free()49 void AppearanceData::free()
50 {
51     m_next = begin_AppearanceData;
52     begin_AppearanceData = this;
53 }
54 
55 
getDefaultObjectInstance()56 AppearanceData *AppearanceData::getDefaultObjectInstance()
57 {
58     if (defaults_AppearanceData == 0) {
59         defaults_AppearanceData = new AppearanceData;
60         defaults_AppearanceData->attr_objtype = "op";
61         defaults_AppearanceData->attr_serialno = 0;
62         defaults_AppearanceData->attr_refno = 0;
63         defaults_AppearanceData->attr_seconds = 0.0;
64         defaults_AppearanceData->attr_future_seconds = 0.0;
65         defaults_AppearanceData->attr_stamp = 0.0;
66         defaults_AppearanceData->attr_parents = std::list<std::string>(1, "appearance");
67         SightData::getDefaultObjectInstance();
68     }
69     return defaults_AppearanceData;
70 }
71 
getDefaultObject()72 AppearanceData *AppearanceData::getDefaultObject()
73 {
74     return AppearanceData::getDefaultObjectInstance();
75 }
76 
~DisappearanceData()77 DisappearanceData::~DisappearanceData()
78 {
79 }
80 
copy() const81 DisappearanceData * DisappearanceData::copy() const
82 {
83     DisappearanceData * copied = DisappearanceData::alloc();
84     *copied = *this;
85     copied->m_refCount = 0;
86     return copied;
87 }
88 
instanceOf(int classNo) const89 bool DisappearanceData::instanceOf(int classNo) const
90 {
91     if(DISAPPEARANCE_NO == classNo) return true;
92     return SightData::instanceOf(classNo);
93 }
94 
95 //freelist related methods specific to this class
96 DisappearanceData *DisappearanceData::defaults_DisappearanceData = 0;
97 DisappearanceData *DisappearanceData::begin_DisappearanceData = 0;
98 
alloc()99 DisappearanceData *DisappearanceData::alloc()
100 {
101     if(begin_DisappearanceData) {
102         DisappearanceData *res = begin_DisappearanceData;
103         assert( res->m_refCount == 0 );
104         res->m_attrFlags = 0;
105         res->m_attributes.clear();
106         begin_DisappearanceData = (DisappearanceData *)begin_DisappearanceData->m_next;
107         return res;
108     }
109     return new DisappearanceData(DisappearanceData::getDefaultObjectInstance());
110 }
111 
free()112 void DisappearanceData::free()
113 {
114     m_next = begin_DisappearanceData;
115     begin_DisappearanceData = this;
116 }
117 
118 
getDefaultObjectInstance()119 DisappearanceData *DisappearanceData::getDefaultObjectInstance()
120 {
121     if (defaults_DisappearanceData == 0) {
122         defaults_DisappearanceData = new DisappearanceData;
123         defaults_DisappearanceData->attr_objtype = "op";
124         defaults_DisappearanceData->attr_serialno = 0;
125         defaults_DisappearanceData->attr_refno = 0;
126         defaults_DisappearanceData->attr_seconds = 0.0;
127         defaults_DisappearanceData->attr_future_seconds = 0.0;
128         defaults_DisappearanceData->attr_stamp = 0.0;
129         defaults_DisappearanceData->attr_parents = std::list<std::string>(1, "disappearance");
130         SightData::getDefaultObjectInstance();
131     }
132     return defaults_DisappearanceData;
133 }
134 
getDefaultObject()135 DisappearanceData *DisappearanceData::getDefaultObject()
136 {
137     return DisappearanceData::getDefaultObjectInstance();
138 }
139 
~SoundData()140 SoundData::~SoundData()
141 {
142 }
143 
copy() const144 SoundData * SoundData::copy() const
145 {
146     SoundData * copied = SoundData::alloc();
147     *copied = *this;
148     copied->m_refCount = 0;
149     return copied;
150 }
151 
instanceOf(int classNo) const152 bool SoundData::instanceOf(int classNo) const
153 {
154     if(SOUND_NO == classNo) return true;
155     return PerceptionData::instanceOf(classNo);
156 }
157 
158 //freelist related methods specific to this class
159 SoundData *SoundData::defaults_SoundData = 0;
160 SoundData *SoundData::begin_SoundData = 0;
161 
alloc()162 SoundData *SoundData::alloc()
163 {
164     if(begin_SoundData) {
165         SoundData *res = begin_SoundData;
166         assert( res->m_refCount == 0 );
167         res->m_attrFlags = 0;
168         res->m_attributes.clear();
169         begin_SoundData = (SoundData *)begin_SoundData->m_next;
170         return res;
171     }
172     return new SoundData(SoundData::getDefaultObjectInstance());
173 }
174 
free()175 void SoundData::free()
176 {
177     m_next = begin_SoundData;
178     begin_SoundData = this;
179 }
180 
181 
getDefaultObjectInstance()182 SoundData *SoundData::getDefaultObjectInstance()
183 {
184     if (defaults_SoundData == 0) {
185         defaults_SoundData = new SoundData;
186         defaults_SoundData->attr_objtype = "op";
187         defaults_SoundData->attr_serialno = 0;
188         defaults_SoundData->attr_refno = 0;
189         defaults_SoundData->attr_seconds = 0.0;
190         defaults_SoundData->attr_future_seconds = 0.0;
191         defaults_SoundData->attr_stamp = 0.0;
192         defaults_SoundData->attr_parents = std::list<std::string>(1, "sound");
193         PerceptionData::getDefaultObjectInstance();
194     }
195     return defaults_SoundData;
196 }
197 
getDefaultObject()198 SoundData *SoundData::getDefaultObject()
199 {
200     return SoundData::getDefaultObjectInstance();
201 }
202 
~SmellData()203 SmellData::~SmellData()
204 {
205 }
206 
copy() const207 SmellData * SmellData::copy() const
208 {
209     SmellData * copied = SmellData::alloc();
210     *copied = *this;
211     copied->m_refCount = 0;
212     return copied;
213 }
214 
instanceOf(int classNo) const215 bool SmellData::instanceOf(int classNo) const
216 {
217     if(SMELL_NO == classNo) return true;
218     return PerceptionData::instanceOf(classNo);
219 }
220 
221 //freelist related methods specific to this class
222 SmellData *SmellData::defaults_SmellData = 0;
223 SmellData *SmellData::begin_SmellData = 0;
224 
alloc()225 SmellData *SmellData::alloc()
226 {
227     if(begin_SmellData) {
228         SmellData *res = begin_SmellData;
229         assert( res->m_refCount == 0 );
230         res->m_attrFlags = 0;
231         res->m_attributes.clear();
232         begin_SmellData = (SmellData *)begin_SmellData->m_next;
233         return res;
234     }
235     return new SmellData(SmellData::getDefaultObjectInstance());
236 }
237 
free()238 void SmellData::free()
239 {
240     m_next = begin_SmellData;
241     begin_SmellData = this;
242 }
243 
244 
getDefaultObjectInstance()245 SmellData *SmellData::getDefaultObjectInstance()
246 {
247     if (defaults_SmellData == 0) {
248         defaults_SmellData = new SmellData;
249         defaults_SmellData->attr_objtype = "op";
250         defaults_SmellData->attr_serialno = 0;
251         defaults_SmellData->attr_refno = 0;
252         defaults_SmellData->attr_seconds = 0.0;
253         defaults_SmellData->attr_future_seconds = 0.0;
254         defaults_SmellData->attr_stamp = 0.0;
255         defaults_SmellData->attr_parents = std::list<std::string>(1, "smell");
256         PerceptionData::getDefaultObjectInstance();
257     }
258     return defaults_SmellData;
259 }
260 
getDefaultObject()261 SmellData *SmellData::getDefaultObject()
262 {
263     return SmellData::getDefaultObjectInstance();
264 }
265 
~FeelData()266 FeelData::~FeelData()
267 {
268 }
269 
copy() const270 FeelData * FeelData::copy() const
271 {
272     FeelData * copied = FeelData::alloc();
273     *copied = *this;
274     copied->m_refCount = 0;
275     return copied;
276 }
277 
instanceOf(int classNo) const278 bool FeelData::instanceOf(int classNo) const
279 {
280     if(FEEL_NO == classNo) return true;
281     return PerceptionData::instanceOf(classNo);
282 }
283 
284 //freelist related methods specific to this class
285 FeelData *FeelData::defaults_FeelData = 0;
286 FeelData *FeelData::begin_FeelData = 0;
287 
alloc()288 FeelData *FeelData::alloc()
289 {
290     if(begin_FeelData) {
291         FeelData *res = begin_FeelData;
292         assert( res->m_refCount == 0 );
293         res->m_attrFlags = 0;
294         res->m_attributes.clear();
295         begin_FeelData = (FeelData *)begin_FeelData->m_next;
296         return res;
297     }
298     return new FeelData(FeelData::getDefaultObjectInstance());
299 }
300 
free()301 void FeelData::free()
302 {
303     m_next = begin_FeelData;
304     begin_FeelData = this;
305 }
306 
307 
getDefaultObjectInstance()308 FeelData *FeelData::getDefaultObjectInstance()
309 {
310     if (defaults_FeelData == 0) {
311         defaults_FeelData = new FeelData;
312         defaults_FeelData->attr_objtype = "op";
313         defaults_FeelData->attr_serialno = 0;
314         defaults_FeelData->attr_refno = 0;
315         defaults_FeelData->attr_seconds = 0.0;
316         defaults_FeelData->attr_future_seconds = 0.0;
317         defaults_FeelData->attr_stamp = 0.0;
318         defaults_FeelData->attr_parents = std::list<std::string>(1, "feel");
319         PerceptionData::getDefaultObjectInstance();
320     }
321     return defaults_FeelData;
322 }
323 
getDefaultObject()324 FeelData *FeelData::getDefaultObject()
325 {
326     return FeelData::getDefaultObjectInstance();
327 }
328 
~ErrorData()329 ErrorData::~ErrorData()
330 {
331 }
332 
copy() const333 ErrorData * ErrorData::copy() const
334 {
335     ErrorData * copied = ErrorData::alloc();
336     *copied = *this;
337     copied->m_refCount = 0;
338     return copied;
339 }
340 
instanceOf(int classNo) const341 bool ErrorData::instanceOf(int classNo) const
342 {
343     if(ERROR_NO == classNo) return true;
344     return InfoData::instanceOf(classNo);
345 }
346 
347 //freelist related methods specific to this class
348 ErrorData *ErrorData::defaults_ErrorData = 0;
349 ErrorData *ErrorData::begin_ErrorData = 0;
350 
alloc()351 ErrorData *ErrorData::alloc()
352 {
353     if(begin_ErrorData) {
354         ErrorData *res = begin_ErrorData;
355         assert( res->m_refCount == 0 );
356         res->m_attrFlags = 0;
357         res->m_attributes.clear();
358         begin_ErrorData = (ErrorData *)begin_ErrorData->m_next;
359         return res;
360     }
361     return new ErrorData(ErrorData::getDefaultObjectInstance());
362 }
363 
free()364 void ErrorData::free()
365 {
366     m_next = begin_ErrorData;
367     begin_ErrorData = this;
368 }
369 
370 
getDefaultObjectInstance()371 ErrorData *ErrorData::getDefaultObjectInstance()
372 {
373     if (defaults_ErrorData == 0) {
374         defaults_ErrorData = new ErrorData;
375         defaults_ErrorData->attr_objtype = "op";
376         defaults_ErrorData->attr_serialno = 0;
377         defaults_ErrorData->attr_refno = 0;
378         defaults_ErrorData->attr_seconds = 0.0;
379         defaults_ErrorData->attr_future_seconds = 0.0;
380         defaults_ErrorData->attr_stamp = 0.0;
381         defaults_ErrorData->attr_parents = std::list<std::string>(1, "error");
382         InfoData::getDefaultObjectInstance();
383     }
384     return defaults_ErrorData;
385 }
386 
getDefaultObject()387 ErrorData *ErrorData::getDefaultObject()
388 {
389     return ErrorData::getDefaultObjectInstance();
390 }
391 
392 } } } // namespace Atlas::Objects::Operation
393