fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComputeBase / ComputeShader / OSGComputeShaderChunkBase.inl
bloba100100c2a2acd98e966ddae0df304b2d231a13a
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 ComputeShaderChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ComputeShaderChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ComputeShaderChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ComputeShaderChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ComputeShaderChunk::_sfComputeProgram field.
79 inline
80 std::string &ComputeShaderChunkBase::editComputeProgram(void)
82     editSField(ComputeProgramFieldMask);
84     return _sfComputeProgram.getValue();
87 //! Get the value of the ComputeShaderChunk::_sfComputeProgram field.
88 inline
89 const std::string &ComputeShaderChunkBase::getComputeProgram(void) const
91     return _sfComputeProgram.getValue();
94 //! Set the value of the ComputeShaderChunk::_sfComputeProgram field.
95 inline
96 void ComputeShaderChunkBase::setComputeProgram(const std::string &value)
98     editSField(ComputeProgramFieldMask);
100     _sfComputeProgram.setValue(value);
102 //! Get the value of the ComputeShaderChunk::_sfGLId field.
104 inline
105 UInt32 &ComputeShaderChunkBase::editGLId(void)
107     editSField(GLIdFieldMask);
109     return _sfGLId.getValue();
112 //! Get the value of the ComputeShaderChunk::_sfGLId field.
113 inline
114       UInt32  ComputeShaderChunkBase::getGLId(void) const
116     return _sfGLId.getValue();
119 //! Set the value of the ComputeShaderChunk::_sfGLId field.
120 inline
121 void ComputeShaderChunkBase::setGLId(const UInt32 value)
123     editSField(GLIdFieldMask);
125     _sfGLId.setValue(value);
129 //! Get the value of the \a index element the ComputeShaderChunk::_mfVariableLocations field.
130 inline
131       Int32  ComputeShaderChunkBase::getVariableLocations(const UInt32 index) const
133     return _mfVariableLocations[index];
136 inline
137 MFInt32            ::reference ComputeShaderChunkBase::editVariableLocations(const UInt32 index)
139     editMField(VariableLocationsFieldMask, _mfVariableLocations);
141     return _mfVariableLocations[index];
144 //! Get the value of the \a index element the ComputeShaderChunk::_mfProceduralVariableLocations field.
145 inline
146       Int32  ComputeShaderChunkBase::getProceduralVariableLocations(const UInt32 index) const
148     return _mfProceduralVariableLocations[index];
151 inline
152 MFInt32            ::reference ComputeShaderChunkBase::editProceduralVariableLocations(const UInt32 index)
154     editMField(ProceduralVariableLocationsFieldMask, _mfProceduralVariableLocations);
156     return _mfProceduralVariableLocations[index];
160 #ifdef OSG_MT_CPTR_ASPECT
161 inline
162 void ComputeShaderChunkBase::execSync (      ComputeShaderChunkBase *pFrom,
163                                         ConstFieldMaskArg  whichField,
164                                         AspectOffsetStore &oOffsets,
165                                         ConstFieldMaskArg  syncMode,
166                                   const UInt32             uiSyncInfo)
168     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
170     if(FieldBits::NoField != (ComputeShaderFieldMask & whichField))
171         _mfComputeShader.syncWith(pFrom->_mfComputeShader,
172                                 syncMode,
173                                 uiSyncInfo,
174                                 oOffsets);
176     if(FieldBits::NoField != (ComputeProgramFieldMask & whichField))
177         _sfComputeProgram.syncWith(pFrom->_sfComputeProgram);
179     if(FieldBits::NoField != (VariablesFieldMask & whichField))
180         _sfVariables.syncWith(pFrom->_sfVariables);
182     if(FieldBits::NoField != (VariableLocationsFieldMask & whichField))
183         _mfVariableLocations.syncWith(pFrom->_mfVariableLocations,
184                                 syncMode,
185                                 uiSyncInfo,
186                                 oOffsets);
188     if(FieldBits::NoField != (ProceduralVariableLocationsFieldMask & whichField))
189         _mfProceduralVariableLocations.syncWith(pFrom->_mfProceduralVariableLocations,
190                                 syncMode,
191                                 uiSyncInfo,
192                                 oOffsets);
194     if(FieldBits::NoField != (GLIdFieldMask & whichField))
195         _sfGLId.syncWith(pFrom->_sfGLId);
197 #endif
200 inline
201 const Char8 *ComputeShaderChunkBase::getClassname(void)
203     return "ComputeShaderChunk";
205 OSG_GEN_CONTAINERPTR(ComputeShaderChunk);
207 OSG_END_NAMESPACE