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 AlgorithmComputeElementData!
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
66 #include "OSGAlgorithmComputeElementDataBase.h"
67 #include "OSGAlgorithmComputeElementData.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::AlgorithmComputeElementData
78 Data use for rendering by the HDR stage
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<AlgorithmComputeElementData
*, nsOSG
>::_type(
92 "AlgorithmComputeElementDataPtr",
94 AlgorithmComputeElementData::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(AlgorithmComputeElementData
*, nsOSG
)
100 /***************************************************************************\
101 * Field Description *
102 \***************************************************************************/
104 void AlgorithmComputeElementDataBase::classDescInserter(TypeObject
&oType
)
109 AlgorithmComputeElementDataBase::TypeObject
AlgorithmComputeElementDataBase::_type(
110 AlgorithmComputeElementDataBase::getClassname(),
111 Inherited::getClassname(),
114 reinterpret_cast<PrototypeCreateF
>(&AlgorithmComputeElementDataBase::createEmptyLocal
),
115 reinterpret_cast<InitContainerF
>(&AlgorithmComputeElementData::initMethod
),
116 reinterpret_cast<ExitContainerF
>(&AlgorithmComputeElementData::exitMethod
),
117 reinterpret_cast<InitalInsertDescFunc
>(
118 reinterpret_cast<void *>(&AlgorithmComputeElementData::classDescInserter
)),
121 "<?xml version=\"1.0\"?>\n"
124 " name=\"AlgorithmComputeElementData\"\n"
125 " parent=\"TraversalData\"\n"
126 " library=\"ContribComputeBase\"\n"
127 " pointerfieldtypes=\"none\"\n"
128 " structure=\"concrete\"\n"
129 " systemcomponent=\"true\"\n"
130 " parentsystemcomponent=\"true\"\n"
131 " decoratable=\"false\"\n"
132 " useLocalIncludes=\"false\"\n"
133 " isNodeCore=\"false\"\n"
134 " docGroupBase=\"GrpEffectsGroupsHDR\"\n"
136 " Data use for rendering by the HDR stage\n"
138 "</FieldContainer>\n",
139 "Data use for rendering by the HDR stage\n"
142 /*------------------------------ get -----------------------------------*/
144 FieldContainerType
&AlgorithmComputeElementDataBase::getType(void)
149 const FieldContainerType
&AlgorithmComputeElementDataBase::getType(void) const
154 UInt32
AlgorithmComputeElementDataBase::getContainerSize(void) const
156 return sizeof(AlgorithmComputeElementData
);
159 /*------------------------- decorator get ------------------------------*/
166 /*------------------------------ access -----------------------------------*/
168 SizeT
AlgorithmComputeElementDataBase::getBinSize(ConstFieldMaskArg whichField
)
170 SizeT returnValue
= Inherited::getBinSize(whichField
);
176 void AlgorithmComputeElementDataBase::copyToBin(BinaryDataHandler
&pMem
,
177 ConstFieldMaskArg whichField
)
179 Inherited::copyToBin(pMem
, whichField
);
183 void AlgorithmComputeElementDataBase::copyFromBin(BinaryDataHandler
&pMem
,
184 ConstFieldMaskArg whichField
)
186 Inherited::copyFromBin(pMem
, whichField
);
190 //! create a new instance of the class
191 AlgorithmComputeElementDataTransitPtr
AlgorithmComputeElementDataBase::createLocal(BitVector bFlags
)
193 AlgorithmComputeElementDataTransitPtr fc
;
195 if(getClassType().getPrototype() != NULL
)
197 FieldContainerTransitPtr tmpPtr
=
198 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
200 fc
= dynamic_pointer_cast
<AlgorithmComputeElementData
>(tmpPtr
);
206 //! create a new instance of the class, copy the container flags
207 AlgorithmComputeElementDataTransitPtr
AlgorithmComputeElementDataBase::createDependent(BitVector bFlags
)
209 AlgorithmComputeElementDataTransitPtr fc
;
211 if(getClassType().getPrototype() != NULL
)
213 FieldContainerTransitPtr tmpPtr
=
214 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
216 fc
= dynamic_pointer_cast
<AlgorithmComputeElementData
>(tmpPtr
);
222 //! create a new instance of the class
223 AlgorithmComputeElementDataTransitPtr
AlgorithmComputeElementDataBase::create(void)
225 AlgorithmComputeElementDataTransitPtr fc
;
227 if(getClassType().getPrototype() != NULL
)
229 FieldContainerTransitPtr tmpPtr
=
230 getClassType().getPrototype()-> shallowCopy();
232 fc
= dynamic_pointer_cast
<AlgorithmComputeElementData
>(tmpPtr
);
238 AlgorithmComputeElementData
*AlgorithmComputeElementDataBase::createEmptyLocal(BitVector bFlags
)
240 AlgorithmComputeElementData
*returnValue
;
242 newPtr
<AlgorithmComputeElementData
>(returnValue
, bFlags
);
244 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
249 //! create an empty new instance of the class, do not copy the prototype
250 AlgorithmComputeElementData
*AlgorithmComputeElementDataBase::createEmpty(void)
252 AlgorithmComputeElementData
*returnValue
;
254 newPtr
<AlgorithmComputeElementData
>(returnValue
, Thread::getCurrentLocalFlags());
256 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
257 ~Thread::getCurrentLocalFlags();
263 FieldContainerTransitPtr
AlgorithmComputeElementDataBase::shallowCopyLocal(
264 BitVector bFlags
) const
266 AlgorithmComputeElementData
*tmpPtr
;
268 newPtr(tmpPtr
, dynamic_cast<const AlgorithmComputeElementData
*>(this), bFlags
);
270 FieldContainerTransitPtr
returnValue(tmpPtr
);
272 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
277 FieldContainerTransitPtr
AlgorithmComputeElementDataBase::shallowCopyDependent(
278 BitVector bFlags
) const
280 AlgorithmComputeElementData
*tmpPtr
;
282 newPtr(tmpPtr
, dynamic_cast<const AlgorithmComputeElementData
*>(this), ~bFlags
);
284 FieldContainerTransitPtr
returnValue(tmpPtr
);
286 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
291 FieldContainerTransitPtr
AlgorithmComputeElementDataBase::shallowCopy(void) const
293 AlgorithmComputeElementData
*tmpPtr
;
296 dynamic_cast<const AlgorithmComputeElementData
*>(this),
297 Thread::getCurrentLocalFlags());
299 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
301 FieldContainerTransitPtr
returnValue(tmpPtr
);
309 /*------------------------- constructors ----------------------------------*/
311 AlgorithmComputeElementDataBase::AlgorithmComputeElementDataBase(void) :
316 AlgorithmComputeElementDataBase::AlgorithmComputeElementDataBase(const AlgorithmComputeElementDataBase
&source
) :
322 /*-------------------------- destructors ----------------------------------*/
324 AlgorithmComputeElementDataBase::~AlgorithmComputeElementDataBase(void)
330 #ifdef OSG_MT_CPTR_ASPECT
331 void AlgorithmComputeElementDataBase::execSyncV( FieldContainer
&oFrom
,
332 ConstFieldMaskArg whichField
,
333 AspectOffsetStore
&oOffsets
,
334 ConstFieldMaskArg syncMode
,
335 const UInt32 uiSyncInfo
)
337 AlgorithmComputeElementData
*pThis
= static_cast<AlgorithmComputeElementData
*>(this);
339 pThis
->execSync(static_cast<AlgorithmComputeElementData
*>(&oFrom
),
348 #ifdef OSG_MT_CPTR_ASPECT
349 FieldContainer
*AlgorithmComputeElementDataBase::createAspectCopy(
350 const FieldContainer
*pRefAspect
) const
352 AlgorithmComputeElementData
*returnValue
;
354 newAspectCopy(returnValue
,
355 dynamic_cast<const AlgorithmComputeElementData
*>(pRefAspect
),
356 dynamic_cast<const AlgorithmComputeElementData
*>(this));
362 void AlgorithmComputeElementDataBase::resolveLinks(void)
364 Inherited::resolveLinks();