fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Base / OSGFrameHandlerBase.h
blob7e02290f7f4463b902682cee4a5f07c9fc7907d2
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 FrameHandler
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGFRAMEHANDLERBASE_H_
55 #define _OSGFRAMEHANDLERBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachmentContainer.h" // Parent
68 #include "OSGSysFields.h" // FrameCount type
69 #include "OSGBaseFields.h" // StartTime type
71 #include "OSGFrameHandlerFields.h"
73 OSG_BEGIN_NAMESPACE
76 class FrameHandler;
78 //! \brief FrameHandler Base Class.
80 class OSG_DYNAMICS_DLLMAPPING FrameHandlerBase : public AttachmentContainer
82 public:
84 typedef AttachmentContainer Inherited;
85 typedef AttachmentContainer ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(FrameHandler);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 FrameCountFieldId = Inherited::NextFieldId,
99 StartTimeFieldId = FrameCountFieldId + 1,
100 LastTimeFieldId = StartTimeFieldId + 1,
101 CurrTimeFieldId = LastTimeFieldId + 1,
102 TimeStampFieldId = CurrTimeFieldId + 1,
103 TimeScaleFieldId = TimeStampFieldId + 1,
104 ConstantTimeStepFieldId = TimeScaleFieldId + 1,
105 ConstantTimeFieldId = ConstantTimeStepFieldId + 1,
106 PausedFieldId = ConstantTimeFieldId + 1,
107 NextFieldId = PausedFieldId + 1
110 static const OSG::BitVector FrameCountFieldMask =
111 (TypeTraits<BitVector>::One << FrameCountFieldId);
112 static const OSG::BitVector StartTimeFieldMask =
113 (TypeTraits<BitVector>::One << StartTimeFieldId);
114 static const OSG::BitVector LastTimeFieldMask =
115 (TypeTraits<BitVector>::One << LastTimeFieldId);
116 static const OSG::BitVector CurrTimeFieldMask =
117 (TypeTraits<BitVector>::One << CurrTimeFieldId);
118 static const OSG::BitVector TimeStampFieldMask =
119 (TypeTraits<BitVector>::One << TimeStampFieldId);
120 static const OSG::BitVector TimeScaleFieldMask =
121 (TypeTraits<BitVector>::One << TimeScaleFieldId);
122 static const OSG::BitVector ConstantTimeStepFieldMask =
123 (TypeTraits<BitVector>::One << ConstantTimeStepFieldId);
124 static const OSG::BitVector ConstantTimeFieldMask =
125 (TypeTraits<BitVector>::One << ConstantTimeFieldId);
126 static const OSG::BitVector PausedFieldMask =
127 (TypeTraits<BitVector>::One << PausedFieldId);
128 static const OSG::BitVector NextFieldMask =
129 (TypeTraits<BitVector>::One << NextFieldId);
131 typedef SFUInt64 SFFrameCountType;
132 typedef SFTime SFStartTimeType;
133 typedef SFTime SFLastTimeType;
134 typedef SFTime SFCurrTimeType;
135 typedef SFTime SFTimeStampType;
136 typedef SFTime SFTimeScaleType;
137 typedef SFTime SFConstantTimeStepType;
138 typedef SFBool SFConstantTimeType;
139 typedef SFBool SFPausedType;
141 /*---------------------------------------------------------------------*/
142 /*! \name Class Get */
143 /*! \{ */
145 static FieldContainerType &getClassType (void);
146 static UInt32 getClassTypeId (void);
147 static UInt16 getClassGroupId(void);
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name FieldContainer Get */
152 /*! \{ */
154 virtual FieldContainerType &getType (void);
155 virtual const FieldContainerType &getType (void) const;
157 virtual UInt32 getContainerSize(void) const;
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Get */
162 /*! \{ */
165 SFUInt64 *editSFFrameCount (void);
166 const SFUInt64 *getSFFrameCount (void) const;
168 SFTime *editSFStartTime (void);
169 const SFTime *getSFStartTime (void) const;
171 SFTime *editSFLastTime (void);
172 const SFTime *getSFLastTime (void) const;
174 SFTime *editSFCurrTime (void);
175 const SFTime *getSFCurrTime (void) const;
177 SFTime *editSFTimeStamp (void);
178 const SFTime *getSFTimeStamp (void) const;
180 SFTime *editSFTimeScale (void);
181 const SFTime *getSFTimeScale (void) const;
183 SFTime *editSFConstantTimeStep(void);
184 const SFTime *getSFConstantTimeStep (void) const;
186 SFBool *editSFConstantTime (void);
187 const SFBool *getSFConstantTime (void) const;
189 SFBool *editSFPaused (void);
190 const SFBool *getSFPaused (void) const;
193 UInt64 &editFrameCount (void);
194 UInt64 getFrameCount (void) const;
196 Time &editStartTime (void);
197 const Time &getStartTime (void) const;
199 Time &editLastTime (void);
200 const Time &getLastTime (void) const;
202 Time &editCurrTime (void);
203 const Time &getCurrTime (void) const;
205 Time &editTimeStamp (void);
206 const Time &getTimeStamp (void) const;
208 Time &editTimeScale (void);
209 const Time &getTimeScale (void) const;
211 Time &editConstantTimeStep(void);
212 const Time &getConstantTimeStep (void) const;
214 bool &editConstantTime (void);
215 bool getConstantTime (void) const;
217 bool &editPaused (void);
218 bool getPaused (void) const;
220 /*! \} */
221 /*---------------------------------------------------------------------*/
222 /*! \name Field Set */
223 /*! \{ */
225 void setFrameCount (const UInt64 value);
226 void setStartTime (const Time &value);
227 void setLastTime (const Time &value);
228 void setCurrTime (const Time &value);
229 void setTimeStamp (const Time &value);
230 void setTimeScale (const Time &value);
231 void setConstantTimeStep(const Time &value);
232 void setConstantTime (const bool value);
233 void setPaused (const bool value);
235 /*! \} */
236 /*---------------------------------------------------------------------*/
237 /*! \name Ptr MField Set */
238 /*! \{ */
240 /*! \} */
241 /*---------------------------------------------------------------------*/
242 /*! \name Binary Access */
243 /*! \{ */
245 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
246 virtual void copyToBin (BinaryDataHandler &pMem,
247 ConstFieldMaskArg whichField);
248 virtual void copyFromBin(BinaryDataHandler &pMem,
249 ConstFieldMaskArg whichField);
252 /*! \} */
253 /*---------------------------------------------------------------------*/
254 /*! \name Construction */
255 /*! \{ */
257 static FrameHandlerTransitPtr create (void);
258 static FrameHandler *createEmpty (void);
260 static FrameHandlerTransitPtr createLocal (
261 BitVector bFlags = FCLocal::All);
263 static FrameHandler *createEmptyLocal(
264 BitVector bFlags = FCLocal::All);
266 static FrameHandlerTransitPtr createDependent (BitVector bFlags);
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Copy */
271 /*! \{ */
273 virtual FieldContainerTransitPtr shallowCopy (void) const;
274 virtual FieldContainerTransitPtr shallowCopyLocal(
275 BitVector bFlags = FCLocal::All) const;
276 virtual FieldContainerTransitPtr shallowCopyDependent(
277 BitVector bFlags) const;
279 /*! \} */
280 /*========================= PROTECTED ===============================*/
282 protected:
284 static TypeObject _type;
286 static void classDescInserter(TypeObject &oType);
287 static const Char8 *getClassname (void );
289 /*---------------------------------------------------------------------*/
290 /*! \name Fields */
291 /*! \{ */
293 SFUInt64 _sfFrameCount;
294 SFTime _sfStartTime;
295 SFTime _sfLastTime;
296 SFTime _sfCurrTime;
297 SFTime _sfTimeStamp;
298 SFTime _sfTimeScale;
299 SFTime _sfConstantTimeStep;
300 SFBool _sfConstantTime;
301 SFBool _sfPaused;
303 /*! \} */
304 /*---------------------------------------------------------------------*/
305 /*! \name Constructors */
306 /*! \{ */
308 FrameHandlerBase(void);
309 FrameHandlerBase(const FrameHandlerBase &source);
311 /*! \} */
312 /*---------------------------------------------------------------------*/
313 /*! \name Destructors */
314 /*! \{ */
316 virtual ~FrameHandlerBase(void);
318 /*! \} */
319 /*---------------------------------------------------------------------*/
320 /*! \name onCreate */
321 /*! \{ */
324 /*! \} */
325 /*---------------------------------------------------------------------*/
326 /*! \name Generic Field Access */
327 /*! \{ */
329 GetFieldHandlePtr getHandleFrameCount (void) const;
330 EditFieldHandlePtr editHandleFrameCount (void);
331 GetFieldHandlePtr getHandleStartTime (void) const;
332 EditFieldHandlePtr editHandleStartTime (void);
333 GetFieldHandlePtr getHandleLastTime (void) const;
334 EditFieldHandlePtr editHandleLastTime (void);
335 GetFieldHandlePtr getHandleCurrTime (void) const;
336 EditFieldHandlePtr editHandleCurrTime (void);
337 GetFieldHandlePtr getHandleTimeStamp (void) const;
338 EditFieldHandlePtr editHandleTimeStamp (void);
339 GetFieldHandlePtr getHandleTimeScale (void) const;
340 EditFieldHandlePtr editHandleTimeScale (void);
341 GetFieldHandlePtr getHandleConstantTimeStep (void) const;
342 EditFieldHandlePtr editHandleConstantTimeStep(void);
343 GetFieldHandlePtr getHandleConstantTime (void) const;
344 EditFieldHandlePtr editHandleConstantTime (void);
345 GetFieldHandlePtr getHandlePaused (void) const;
346 EditFieldHandlePtr editHandlePaused (void);
348 /*! \} */
349 /*---------------------------------------------------------------------*/
350 /*! \name Sync */
351 /*! \{ */
353 #ifdef OSG_MT_CPTR_ASPECT
354 virtual void execSyncV( FieldContainer &oFrom,
355 ConstFieldMaskArg whichField,
356 AspectOffsetStore &oOffsets,
357 ConstFieldMaskArg syncMode ,
358 const UInt32 uiSyncInfo);
360 void execSync ( FrameHandlerBase *pFrom,
361 ConstFieldMaskArg whichField,
362 AspectOffsetStore &oOffsets,
363 ConstFieldMaskArg syncMode ,
364 const UInt32 uiSyncInfo);
365 #endif
367 /*! \} */
368 /*---------------------------------------------------------------------*/
369 /*! \name Edit */
370 /*! \{ */
372 /*! \} */
373 /*---------------------------------------------------------------------*/
374 /*! \name Aspect Create */
375 /*! \{ */
377 #ifdef OSG_MT_CPTR_ASPECT
378 virtual FieldContainer *createAspectCopy(
379 const FieldContainer *pRefAspect) const;
380 #endif
382 /*! \} */
383 /*---------------------------------------------------------------------*/
384 /*! \name Edit */
385 /*! \{ */
386 /*! \} */
387 /*---------------------------------------------------------------------*/
388 /*! \name Sync */
389 /*! \{ */
391 virtual void resolveLinks(void);
393 /*! \} */
394 /*========================== PRIVATE ================================*/
396 private:
397 /*---------------------------------------------------------------------*/
399 // prohibit default functions (move to 'public' if you need one)
400 void operator =(const FrameHandlerBase &source);
403 typedef FrameHandlerBase *FrameHandlerBaseP;
405 OSG_END_NAMESPACE
407 #endif /* _OSGFRAMEHANDLERBASE_H_ */