fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Shader / Chunks / OSGShaderExecutableVarChunkBase.inl
blobb8d070179b17aba845626d757211837e9870eaea
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 ShaderExecutableVarChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ShaderExecutableVarChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ShaderExecutableVarChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ShaderExecutableVarChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ShaderExecutableVarChunk::_sfActiveShader field.
79 inline
80 UInt32 &ShaderExecutableVarChunkBase::editActiveShader(void)
82     editSField(ActiveShaderFieldMask);
84     return _sfActiveShader.getValue();
87 //! Get the value of the ShaderExecutableVarChunk::_sfActiveShader field.
88 inline
89       UInt32  ShaderExecutableVarChunkBase::getActiveShader(void) const
91     return _sfActiveShader.getValue();
94 //! Set the value of the ShaderExecutableVarChunk::_sfActiveShader field.
95 inline
96 void ShaderExecutableVarChunkBase::setActiveShader(const UInt32 value)
98     editSField(ActiveShaderFieldMask);
100     _sfActiveShader.setValue(value);
103 //! Get the value of the \a index element the ShaderExecutableVarChunk::_mfVariableLocations field.
104 inline
105       Int32  ShaderExecutableVarChunkBase::getVariableLocations(const UInt32 index) const
107     return _mfVariableLocations[index];
110 inline
111 MFInt32            ::reference ShaderExecutableVarChunkBase::editVariableLocations(const UInt32 index)
113     editMField(VariableLocationsFieldMask, _mfVariableLocations);
115     return _mfVariableLocations[index];
119 #ifdef OSG_MT_CPTR_ASPECT
120 inline
121 void ShaderExecutableVarChunkBase::execSync (      ShaderExecutableVarChunkBase *pFrom,
122                                         ConstFieldMaskArg  whichField,
123                                         AspectOffsetStore &oOffsets,
124                                         ConstFieldMaskArg  syncMode,
125                                   const UInt32             uiSyncInfo)
127     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
129     if(FieldBits::NoField != (ProgramVarChunksFieldMask & whichField))
130         _mfProgramVarChunks.syncWith(pFrom->_mfProgramVarChunks,
131                                 syncMode,
132                                 uiSyncInfo,
133                                 oOffsets);
135     if(FieldBits::NoField != (VariablesFieldMask & whichField))
136         _sfVariables.syncWith(pFrom->_sfVariables);
138     if(FieldBits::NoField != (VariableLocationsFieldMask & whichField))
139         _mfVariableLocations.syncWith(pFrom->_mfVariableLocations,
140                                 syncMode,
141                                 uiSyncInfo,
142                                 oOffsets);
144     if(FieldBits::NoField != (ActiveShaderFieldMask & whichField))
145         _sfActiveShader.syncWith(pFrom->_sfActiveShader);
147 #endif
150 inline
151 const Char8 *ShaderExecutableVarChunkBase::getClassname(void)
153     return "ShaderExecutableVarChunk";
155 OSG_GEN_CONTAINERPTR(ShaderExecutableVarChunk);
157 OSG_END_NAMESPACE