fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Drawables / Geometry / PropertiesBase / OSGGeoPropertyBase.h
blob4dabdb51708eddc09a362d193554d6f514fb19f3
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 GeoProperty
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGGEOPROPERTYBASE_H_
55 #define _OSGGEOPROPERTYBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGSysFields.h" // UseVBO type
70 #include "OSGGeoPropertyFields.h"
72 OSG_BEGIN_NAMESPACE
75 class GeoProperty;
77 //! \brief GeoProperty Base Class.
79 class OSG_SYSTEM_DLLMAPPING GeoPropertyBase : public StateChunk
81 public:
83 typedef StateChunk Inherited;
84 typedef StateChunk ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(GeoProperty);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 UseVBOFieldId = Inherited::NextFieldId,
98 UsageFieldId = UseVBOFieldId + 1,
99 GLIdFieldId = UsageFieldId + 1,
100 VboUsageFieldId = GLIdFieldId + 1,
101 NextFieldId = VboUsageFieldId + 1
104 static const OSG::BitVector UseVBOFieldMask =
105 (TypeTraits<BitVector>::One << UseVBOFieldId);
106 static const OSG::BitVector UsageFieldMask =
107 (TypeTraits<BitVector>::One << UsageFieldId);
108 static const OSG::BitVector GLIdFieldMask =
109 (TypeTraits<BitVector>::One << GLIdFieldId);
110 static const OSG::BitVector VboUsageFieldMask =
111 (TypeTraits<BitVector>::One << VboUsageFieldId);
112 static const OSG::BitVector NextFieldMask =
113 (TypeTraits<BitVector>::One << NextFieldId);
115 typedef SFBool SFUseVBOType;
116 typedef SFUInt32 SFUsageType;
117 typedef SFUInt32 SFGLIdType;
118 typedef SFInt32 SFVboUsageType;
120 /*---------------------------------------------------------------------*/
121 /*! \name Class Get */
122 /*! \{ */
124 static FieldContainerType &getClassType (void);
125 static UInt32 getClassTypeId (void);
126 static UInt16 getClassGroupId(void);
128 /*! \} */
129 /*---------------------------------------------------------------------*/
130 /*! \name FieldContainer Get */
131 /*! \{ */
133 virtual FieldContainerType &getType (void);
134 virtual const FieldContainerType &getType (void) const;
136 virtual UInt32 getContainerSize(void) const;
138 /*! \} */
139 /*---------------------------------------------------------------------*/
140 /*! \name Field Get */
141 /*! \{ */
144 SFBool *editSFUseVBO (void);
145 const SFBool *getSFUseVBO (void) const;
147 SFUInt32 *editSFUsage (void);
148 const SFUInt32 *getSFUsage (void) const;
150 SFInt32 *editSFVboUsage (void);
151 const SFInt32 *getSFVboUsage (void) const;
154 bool &editUseVBO (void);
155 bool getUseVBO (void) const;
157 UInt32 &editUsage (void);
158 UInt32 getUsage (void) const;
160 Int32 &editVboUsage (void);
161 Int32 getVboUsage (void) const;
163 /*! \} */
164 /*---------------------------------------------------------------------*/
165 /*! \name Field Set */
166 /*! \{ */
168 void setUseVBO (const bool value);
169 void setUsage (const UInt32 value);
170 void setVboUsage (const Int32 value);
172 /*! \} */
173 /*---------------------------------------------------------------------*/
174 /*! \name Ptr MField Set */
175 /*! \{ */
177 /*! \} */
178 /*---------------------------------------------------------------------*/
179 /*! \name Binary Access */
180 /*! \{ */
182 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
183 virtual void copyToBin (BinaryDataHandler &pMem,
184 ConstFieldMaskArg whichField);
185 virtual void copyFromBin(BinaryDataHandler &pMem,
186 ConstFieldMaskArg whichField);
189 /*! \} */
190 /*========================= PROTECTED ===============================*/
192 protected:
194 static TypeObject _type;
196 static void classDescInserter(TypeObject &oType);
197 static const Char8 *getClassname (void );
199 /*---------------------------------------------------------------------*/
200 /*! \name Fields */
201 /*! \{ */
203 SFBool _sfUseVBO;
204 SFUInt32 _sfUsage;
205 SFUInt32 _sfGLId;
206 SFInt32 _sfVboUsage;
208 /*! \} */
209 /*---------------------------------------------------------------------*/
210 /*! \name Constructors */
211 /*! \{ */
213 GeoPropertyBase(void);
214 GeoPropertyBase(const GeoPropertyBase &source);
216 /*! \} */
217 /*---------------------------------------------------------------------*/
218 /*! \name Destructors */
219 /*! \{ */
221 virtual ~GeoPropertyBase(void);
223 /*! \} */
224 /*---------------------------------------------------------------------*/
225 /*! \name onCreate */
226 /*! \{ */
229 /*! \} */
230 /*---------------------------------------------------------------------*/
231 /*! \name Generic Field Access */
232 /*! \{ */
234 GetFieldHandlePtr getHandleUseVBO (void) const;
235 EditFieldHandlePtr editHandleUseVBO (void);
236 GetFieldHandlePtr getHandleUsage (void) const;
237 EditFieldHandlePtr editHandleUsage (void);
238 GetFieldHandlePtr getHandleGLId (void) const;
239 EditFieldHandlePtr editHandleGLId (void);
240 GetFieldHandlePtr getHandleVboUsage (void) const;
241 EditFieldHandlePtr editHandleVboUsage (void);
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name Field Get */
246 /*! \{ */
249 SFUInt32 *editSFGLId (void);
250 const SFUInt32 *getSFGLId (void) const;
253 UInt32 &editGLId (void);
254 UInt32 getGLId (void) const;
256 /*! \} */
257 /*---------------------------------------------------------------------*/
258 /*! \name Field Set */
259 /*! \{ */
261 void setGLId (const UInt32 value);
263 /*! \} */
264 /*---------------------------------------------------------------------*/
265 /*! \name Ptr MField Set */
266 /*! \{ */
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Sync */
271 /*! \{ */
273 #ifdef OSG_MT_CPTR_ASPECT
274 virtual void execSyncV( FieldContainer &oFrom,
275 ConstFieldMaskArg whichField,
276 AspectOffsetStore &oOffsets,
277 ConstFieldMaskArg syncMode ,
278 const UInt32 uiSyncInfo);
280 void execSync ( GeoPropertyBase *pFrom,
281 ConstFieldMaskArg whichField,
282 AspectOffsetStore &oOffsets,
283 ConstFieldMaskArg syncMode ,
284 const UInt32 uiSyncInfo);
285 #endif
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Edit */
290 /*! \{ */
292 /*! \} */
293 /*---------------------------------------------------------------------*/
294 /*! \name Aspect Create */
295 /*! \{ */
297 /*! \} */
298 /*---------------------------------------------------------------------*/
299 /*! \name Edit */
300 /*! \{ */
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Sync */
304 /*! \{ */
306 virtual void resolveLinks(void);
308 /*! \} */
309 /*========================== PRIVATE ================================*/
311 private:
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const GeoPropertyBase &source);
318 typedef GeoPropertyBase *GeoPropertyBaseP;
320 OSG_END_NAMESPACE
322 #endif /* _OSGGEOPROPERTYBASE_H_ */