fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Shader / Chunks / OSGShaderExecutableChunkBase.inl
blob0cee54a7cffbb315c6df9afeef80e09711fef799
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 ShaderExecutableChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ShaderExecutableChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ShaderExecutableChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ShaderExecutableChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ShaderExecutableChunk::_sfGeometryVerticesOut field.
79 inline
80 UInt32 &ShaderExecutableChunkBase::editGeometryVerticesOut(void)
82     editSField(GeometryVerticesOutFieldMask);
84     return _sfGeometryVerticesOut.getValue();
87 //! Get the value of the ShaderExecutableChunk::_sfGeometryVerticesOut field.
88 inline
89       UInt32  ShaderExecutableChunkBase::getGeometryVerticesOut(void) const
91     return _sfGeometryVerticesOut.getValue();
94 //! Set the value of the ShaderExecutableChunk::_sfGeometryVerticesOut field.
95 inline
96 void ShaderExecutableChunkBase::setGeometryVerticesOut(const UInt32 value)
98     editSField(GeometryVerticesOutFieldMask);
100     _sfGeometryVerticesOut.setValue(value);
102 //! Get the value of the ShaderExecutableChunk::_sfGeometryInputType field.
104 inline
105 GLenum &ShaderExecutableChunkBase::editGeometryInputType(void)
107     editSField(GeometryInputTypeFieldMask);
109     return _sfGeometryInputType.getValue();
112 //! Get the value of the ShaderExecutableChunk::_sfGeometryInputType field.
113 inline
114 const GLenum &ShaderExecutableChunkBase::getGeometryInputType(void) const
116     return _sfGeometryInputType.getValue();
119 //! Set the value of the ShaderExecutableChunk::_sfGeometryInputType field.
120 inline
121 void ShaderExecutableChunkBase::setGeometryInputType(const GLenum &value)
123     editSField(GeometryInputTypeFieldMask);
125     _sfGeometryInputType.setValue(value);
127 //! Get the value of the ShaderExecutableChunk::_sfGeometryOutputType field.
129 inline
130 GLenum &ShaderExecutableChunkBase::editGeometryOutputType(void)
132     editSField(GeometryOutputTypeFieldMask);
134     return _sfGeometryOutputType.getValue();
137 //! Get the value of the ShaderExecutableChunk::_sfGeometryOutputType field.
138 inline
139 const GLenum &ShaderExecutableChunkBase::getGeometryOutputType(void) const
141     return _sfGeometryOutputType.getValue();
144 //! Set the value of the ShaderExecutableChunk::_sfGeometryOutputType field.
145 inline
146 void ShaderExecutableChunkBase::setGeometryOutputType(const GLenum &value)
148     editSField(GeometryOutputTypeFieldMask);
150     _sfGeometryOutputType.setValue(value);
152 //! Get the value of the ShaderExecutableChunk::_sfGLId field.
154 inline
155 UInt32 &ShaderExecutableChunkBase::editGLId(void)
157     editSField(GLIdFieldMask);
159     return _sfGLId.getValue();
162 //! Get the value of the ShaderExecutableChunk::_sfGLId field.
163 inline
164       UInt32  ShaderExecutableChunkBase::getGLId(void) const
166     return _sfGLId.getValue();
169 //! Set the value of the ShaderExecutableChunk::_sfGLId field.
170 inline
171 void ShaderExecutableChunkBase::setGLId(const UInt32 value)
173     editSField(GLIdFieldMask);
175     _sfGLId.setValue(value);
177 //! Get the value of the ShaderExecutableChunk::_sfPointSize field.
179 inline
180 bool &ShaderExecutableChunkBase::editPointSize(void)
182     editSField(PointSizeFieldMask);
184     return _sfPointSize.getValue();
187 //! Get the value of the ShaderExecutableChunk::_sfPointSize field.
188 inline
189       bool  ShaderExecutableChunkBase::getPointSize(void) const
191     return _sfPointSize.getValue();
194 //! Set the value of the ShaderExecutableChunk::_sfPointSize field.
195 inline
196 void ShaderExecutableChunkBase::setPointSize(const bool value)
198     editSField(PointSizeFieldMask);
200     _sfPointSize.setValue(value);
203 //! Get the value of the \a index element the ShaderExecutableChunk::_mfVariableLocations field.
204 inline
205       Int32  ShaderExecutableChunkBase::getVariableLocations(const UInt32 index) const
207     return _mfVariableLocations[index];
210 inline
211 MFInt32            ::reference ShaderExecutableChunkBase::editVariableLocations(const UInt32 index)
213     editMField(VariableLocationsFieldMask, _mfVariableLocations);
215     return _mfVariableLocations[index];
218 //! Get the value of the \a index element the ShaderExecutableChunk::_mfProceduralVariableLocations field.
219 inline
220       Int32  ShaderExecutableChunkBase::getProceduralVariableLocations(const UInt32 index) const
222     return _mfProceduralVariableLocations[index];
225 inline
226 MFInt32            ::reference ShaderExecutableChunkBase::editProceduralVariableLocations(const UInt32 index)
228     editMField(ProceduralVariableLocationsFieldMask, _mfProceduralVariableLocations);
230     return _mfProceduralVariableLocations[index];
233 //! Get the value of the \a index element the ShaderExecutableChunk::_mfAttributes field.
234 inline
235 const ShaderAttribute &ShaderExecutableChunkBase::getAttributes(const UInt32 index) const
237     return _mfAttributes[index];
240 inline
241 MFShaderAttribute  ::reference ShaderExecutableChunkBase::editAttributes(const UInt32 index)
243     editMField(AttributesFieldMask, _mfAttributes);
245     return _mfAttributes[index];
249 #ifdef OSG_MT_CPTR_ASPECT
250 inline
251 void ShaderExecutableChunkBase::execSync (      ShaderExecutableChunkBase *pFrom,
252                                         ConstFieldMaskArg  whichField,
253                                         AspectOffsetStore &oOffsets,
254                                         ConstFieldMaskArg  syncMode,
255                                   const UInt32             uiSyncInfo)
257     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
259     if(FieldBits::NoField != (VertexShaderFieldMask & whichField))
260         _mfVertexShader.syncWith(pFrom->_mfVertexShader,
261                                 syncMode,
262                                 uiSyncInfo,
263                                 oOffsets);
265     if(FieldBits::NoField != (TessControlShaderFieldMask & whichField))
266         _mfTessControlShader.syncWith(pFrom->_mfTessControlShader,
267                                 syncMode,
268                                 uiSyncInfo,
269                                 oOffsets);
271     if(FieldBits::NoField != (TessEvaluationShaderFieldMask & whichField))
272         _mfTessEvaluationShader.syncWith(pFrom->_mfTessEvaluationShader,
273                                 syncMode,
274                                 uiSyncInfo,
275                                 oOffsets);
277     if(FieldBits::NoField != (GeometryShaderFieldMask & whichField))
278         _mfGeometryShader.syncWith(pFrom->_mfGeometryShader,
279                                 syncMode,
280                                 uiSyncInfo,
281                                 oOffsets);
283     if(FieldBits::NoField != (FragmentShaderFieldMask & whichField))
284         _mfFragmentShader.syncWith(pFrom->_mfFragmentShader,
285                                 syncMode,
286                                 uiSyncInfo,
287                                 oOffsets);
289     if(FieldBits::NoField != (VariablesFieldMask & whichField))
290         _sfVariables.syncWith(pFrom->_sfVariables);
292     if(FieldBits::NoField != (VariableLocationsFieldMask & whichField))
293         _mfVariableLocations.syncWith(pFrom->_mfVariableLocations,
294                                 syncMode,
295                                 uiSyncInfo,
296                                 oOffsets);
298     if(FieldBits::NoField != (ProceduralVariableLocationsFieldMask & whichField))
299         _mfProceduralVariableLocations.syncWith(pFrom->_mfProceduralVariableLocations,
300                                 syncMode,
301                                 uiSyncInfo,
302                                 oOffsets);
304     if(FieldBits::NoField != (GeometryVerticesOutFieldMask & whichField))
305         _sfGeometryVerticesOut.syncWith(pFrom->_sfGeometryVerticesOut);
307     if(FieldBits::NoField != (GeometryInputTypeFieldMask & whichField))
308         _sfGeometryInputType.syncWith(pFrom->_sfGeometryInputType);
310     if(FieldBits::NoField != (GeometryOutputTypeFieldMask & whichField))
311         _sfGeometryOutputType.syncWith(pFrom->_sfGeometryOutputType);
313     if(FieldBits::NoField != (AttributesFieldMask & whichField))
314         _mfAttributes.syncWith(pFrom->_mfAttributes,
315                                 syncMode,
316                                 uiSyncInfo,
317                                 oOffsets);
319     if(FieldBits::NoField != (GLIdFieldMask & whichField))
320         _sfGLId.syncWith(pFrom->_sfGLId);
322     if(FieldBits::NoField != (PointSizeFieldMask & whichField))
323         _sfPointSize.syncWith(pFrom->_sfPointSize);
325 #endif
328 inline
329 const Char8 *ShaderExecutableChunkBase::getClassname(void)
331     return "ShaderExecutableChunk";
333 OSG_GEN_CONTAINERPTR(ShaderExecutableChunk);
335 OSG_END_NAMESPACE