fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Shader / Variables / OSGShaderValueVariableBase.h
blobfbd2814588d6c0706116caddb4eb7d6a07dd7dca
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ShaderValueVariable
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSHADERVALUEVARIABLEBASE_H_
55 #define _OSGSHADERVALUEVARIABLEBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGShaderVariable.h" // Parent
68 #include "OSGSysFields.h" // VariableIdx type
69 #include "OSGFieldContainerFields.h" // Parents type
71 #include "OSGShaderValueVariableFields.h"
73 OSG_BEGIN_NAMESPACE
76 class ShaderValueVariable;
78 //! \brief ShaderValueVariable Base Class.
80 class OSG_SYSTEM_DLLMAPPING ShaderValueVariableBase : public ShaderVariable
82 public:
84 typedef ShaderVariable Inherited;
85 typedef ShaderVariable ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(ShaderValueVariable);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 VariableIdxFieldId = Inherited::NextFieldId,
99 ParentsFieldId = VariableIdxFieldId + 1,
100 ExeVariableIdxFieldId = ParentsFieldId + 1,
101 ExeParentsFieldId = ExeVariableIdxFieldId + 1,
102 NextFieldId = ExeParentsFieldId + 1
105 static const OSG::BitVector VariableIdxFieldMask =
106 (TypeTraits<BitVector>::One << VariableIdxFieldId);
107 static const OSG::BitVector ParentsFieldMask =
108 (TypeTraits<BitVector>::One << ParentsFieldId);
109 static const OSG::BitVector ExeVariableIdxFieldMask =
110 (TypeTraits<BitVector>::One << ExeVariableIdxFieldId);
111 static const OSG::BitVector ExeParentsFieldMask =
112 (TypeTraits<BitVector>::One << ExeParentsFieldId);
113 static const OSG::BitVector NextFieldMask =
114 (TypeTraits<BitVector>::One << NextFieldId);
116 typedef MFUInt16 MFVariableIdxType;
117 typedef MFParentFieldContainerPtr MFParentsType;
118 typedef MFUInt16 MFExeVariableIdxType;
119 typedef MFParentFieldContainerPtr MFExeParentsType;
121 /*---------------------------------------------------------------------*/
122 /*! \name Class Get */
123 /*! \{ */
125 static FieldContainerType &getClassType (void);
126 static UInt32 getClassTypeId (void);
127 static UInt16 getClassGroupId(void);
129 /*! \} */
130 /*---------------------------------------------------------------------*/
131 /*! \name FieldContainer Get */
132 /*! \{ */
134 virtual FieldContainerType &getType (void);
135 virtual const FieldContainerType &getType (void) const;
137 virtual UInt32 getContainerSize(void) const;
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Binary Access */
142 /*! \{ */
144 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
145 virtual void copyToBin (BinaryDataHandler &pMem,
146 ConstFieldMaskArg whichField);
147 virtual void copyFromBin(BinaryDataHandler &pMem,
148 ConstFieldMaskArg whichField);
151 /*! \} */
152 /*========================= PROTECTED ===============================*/
154 protected:
156 static TypeObject _type;
158 static void classDescInserter(TypeObject &oType);
159 static const Char8 *getClassname (void );
161 /*---------------------------------------------------------------------*/
162 /*! \name Fields */
163 /*! \{ */
165 MFUInt16 _mfVariableIdx;
166 MFParentFieldContainerPtr _mfParents;
167 MFUInt16 _mfExeVariableIdx;
168 MFParentFieldContainerPtr _mfExeParents;
170 /*! \} */
171 /*---------------------------------------------------------------------*/
172 /*! \name Constructors */
173 /*! \{ */
175 ShaderValueVariableBase(void);
176 ShaderValueVariableBase(const ShaderValueVariableBase &source);
178 /*! \} */
179 /*---------------------------------------------------------------------*/
180 /*! \name Destructors */
181 /*! \{ */
183 virtual ~ShaderValueVariableBase(void);
185 /*! \} */
186 /*---------------------------------------------------------------------*/
187 /*! \name onCreate */
188 /*! \{ */
191 /*! \} */
192 /*---------------------------------------------------------------------*/
193 /*! \name Parent linking */
194 /*! \{ */
196 virtual bool linkParent (FieldContainer * const pParent,
197 UInt16 const childFieldId,
198 UInt16 const parentFieldId);
199 virtual bool unlinkParent(FieldContainer * const pParent,
200 UInt16 const parentFieldId);
202 /*! \} */
203 /*---------------------------------------------------------------------*/
204 /*! \name Generic Field Access */
205 /*! \{ */
207 GetFieldHandlePtr getHandleVariableIdx (void) const;
208 EditFieldHandlePtr editHandleVariableIdx (void);
209 GetFieldHandlePtr getHandleParents (void) const;
210 EditFieldHandlePtr editHandleParents (void);
211 GetFieldHandlePtr getHandleExeVariableIdx (void) const;
212 EditFieldHandlePtr editHandleExeVariableIdx (void);
213 GetFieldHandlePtr getHandleExeParents (void) const;
214 EditFieldHandlePtr editHandleExeParents (void);
216 /*! \} */
217 /*---------------------------------------------------------------------*/
218 /*! \name Sync */
219 /*! \{ */
221 #ifdef OSG_MT_CPTR_ASPECT
222 virtual void execSyncV( FieldContainer &oFrom,
223 ConstFieldMaskArg whichField,
224 AspectOffsetStore &oOffsets,
225 ConstFieldMaskArg syncMode ,
226 const UInt32 uiSyncInfo);
228 void execSync ( ShaderValueVariableBase *pFrom,
229 ConstFieldMaskArg whichField,
230 AspectOffsetStore &oOffsets,
231 ConstFieldMaskArg syncMode ,
232 const UInt32 uiSyncInfo);
233 #endif
235 /*! \} */
236 /*---------------------------------------------------------------------*/
237 /*! \name Edit */
238 /*! \{ */
240 /*! \} */
241 /*---------------------------------------------------------------------*/
242 /*! \name Aspect Create */
243 /*! \{ */
245 /*! \} */
246 /*---------------------------------------------------------------------*/
247 /*! \name Edit */
248 /*! \{ */
249 /*! \} */
250 /*---------------------------------------------------------------------*/
251 /*! \name Sync */
252 /*! \{ */
254 virtual void resolveLinks(void);
256 /*! \} */
257 /*========================== PRIVATE ================================*/
259 private:
260 /*---------------------------------------------------------------------*/
262 // prohibit default functions (move to 'public' if you need one)
263 void operator =(const ShaderValueVariableBase &source);
266 typedef ShaderValueVariableBase *ShaderValueVariableBaseP;
268 OSG_END_NAMESPACE
270 #endif /* _OSGSHADERVALUEVARIABLEBASE_H_ */