fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Base / OSGShaderStorageBufferObjChunkBase.inl
blob221caa8fefb557c867b44562a9ddc68f87c7c33d
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *               Copyright (C) 2000-2013 by the OpenSG Forum                 *
6  *                                                                           *
7  * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net  *
8  *                                                                           *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
11  *                                License                                    *
12  *                                                                           *
13  * This library is free software; you can redistribute it and/or modify it   *
14  * under the terms of the GNU Library General Public License as published    *
15  * by the Free Software Foundation, version 2.                               *
16  *                                                                           *
17  * This library is distributed in the hope that it will be useful, but       *
18  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
20  * Library General Public License for more details.                          *
21  *                                                                           *
22  * You should have received a copy of the GNU Library General Public         *
23  * License along with this library; if not, write to the Free Software       *
24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
25  *                                                                           *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
28  *                                Changes                                    *
29  *                                                                           *
30  *                                                                           *
31  *                                                                           *
32  *                                                                           *
33  *                                                                           *
34  *                                                                           *
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38  *****************************************************************************
39  **                                                                         **
40  **                  This file is automatically generated.                  **
41  **                                                                         **
42  **          Any changes made to this file WILL be lost when it is          **
43  **           regenerated, which can become necessary at any time.          **
44  **                                                                         **
45  **     Do not change this file, changes should be done in the derived      **
46  **     class ShaderStorageBufferObjChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ShaderStorageBufferObjChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ShaderStorageBufferObjChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ShaderStorageBufferObjChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ShaderStorageBufferObjChunk::_sfGLId field.
79 inline
80 GLenum &ShaderStorageBufferObjChunkBase::editGLId(void)
82     editSField(GLIdFieldMask);
84     return _sfGLId.getValue();
87 //! Get the value of the ShaderStorageBufferObjChunk::_sfGLId field.
88 inline
89 const GLenum &ShaderStorageBufferObjChunkBase::getGLId(void) const
91     return _sfGLId.getValue();
94 //! Set the value of the ShaderStorageBufferObjChunk::_sfGLId field.
95 inline
96 void ShaderStorageBufferObjChunkBase::setGLId(const GLenum &value)
98     editSField(GLIdFieldMask);
100     _sfGLId.setValue(value);
102 //! Get the value of the ShaderStorageBufferObjChunk::_sfUsage field.
104 inline
105 GLenum &ShaderStorageBufferObjChunkBase::editUsage(void)
107     editSField(UsageFieldMask);
109     return _sfUsage.getValue();
112 //! Get the value of the ShaderStorageBufferObjChunk::_sfUsage field.
113 inline
114 const GLenum &ShaderStorageBufferObjChunkBase::getUsage(void) const
116     return _sfUsage.getValue();
119 //! Set the value of the ShaderStorageBufferObjChunk::_sfUsage field.
120 inline
121 void ShaderStorageBufferObjChunkBase::setUsage(const GLenum &value)
123     editSField(UsageFieldMask);
125     _sfUsage.setValue(value);
127 //! Get the value of the ShaderStorageBufferObjChunk::_sfBlockName field.
129 inline
130 std::string &ShaderStorageBufferObjChunkBase::editBlockName(void)
132     editSField(BlockNameFieldMask);
134     return _sfBlockName.getValue();
137 //! Get the value of the ShaderStorageBufferObjChunk::_sfBlockName field.
138 inline
139 const std::string &ShaderStorageBufferObjChunkBase::getBlockName(void) const
141     return _sfBlockName.getValue();
144 //! Set the value of the ShaderStorageBufferObjChunk::_sfBlockName field.
145 inline
146 void ShaderStorageBufferObjChunkBase::setBlockName(const std::string &value)
148     editSField(BlockNameFieldMask);
150     _sfBlockName.setValue(value);
152 //! Get the value of the ShaderStorageBufferObjChunk::_sfNameToIndex field.
154 inline
155 StringToUInt32Map &ShaderStorageBufferObjChunkBase::editNameToIndex(void)
157     editSField(NameToIndexFieldMask);
159     return _sfNameToIndex.getValue();
162 //! Get the value of the ShaderStorageBufferObjChunk::_sfNameToIndex field.
163 inline
164 const StringToUInt32Map &ShaderStorageBufferObjChunkBase::getNameToIndex(void) const
166     return _sfNameToIndex.getValue();
169 //! Set the value of the ShaderStorageBufferObjChunk::_sfNameToIndex field.
170 inline
171 void ShaderStorageBufferObjChunkBase::setNameToIndex(const StringToUInt32Map &value)
173     editSField(NameToIndexFieldMask);
175     _sfNameToIndex.setValue(value);
178 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfFundamentalTypes field.
179 inline
180       UInt8  ShaderStorageBufferObjChunkBase::getFundamentalTypes(const UInt32 index) const
182     return _mfFundamentalTypes[index];
185 inline
186 MFUInt8            ::reference ShaderStorageBufferObjChunkBase::editFundamentalTypes(const UInt32 index)
188     editMField(FundamentalTypesFieldMask, _mfFundamentalTypes);
190     return _mfFundamentalTypes[index];
193 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfMainTypes field.
194 inline
195       UInt8  ShaderStorageBufferObjChunkBase::getMainTypes(const UInt32 index) const
197     return _mfMainTypes[index];
200 inline
201 MFUInt8            ::reference ShaderStorageBufferObjChunkBase::editMainTypes(const UInt32 index)
203     editMField(MainTypesFieldMask, _mfMainTypes);
205     return _mfMainTypes[index];
208 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfCardinality field.
209 inline
210       UInt32  ShaderStorageBufferObjChunkBase::getCardinality(const UInt32 index) const
212     return _mfCardinality[index];
215 inline
216 MFUInt32           ::reference ShaderStorageBufferObjChunkBase::editCardinality(const UInt32 index)
218     editMField(CardinalityFieldMask, _mfCardinality);
220     return _mfCardinality[index];
223 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfIndex field.
224 inline
225       UInt32  ShaderStorageBufferObjChunkBase::getIndex(const UInt32 index) const
227     return _mfIndex[index];
230 inline
231 MFUInt32           ::reference ShaderStorageBufferObjChunkBase::editIndex(const UInt32 index)
233     editMField(IndexFieldMask, _mfIndex);
235     return _mfIndex[index];
238 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfNames field.
239 inline
240 const std::string &ShaderStorageBufferObjChunkBase::getNames(const UInt32 index) const
242     return _mfNames[index];
245 inline
246 MFString           ::reference ShaderStorageBufferObjChunkBase::editNames(const UInt32 index)
248     editMField(NamesFieldMask, _mfNames);
250     return _mfNames[index];
253 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfFloatValues field.
254 inline
255       Real32  ShaderStorageBufferObjChunkBase::getFloatValues(const UInt32 index) const
257     return _mfFloatValues[index];
260 inline
261 MFReal32           ::reference ShaderStorageBufferObjChunkBase::editFloatValues(const UInt32 index)
263     editMField(FloatValuesFieldMask, _mfFloatValues);
265     return _mfFloatValues[index];
268 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfDoubleValues field.
269 inline
270       Real64  ShaderStorageBufferObjChunkBase::getDoubleValues(const UInt32 index) const
272     return _mfDoubleValues[index];
275 inline
276 MFReal64           ::reference ShaderStorageBufferObjChunkBase::editDoubleValues(const UInt32 index)
278     editMField(DoubleValuesFieldMask, _mfDoubleValues);
280     return _mfDoubleValues[index];
283 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfIntValues field.
284 inline
285       Int32  ShaderStorageBufferObjChunkBase::getIntValues(const UInt32 index) const
287     return _mfIntValues[index];
290 inline
291 MFInt32            ::reference ShaderStorageBufferObjChunkBase::editIntValues(const UInt32 index)
293     editMField(IntValuesFieldMask, _mfIntValues);
295     return _mfIntValues[index];
298 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfUIntValues field.
299 inline
300       UInt32  ShaderStorageBufferObjChunkBase::getUIntValues(const UInt32 index) const
302     return _mfUIntValues[index];
305 inline
306 MFUInt32           ::reference ShaderStorageBufferObjChunkBase::editUIntValues(const UInt32 index)
308     editMField(UIntValuesFieldMask, _mfUIntValues);
310     return _mfUIntValues[index];
313 //! Get the value of the \a index element the ShaderStorageBufferObjChunk::_mfBoolValues field.
314 inline
315       UInt8  ShaderStorageBufferObjChunkBase::getBoolValues(const UInt32 index) const
317     return _mfBoolValues[index];
320 inline
321 MFUInt8            ::reference ShaderStorageBufferObjChunkBase::editBoolValues(const UInt32 index)
323     editMField(BoolValuesFieldMask, _mfBoolValues);
325     return _mfBoolValues[index];
329 #ifdef OSG_MT_CPTR_ASPECT
330 inline
331 void ShaderStorageBufferObjChunkBase::execSync (      ShaderStorageBufferObjChunkBase *pFrom,
332                                         ConstFieldMaskArg  whichField,
333                                         AspectOffsetStore &oOffsets,
334                                         ConstFieldMaskArg  syncMode,
335                                   const UInt32             uiSyncInfo)
337     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
339     if(FieldBits::NoField != (GLIdFieldMask & whichField))
340         _sfGLId.syncWith(pFrom->_sfGLId);
342     if(FieldBits::NoField != (UsageFieldMask & whichField))
343         _sfUsage.syncWith(pFrom->_sfUsage);
345     if(FieldBits::NoField != (BlockNameFieldMask & whichField))
346         _sfBlockName.syncWith(pFrom->_sfBlockName);
348     if(FieldBits::NoField != (FundamentalTypesFieldMask & whichField))
349         _mfFundamentalTypes.syncWith(pFrom->_mfFundamentalTypes,
350                                 syncMode,
351                                 uiSyncInfo,
352                                 oOffsets);
354     if(FieldBits::NoField != (MainTypesFieldMask & whichField))
355         _mfMainTypes.syncWith(pFrom->_mfMainTypes,
356                                 syncMode,
357                                 uiSyncInfo,
358                                 oOffsets);
360     if(FieldBits::NoField != (CardinalityFieldMask & whichField))
361         _mfCardinality.syncWith(pFrom->_mfCardinality,
362                                 syncMode,
363                                 uiSyncInfo,
364                                 oOffsets);
366     if(FieldBits::NoField != (IndexFieldMask & whichField))
367         _mfIndex.syncWith(pFrom->_mfIndex,
368                                 syncMode,
369                                 uiSyncInfo,
370                                 oOffsets);
372     if(FieldBits::NoField != (NamesFieldMask & whichField))
373         _mfNames.syncWith(pFrom->_mfNames,
374                                 syncMode,
375                                 uiSyncInfo,
376                                 oOffsets);
378     if(FieldBits::NoField != (NameToIndexFieldMask & whichField))
379         _sfNameToIndex.syncWith(pFrom->_sfNameToIndex);
381     if(FieldBits::NoField != (FloatValuesFieldMask & whichField))
382         _mfFloatValues.syncWith(pFrom->_mfFloatValues,
383                                 syncMode,
384                                 uiSyncInfo,
385                                 oOffsets);
387     if(FieldBits::NoField != (DoubleValuesFieldMask & whichField))
388         _mfDoubleValues.syncWith(pFrom->_mfDoubleValues,
389                                 syncMode,
390                                 uiSyncInfo,
391                                 oOffsets);
393     if(FieldBits::NoField != (IntValuesFieldMask & whichField))
394         _mfIntValues.syncWith(pFrom->_mfIntValues,
395                                 syncMode,
396                                 uiSyncInfo,
397                                 oOffsets);
399     if(FieldBits::NoField != (UIntValuesFieldMask & whichField))
400         _mfUIntValues.syncWith(pFrom->_mfUIntValues,
401                                 syncMode,
402                                 uiSyncInfo,
403                                 oOffsets);
405     if(FieldBits::NoField != (BoolValuesFieldMask & whichField))
406         _mfBoolValues.syncWith(pFrom->_mfBoolValues,
407                                 syncMode,
408                                 uiSyncInfo,
409                                 oOffsets);
411 #endif
414 inline
415 const Char8 *ShaderStorageBufferObjChunkBase::getClassname(void)
417     return "ShaderStorageBufferObjChunk";
419 OSG_GEN_CONTAINERPTR(ShaderStorageBufferObjChunk);
421 OSG_END_NAMESPACE