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 ComputeElement
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCOMPUTEELEMENTBASE_H_
55 #define _OSGCOMPUTEELEMENTBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribComputeBaseDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGGroup.h" // Parent
69 #include "OSGComputeElementFields.h"
71 #include "OSGComputeElementParent.h"
78 //! \brief ComputeElement Base Class.
80 class OSG_CONTRIBCOMPUTEBASE_DLLMAPPING ComputeElementBase
: public ComputeElementParent
84 typedef ComputeElementParent Inherited
;
85 typedef Group ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(ComputeElement
);
92 /*========================== PUBLIC =================================*/
97 /*---------------------------------------------------------------------*/
98 /*! \name Class Get */
101 static FieldContainerType
&getClassType (void);
102 static UInt32
getClassTypeId (void);
103 static UInt16
getClassGroupId(void);
106 /*---------------------------------------------------------------------*/
107 /*! \name FieldContainer Get */
110 virtual FieldContainerType
&getType (void);
111 virtual const FieldContainerType
&getType (void) const;
113 virtual UInt32
getContainerSize(void) const;
116 /*---------------------------------------------------------------------*/
117 /*! \name Binary Access */
120 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
121 virtual void copyToBin (BinaryDataHandler
&pMem
,
122 ConstFieldMaskArg whichField
);
123 virtual void copyFromBin(BinaryDataHandler
&pMem
,
124 ConstFieldMaskArg whichField
);
128 /*---------------------------------------------------------------------*/
129 /*! \name Construction */
132 static ComputeElementTransitPtr
create (void);
133 static ComputeElement
*createEmpty (void);
135 static ComputeElementTransitPtr
createLocal (
136 BitVector bFlags
= FCLocal::All
);
138 static ComputeElement
*createEmptyLocal(
139 BitVector bFlags
= FCLocal::All
);
141 static ComputeElementTransitPtr
createDependent (BitVector bFlags
);
144 /*---------------------------------------------------------------------*/
148 virtual FieldContainerTransitPtr
shallowCopy (void) const;
149 virtual FieldContainerTransitPtr
shallowCopyLocal(
150 BitVector bFlags
= FCLocal::All
) const;
151 virtual FieldContainerTransitPtr
shallowCopyDependent(
152 BitVector bFlags
) const;
155 /*========================= PROTECTED ===============================*/
159 static TypeObject _type
;
161 static void classDescInserter(TypeObject
&oType
);
162 static const Char8
*getClassname (void );
164 /*---------------------------------------------------------------------*/
165 /*! \name Constructors */
168 ComputeElementBase(void);
169 ComputeElementBase(const ComputeElementBase
&source
);
172 /*---------------------------------------------------------------------*/
173 /*! \name Destructors */
176 virtual ~ComputeElementBase(void);
179 /*---------------------------------------------------------------------*/
180 /*! \name onCreate */
185 /*---------------------------------------------------------------------*/
186 /*! \name Generic Field Access */
191 /*---------------------------------------------------------------------*/
195 #ifdef OSG_MT_CPTR_ASPECT
196 virtual void execSyncV( FieldContainer
&oFrom
,
197 ConstFieldMaskArg whichField
,
198 AspectOffsetStore
&oOffsets
,
199 ConstFieldMaskArg syncMode
,
200 const UInt32 uiSyncInfo
);
202 void execSync ( ComputeElementBase
*pFrom
,
203 ConstFieldMaskArg whichField
,
204 AspectOffsetStore
&oOffsets
,
205 ConstFieldMaskArg syncMode
,
206 const UInt32 uiSyncInfo
);
210 /*---------------------------------------------------------------------*/
215 /*---------------------------------------------------------------------*/
216 /*! \name Aspect Create */
219 #ifdef OSG_MT_CPTR_ASPECT
220 virtual FieldContainer
*createAspectCopy(
221 const FieldContainer
*pRefAspect
) const;
225 /*---------------------------------------------------------------------*/
229 /*---------------------------------------------------------------------*/
233 virtual void resolveLinks(void);
236 /*========================== PRIVATE ================================*/
239 /*---------------------------------------------------------------------*/
241 // prohibit default functions (move to 'public' if you need one)
242 void operator =(const ComputeElementBase
&source
);
245 typedef ComputeElementBase
*ComputeElementBaseP
;
247 typedef CoredNodeRefPtr
<ComputeElement
> ComputeElementNodeRefPtr
;
248 typedef CoredNodeMTRefPtr
<ComputeElement
> ComputeElementNodeMTRefPtr
;
252 #endif /* _OSGCOMPUTEELEMENTBASE_H_ */