changed: gcc8 base update
[opensg.git] / Source / System / State / Base / OSGUniformBufferObjChunkBase.h
blob111119aad15d9a18732be098e91cf0bba88cbdec
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 UniformBufferObjChunk
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGUNIFORMBUFFEROBJCHUNKBASE_H_
55 #define _OSGUNIFORMBUFFEROBJCHUNKBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGUniformBufferObjBaseChunk.h" // Parent
68 #include "OSGBaseFields.h" // GLId type
69 #include "OSGSysFields.h" // FundamentalTypes type
70 #include "OSGStringToUInt32MapFields.h" // NameToIndex type
72 #include "OSGUniformBufferObjChunkFields.h"
74 OSG_BEGIN_NAMESPACE
77 class UniformBufferObjChunk;
79 //! \brief UniformBufferObjChunk Base Class.
81 class OSG_SYSTEM_DLLMAPPING UniformBufferObjChunkBase : public UniformBufferObjBaseChunk
83 public:
85 typedef UniformBufferObjBaseChunk Inherited;
86 typedef UniformBufferObjBaseChunk ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(UniformBufferObjChunk);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 GLIdFieldId = Inherited::NextFieldId,
100 UsageFieldId = GLIdFieldId + 1,
101 BlockNameFieldId = UsageFieldId + 1,
102 FundamentalTypesFieldId = BlockNameFieldId + 1,
103 MainTypesFieldId = FundamentalTypesFieldId + 1,
104 CardinalityFieldId = MainTypesFieldId + 1,
105 IndexFieldId = CardinalityFieldId + 1,
106 NamesFieldId = IndexFieldId + 1,
107 NameToIndexFieldId = NamesFieldId + 1,
108 FloatValuesFieldId = NameToIndexFieldId + 1,
109 DoubleValuesFieldId = FloatValuesFieldId + 1,
110 IntValuesFieldId = DoubleValuesFieldId + 1,
111 UIntValuesFieldId = IntValuesFieldId + 1,
112 BoolValuesFieldId = UIntValuesFieldId + 1,
113 NextFieldId = BoolValuesFieldId + 1
116 static const OSG::BitVector GLIdFieldMask =
117 (TypeTraits<BitVector>::One << GLIdFieldId);
118 static const OSG::BitVector UsageFieldMask =
119 (TypeTraits<BitVector>::One << UsageFieldId);
120 static const OSG::BitVector BlockNameFieldMask =
121 (TypeTraits<BitVector>::One << BlockNameFieldId);
122 static const OSG::BitVector FundamentalTypesFieldMask =
123 (TypeTraits<BitVector>::One << FundamentalTypesFieldId);
124 static const OSG::BitVector MainTypesFieldMask =
125 (TypeTraits<BitVector>::One << MainTypesFieldId);
126 static const OSG::BitVector CardinalityFieldMask =
127 (TypeTraits<BitVector>::One << CardinalityFieldId);
128 static const OSG::BitVector IndexFieldMask =
129 (TypeTraits<BitVector>::One << IndexFieldId);
130 static const OSG::BitVector NamesFieldMask =
131 (TypeTraits<BitVector>::One << NamesFieldId);
132 static const OSG::BitVector NameToIndexFieldMask =
133 (TypeTraits<BitVector>::One << NameToIndexFieldId);
134 static const OSG::BitVector FloatValuesFieldMask =
135 (TypeTraits<BitVector>::One << FloatValuesFieldId);
136 static const OSG::BitVector DoubleValuesFieldMask =
137 (TypeTraits<BitVector>::One << DoubleValuesFieldId);
138 static const OSG::BitVector IntValuesFieldMask =
139 (TypeTraits<BitVector>::One << IntValuesFieldId);
140 static const OSG::BitVector UIntValuesFieldMask =
141 (TypeTraits<BitVector>::One << UIntValuesFieldId);
142 static const OSG::BitVector BoolValuesFieldMask =
143 (TypeTraits<BitVector>::One << BoolValuesFieldId);
144 static const OSG::BitVector NextFieldMask =
145 (TypeTraits<BitVector>::One << NextFieldId);
147 typedef SFGLenum SFGLIdType;
148 typedef SFGLenum SFUsageType;
149 typedef SFString SFBlockNameType;
150 typedef MFUInt8 MFFundamentalTypesType;
151 typedef MFUInt8 MFMainTypesType;
152 typedef MFUInt32 MFCardinalityType;
153 typedef MFUInt32 MFIndexType;
154 typedef MFString MFNamesType;
155 typedef SFStringToUInt32Map SFNameToIndexType;
156 typedef MFReal32 MFFloatValuesType;
157 typedef MFReal64 MFDoubleValuesType;
158 typedef MFInt32 MFIntValuesType;
159 typedef MFUInt32 MFUIntValuesType;
160 typedef MFUInt8 MFBoolValuesType;
162 /*---------------------------------------------------------------------*/
163 /*! \name Class Get */
164 /*! \{ */
166 static FieldContainerType &getClassType (void);
167 static UInt32 getClassTypeId (void);
168 static UInt16 getClassGroupId(void);
170 /*! \} */
171 /*---------------------------------------------------------------------*/
172 /*! \name FieldContainer Get */
173 /*! \{ */
175 virtual FieldContainerType &getType (void);
176 virtual const FieldContainerType &getType (void) const;
178 virtual UInt32 getContainerSize(void) const;
180 /*! \} */
181 /*---------------------------------------------------------------------*/
182 /*! \name Field Get */
183 /*! \{ */
186 SFGLenum *editSFGLId (void);
187 const SFGLenum *getSFGLId (void) const;
189 SFGLenum *editSFUsage (void);
190 const SFGLenum *getSFUsage (void) const;
192 SFString *editSFBlockName (void);
193 const SFString *getSFBlockName (void) const;
196 GLenum &editGLId (void);
197 const GLenum &getGLId (void) const;
199 GLenum &editUsage (void);
200 const GLenum &getUsage (void) const;
202 std::string &editBlockName (void);
203 const std::string &getBlockName (void) const;
205 /*! \} */
206 /*---------------------------------------------------------------------*/
207 /*! \name Field Set */
208 /*! \{ */
210 void setGLId (const GLenum &value);
211 void setUsage (const GLenum &value);
212 void setBlockName (const std::string &value);
214 /*! \} */
215 /*---------------------------------------------------------------------*/
216 /*! \name Ptr MField Set */
217 /*! \{ */
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Binary Access */
222 /*! \{ */
224 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
225 virtual void copyToBin (BinaryDataHandler &pMem,
226 ConstFieldMaskArg whichField);
227 virtual void copyFromBin(BinaryDataHandler &pMem,
228 ConstFieldMaskArg whichField);
231 /*! \} */
232 /*---------------------------------------------------------------------*/
233 /*! \name Construction */
234 /*! \{ */
236 static UniformBufferObjChunkTransitPtr create (void);
237 static UniformBufferObjChunk *createEmpty (void);
239 static UniformBufferObjChunkTransitPtr createLocal (
240 BitVector bFlags = FCLocal::All);
242 static UniformBufferObjChunk *createEmptyLocal(
243 BitVector bFlags = FCLocal::All);
245 static UniformBufferObjChunkTransitPtr createDependent (BitVector bFlags);
247 /*! \} */
248 /*---------------------------------------------------------------------*/
249 /*! \name Copy */
250 /*! \{ */
252 virtual FieldContainerTransitPtr shallowCopy (void) const;
253 virtual FieldContainerTransitPtr shallowCopyLocal(
254 BitVector bFlags = FCLocal::All) const;
255 virtual FieldContainerTransitPtr shallowCopyDependent(
256 BitVector bFlags) const;
258 /*! \} */
259 /*========================= PROTECTED ===============================*/
261 protected:
263 static TypeObject _type;
265 static void classDescInserter(TypeObject &oType);
266 static const Char8 *getClassname (void );
268 /*---------------------------------------------------------------------*/
269 /*! \name Fields */
270 /*! \{ */
272 SFGLenum _sfGLId;
273 SFGLenum _sfUsage;
274 SFString _sfBlockName;
275 MFUInt8 _mfFundamentalTypes;
276 MFUInt8 _mfMainTypes;
277 MFUInt32 _mfCardinality;
278 MFUInt32 _mfIndex;
279 MFString _mfNames;
280 SFStringToUInt32Map _sfNameToIndex;
281 MFReal32 _mfFloatValues;
282 MFReal64 _mfDoubleValues;
283 MFInt32 _mfIntValues;
284 MFUInt32 _mfUIntValues;
285 MFUInt8 _mfBoolValues;
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Constructors */
290 /*! \{ */
292 UniformBufferObjChunkBase(void);
293 UniformBufferObjChunkBase(const UniformBufferObjChunkBase &source);
295 /*! \} */
296 /*---------------------------------------------------------------------*/
297 /*! \name Destructors */
298 /*! \{ */
300 virtual ~UniformBufferObjChunkBase(void);
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name onCreate */
305 /*! \{ */
308 /*! \} */
309 /*---------------------------------------------------------------------*/
310 /*! \name Generic Field Access */
311 /*! \{ */
313 GetFieldHandlePtr getHandleGLId (void) const;
314 EditFieldHandlePtr editHandleGLId (void);
315 GetFieldHandlePtr getHandleUsage (void) const;
316 EditFieldHandlePtr editHandleUsage (void);
317 GetFieldHandlePtr getHandleBlockName (void) const;
318 EditFieldHandlePtr editHandleBlockName (void);
319 GetFieldHandlePtr getHandleFundamentalTypes (void) const;
320 EditFieldHandlePtr editHandleFundamentalTypes(void);
321 GetFieldHandlePtr getHandleMainTypes (void) const;
322 EditFieldHandlePtr editHandleMainTypes (void);
323 GetFieldHandlePtr getHandleCardinality (void) const;
324 EditFieldHandlePtr editHandleCardinality (void);
325 GetFieldHandlePtr getHandleIndex (void) const;
326 EditFieldHandlePtr editHandleIndex (void);
327 GetFieldHandlePtr getHandleNames (void) const;
328 EditFieldHandlePtr editHandleNames (void);
329 GetFieldHandlePtr getHandleNameToIndex (void) const;
330 EditFieldHandlePtr editHandleNameToIndex (void);
331 GetFieldHandlePtr getHandleFloatValues (void) const;
332 EditFieldHandlePtr editHandleFloatValues (void);
333 GetFieldHandlePtr getHandleDoubleValues (void) const;
334 EditFieldHandlePtr editHandleDoubleValues (void);
335 GetFieldHandlePtr getHandleIntValues (void) const;
336 EditFieldHandlePtr editHandleIntValues (void);
337 GetFieldHandlePtr getHandleUIntValues (void) const;
338 EditFieldHandlePtr editHandleUIntValues (void);
339 GetFieldHandlePtr getHandleBoolValues (void) const;
340 EditFieldHandlePtr editHandleBoolValues (void);
342 /*! \} */
343 /*---------------------------------------------------------------------*/
344 /*! \name Field Get */
345 /*! \{ */
348 MFUInt8 *editMFFundamentalTypes(void);
349 const MFUInt8 *getMFFundamentalTypes (void) const;
351 MFUInt8 *editMFMainTypes (void);
352 const MFUInt8 *getMFMainTypes (void) const;
354 MFUInt32 *editMFCardinality (void);
355 const MFUInt32 *getMFCardinality (void) const;
357 MFUInt32 *editMFIndex (void);
358 const MFUInt32 *getMFIndex (void) const;
360 MFString *editMFNames (void);
361 const MFString *getMFNames (void) const;
363 SFStringToUInt32Map *editSFNameToIndex (void);
364 const SFStringToUInt32Map *getSFNameToIndex (void) const;
366 MFReal32 *editMFFloatValues (void);
367 const MFReal32 *getMFFloatValues (void) const;
369 MFReal64 *editMFDoubleValues (void);
370 const MFReal64 *getMFDoubleValues (void) const;
372 MFInt32 *editMFIntValues (void);
373 const MFInt32 *getMFIntValues (void) const;
375 MFUInt32 *editMFUIntValues (void);
376 const MFUInt32 *getMFUIntValues (void) const;
378 MFUInt8 *editMFBoolValues (void);
379 const MFUInt8 *getMFBoolValues (void) const;
382 MFUInt8 ::reference editFundamentalTypes(const UInt32 index);
383 UInt8 getFundamentalTypes (const UInt32 index) const;
385 MFUInt8 ::reference editMainTypes (const UInt32 index);
386 UInt8 getMainTypes (const UInt32 index) const;
388 MFUInt32 ::reference editCardinality (const UInt32 index);
389 UInt32 getCardinality (const UInt32 index) const;
391 MFUInt32 ::reference editIndex (const UInt32 index);
392 UInt32 getIndex (const UInt32 index) const;
394 MFString ::reference editNames (const UInt32 index);
395 const std::string &getNames (const UInt32 index) const;
397 StringToUInt32Map &editNameToIndex (void);
398 const StringToUInt32Map &getNameToIndex (void) const;
400 MFReal32 ::reference editFloatValues (const UInt32 index);
401 Real32 getFloatValues (const UInt32 index) const;
403 MFReal64 ::reference editDoubleValues (const UInt32 index);
404 Real64 getDoubleValues (const UInt32 index) const;
406 MFInt32 ::reference editIntValues (const UInt32 index);
407 Int32 getIntValues (const UInt32 index) const;
409 MFUInt32 ::reference editUIntValues (const UInt32 index);
410 UInt32 getUIntValues (const UInt32 index) const;
412 MFUInt8 ::reference editBoolValues (const UInt32 index);
413 UInt8 getBoolValues (const UInt32 index) const;
415 /*! \} */
416 /*---------------------------------------------------------------------*/
417 /*! \name Field Set */
418 /*! \{ */
420 void setNameToIndex (const StringToUInt32Map &value);
422 /*! \} */
423 /*---------------------------------------------------------------------*/
424 /*! \name Ptr MField Set */
425 /*! \{ */
427 /*! \} */
428 /*---------------------------------------------------------------------*/
429 /*! \name Sync */
430 /*! \{ */
432 #ifdef OSG_MT_CPTR_ASPECT
433 virtual void execSyncV( FieldContainer &oFrom,
434 ConstFieldMaskArg whichField,
435 AspectOffsetStore &oOffsets,
436 ConstFieldMaskArg syncMode ,
437 const UInt32 uiSyncInfo);
439 void execSync ( UniformBufferObjChunkBase *pFrom,
440 ConstFieldMaskArg whichField,
441 AspectOffsetStore &oOffsets,
442 ConstFieldMaskArg syncMode ,
443 const UInt32 uiSyncInfo);
444 #endif
446 /*! \} */
447 /*---------------------------------------------------------------------*/
448 /*! \name Edit */
449 /*! \{ */
451 /*! \} */
452 /*---------------------------------------------------------------------*/
453 /*! \name Aspect Create */
454 /*! \{ */
456 #ifdef OSG_MT_CPTR_ASPECT
457 virtual FieldContainer *createAspectCopy(
458 const FieldContainer *pRefAspect) const;
459 #endif
461 /*! \} */
462 /*---------------------------------------------------------------------*/
463 /*! \name Edit */
464 /*! \{ */
465 /*! \} */
466 /*---------------------------------------------------------------------*/
467 /*! \name Sync */
468 /*! \{ */
470 virtual void resolveLinks(void);
472 /*! \} */
473 /*========================== PRIVATE ================================*/
475 private:
476 /*---------------------------------------------------------------------*/
478 // prohibit default functions (move to 'public' if you need one)
479 void operator =(const UniformBufferObjChunkBase &source);
482 typedef UniformBufferObjChunkBase *UniformBufferObjChunkBaseP;
484 OSG_END_NAMESPACE
486 #endif /* _OSGUNIFORMBUFFEROBJCHUNKBASE_H_ */