1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ShaderValueVariable
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSHADERVALUEVARIABLEBASE_H_
55 #define _OSGSHADERVALUEVARIABLEBASE_H_
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"
76 class ShaderValueVariable
;
78 //! \brief ShaderValueVariable Base Class.
80 class OSG_SYSTEM_DLLMAPPING ShaderValueVariableBase
: public ShaderVariable
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 =================================*/
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 */
125 static FieldContainerType
&getClassType (void);
126 static UInt32
getClassTypeId (void);
127 static UInt16
getClassGroupId(void);
130 /*---------------------------------------------------------------------*/
131 /*! \name FieldContainer Get */
134 virtual FieldContainerType
&getType (void);
135 virtual const FieldContainerType
&getType (void) const;
137 virtual UInt32
getContainerSize(void) const;
140 /*---------------------------------------------------------------------*/
141 /*! \name Binary Access */
144 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
145 virtual void copyToBin (BinaryDataHandler
&pMem
,
146 ConstFieldMaskArg whichField
);
147 virtual void copyFromBin(BinaryDataHandler
&pMem
,
148 ConstFieldMaskArg whichField
);
152 /*========================= PROTECTED ===============================*/
156 static TypeObject _type
;
158 static void classDescInserter(TypeObject
&oType
);
159 static const Char8
*getClassname (void );
161 /*---------------------------------------------------------------------*/
165 MFUInt16 _mfVariableIdx
;
166 MFParentFieldContainerPtr _mfParents
;
167 MFUInt16 _mfExeVariableIdx
;
168 MFParentFieldContainerPtr _mfExeParents
;
171 /*---------------------------------------------------------------------*/
172 /*! \name Constructors */
175 ShaderValueVariableBase(void);
176 ShaderValueVariableBase(const ShaderValueVariableBase
&source
);
179 /*---------------------------------------------------------------------*/
180 /*! \name Destructors */
183 virtual ~ShaderValueVariableBase(void);
186 /*---------------------------------------------------------------------*/
187 /*! \name onCreate */
192 /*---------------------------------------------------------------------*/
193 /*! \name Parent linking */
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
);
203 /*---------------------------------------------------------------------*/
204 /*! \name Generic Field Access */
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);
217 /*---------------------------------------------------------------------*/
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
);
236 /*---------------------------------------------------------------------*/
241 /*---------------------------------------------------------------------*/
242 /*! \name Aspect Create */
246 /*---------------------------------------------------------------------*/
250 /*---------------------------------------------------------------------*/
254 virtual void resolveLinks(void);
257 /*========================== PRIVATE ================================*/
260 /*---------------------------------------------------------------------*/
262 // prohibit default functions (move to 'public' if you need one)
263 void operator =(const ShaderValueVariableBase
&source
);
266 typedef ShaderValueVariableBase
*ShaderValueVariableBaseP
;
270 #endif /* _OSGSHADERVALUEVARIABLEBASE_H_ */