fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Shader / SHL / OSGSimpleSHLChunkBase.inl
blob9a83040b71bf0fb3c4f9b7d301bbe82f0480a5e4
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 SimpleSHLChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &SimpleSHLChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 SimpleSHLChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 SimpleSHLChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the SimpleSHLChunk::_sfVertexProgram field.
79 inline
80 std::string &SimpleSHLChunkBase::editVertexProgram(void)
82     editSField(VertexProgramFieldMask);
84     return _sfVertexProgram.getValue();
87 //! Get the value of the SimpleSHLChunk::_sfVertexProgram field.
88 inline
89 const std::string &SimpleSHLChunkBase::getVertexProgram(void) const
91     return _sfVertexProgram.getValue();
94 //! Set the value of the SimpleSHLChunk::_sfVertexProgram field.
95 inline
96 void SimpleSHLChunkBase::setVertexProgram(const std::string &value)
98     editSField(VertexProgramFieldMask);
100     _sfVertexProgram.setValue(value);
102 //! Get the value of the SimpleSHLChunk::_sfTessControlProgram field.
104 inline
105 std::string &SimpleSHLChunkBase::editTessControlProgram(void)
107     editSField(TessControlProgramFieldMask);
109     return _sfTessControlProgram.getValue();
112 //! Get the value of the SimpleSHLChunk::_sfTessControlProgram field.
113 inline
114 const std::string &SimpleSHLChunkBase::getTessControlProgram(void) const
116     return _sfTessControlProgram.getValue();
119 //! Set the value of the SimpleSHLChunk::_sfTessControlProgram field.
120 inline
121 void SimpleSHLChunkBase::setTessControlProgram(const std::string &value)
123     editSField(TessControlProgramFieldMask);
125     _sfTessControlProgram.setValue(value);
127 //! Get the value of the SimpleSHLChunk::_sfTessEvaluationProgram field.
129 inline
130 std::string &SimpleSHLChunkBase::editTessEvaluationProgram(void)
132     editSField(TessEvaluationProgramFieldMask);
134     return _sfTessEvaluationProgram.getValue();
137 //! Get the value of the SimpleSHLChunk::_sfTessEvaluationProgram field.
138 inline
139 const std::string &SimpleSHLChunkBase::getTessEvaluationProgram(void) const
141     return _sfTessEvaluationProgram.getValue();
144 //! Set the value of the SimpleSHLChunk::_sfTessEvaluationProgram field.
145 inline
146 void SimpleSHLChunkBase::setTessEvaluationProgram(const std::string &value)
148     editSField(TessEvaluationProgramFieldMask);
150     _sfTessEvaluationProgram.setValue(value);
152 //! Get the value of the SimpleSHLChunk::_sfGeometryProgram field.
154 inline
155 std::string &SimpleSHLChunkBase::editGeometryProgram(void)
157     editSField(GeometryProgramFieldMask);
159     return _sfGeometryProgram.getValue();
162 //! Get the value of the SimpleSHLChunk::_sfGeometryProgram field.
163 inline
164 const std::string &SimpleSHLChunkBase::getGeometryProgram(void) const
166     return _sfGeometryProgram.getValue();
169 //! Set the value of the SimpleSHLChunk::_sfGeometryProgram field.
170 inline
171 void SimpleSHLChunkBase::setGeometryProgram(const std::string &value)
173     editSField(GeometryProgramFieldMask);
175     _sfGeometryProgram.setValue(value);
177 //! Get the value of the SimpleSHLChunk::_sfFragmentProgram field.
179 inline
180 std::string &SimpleSHLChunkBase::editFragmentProgram(void)
182     editSField(FragmentProgramFieldMask);
184     return _sfFragmentProgram.getValue();
187 //! Get the value of the SimpleSHLChunk::_sfFragmentProgram field.
188 inline
189 const std::string &SimpleSHLChunkBase::getFragmentProgram(void) const
191     return _sfFragmentProgram.getValue();
194 //! Set the value of the SimpleSHLChunk::_sfFragmentProgram field.
195 inline
196 void SimpleSHLChunkBase::setFragmentProgram(const std::string &value)
198     editSField(FragmentProgramFieldMask);
200     _sfFragmentProgram.setValue(value);
202 //! Get the value of the SimpleSHLChunk::_sfCgFrontEnd field.
204 inline
205 bool &SimpleSHLChunkBase::editCgFrontEnd(void)
207     editSField(CgFrontEndFieldMask);
209     return _sfCgFrontEnd.getValue();
212 //! Get the value of the SimpleSHLChunk::_sfCgFrontEnd field.
213 inline
214       bool  SimpleSHLChunkBase::getCgFrontEnd(void) const
216     return _sfCgFrontEnd.getValue();
219 //! Set the value of the SimpleSHLChunk::_sfCgFrontEnd field.
220 inline
221 void SimpleSHLChunkBase::setCgFrontEnd(const bool value)
223     editSField(CgFrontEndFieldMask);
225     _sfCgFrontEnd.setValue(value);
227 //! Get the value of the SimpleSHLChunk::_sfGLId field.
229 inline
230 UInt32 &SimpleSHLChunkBase::editGLId(void)
232     editSField(GLIdFieldMask);
234     return _sfGLId.getValue();
237 //! Get the value of the SimpleSHLChunk::_sfGLId field.
238 inline
239       UInt32  SimpleSHLChunkBase::getGLId(void) const
241     return _sfGLId.getValue();
244 //! Set the value of the SimpleSHLChunk::_sfGLId field.
245 inline
246 void SimpleSHLChunkBase::setGLId(const UInt32 value)
248     editSField(GLIdFieldMask);
250     _sfGLId.setValue(value);
252 //! Get the value of the SimpleSHLChunk::_sfPointSize field.
254 inline
255 bool &SimpleSHLChunkBase::editPointSize(void)
257     editSField(PointSizeFieldMask);
259     return _sfPointSize.getValue();
262 //! Get the value of the SimpleSHLChunk::_sfPointSize field.
263 inline
264       bool  SimpleSHLChunkBase::getPointSize(void) const
266     return _sfPointSize.getValue();
269 //! Set the value of the SimpleSHLChunk::_sfPointSize field.
270 inline
271 void SimpleSHLChunkBase::setPointSize(const bool value)
273     editSField(PointSizeFieldMask);
275     _sfPointSize.setValue(value);
278 //! Get the value of the \a index element the SimpleSHLChunk::_mfVariableLocations field.
279 inline
280       Int32  SimpleSHLChunkBase::getVariableLocations(const UInt32 index) const
282     return _mfVariableLocations[index];
285 inline
286 MFInt32            ::reference SimpleSHLChunkBase::editVariableLocations(const UInt32 index)
288     editMField(VariableLocationsFieldMask, _mfVariableLocations);
290     return _mfVariableLocations[index];
293 //! Get the value of the \a index element the SimpleSHLChunk::_mfProceduralVariableLocations field.
294 inline
295       Int32  SimpleSHLChunkBase::getProceduralVariableLocations(const UInt32 index) const
297     return _mfProceduralVariableLocations[index];
300 inline
301 MFInt32            ::reference SimpleSHLChunkBase::editProceduralVariableLocations(const UInt32 index)
303     editMField(ProceduralVariableLocationsFieldMask, _mfProceduralVariableLocations);
305     return _mfProceduralVariableLocations[index];
309 #ifdef OSG_MT_CPTR_ASPECT
310 inline
311 void SimpleSHLChunkBase::execSync (      SimpleSHLChunkBase *pFrom,
312                                         ConstFieldMaskArg  whichField,
313                                         AspectOffsetStore &oOffsets,
314                                         ConstFieldMaskArg  syncMode,
315                                   const UInt32             uiSyncInfo)
317     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
319     if(FieldBits::NoField != (VertexProgramFieldMask & whichField))
320         _sfVertexProgram.syncWith(pFrom->_sfVertexProgram);
322     if(FieldBits::NoField != (TessControlProgramFieldMask & whichField))
323         _sfTessControlProgram.syncWith(pFrom->_sfTessControlProgram);
325     if(FieldBits::NoField != (TessEvaluationProgramFieldMask & whichField))
326         _sfTessEvaluationProgram.syncWith(pFrom->_sfTessEvaluationProgram);
328     if(FieldBits::NoField != (GeometryProgramFieldMask & whichField))
329         _sfGeometryProgram.syncWith(pFrom->_sfGeometryProgram);
331     if(FieldBits::NoField != (FragmentProgramFieldMask & whichField))
332         _sfFragmentProgram.syncWith(pFrom->_sfFragmentProgram);
334     if(FieldBits::NoField != (CgFrontEndFieldMask & whichField))
335         _sfCgFrontEnd.syncWith(pFrom->_sfCgFrontEnd);
337     if(FieldBits::NoField != (VariablesFieldMask & whichField))
338         _sfVariables.syncWith(pFrom->_sfVariables);
340     if(FieldBits::NoField != (VariableLocationsFieldMask & whichField))
341         _mfVariableLocations.syncWith(pFrom->_mfVariableLocations,
342                                 syncMode,
343                                 uiSyncInfo,
344                                 oOffsets);
346     if(FieldBits::NoField != (ProceduralVariableLocationsFieldMask & whichField))
347         _mfProceduralVariableLocations.syncWith(pFrom->_mfProceduralVariableLocations,
348                                 syncMode,
349                                 uiSyncInfo,
350                                 oOffsets);
352     if(FieldBits::NoField != (GLIdFieldMask & whichField))
353         _sfGLId.syncWith(pFrom->_sfGLId);
355     if(FieldBits::NoField != (PointSizeFieldMask & whichField))
356         _sfPointSize.syncWith(pFrom->_sfPointSize);
358 #endif
361 inline
362 const Char8 *SimpleSHLChunkBase::getClassname(void)
364     return "SimpleSHLChunk";
366 OSG_GEN_CONTAINERPTR(SimpleSHLChunk);
368 OSG_END_NAMESPACE