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 ShaderProcVariable
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSHADERPROCVARIABLEBASE_H_
55 #define _OSGSHADERPROCVARIABLEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGShaderVariable.h" // Parent
68 #include "OSGSysFields.h" // Dependency type
69 #include "OSGFieldContainerFields.h" // Parents type
71 #include "OSGShaderProcVariableFields.h"
76 class ShaderProcVariable
;
78 //! \brief ShaderProcVariable Base Class.
80 class OSG_SYSTEM_DLLMAPPING ShaderProcVariableBase
: public ShaderVariable
84 typedef ShaderVariable Inherited
;
85 typedef ShaderVariable ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(ShaderProcVariable
);
92 /*========================== PUBLIC =================================*/
98 DependencyFieldId
= Inherited::NextFieldId
,
99 ParentsFieldId
= DependencyFieldId
+ 1,
100 NextFieldId
= ParentsFieldId
+ 1
103 static const OSG::BitVector DependencyFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< DependencyFieldId
);
105 static const OSG::BitVector ParentsFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< ParentsFieldId
);
107 static const OSG::BitVector NextFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
110 typedef SFUInt32 SFDependencyType
;
111 typedef MFParentFieldContainerPtr MFParentsType
;
113 /*---------------------------------------------------------------------*/
114 /*! \name Class Get */
117 static FieldContainerType
&getClassType (void);
118 static UInt32
getClassTypeId (void);
119 static UInt16
getClassGroupId(void);
122 /*---------------------------------------------------------------------*/
123 /*! \name FieldContainer Get */
126 virtual FieldContainerType
&getType (void);
127 virtual const FieldContainerType
&getType (void) const;
129 virtual UInt32
getContainerSize(void) const;
132 /*---------------------------------------------------------------------*/
133 /*! \name Field Get */
137 SFUInt32
*editSFDependency (void);
138 const SFUInt32
*getSFDependency (void) const;
141 UInt32
&editDependency (void);
142 UInt32
getDependency (void) const;
145 /*---------------------------------------------------------------------*/
146 /*! \name Field Set */
149 void setDependency (const UInt32 value
);
152 /*---------------------------------------------------------------------*/
153 /*! \name Ptr MField Set */
157 /*---------------------------------------------------------------------*/
158 /*! \name Binary Access */
161 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
162 virtual void copyToBin (BinaryDataHandler
&pMem
,
163 ConstFieldMaskArg whichField
);
164 virtual void copyFromBin(BinaryDataHandler
&pMem
,
165 ConstFieldMaskArg whichField
);
169 /*========================= PROTECTED ===============================*/
173 static TypeObject _type
;
175 static void classDescInserter(TypeObject
&oType
);
176 static const Char8
*getClassname (void );
178 /*---------------------------------------------------------------------*/
182 SFUInt32 _sfDependency
;
183 MFParentFieldContainerPtr _mfParents
;
186 /*---------------------------------------------------------------------*/
187 /*! \name Constructors */
190 ShaderProcVariableBase(void);
191 ShaderProcVariableBase(const ShaderProcVariableBase
&source
);
194 /*---------------------------------------------------------------------*/
195 /*! \name Destructors */
198 virtual ~ShaderProcVariableBase(void);
201 /*---------------------------------------------------------------------*/
202 /*! \name onCreate */
207 /*---------------------------------------------------------------------*/
208 /*! \name Parent linking */
211 virtual bool linkParent (FieldContainer
* const pParent
,
212 UInt16
const childFieldId
,
213 UInt16
const parentFieldId
);
214 virtual bool unlinkParent(FieldContainer
* const pParent
,
215 UInt16
const parentFieldId
);
218 /*---------------------------------------------------------------------*/
219 /*! \name Generic Field Access */
222 GetFieldHandlePtr
getHandleDependency (void) const;
223 EditFieldHandlePtr
editHandleDependency (void);
224 GetFieldHandlePtr
getHandleParents (void) const;
225 EditFieldHandlePtr
editHandleParents (void);
228 /*---------------------------------------------------------------------*/
232 #ifdef OSG_MT_CPTR_ASPECT
233 virtual void execSyncV( FieldContainer
&oFrom
,
234 ConstFieldMaskArg whichField
,
235 AspectOffsetStore
&oOffsets
,
236 ConstFieldMaskArg syncMode
,
237 const UInt32 uiSyncInfo
);
239 void execSync ( ShaderProcVariableBase
*pFrom
,
240 ConstFieldMaskArg whichField
,
241 AspectOffsetStore
&oOffsets
,
242 ConstFieldMaskArg syncMode
,
243 const UInt32 uiSyncInfo
);
247 /*---------------------------------------------------------------------*/
252 /*---------------------------------------------------------------------*/
253 /*! \name Aspect Create */
257 /*---------------------------------------------------------------------*/
261 /*---------------------------------------------------------------------*/
265 virtual void resolveLinks(void);
268 /*========================== PRIVATE ================================*/
271 /*---------------------------------------------------------------------*/
273 // prohibit default functions (move to 'public' if you need one)
274 void operator =(const ShaderProcVariableBase
&source
);
277 typedef ShaderProcVariableBase
*ShaderProcVariableBaseP
;
281 #endif /* _OSGSHADERPROCVARIABLEBASE_H_ */