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 AlgorithmComputeElement
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGALGORITHMCOMPUTEELEMENTBASE_H_
55 #define _OSGALGORITHMCOMPUTEELEMENTBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribComputeBaseDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGComputeElement.h" // Parent
68 #include "OSGComputeAlgorithmFields.h" // Algorithm type
70 #include "OSGAlgorithmComputeElementFields.h"
75 class AlgorithmComputeElement
;
77 //! \brief AlgorithmComputeElement Base Class.
79 class OSG_CONTRIBCOMPUTEBASE_DLLMAPPING AlgorithmComputeElementBase
: public ComputeElement
83 typedef ComputeElement Inherited
;
84 typedef ComputeElement ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(AlgorithmComputeElement
);
91 /*========================== PUBLIC =================================*/
97 AlgorithmFieldId
= Inherited::NextFieldId
,
98 NextFieldId
= AlgorithmFieldId
+ 1
101 static const OSG::BitVector AlgorithmFieldMask
=
102 (TypeTraits
<BitVector
>::One
<< AlgorithmFieldId
);
103 static const OSG::BitVector NextFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
106 typedef SFUnrecComputeAlgorithmPtr SFAlgorithmType
;
108 /*---------------------------------------------------------------------*/
109 /*! \name Class Get */
112 static FieldContainerType
&getClassType (void);
113 static UInt32
getClassTypeId (void);
114 static UInt16
getClassGroupId(void);
117 /*---------------------------------------------------------------------*/
118 /*! \name FieldContainer Get */
121 virtual FieldContainerType
&getType (void);
122 virtual const FieldContainerType
&getType (void) const;
124 virtual UInt32
getContainerSize(void) const;
127 /*---------------------------------------------------------------------*/
128 /*! \name Field Get */
131 const SFUnrecComputeAlgorithmPtr
*getSFAlgorithm (void) const;
132 SFUnrecComputeAlgorithmPtr
*editSFAlgorithm (void);
135 ComputeAlgorithm
* getAlgorithm (void) const;
138 /*---------------------------------------------------------------------*/
139 /*! \name Field Set */
142 void setAlgorithm (ComputeAlgorithm
* const value
);
145 /*---------------------------------------------------------------------*/
146 /*! \name Ptr Field Set */
150 /*---------------------------------------------------------------------*/
151 /*! \name Ptr MField Set */
155 /*---------------------------------------------------------------------*/
156 /*! \name Binary Access */
159 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
160 virtual void copyToBin (BinaryDataHandler
&pMem
,
161 ConstFieldMaskArg whichField
);
162 virtual void copyFromBin(BinaryDataHandler
&pMem
,
163 ConstFieldMaskArg whichField
);
167 /*---------------------------------------------------------------------*/
168 /*! \name Construction */
171 static AlgorithmComputeElementTransitPtr
create (void);
172 static AlgorithmComputeElement
*createEmpty (void);
174 static AlgorithmComputeElementTransitPtr
createLocal (
175 BitVector bFlags
= FCLocal::All
);
177 static AlgorithmComputeElement
*createEmptyLocal(
178 BitVector bFlags
= FCLocal::All
);
180 static AlgorithmComputeElementTransitPtr
createDependent (BitVector bFlags
);
183 /*---------------------------------------------------------------------*/
187 virtual FieldContainerTransitPtr
shallowCopy (void) const;
188 virtual FieldContainerTransitPtr
shallowCopyLocal(
189 BitVector bFlags
= FCLocal::All
) const;
190 virtual FieldContainerTransitPtr
shallowCopyDependent(
191 BitVector bFlags
) const;
194 /*========================= PROTECTED ===============================*/
198 static TypeObject _type
;
200 static void classDescInserter(TypeObject
&oType
);
201 static const Char8
*getClassname (void );
203 /*---------------------------------------------------------------------*/
207 SFUnrecComputeAlgorithmPtr _sfAlgorithm
;
210 /*---------------------------------------------------------------------*/
211 /*! \name Constructors */
214 AlgorithmComputeElementBase(void);
215 AlgorithmComputeElementBase(const AlgorithmComputeElementBase
&source
);
218 /*---------------------------------------------------------------------*/
219 /*! \name Destructors */
222 virtual ~AlgorithmComputeElementBase(void);
225 /*---------------------------------------------------------------------*/
226 /*! \name onCreate */
229 void onCreate(const AlgorithmComputeElement
*source
= NULL
);
232 /*---------------------------------------------------------------------*/
233 /*! \name Generic Field Access */
236 GetFieldHandlePtr
getHandleAlgorithm (void) const;
237 EditFieldHandlePtr
editHandleAlgorithm (void);
240 /*---------------------------------------------------------------------*/
244 #ifdef OSG_MT_CPTR_ASPECT
245 virtual void execSyncV( FieldContainer
&oFrom
,
246 ConstFieldMaskArg whichField
,
247 AspectOffsetStore
&oOffsets
,
248 ConstFieldMaskArg syncMode
,
249 const UInt32 uiSyncInfo
);
251 void execSync ( AlgorithmComputeElementBase
*pFrom
,
252 ConstFieldMaskArg whichField
,
253 AspectOffsetStore
&oOffsets
,
254 ConstFieldMaskArg syncMode
,
255 const UInt32 uiSyncInfo
);
259 /*---------------------------------------------------------------------*/
264 /*---------------------------------------------------------------------*/
265 /*! \name Aspect Create */
268 #ifdef OSG_MT_CPTR_ASPECT
269 virtual FieldContainer
*createAspectCopy(
270 const FieldContainer
*pRefAspect
) const;
274 /*---------------------------------------------------------------------*/
278 /*---------------------------------------------------------------------*/
282 virtual void resolveLinks(void);
285 /*========================== PRIVATE ================================*/
288 /*---------------------------------------------------------------------*/
290 // prohibit default functions (move to 'public' if you need one)
291 void operator =(const AlgorithmComputeElementBase
&source
);
294 typedef AlgorithmComputeElementBase
*AlgorithmComputeElementBaseP
;
296 typedef CoredNodeRefPtr
<AlgorithmComputeElement
> AlgorithmComputeElementNodeRefPtr
;
297 typedef CoredNodeMTRefPtr
<AlgorithmComputeElement
> AlgorithmComputeElementNodeMTRefPtr
;
301 #endif /* _OSGALGORITHMCOMPUTEELEMENTBASE_H_ */