fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Test / GroupLib / OSGInsertTestTaskBase.h
blob8bdbea24189301f853db20bd6a7187b9dc44af13
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class InsertTestTask
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGINSERTTESTTASKBASE_H_
55 #define _OSGINSERTTESTTASKBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachmentContainer.h" // Parent
68 #include "OSGBaseFields.h" // Message type
69 #include "OSGCSMWindowFields.h" // Window type
70 #include "OSGOSGAnyFields.h" // Trigger type
72 #include "OSGInsertTestTaskFields.h"
74 OSG_BEGIN_NAMESPACE
77 class InsertTestTask;
79 //! \brief InsertTestTask Base Class.
81 class OSG_GROUP_DLLMAPPING InsertTestTaskBase : public AttachmentContainer
83 public:
85 typedef AttachmentContainer Inherited;
86 typedef AttachmentContainer ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(InsertTestTask);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 MessageFieldId = Inherited::NextFieldId,
100 WindowFieldId = MessageFieldId + 1,
101 TriggerFieldId = WindowFieldId + 1,
102 NextFieldId = TriggerFieldId + 1
105 static const OSG::BitVector MessageFieldMask =
106 (TypeTraits<BitVector>::One << MessageFieldId);
107 static const OSG::BitVector WindowFieldMask =
108 (TypeTraits<BitVector>::One << WindowFieldId);
109 static const OSG::BitVector TriggerFieldMask =
110 (TypeTraits<BitVector>::One << TriggerFieldId);
111 static const OSG::BitVector NextFieldMask =
112 (TypeTraits<BitVector>::One << NextFieldId);
114 typedef SFString SFMessageType;
115 typedef SFWeakCSMWindowPtr SFWindowType;
116 typedef SFOSGAny SFTriggerType;
118 /*---------------------------------------------------------------------*/
119 /*! \name Class Get */
120 /*! \{ */
122 static FieldContainerType &getClassType (void);
123 static UInt32 getClassTypeId (void);
124 static UInt16 getClassGroupId(void);
126 /*! \} */
127 /*---------------------------------------------------------------------*/
128 /*! \name FieldContainer Get */
129 /*! \{ */
131 virtual FieldContainerType &getType (void);
132 virtual const FieldContainerType &getType (void) const;
134 virtual UInt32 getContainerSize(void) const;
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Field Get */
139 /*! \{ */
142 SFString *editSFMessage (void);
143 const SFString *getSFMessage (void) const;
144 const SFWeakCSMWindowPtr *getSFWindow (void) const;
145 SFWeakCSMWindowPtr *editSFWindow (void);
148 std::string &editMessage (void);
149 const std::string &getMessage (void) const;
151 CSMWindow * getWindow (void) const;
153 /*! \} */
154 /*---------------------------------------------------------------------*/
155 /*! \name Field Set */
156 /*! \{ */
158 void setMessage (const std::string &value);
159 void setWindow (CSMWindow * const value);
161 /*! \} */
162 /*---------------------------------------------------------------------*/
163 /*! \name Ptr Field Set */
164 /*! \{ */
166 /*! \} */
167 /*---------------------------------------------------------------------*/
168 /*! \name Ptr MField Set */
169 /*! \{ */
171 /*! \} */
172 /*---------------------------------------------------------------------*/
173 /*! \name Binary Access */
174 /*! \{ */
176 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
177 virtual void copyToBin (BinaryDataHandler &pMem,
178 ConstFieldMaskArg whichField);
179 virtual void copyFromBin(BinaryDataHandler &pMem,
180 ConstFieldMaskArg whichField);
183 /*! \} */
184 /*---------------------------------------------------------------------*/
185 /*! \name Construction */
186 /*! \{ */
188 static InsertTestTaskTransitPtr create (void);
189 static InsertTestTask *createEmpty (void);
191 static InsertTestTaskTransitPtr createLocal (
192 BitVector bFlags = FCLocal::All);
194 static InsertTestTask *createEmptyLocal(
195 BitVector bFlags = FCLocal::All);
197 static InsertTestTaskTransitPtr createDependent (BitVector bFlags);
199 /*! \} */
200 /*---------------------------------------------------------------------*/
201 /*! \name Copy */
202 /*! \{ */
204 virtual FieldContainerTransitPtr shallowCopy (void) const;
205 virtual FieldContainerTransitPtr shallowCopyLocal(
206 BitVector bFlags = FCLocal::All) const;
207 virtual FieldContainerTransitPtr shallowCopyDependent(
208 BitVector bFlags) const;
210 /*! \} */
211 /*========================= PROTECTED ===============================*/
213 protected:
215 static TypeObject _type;
217 static void classDescInserter(TypeObject &oType);
218 static const Char8 *getClassname (void );
220 /*---------------------------------------------------------------------*/
221 /*! \name Fields */
222 /*! \{ */
224 SFString _sfMessage;
225 SFWeakCSMWindowPtr _sfWindow;
226 SFOSGAny _sfTrigger;
228 /*! \} */
229 /*---------------------------------------------------------------------*/
230 /*! \name Constructors */
231 /*! \{ */
233 InsertTestTaskBase(void);
234 InsertTestTaskBase(const InsertTestTaskBase &source);
236 /*! \} */
237 /*---------------------------------------------------------------------*/
238 /*! \name Destructors */
239 /*! \{ */
241 virtual ~InsertTestTaskBase(void);
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name onCreate */
246 /*! \{ */
248 void onCreate(const InsertTestTask *source = NULL);
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name Generic Field Access */
253 /*! \{ */
255 GetFieldHandlePtr getHandleMessage (void) const;
256 EditFieldHandlePtr editHandleMessage (void);
257 GetFieldHandlePtr getHandleWindow (void) const;
258 EditFieldHandlePtr editHandleWindow (void);
259 GetFieldHandlePtr getHandleTrigger (void) const;
260 EditFieldHandlePtr editHandleTrigger (void);
262 /*! \} */
263 /*---------------------------------------------------------------------*/
264 /*! \name Field Get */
265 /*! \{ */
268 SFOSGAny *editSFTrigger (void);
269 const SFOSGAny *getSFTrigger (void) const;
272 OSGAny &editTrigger (void);
273 const OSGAny &getTrigger (void) const;
275 /*! \} */
276 /*---------------------------------------------------------------------*/
277 /*! \name Field Set */
278 /*! \{ */
280 void setTrigger (const OSGAny &value);
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Ptr MField Set */
285 /*! \{ */
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Sync */
290 /*! \{ */
292 #ifdef OSG_MT_CPTR_ASPECT
293 virtual void execSyncV( FieldContainer &oFrom,
294 ConstFieldMaskArg whichField,
295 AspectOffsetStore &oOffsets,
296 ConstFieldMaskArg syncMode ,
297 const UInt32 uiSyncInfo);
299 void execSync ( InsertTestTaskBase *pFrom,
300 ConstFieldMaskArg whichField,
301 AspectOffsetStore &oOffsets,
302 ConstFieldMaskArg syncMode ,
303 const UInt32 uiSyncInfo);
304 #endif
306 /*! \} */
307 /*---------------------------------------------------------------------*/
308 /*! \name Edit */
309 /*! \{ */
311 /*! \} */
312 /*---------------------------------------------------------------------*/
313 /*! \name Aspect Create */
314 /*! \{ */
316 #ifdef OSG_MT_CPTR_ASPECT
317 virtual FieldContainer *createAspectCopy(
318 const FieldContainer *pRefAspect) const;
319 #endif
321 /*! \} */
322 /*---------------------------------------------------------------------*/
323 /*! \name Edit */
324 /*! \{ */
325 /*! \} */
326 /*---------------------------------------------------------------------*/
327 /*! \name Sync */
328 /*! \{ */
330 virtual void resolveLinks(void);
332 /*! \} */
333 /*========================== PRIVATE ================================*/
335 private:
336 /*---------------------------------------------------------------------*/
338 // prohibit default functions (move to 'public' if you need one)
339 void operator =(const InsertTestTaskBase &source);
342 typedef InsertTestTaskBase *InsertTestTaskBaseP;
344 OSG_END_NAMESPACE
346 #endif /* _OSGINSERTTESTTASKBASE_H_ */