fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Base / OSGMultiCoreBase.h
blobb8d2997e7a1f1683df48bb7c44ee1fa8e00120f0
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 MultiCore
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGMULTICOREBASE_H_
55 #define _OSGMULTICOREBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGGroup.h" // Parent
68 #include "OSGNodeCoreFields.h" // Cores type
69 #include "OSGSysFields.h" // ExitOnSkip type
71 #include "OSGMultiCoreFields.h"
73 OSG_BEGIN_NAMESPACE
76 class MultiCore;
78 //! \brief MultiCore Base Class.
80 class OSG_SYSTEM_DLLMAPPING MultiCoreBase : public Group
82 public:
84 typedef Group Inherited;
85 typedef Group ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(MultiCore);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 CoresFieldId = Inherited::NextFieldId,
99 ExitOnSkipFieldId = CoresFieldId + 1,
100 NextFieldId = ExitOnSkipFieldId + 1
103 static const OSG::BitVector CoresFieldMask =
104 (TypeTraits<BitVector>::One << CoresFieldId);
105 static const OSG::BitVector ExitOnSkipFieldMask =
106 (TypeTraits<BitVector>::One << ExitOnSkipFieldId);
107 static const OSG::BitVector NextFieldMask =
108 (TypeTraits<BitVector>::One << NextFieldId);
110 typedef MFUnrecChildNodeCorePtr MFCoresType;
111 typedef SFBool SFExitOnSkipType;
113 /*---------------------------------------------------------------------*/
114 /*! \name Class Get */
115 /*! \{ */
117 static FieldContainerType &getClassType (void);
118 static UInt32 getClassTypeId (void);
119 static UInt16 getClassGroupId(void);
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name FieldContainer Get */
124 /*! \{ */
126 virtual FieldContainerType &getType (void);
127 virtual const FieldContainerType &getType (void) const;
129 virtual UInt32 getContainerSize(void) const;
131 /*! \} */
132 /*---------------------------------------------------------------------*/
133 /*! \name Field Get */
134 /*! \{ */
137 SFBool *editSFExitOnSkip (void);
138 const SFBool *getSFExitOnSkip (void) const;
141 bool &editExitOnSkip (void);
142 bool getExitOnSkip (void) const;
144 /*! \} */
145 /*---------------------------------------------------------------------*/
146 /*! \name Field Set */
147 /*! \{ */
149 void setExitOnSkip (const bool value);
151 /*! \} */
152 /*---------------------------------------------------------------------*/
153 /*! \name Ptr Field Set */
154 /*! \{ */
156 /*! \} */
157 /*---------------------------------------------------------------------*/
158 /*! \name Ptr MField Set */
159 /*! \{ */
161 /*! \} */
162 /*---------------------------------------------------------------------*/
163 /*! \name Binary Access */
164 /*! \{ */
166 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
167 virtual void copyToBin (BinaryDataHandler &pMem,
168 ConstFieldMaskArg whichField);
169 virtual void copyFromBin(BinaryDataHandler &pMem,
170 ConstFieldMaskArg whichField);
173 /*! \} */
174 /*---------------------------------------------------------------------*/
175 /*! \name Construction */
176 /*! \{ */
178 static MultiCoreTransitPtr create (void);
179 static MultiCore *createEmpty (void);
181 static MultiCoreTransitPtr createLocal (
182 BitVector bFlags = FCLocal::All);
184 static MultiCore *createEmptyLocal(
185 BitVector bFlags = FCLocal::All);
187 static MultiCoreTransitPtr createDependent (BitVector bFlags);
189 /*! \} */
190 /*---------------------------------------------------------------------*/
191 /*! \name Copy */
192 /*! \{ */
194 virtual FieldContainerTransitPtr shallowCopy (void) const;
195 virtual FieldContainerTransitPtr shallowCopyLocal(
196 BitVector bFlags = FCLocal::All) const;
197 virtual FieldContainerTransitPtr shallowCopyDependent(
198 BitVector bFlags) const;
200 /*! \} */
201 /*========================= PROTECTED ===============================*/
203 protected:
205 static TypeObject _type;
207 static void classDescInserter(TypeObject &oType);
208 static const Char8 *getClassname (void );
210 /*---------------------------------------------------------------------*/
211 /*! \name Fields */
212 /*! \{ */
214 MFUnrecChildNodeCorePtr _mfCores;
215 SFBool _sfExitOnSkip;
217 /*! \} */
218 /*---------------------------------------------------------------------*/
219 /*! \name Constructors */
220 /*! \{ */
222 MultiCoreBase(void);
223 MultiCoreBase(const MultiCoreBase &source);
225 /*! \} */
226 /*---------------------------------------------------------------------*/
227 /*! \name Destructors */
228 /*! \{ */
230 virtual ~MultiCoreBase(void);
232 /*! \} */
233 /*---------------------------------------------------------------------*/
234 /*! \name onCreate */
235 /*! \{ */
237 void onCreate(const MultiCore *source = NULL);
239 /*! \} */
240 /*---------------------------------------------------------------------*/
241 /*! \name Child linking */
242 /*! \{ */
244 virtual bool unlinkChild(FieldContainer * const pChild,
245 UInt16 const childFieldId);
247 /*! \} */
248 /*---------------------------------------------------------------------*/
249 /*! \name Generic Field Access */
250 /*! \{ */
252 GetFieldHandlePtr getHandleCores (void) const;
253 EditFieldHandlePtr editHandleCores (void);
254 GetFieldHandlePtr getHandleExitOnSkip (void) const;
255 EditFieldHandlePtr editHandleExitOnSkip (void);
257 /*! \} */
258 /*---------------------------------------------------------------------*/
259 /*! \name Field Get */
260 /*! \{ */
262 const MFUnrecChildNodeCorePtr *getMFCores (void) const;
263 MFUnrecChildNodeCorePtr *editMFCores (void);
266 NodeCore * getCores (const UInt32 index) const;
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Field Set */
271 /*! \{ */
274 /*! \} */
275 /*---------------------------------------------------------------------*/
276 /*! \name Ptr MField Set */
277 /*! \{ */
279 void addCore (NodeCore * const value );
280 void assignCoresFrom (const MFUnrecChildNodeCorePtr &value);
281 void subCore (UInt32 uiIndex );
282 void subCoreByObj (NodeCore * const value );
283 void clearCores (void );
285 /*! \} */
286 /*---------------------------------------------------------------------*/
287 /*! \name Sync */
288 /*! \{ */
290 #ifdef OSG_MT_CPTR_ASPECT
291 virtual void execSyncV( FieldContainer &oFrom,
292 ConstFieldMaskArg whichField,
293 AspectOffsetStore &oOffsets,
294 ConstFieldMaskArg syncMode ,
295 const UInt32 uiSyncInfo);
297 void execSync ( MultiCoreBase *pFrom,
298 ConstFieldMaskArg whichField,
299 AspectOffsetStore &oOffsets,
300 ConstFieldMaskArg syncMode ,
301 const UInt32 uiSyncInfo);
302 #endif
304 /*! \} */
305 /*---------------------------------------------------------------------*/
306 /*! \name Edit */
307 /*! \{ */
309 /*! \} */
310 /*---------------------------------------------------------------------*/
311 /*! \name Aspect Create */
312 /*! \{ */
314 #ifdef OSG_MT_CPTR_ASPECT
315 virtual FieldContainer *createAspectCopy(
316 const FieldContainer *pRefAspect) const;
317 #endif
319 /*! \} */
320 /*---------------------------------------------------------------------*/
321 /*! \name Edit */
322 /*! \{ */
323 /*! \} */
324 /*---------------------------------------------------------------------*/
325 /*! \name Sync */
326 /*! \{ */
328 virtual void resolveLinks(void);
330 /*! \} */
331 /*========================== PRIVATE ================================*/
333 private:
334 /*---------------------------------------------------------------------*/
336 // prohibit default functions (move to 'public' if you need one)
337 void operator =(const MultiCoreBase &source);
340 typedef MultiCoreBase *MultiCoreBaseP;
342 OSG_END_NAMESPACE
344 #endif /* _OSGMULTICOREBASE_H_ */