fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Misc / OSGProxyGroupBase.h
bloba32b3930ce30ace32ae3e61137d1133382877b25
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 ProxyGroup
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGPROXYGROUPBASE_H_
55 #define _OSGPROXYGROUPBASE_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 "OSGSysFields.h" // Enabled type
69 #include "OSGBaseFields.h" // Url type
70 #include "OSGNodeFields.h" // Root type
72 #include "OSGProxyGroupFields.h"
74 OSG_BEGIN_NAMESPACE
77 class ProxyGroup;
79 //! \brief ProxyGroup Base Class.
81 class OSG_GROUP_DLLMAPPING ProxyGroupBase : public Group
83 public:
85 typedef Group Inherited;
86 typedef Group ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(ProxyGroup);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 EnabledFieldId = Inherited::NextFieldId,
100 UrlFieldId = EnabledFieldId + 1,
101 RootFieldId = UrlFieldId + 1,
102 StateFieldId = RootFieldId + 1,
103 ConcurrentLoadFieldId = StateFieldId + 1,
104 VolumeFieldId = ConcurrentLoadFieldId + 1,
105 IndicesFieldId = VolumeFieldId + 1,
106 TrianglesFieldId = IndicesFieldId + 1,
107 PositionsFieldId = TrianglesFieldId + 1,
108 GeometriesFieldId = PositionsFieldId + 1,
109 AbsoluteUrlFieldId = GeometriesFieldId + 1,
110 InlineFieldId = AbsoluteUrlFieldId + 1,
111 NextFieldId = InlineFieldId + 1
114 static const OSG::BitVector EnabledFieldMask =
115 (TypeTraits<BitVector>::One << EnabledFieldId);
116 static const OSG::BitVector UrlFieldMask =
117 (TypeTraits<BitVector>::One << UrlFieldId);
118 static const OSG::BitVector RootFieldMask =
119 (TypeTraits<BitVector>::One << RootFieldId);
120 static const OSG::BitVector StateFieldMask =
121 (TypeTraits<BitVector>::One << StateFieldId);
122 static const OSG::BitVector ConcurrentLoadFieldMask =
123 (TypeTraits<BitVector>::One << ConcurrentLoadFieldId);
124 static const OSG::BitVector VolumeFieldMask =
125 (TypeTraits<BitVector>::One << VolumeFieldId);
126 static const OSG::BitVector IndicesFieldMask =
127 (TypeTraits<BitVector>::One << IndicesFieldId);
128 static const OSG::BitVector TrianglesFieldMask =
129 (TypeTraits<BitVector>::One << TrianglesFieldId);
130 static const OSG::BitVector PositionsFieldMask =
131 (TypeTraits<BitVector>::One << PositionsFieldId);
132 static const OSG::BitVector GeometriesFieldMask =
133 (TypeTraits<BitVector>::One << GeometriesFieldId);
134 static const OSG::BitVector AbsoluteUrlFieldMask =
135 (TypeTraits<BitVector>::One << AbsoluteUrlFieldId);
136 static const OSG::BitVector InlineFieldMask =
137 (TypeTraits<BitVector>::One << InlineFieldId);
138 static const OSG::BitVector NextFieldMask =
139 (TypeTraits<BitVector>::One << NextFieldId);
141 typedef SFBool SFEnabledType;
142 typedef SFString SFUrlType;
143 typedef SFUnrecNodePtr SFRootType;
144 typedef SFUInt32 SFStateType;
145 typedef SFBool SFConcurrentLoadType;
146 typedef SFBoxVolume SFVolumeType;
147 typedef SFUInt32 SFIndicesType;
148 typedef SFUInt32 SFTrianglesType;
149 typedef SFUInt32 SFPositionsType;
150 typedef SFUInt32 SFGeometriesType;
151 typedef SFString SFAbsoluteUrlType;
152 typedef MFUInt8 MFInlineType;
154 /*---------------------------------------------------------------------*/
155 /*! \name Class Get */
156 /*! \{ */
158 static FieldContainerType &getClassType (void);
159 static UInt32 getClassTypeId (void);
160 static UInt16 getClassGroupId(void);
162 /*! \} */
163 /*---------------------------------------------------------------------*/
164 /*! \name FieldContainer Get */
165 /*! \{ */
167 virtual FieldContainerType &getType (void);
168 virtual const FieldContainerType &getType (void) const;
170 virtual UInt32 getContainerSize(void) const;
172 /*! \} */
173 /*---------------------------------------------------------------------*/
174 /*! \name Field Get */
175 /*! \{ */
178 SFBool *editSFEnabled (void);
179 const SFBool *getSFEnabled (void) const;
181 SFString *editSFUrl (void);
182 const SFString *getSFUrl (void) const;
183 const SFUnrecNodePtr *getSFRoot (void) const;
184 SFUnrecNodePtr *editSFRoot (void);
186 SFUInt32 *editSFState (void);
187 const SFUInt32 *getSFState (void) const;
189 SFBool *editSFConcurrentLoad (void);
190 const SFBool *getSFConcurrentLoad (void) const;
192 SFBoxVolume *editSFVolume (void);
193 const SFBoxVolume *getSFVolume (void) const;
195 SFUInt32 *editSFIndices (void);
196 const SFUInt32 *getSFIndices (void) const;
198 SFUInt32 *editSFTriangles (void);
199 const SFUInt32 *getSFTriangles (void) const;
201 SFUInt32 *editSFPositions (void);
202 const SFUInt32 *getSFPositions (void) const;
204 SFUInt32 *editSFGeometries (void);
205 const SFUInt32 *getSFGeometries (void) const;
207 MFUInt8 *editMFInline (void);
208 const MFUInt8 *getMFInline (void) const;
211 bool &editEnabled (void);
212 bool getEnabled (void) const;
214 std::string &editUrl (void);
215 const std::string &getUrl (void) const;
217 Node * getRoot (void) const;
219 UInt32 &editState (void);
220 UInt32 getState (void) const;
222 bool &editConcurrentLoad (void);
223 bool getConcurrentLoad (void) const;
225 BoxVolume &editVolume (void);
226 const BoxVolume &getVolume (void) const;
228 UInt32 &editIndices (void);
229 UInt32 getIndices (void) const;
231 UInt32 &editTriangles (void);
232 UInt32 getTriangles (void) const;
234 UInt32 &editPositions (void);
235 UInt32 getPositions (void) const;
237 UInt32 &editGeometries (void);
238 UInt32 getGeometries (void) const;
240 MFUInt8 ::reference editInline (const UInt32 index);
241 UInt8 getInline (const UInt32 index) const;
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name Field Set */
246 /*! \{ */
248 void setEnabled (const bool value);
249 void setUrl (const std::string &value);
250 void setRoot (Node * const value);
251 void setState (const UInt32 value);
252 void setConcurrentLoad (const bool value);
253 void setVolume (const BoxVolume &value);
254 void setIndices (const UInt32 value);
255 void setTriangles (const UInt32 value);
256 void setPositions (const UInt32 value);
257 void setGeometries (const UInt32 value);
259 /*! \} */
260 /*---------------------------------------------------------------------*/
261 /*! \name Ptr Field Set */
262 /*! \{ */
264 /*! \} */
265 /*---------------------------------------------------------------------*/
266 /*! \name Ptr MField Set */
267 /*! \{ */
269 /*! \} */
270 /*---------------------------------------------------------------------*/
271 /*! \name Binary Access */
272 /*! \{ */
274 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
275 virtual void copyToBin (BinaryDataHandler &pMem,
276 ConstFieldMaskArg whichField);
277 virtual void copyFromBin(BinaryDataHandler &pMem,
278 ConstFieldMaskArg whichField);
281 /*! \} */
282 /*---------------------------------------------------------------------*/
283 /*! \name Construction */
284 /*! \{ */
286 static ProxyGroupTransitPtr create (void);
287 static ProxyGroup *createEmpty (void);
289 static ProxyGroupTransitPtr createLocal (
290 BitVector bFlags = FCLocal::All);
292 static ProxyGroup *createEmptyLocal(
293 BitVector bFlags = FCLocal::All);
295 static ProxyGroupTransitPtr createDependent (BitVector bFlags);
297 /*! \} */
298 /*---------------------------------------------------------------------*/
299 /*! \name Copy */
300 /*! \{ */
302 virtual FieldContainerTransitPtr shallowCopy (void) const;
303 virtual FieldContainerTransitPtr shallowCopyLocal(
304 BitVector bFlags = FCLocal::All) const;
305 virtual FieldContainerTransitPtr shallowCopyDependent(
306 BitVector bFlags) const;
308 /*! \} */
309 /*========================= PROTECTED ===============================*/
311 protected:
313 static TypeObject _type;
315 static void classDescInserter(TypeObject &oType);
316 static const Char8 *getClassname (void );
318 /*---------------------------------------------------------------------*/
319 /*! \name Fields */
320 /*! \{ */
322 SFBool _sfEnabled;
323 SFString _sfUrl;
324 SFUnrecNodePtr _sfRoot;
325 SFUInt32 _sfState;
326 SFBool _sfConcurrentLoad;
327 SFBoxVolume _sfVolume;
328 SFUInt32 _sfIndices;
329 SFUInt32 _sfTriangles;
330 SFUInt32 _sfPositions;
331 SFUInt32 _sfGeometries;
332 SFString _sfAbsoluteUrl;
333 MFUInt8 _mfInline;
335 /*! \} */
336 /*---------------------------------------------------------------------*/
337 /*! \name Constructors */
338 /*! \{ */
340 ProxyGroupBase(void);
341 ProxyGroupBase(const ProxyGroupBase &source);
343 /*! \} */
344 /*---------------------------------------------------------------------*/
345 /*! \name Destructors */
346 /*! \{ */
348 virtual ~ProxyGroupBase(void);
350 /*! \} */
351 /*---------------------------------------------------------------------*/
352 /*! \name onCreate */
353 /*! \{ */
355 void onCreate(const ProxyGroup *source = NULL);
357 /*! \} */
358 /*---------------------------------------------------------------------*/
359 /*! \name Generic Field Access */
360 /*! \{ */
362 GetFieldHandlePtr getHandleEnabled (void) const;
363 EditFieldHandlePtr editHandleEnabled (void);
364 GetFieldHandlePtr getHandleUrl (void) const;
365 EditFieldHandlePtr editHandleUrl (void);
366 GetFieldHandlePtr getHandleRoot (void) const;
367 EditFieldHandlePtr editHandleRoot (void);
368 GetFieldHandlePtr getHandleState (void) const;
369 EditFieldHandlePtr editHandleState (void);
370 GetFieldHandlePtr getHandleConcurrentLoad (void) const;
371 EditFieldHandlePtr editHandleConcurrentLoad (void);
372 GetFieldHandlePtr getHandleVolume (void) const;
373 EditFieldHandlePtr editHandleVolume (void);
374 GetFieldHandlePtr getHandleIndices (void) const;
375 EditFieldHandlePtr editHandleIndices (void);
376 GetFieldHandlePtr getHandleTriangles (void) const;
377 EditFieldHandlePtr editHandleTriangles (void);
378 GetFieldHandlePtr getHandlePositions (void) const;
379 EditFieldHandlePtr editHandlePositions (void);
380 GetFieldHandlePtr getHandleGeometries (void) const;
381 EditFieldHandlePtr editHandleGeometries (void);
382 GetFieldHandlePtr getHandleAbsoluteUrl (void) const;
383 EditFieldHandlePtr editHandleAbsoluteUrl (void);
384 GetFieldHandlePtr getHandleInline (void) const;
385 EditFieldHandlePtr editHandleInline (void);
387 /*! \} */
388 /*---------------------------------------------------------------------*/
389 /*! \name Field Get */
390 /*! \{ */
393 SFString *editSFAbsoluteUrl (void);
394 const SFString *getSFAbsoluteUrl (void) const;
397 std::string &editAbsoluteUrl (void);
398 const std::string &getAbsoluteUrl (void) const;
400 /*! \} */
401 /*---------------------------------------------------------------------*/
402 /*! \name Field Set */
403 /*! \{ */
405 void setAbsoluteUrl (const std::string &value);
407 /*! \} */
408 /*---------------------------------------------------------------------*/
409 /*! \name Ptr MField Set */
410 /*! \{ */
412 /*! \} */
413 /*---------------------------------------------------------------------*/
414 /*! \name Sync */
415 /*! \{ */
417 #ifdef OSG_MT_CPTR_ASPECT
418 virtual void execSyncV( FieldContainer &oFrom,
419 ConstFieldMaskArg whichField,
420 AspectOffsetStore &oOffsets,
421 ConstFieldMaskArg syncMode ,
422 const UInt32 uiSyncInfo);
424 void execSync ( ProxyGroupBase *pFrom,
425 ConstFieldMaskArg whichField,
426 AspectOffsetStore &oOffsets,
427 ConstFieldMaskArg syncMode ,
428 const UInt32 uiSyncInfo);
429 #endif
431 /*! \} */
432 /*---------------------------------------------------------------------*/
433 /*! \name Edit */
434 /*! \{ */
436 /*! \} */
437 /*---------------------------------------------------------------------*/
438 /*! \name Aspect Create */
439 /*! \{ */
441 #ifdef OSG_MT_CPTR_ASPECT
442 virtual FieldContainer *createAspectCopy(
443 const FieldContainer *pRefAspect) const;
444 #endif
446 /*! \} */
447 /*---------------------------------------------------------------------*/
448 /*! \name Edit */
449 /*! \{ */
450 /*! \} */
451 /*---------------------------------------------------------------------*/
452 /*! \name Sync */
453 /*! \{ */
455 virtual void resolveLinks(void);
457 /*! \} */
458 /*========================== PRIVATE ================================*/
460 private:
461 /*---------------------------------------------------------------------*/
463 // prohibit default functions (move to 'public' if you need one)
464 void operator =(const ProxyGroupBase &source);
467 typedef ProxyGroupBase *ProxyGroupBaseP;
469 typedef CoredNodeRefPtr <ProxyGroup> ProxyGroupNodeRefPtr;
470 typedef CoredNodeMTRefPtr<ProxyGroup> ProxyGroupNodeMTRefPtr;
472 OSG_END_NAMESPACE
474 #endif /* _OSGPROXYGROUPBASE_H_ */