1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGFRAMEHANDLERBASE_H_
55 #define _OSGFRAMEHANDLERBASE_H_
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"
78 //! \brief FrameHandler Base Class.
80 class OSG_DYNAMICS_DLLMAPPING FrameHandlerBase
: public AttachmentContainer
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 =================================*/
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 */
145 static FieldContainerType
&getClassType (void);
146 static UInt32
getClassTypeId (void);
147 static UInt16
getClassGroupId(void);
150 /*---------------------------------------------------------------------*/
151 /*! \name FieldContainer Get */
154 virtual FieldContainerType
&getType (void);
155 virtual const FieldContainerType
&getType (void) const;
157 virtual UInt32
getContainerSize(void) const;
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Get */
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;
221 /*---------------------------------------------------------------------*/
222 /*! \name Field Set */
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
);
236 /*---------------------------------------------------------------------*/
237 /*! \name Ptr MField Set */
241 /*---------------------------------------------------------------------*/
242 /*! \name Binary Access */
245 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
246 virtual void copyToBin (BinaryDataHandler
&pMem
,
247 ConstFieldMaskArg whichField
);
248 virtual void copyFromBin(BinaryDataHandler
&pMem
,
249 ConstFieldMaskArg whichField
);
253 /*---------------------------------------------------------------------*/
254 /*! \name Construction */
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
);
269 /*---------------------------------------------------------------------*/
273 virtual FieldContainerTransitPtr
shallowCopy (void) const;
274 virtual FieldContainerTransitPtr
shallowCopyLocal(
275 BitVector bFlags
= FCLocal::All
) const;
276 virtual FieldContainerTransitPtr
shallowCopyDependent(
277 BitVector bFlags
) const;
280 /*========================= PROTECTED ===============================*/
284 static TypeObject _type
;
286 static void classDescInserter(TypeObject
&oType
);
287 static const Char8
*getClassname (void );
289 /*---------------------------------------------------------------------*/
293 SFUInt64 _sfFrameCount
;
299 SFTime _sfConstantTimeStep
;
300 SFBool _sfConstantTime
;
304 /*---------------------------------------------------------------------*/
305 /*! \name Constructors */
308 FrameHandlerBase(void);
309 FrameHandlerBase(const FrameHandlerBase
&source
);
312 /*---------------------------------------------------------------------*/
313 /*! \name Destructors */
316 virtual ~FrameHandlerBase(void);
319 /*---------------------------------------------------------------------*/
320 /*! \name onCreate */
325 /*---------------------------------------------------------------------*/
326 /*! \name Generic Field Access */
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);
349 /*---------------------------------------------------------------------*/
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
);
368 /*---------------------------------------------------------------------*/
373 /*---------------------------------------------------------------------*/
374 /*! \name Aspect Create */
377 #ifdef OSG_MT_CPTR_ASPECT
378 virtual FieldContainer
*createAspectCopy(
379 const FieldContainer
*pRefAspect
) const;
383 /*---------------------------------------------------------------------*/
387 /*---------------------------------------------------------------------*/
391 virtual void resolveLinks(void);
394 /*========================== PRIVATE ================================*/
397 /*---------------------------------------------------------------------*/
399 // prohibit default functions (move to 'public' if you need one)
400 void operator =(const FrameHandlerBase
&source
);
403 typedef FrameHandlerBase
*FrameHandlerBaseP
;
407 #endif /* _OSGFRAMEHANDLERBASE_H_ */