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 **
48 ** class StackedTransform
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSTACKEDTRANSFORMBASE_H_
55 #define _OSGSTACKEDTRANSFORMBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGGroup.h" // Parent
68 #include "OSGTransformationElementFields.h" // TransformElements type
70 #include "OSGStackedTransformFields.h"
75 class StackedTransform
;
77 //! \brief StackedTransform Base Class.
79 class OSG_GROUP_DLLMAPPING StackedTransformBase
: public Group
83 typedef Group Inherited
;
84 typedef Group ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(StackedTransform
);
91 /*========================== PUBLIC =================================*/
97 TransformElementsFieldId
= Inherited::NextFieldId
,
98 NextFieldId
= TransformElementsFieldId
+ 1
101 static const OSG::BitVector TransformElementsFieldMask
=
102 (TypeTraits
<BitVector
>::One
<< TransformElementsFieldId
);
103 static const OSG::BitVector NextFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
106 typedef MFUnrecChildTransformationElementPtr MFTransformElementsType
;
108 /*---------------------------------------------------------------------*/
109 /*! \name Class Get */
112 static FieldContainerType
&getClassType (void);
113 static UInt32
getClassTypeId (void);
114 static UInt16
getClassGroupId(void);
117 /*---------------------------------------------------------------------*/
118 /*! \name FieldContainer Get */
121 virtual FieldContainerType
&getType (void);
122 virtual const FieldContainerType
&getType (void) const;
124 virtual UInt32
getContainerSize(void) const;
127 /*---------------------------------------------------------------------*/
128 /*! \name Field Get */
131 const MFUnrecChildTransformationElementPtr
*getMFTransformElements(void) const;
134 TransformationElement
* getTransformElements(const UInt32 index
) const;
137 /*---------------------------------------------------------------------*/
138 /*! \name Field Set */
143 /*---------------------------------------------------------------------*/
144 /*! \name Ptr Field Set */
148 /*---------------------------------------------------------------------*/
149 /*! \name Ptr MField Set */
152 void pushToTransformElements (TransformationElement
* const value
);
153 void assignTransformElements (const MFUnrecChildTransformationElementPtr
&value
);
154 void clearTransformElements (void );
155 void insertIntoTransformElements (UInt32 uiIndex
,
156 TransformationElement
* const value
);
157 void replaceInTransformElements ( UInt32 uiIndex
,
158 TransformationElement
* const value
);
159 void replaceObjInTransformElements (TransformationElement
* const pOldElem
,
160 TransformationElement
* const pNewElem
);
161 void removeFromTransformElements (UInt32 uiIndex
);
162 void removeObjFromTransformElements(TransformationElement
* const value
);
165 /*---------------------------------------------------------------------*/
166 /*! \name Binary Access */
169 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
170 virtual void copyToBin (BinaryDataHandler
&pMem
,
171 ConstFieldMaskArg whichField
);
172 virtual void copyFromBin(BinaryDataHandler
&pMem
,
173 ConstFieldMaskArg whichField
);
177 /*---------------------------------------------------------------------*/
178 /*! \name Construction */
181 static StackedTransformTransitPtr
create (void);
182 static StackedTransform
*createEmpty (void);
184 static StackedTransformTransitPtr
createLocal (
185 BitVector bFlags
= FCLocal::All
);
187 static StackedTransform
*createEmptyLocal(
188 BitVector bFlags
= FCLocal::All
);
190 static StackedTransformTransitPtr
createDependent (BitVector bFlags
);
193 /*---------------------------------------------------------------------*/
197 virtual FieldContainerTransitPtr
shallowCopy (void) const;
198 virtual FieldContainerTransitPtr
shallowCopyLocal(
199 BitVector bFlags
= FCLocal::All
) const;
200 virtual FieldContainerTransitPtr
shallowCopyDependent(
201 BitVector bFlags
) const;
204 /*========================= PROTECTED ===============================*/
208 static TypeObject _type
;
210 static void classDescInserter(TypeObject
&oType
);
211 static const Char8
*getClassname (void );
213 /*---------------------------------------------------------------------*/
217 MFUnrecChildTransformationElementPtr _mfTransformElements
;
220 /*---------------------------------------------------------------------*/
221 /*! \name Constructors */
224 StackedTransformBase(void);
225 StackedTransformBase(const StackedTransformBase
&source
);
228 /*---------------------------------------------------------------------*/
229 /*! \name Destructors */
232 virtual ~StackedTransformBase(void);
235 /*---------------------------------------------------------------------*/
236 /*! \name onCreate */
239 void onCreate(const StackedTransform
*source
= NULL
);
242 /*---------------------------------------------------------------------*/
243 /*! \name Child linking */
246 virtual bool unlinkChild(FieldContainer
* const pChild
,
247 UInt16
const childFieldId
);
250 /*---------------------------------------------------------------------*/
251 /*! \name Generic Field Access */
254 GetFieldHandlePtr
getHandleTransformElements (void) const;
255 EditFieldHandlePtr
editHandleTransformElements(void);
258 /*---------------------------------------------------------------------*/
262 #ifdef OSG_MT_CPTR_ASPECT
263 virtual void execSyncV( FieldContainer
&oFrom
,
264 ConstFieldMaskArg whichField
,
265 AspectOffsetStore
&oOffsets
,
266 ConstFieldMaskArg syncMode
,
267 const UInt32 uiSyncInfo
);
269 void execSync ( StackedTransformBase
*pFrom
,
270 ConstFieldMaskArg whichField
,
271 AspectOffsetStore
&oOffsets
,
272 ConstFieldMaskArg syncMode
,
273 const UInt32 uiSyncInfo
);
277 /*---------------------------------------------------------------------*/
282 /*---------------------------------------------------------------------*/
283 /*! \name Aspect Create */
286 #ifdef OSG_MT_CPTR_ASPECT
287 virtual FieldContainer
*createAspectCopy(
288 const FieldContainer
*pRefAspect
) const;
292 /*---------------------------------------------------------------------*/
296 /*---------------------------------------------------------------------*/
300 virtual void resolveLinks(void);
303 /*========================== PRIVATE ================================*/
306 /*---------------------------------------------------------------------*/
308 // prohibit default functions (move to 'public' if you need one)
309 void operator =(const StackedTransformBase
&source
);
312 typedef StackedTransformBase
*StackedTransformBaseP
;
314 typedef CoredNodeRefPtr
<StackedTransform
> StackedTransformNodeRefPtr
;
315 typedef CoredNodeMTRefPtr
<StackedTransform
> StackedTransformNodeMTRefPtr
;
319 #endif /* _OSGSTACKEDTRANSFORMBASE_H_ */