fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGComplexSceneManagerBase.h
blob1fc77ab55e683e4400e36594c2960ca2c3ed539f
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 ComplexSceneManager
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCOMPLEXSCENEMANAGERBASE_H_
55 #define _OSGCOMPLEXSCENEMANAGERBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGFieldContainer.h" // Parent
68 #include "OSGFieldContainerFields.h" // Globals type
69 #include "OSGCSMDrawManagerFields.h" // DrawManager type
70 #include "OSGBaseFields.h" // StartTime type
71 #include "OSGSysFields.h" // ConstantTime type
73 #include "OSGComplexSceneManagerFields.h"
75 OSG_BEGIN_NAMESPACE
78 class ComplexSceneManager;
80 //! \brief ComplexSceneManager Base Class.
82 class OSG_CONTRIBCSM_DLLMAPPING ComplexSceneManagerBase : public FieldContainer
84 public:
86 typedef FieldContainer Inherited;
87 typedef FieldContainer ParentContainer;
89 typedef Inherited::TypeObject TypeObject;
90 typedef TypeObject::InitPhase InitPhase;
92 OSG_GEN_INTERNALPTR(ComplexSceneManager);
94 /*========================== PUBLIC =================================*/
96 public:
98 enum
100 GlobalsFieldId = Inherited::NextFieldId,
101 DrawManagerFieldId = GlobalsFieldId + 1,
102 StartTimeFieldId = DrawManagerFieldId + 1,
103 TimeScaleFieldId = StartTimeFieldId + 1,
104 ConstantTimeStepFieldId = TimeScaleFieldId + 1,
105 ConstantTimeFieldId = ConstantTimeStepFieldId + 1,
106 PausedFieldId = ConstantTimeFieldId + 1,
107 DumpFrameStartFieldId = PausedFieldId + 1,
108 EnableWebServiceFieldId = DumpFrameStartFieldId + 1,
109 WebServicePortFieldId = EnableWebServiceFieldId + 1,
110 WebServiceRootFieldId = WebServicePortFieldId + 1,
111 WaitKeyAfterFrameFieldId = WebServiceRootFieldId + 1,
112 NextFieldId = WaitKeyAfterFrameFieldId + 1
115 static const OSG::BitVector GlobalsFieldMask =
116 (TypeTraits<BitVector>::One << GlobalsFieldId);
117 static const OSG::BitVector DrawManagerFieldMask =
118 (TypeTraits<BitVector>::One << DrawManagerFieldId);
119 static const OSG::BitVector StartTimeFieldMask =
120 (TypeTraits<BitVector>::One << StartTimeFieldId);
121 static const OSG::BitVector TimeScaleFieldMask =
122 (TypeTraits<BitVector>::One << TimeScaleFieldId);
123 static const OSG::BitVector ConstantTimeStepFieldMask =
124 (TypeTraits<BitVector>::One << ConstantTimeStepFieldId);
125 static const OSG::BitVector ConstantTimeFieldMask =
126 (TypeTraits<BitVector>::One << ConstantTimeFieldId);
127 static const OSG::BitVector PausedFieldMask =
128 (TypeTraits<BitVector>::One << PausedFieldId);
129 static const OSG::BitVector DumpFrameStartFieldMask =
130 (TypeTraits<BitVector>::One << DumpFrameStartFieldId);
131 static const OSG::BitVector EnableWebServiceFieldMask =
132 (TypeTraits<BitVector>::One << EnableWebServiceFieldId);
133 static const OSG::BitVector WebServicePortFieldMask =
134 (TypeTraits<BitVector>::One << WebServicePortFieldId);
135 static const OSG::BitVector WebServiceRootFieldMask =
136 (TypeTraits<BitVector>::One << WebServiceRootFieldId);
137 static const OSG::BitVector WaitKeyAfterFrameFieldMask =
138 (TypeTraits<BitVector>::One << WaitKeyAfterFrameFieldId);
139 static const OSG::BitVector NextFieldMask =
140 (TypeTraits<BitVector>::One << NextFieldId);
142 typedef MFRecFieldContainerPtr MFGlobalsType;
143 typedef SFUnrecCSMDrawManagerPtr SFDrawManagerType;
144 typedef SFTime SFStartTimeType;
145 typedef SFTime SFTimeScaleType;
146 typedef SFTime SFConstantTimeStepType;
147 typedef SFBool SFConstantTimeType;
148 typedef SFBool SFPausedType;
149 typedef SFBool SFDumpFrameStartType;
150 typedef SFBool SFEnableWebServiceType;
151 typedef SFUInt32 SFWebServicePortType;
152 typedef SFString SFWebServiceRootType;
153 typedef SFBool SFWaitKeyAfterFrameType;
155 /*---------------------------------------------------------------------*/
156 /*! \name Class Get */
157 /*! \{ */
159 static FieldContainerType &getClassType (void);
160 static UInt32 getClassTypeId (void);
161 static UInt16 getClassGroupId(void);
163 /*! \} */
164 /*---------------------------------------------------------------------*/
165 /*! \name FieldContainer Get */
166 /*! \{ */
168 virtual FieldContainerType &getType (void);
169 virtual const FieldContainerType &getType (void) const;
171 virtual UInt32 getContainerSize(void) const;
173 /*! \} */
174 /*---------------------------------------------------------------------*/
175 /*! \name Field Get */
176 /*! \{ */
178 const MFRecFieldContainerPtr *getMFGlobals (void) const;
179 MFRecFieldContainerPtr *editMFGlobals (void);
180 const SFUnrecCSMDrawManagerPtr *getSFDrawManager (void) const;
181 SFUnrecCSMDrawManagerPtr *editSFDrawManager (void);
183 SFTime *editSFStartTime (void);
184 const SFTime *getSFStartTime (void) const;
186 SFTime *editSFTimeScale (void);
187 const SFTime *getSFTimeScale (void) const;
189 SFTime *editSFConstantTimeStep(void);
190 const SFTime *getSFConstantTimeStep (void) const;
192 SFBool *editSFConstantTime (void);
193 const SFBool *getSFConstantTime (void) const;
195 SFBool *editSFPaused (void);
196 const SFBool *getSFPaused (void) const;
198 SFBool *editSFDumpFrameStart (void);
199 const SFBool *getSFDumpFrameStart (void) const;
201 SFBool *editSFEnableWebService(void);
202 const SFBool *getSFEnableWebService (void) const;
204 SFUInt32 *editSFWebServicePort (void);
205 const SFUInt32 *getSFWebServicePort (void) const;
207 SFString *editSFWebServiceRoot (void);
208 const SFString *getSFWebServiceRoot (void) const;
210 SFBool *editSFWaitKeyAfterFrame(void);
211 const SFBool *getSFWaitKeyAfterFrame (void) const;
214 FieldContainer * getGlobals (const UInt32 index) const;
216 CSMDrawManager * getDrawManager (void) const;
218 Time &editStartTime (void);
219 const Time &getStartTime (void) const;
221 Time &editTimeScale (void);
222 const Time &getTimeScale (void) const;
224 Time &editConstantTimeStep(void);
225 const Time &getConstantTimeStep (void) const;
227 bool &editConstantTime (void);
228 bool getConstantTime (void) const;
230 bool &editPaused (void);
231 bool getPaused (void) const;
233 bool &editDumpFrameStart (void);
234 bool getDumpFrameStart (void) const;
236 bool &editEnableWebService(void);
237 bool getEnableWebService (void) const;
239 UInt32 &editWebServicePort (void);
240 UInt32 getWebServicePort (void) const;
242 std::string &editWebServiceRoot (void);
243 const std::string &getWebServiceRoot (void) const;
245 bool &editWaitKeyAfterFrame(void);
246 bool getWaitKeyAfterFrame (void) const;
248 /*! \} */
249 /*---------------------------------------------------------------------*/
250 /*! \name Field Set */
251 /*! \{ */
253 void setDrawManager (CSMDrawManager * const value);
254 void setStartTime (const Time &value);
255 void setTimeScale (const Time &value);
256 void setConstantTimeStep(const Time &value);
257 void setConstantTime (const bool value);
258 void setPaused (const bool value);
259 void setDumpFrameStart (const bool value);
260 void setEnableWebService(const bool value);
261 void setWebServicePort (const UInt32 value);
262 void setWebServiceRoot (const std::string &value);
263 void setWaitKeyAfterFrame(const bool value);
265 /*! \} */
266 /*---------------------------------------------------------------------*/
267 /*! \name Ptr Field Set */
268 /*! \{ */
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name Ptr MField Set */
273 /*! \{ */
275 void pushToGlobals (FieldContainer * const value );
276 void assignGlobals (const MFRecFieldContainerPtr &value);
277 void removeFromGlobals (UInt32 uiIndex );
278 void removeObjFromGlobals(FieldContainer * const value );
279 void clearGlobals (void );
281 /*! \} */
282 /*---------------------------------------------------------------------*/
283 /*! \name Binary Access */
284 /*! \{ */
286 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
287 virtual void copyToBin (BinaryDataHandler &pMem,
288 ConstFieldMaskArg whichField);
289 virtual void copyFromBin(BinaryDataHandler &pMem,
290 ConstFieldMaskArg whichField);
293 /*! \} */
294 /*---------------------------------------------------------------------*/
295 /*! \name Construction */
296 /*! \{ */
298 static ComplexSceneManagerTransitPtr create (void);
299 static ComplexSceneManager *createEmpty (void);
301 static ComplexSceneManagerTransitPtr createLocal (
302 BitVector bFlags = FCLocal::All);
304 static ComplexSceneManager *createEmptyLocal(
305 BitVector bFlags = FCLocal::All);
307 static ComplexSceneManagerTransitPtr createDependent (BitVector bFlags);
309 /*! \} */
310 /*---------------------------------------------------------------------*/
311 /*! \name Copy */
312 /*! \{ */
314 virtual FieldContainerTransitPtr shallowCopy (void) const;
315 virtual FieldContainerTransitPtr shallowCopyLocal(
316 BitVector bFlags = FCLocal::All) const;
317 virtual FieldContainerTransitPtr shallowCopyDependent(
318 BitVector bFlags) const;
320 /*! \} */
321 /*========================= PROTECTED ===============================*/
323 protected:
325 static TypeObject _type;
327 static void classDescInserter(TypeObject &oType);
328 static const Char8 *getClassname (void );
330 /*---------------------------------------------------------------------*/
331 /*! \name Fields */
332 /*! \{ */
334 MFRecFieldContainerPtr _mfGlobals;
335 SFUnrecCSMDrawManagerPtr _sfDrawManager;
336 SFTime _sfStartTime;
337 SFTime _sfTimeScale;
338 SFTime _sfConstantTimeStep;
339 SFBool _sfConstantTime;
340 SFBool _sfPaused;
341 SFBool _sfDumpFrameStart;
342 SFBool _sfEnableWebService;
343 SFUInt32 _sfWebServicePort;
344 SFString _sfWebServiceRoot;
345 SFBool _sfWaitKeyAfterFrame;
347 /*! \} */
348 /*---------------------------------------------------------------------*/
349 /*! \name Constructors */
350 /*! \{ */
352 ComplexSceneManagerBase(void);
353 ComplexSceneManagerBase(const ComplexSceneManagerBase &source);
355 /*! \} */
356 /*---------------------------------------------------------------------*/
357 /*! \name Destructors */
358 /*! \{ */
360 virtual ~ComplexSceneManagerBase(void);
362 /*! \} */
363 /*---------------------------------------------------------------------*/
364 /*! \name onCreate */
365 /*! \{ */
367 void onCreate(const ComplexSceneManager *source = NULL);
369 /*! \} */
370 /*---------------------------------------------------------------------*/
371 /*! \name Generic Field Access */
372 /*! \{ */
374 GetFieldHandlePtr getHandleGlobals (void) const;
375 EditFieldHandlePtr editHandleGlobals (void);
376 GetFieldHandlePtr getHandleDrawManager (void) const;
377 EditFieldHandlePtr editHandleDrawManager (void);
378 GetFieldHandlePtr getHandleStartTime (void) const;
379 EditFieldHandlePtr editHandleStartTime (void);
380 GetFieldHandlePtr getHandleTimeScale (void) const;
381 EditFieldHandlePtr editHandleTimeScale (void);
382 GetFieldHandlePtr getHandleConstantTimeStep (void) const;
383 EditFieldHandlePtr editHandleConstantTimeStep(void);
384 GetFieldHandlePtr getHandleConstantTime (void) const;
385 EditFieldHandlePtr editHandleConstantTime (void);
386 GetFieldHandlePtr getHandlePaused (void) const;
387 EditFieldHandlePtr editHandlePaused (void);
388 GetFieldHandlePtr getHandleDumpFrameStart (void) const;
389 EditFieldHandlePtr editHandleDumpFrameStart (void);
390 GetFieldHandlePtr getHandleEnableWebService (void) const;
391 EditFieldHandlePtr editHandleEnableWebService(void);
392 GetFieldHandlePtr getHandleWebServicePort (void) const;
393 EditFieldHandlePtr editHandleWebServicePort (void);
394 GetFieldHandlePtr getHandleWebServiceRoot (void) const;
395 EditFieldHandlePtr editHandleWebServiceRoot (void);
396 GetFieldHandlePtr getHandleWaitKeyAfterFrame (void) const;
397 EditFieldHandlePtr editHandleWaitKeyAfterFrame(void);
399 /*! \} */
400 /*---------------------------------------------------------------------*/
401 /*! \name Sync */
402 /*! \{ */
404 #ifdef OSG_MT_CPTR_ASPECT
405 virtual void execSyncV( FieldContainer &oFrom,
406 ConstFieldMaskArg whichField,
407 AspectOffsetStore &oOffsets,
408 ConstFieldMaskArg syncMode ,
409 const UInt32 uiSyncInfo);
411 void execSync ( ComplexSceneManagerBase *pFrom,
412 ConstFieldMaskArg whichField,
413 AspectOffsetStore &oOffsets,
414 ConstFieldMaskArg syncMode ,
415 const UInt32 uiSyncInfo);
416 #endif
418 /*! \} */
419 /*---------------------------------------------------------------------*/
420 /*! \name Edit */
421 /*! \{ */
423 /*! \} */
424 /*---------------------------------------------------------------------*/
425 /*! \name Aspect Create */
426 /*! \{ */
428 #ifdef OSG_MT_CPTR_ASPECT
429 virtual FieldContainer *createAspectCopy(
430 const FieldContainer *pRefAspect) const;
431 #endif
433 /*! \} */
434 /*---------------------------------------------------------------------*/
435 /*! \name Edit */
436 /*! \{ */
437 /*! \} */
438 /*---------------------------------------------------------------------*/
439 /*! \name Sync */
440 /*! \{ */
442 virtual void resolveLinks(void);
444 /*! \} */
445 /*========================== PRIVATE ================================*/
447 private:
448 /*---------------------------------------------------------------------*/
450 // prohibit default functions (move to 'public' if you need one)
451 void operator =(const ComplexSceneManagerBase &source);
454 typedef ComplexSceneManagerBase *ComplexSceneManagerBaseP;
456 OSG_END_NAMESPACE
458 #endif /* _OSGCOMPLEXSCENEMANAGERBASE_H_ */