fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Misc / OSGStackedTransformBase.h
blob7a6530fa6f40ee0ddfeea74e186d95768556979d
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 StackedTransform
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSTACKEDTRANSFORMBASE_H_
55 #define _OSGSTACKEDTRANSFORMBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
72 OSG_BEGIN_NAMESPACE
75 class StackedTransform;
77 //! \brief StackedTransform Base Class.
79 class OSG_GROUP_DLLMAPPING StackedTransformBase : public Group
81 public:
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 =================================*/
93 public:
95 enum
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 */
110 /*! \{ */
112 static FieldContainerType &getClassType (void);
113 static UInt32 getClassTypeId (void);
114 static UInt16 getClassGroupId(void);
116 /*! \} */
117 /*---------------------------------------------------------------------*/
118 /*! \name FieldContainer Get */
119 /*! \{ */
121 virtual FieldContainerType &getType (void);
122 virtual const FieldContainerType &getType (void) const;
124 virtual UInt32 getContainerSize(void) const;
126 /*! \} */
127 /*---------------------------------------------------------------------*/
128 /*! \name Field Get */
129 /*! \{ */
131 const MFUnrecChildTransformationElementPtr *getMFTransformElements(void) const;
134 TransformationElement * getTransformElements(const UInt32 index) const;
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Field Set */
139 /*! \{ */
142 /*! \} */
143 /*---------------------------------------------------------------------*/
144 /*! \name Ptr Field Set */
145 /*! \{ */
147 /*! \} */
148 /*---------------------------------------------------------------------*/
149 /*! \name Ptr MField Set */
150 /*! \{ */
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 );
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Binary Access */
167 /*! \{ */
169 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
170 virtual void copyToBin (BinaryDataHandler &pMem,
171 ConstFieldMaskArg whichField);
172 virtual void copyFromBin(BinaryDataHandler &pMem,
173 ConstFieldMaskArg whichField);
176 /*! \} */
177 /*---------------------------------------------------------------------*/
178 /*! \name Construction */
179 /*! \{ */
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);
192 /*! \} */
193 /*---------------------------------------------------------------------*/
194 /*! \name Copy */
195 /*! \{ */
197 virtual FieldContainerTransitPtr shallowCopy (void) const;
198 virtual FieldContainerTransitPtr shallowCopyLocal(
199 BitVector bFlags = FCLocal::All) const;
200 virtual FieldContainerTransitPtr shallowCopyDependent(
201 BitVector bFlags) const;
203 /*! \} */
204 /*========================= PROTECTED ===============================*/
206 protected:
208 static TypeObject _type;
210 static void classDescInserter(TypeObject &oType);
211 static const Char8 *getClassname (void );
213 /*---------------------------------------------------------------------*/
214 /*! \name Fields */
215 /*! \{ */
217 MFUnrecChildTransformationElementPtr _mfTransformElements;
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Constructors */
222 /*! \{ */
224 StackedTransformBase(void);
225 StackedTransformBase(const StackedTransformBase &source);
227 /*! \} */
228 /*---------------------------------------------------------------------*/
229 /*! \name Destructors */
230 /*! \{ */
232 virtual ~StackedTransformBase(void);
234 /*! \} */
235 /*---------------------------------------------------------------------*/
236 /*! \name onCreate */
237 /*! \{ */
239 void onCreate(const StackedTransform *source = NULL);
241 /*! \} */
242 /*---------------------------------------------------------------------*/
243 /*! \name Child linking */
244 /*! \{ */
246 virtual bool unlinkChild(FieldContainer * const pChild,
247 UInt16 const childFieldId);
249 /*! \} */
250 /*---------------------------------------------------------------------*/
251 /*! \name Generic Field Access */
252 /*! \{ */
254 GetFieldHandlePtr getHandleTransformElements (void) const;
255 EditFieldHandlePtr editHandleTransformElements(void);
257 /*! \} */
258 /*---------------------------------------------------------------------*/
259 /*! \name Sync */
260 /*! \{ */
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);
274 #endif
276 /*! \} */
277 /*---------------------------------------------------------------------*/
278 /*! \name Edit */
279 /*! \{ */
281 /*! \} */
282 /*---------------------------------------------------------------------*/
283 /*! \name Aspect Create */
284 /*! \{ */
286 #ifdef OSG_MT_CPTR_ASPECT
287 virtual FieldContainer *createAspectCopy(
288 const FieldContainer *pRefAspect) const;
289 #endif
291 /*! \} */
292 /*---------------------------------------------------------------------*/
293 /*! \name Edit */
294 /*! \{ */
295 /*! \} */
296 /*---------------------------------------------------------------------*/
297 /*! \name Sync */
298 /*! \{ */
300 virtual void resolveLinks(void);
302 /*! \} */
303 /*========================== PRIVATE ================================*/
305 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;
317 OSG_END_NAMESPACE
319 #endif /* _OSGSTACKEDTRANSFORMBASE_H_ */