fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComputeBase / ComputeShader / OSGComputeShaderAlgorithmBase.inl
blob2aaaa9ec209ce2c3caee6f8df17875a58ded20ce
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 ComputeShaderAlgorithm!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ComputeShaderAlgorithmBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ComputeShaderAlgorithmBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ComputeShaderAlgorithmBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ComputeShaderAlgorithm::_sfDispatchConfig field.
79 inline
80 Vec3i &ComputeShaderAlgorithmBase::editDispatchConfig(void)
82     editSField(DispatchConfigFieldMask);
84     return _sfDispatchConfig.getValue();
87 //! Get the value of the ComputeShaderAlgorithm::_sfDispatchConfig field.
88 inline
89 const Vec3i &ComputeShaderAlgorithmBase::getDispatchConfig(void) const
91     return _sfDispatchConfig.getValue();
94 //! Set the value of the ComputeShaderAlgorithm::_sfDispatchConfig field.
95 inline
96 void ComputeShaderAlgorithmBase::setDispatchConfig(const Vec3i &value)
98     editSField(DispatchConfigFieldMask);
100     _sfDispatchConfig.setValue(value);
102 //! Get the value of the ComputeShaderAlgorithm::_sfWorkGroupSize field.
104 inline
105 Vec3i &ComputeShaderAlgorithmBase::editWorkGroupSize(void)
107     editSField(WorkGroupSizeFieldMask);
109     return _sfWorkGroupSize.getValue();
112 //! Get the value of the ComputeShaderAlgorithm::_sfWorkGroupSize field.
113 inline
114 const Vec3i &ComputeShaderAlgorithmBase::getWorkGroupSize(void) const
116     return _sfWorkGroupSize.getValue();
119 //! Set the value of the ComputeShaderAlgorithm::_sfWorkGroupSize field.
120 inline
121 void ComputeShaderAlgorithmBase::setWorkGroupSize(const Vec3i &value)
123     editSField(WorkGroupSizeFieldMask);
125     _sfWorkGroupSize.setValue(value);
127 //! Get the value of the ComputeShaderAlgorithm::_sfUseMemoryBarrier field.
129 inline
130 bool &ComputeShaderAlgorithmBase::editUseMemoryBarrier(void)
132     editSField(UseMemoryBarrierFieldMask);
134     return _sfUseMemoryBarrier.getValue();
137 //! Get the value of the ComputeShaderAlgorithm::_sfUseMemoryBarrier field.
138 inline
139       bool  ComputeShaderAlgorithmBase::getUseMemoryBarrier(void) const
141     return _sfUseMemoryBarrier.getValue();
144 //! Set the value of the ComputeShaderAlgorithm::_sfUseMemoryBarrier field.
145 inline
146 void ComputeShaderAlgorithmBase::setUseMemoryBarrier(const bool value)
148     editSField(UseMemoryBarrierFieldMask);
150     _sfUseMemoryBarrier.setValue(value);
152 //! Get the value of the ComputeShaderAlgorithm::_sfUseVariableWorkGroupSize field.
154 inline
155 bool &ComputeShaderAlgorithmBase::editUseVariableWorkGroupSize(void)
157     editSField(UseVariableWorkGroupSizeFieldMask);
159     return _sfUseVariableWorkGroupSize.getValue();
162 //! Get the value of the ComputeShaderAlgorithm::_sfUseVariableWorkGroupSize field.
163 inline
164       bool  ComputeShaderAlgorithmBase::getUseVariableWorkGroupSize(void) const
166     return _sfUseVariableWorkGroupSize.getValue();
169 //! Set the value of the ComputeShaderAlgorithm::_sfUseVariableWorkGroupSize field.
170 inline
171 void ComputeShaderAlgorithmBase::setUseVariableWorkGroupSize(const bool value)
173     editSField(UseVariableWorkGroupSizeFieldMask);
175     _sfUseVariableWorkGroupSize.setValue(value);
177 //! Get the value of the ComputeShaderAlgorithm::_sfMemoryBarrier field.
179 inline
180 GLenum &ComputeShaderAlgorithmBase::editMemoryBarrier(void)
182     editSField(MemoryBarrierFieldMask);
184     return _sfMemoryBarrier.getValue();
187 //! Get the value of the ComputeShaderAlgorithm::_sfMemoryBarrier field.
188 inline
189 const GLenum &ComputeShaderAlgorithmBase::getMemoryBarrier(void) const
191     return _sfMemoryBarrier.getValue();
194 //! Set the value of the ComputeShaderAlgorithm::_sfMemoryBarrier field.
195 inline
196 void ComputeShaderAlgorithmBase::setMemoryBarrier(const GLenum &value)
198     editSField(MemoryBarrierFieldMask);
200     _sfMemoryBarrier.setValue(value);
205 #ifdef OSG_MT_CPTR_ASPECT
206 inline
207 void ComputeShaderAlgorithmBase::execSync (      ComputeShaderAlgorithmBase *pFrom,
208                                         ConstFieldMaskArg  whichField,
209                                         AspectOffsetStore &oOffsets,
210                                         ConstFieldMaskArg  syncMode,
211                                   const UInt32             uiSyncInfo)
213     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
215     if(FieldBits::NoField != (TextureImagesFieldMask & whichField))
216         _mfTextureImages.syncWith(pFrom->_mfTextureImages,
217                                 syncMode,
218                                 uiSyncInfo,
219                                 oOffsets);
221     if(FieldBits::NoField != (ChunkMaterialFieldMask & whichField))
222         _sfChunkMaterial.syncWith(pFrom->_sfChunkMaterial);
224     if(FieldBits::NoField != (ComputeShaderFieldMask & whichField))
225         _sfComputeShader.syncWith(pFrom->_sfComputeShader);
227     if(FieldBits::NoField != (DispatchConfigFieldMask & whichField))
228         _sfDispatchConfig.syncWith(pFrom->_sfDispatchConfig);
230     if(FieldBits::NoField != (WorkGroupSizeFieldMask & whichField))
231         _sfWorkGroupSize.syncWith(pFrom->_sfWorkGroupSize);
233     if(FieldBits::NoField != (UseMemoryBarrierFieldMask & whichField))
234         _sfUseMemoryBarrier.syncWith(pFrom->_sfUseMemoryBarrier);
236     if(FieldBits::NoField != (UseVariableWorkGroupSizeFieldMask & whichField))
237         _sfUseVariableWorkGroupSize.syncWith(pFrom->_sfUseVariableWorkGroupSize);
239     if(FieldBits::NoField != (MemoryBarrierFieldMask & whichField))
240         _sfMemoryBarrier.syncWith(pFrom->_sfMemoryBarrier);
242 #endif
245 inline
246 const Char8 *ComputeShaderAlgorithmBase::getClassname(void)
248     return "ComputeShaderAlgorithm";
250 OSG_GEN_CONTAINERPTR(ComputeShaderAlgorithm);
252 OSG_END_NAMESPACE