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
>(&AlgorithmComputeElementData::classDescInserter
),
120 "<?xml version=\"1.0\"?>\n"
123 " name=\"AlgorithmComputeElementData\"\n"
124 " parent=\"TraversalData\"\n"
125 " library=\"ContribComputeBase\"\n"
126 " pointerfieldtypes=\"none\"\n"
127 " structure=\"concrete\"\n"
128 " systemcomponent=\"true\"\n"
129 " parentsystemcomponent=\"true\"\n"
130 " decoratable=\"false\"\n"
131 " useLocalIncludes=\"false\"\n"
132 " isNodeCore=\"false\"\n"
133 " docGroupBase=\"GrpEffectsGroupsHDR\"\n"
135 " Data use for rendering by the HDR stage\n"
137 "</FieldContainer>\n",
138 "Data use for rendering by the HDR stage\n"
141 /*------------------------------ get -----------------------------------*/
143 FieldContainerType
&AlgorithmComputeElementDataBase::getType(void)
148 const FieldContainerType
&AlgorithmComputeElementDataBase::getType(void) const
153 UInt32
AlgorithmComputeElementDataBase::getContainerSize(void) const
155 return sizeof(AlgorithmComputeElementData
);
158 /*------------------------- decorator get ------------------------------*/
165 /*------------------------------ access -----------------------------------*/
167 SizeT
AlgorithmComputeElementDataBase::getBinSize(ConstFieldMaskArg whichField
)
169 SizeT returnValue
= Inherited::getBinSize(whichField
);
175 void AlgorithmComputeElementDataBase::copyToBin(BinaryDataHandler
&pMem
,
176 ConstFieldMaskArg whichField
)
178 Inherited::copyToBin(pMem
, whichField
);
182 void AlgorithmComputeElementDataBase::copyFromBin(BinaryDataHandler
&pMem
,
183 ConstFieldMaskArg whichField
)
185 Inherited::copyFromBin(pMem
, whichField
);
189 //! create a new instance of the class
190 AlgorithmComputeElementDataTransitPtr
AlgorithmComputeElementDataBase::createLocal(BitVector bFlags
)
192 AlgorithmComputeElementDataTransitPtr fc
;
194 if(getClassType().getPrototype() != NULL
)
196 FieldContainerTransitPtr tmpPtr
=
197 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
199 fc
= dynamic_pointer_cast
<AlgorithmComputeElementData
>(tmpPtr
);
205 //! create a new instance of the class, copy the container flags
206 AlgorithmComputeElementDataTransitPtr
AlgorithmComputeElementDataBase::createDependent(BitVector bFlags
)
208 AlgorithmComputeElementDataTransitPtr fc
;
210 if(getClassType().getPrototype() != NULL
)
212 FieldContainerTransitPtr tmpPtr
=
213 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
215 fc
= dynamic_pointer_cast
<AlgorithmComputeElementData
>(tmpPtr
);
221 //! create a new instance of the class
222 AlgorithmComputeElementDataTransitPtr
AlgorithmComputeElementDataBase::create(void)
224 AlgorithmComputeElementDataTransitPtr fc
;
226 if(getClassType().getPrototype() != NULL
)
228 FieldContainerTransitPtr tmpPtr
=
229 getClassType().getPrototype()-> shallowCopy();
231 fc
= dynamic_pointer_cast
<AlgorithmComputeElementData
>(tmpPtr
);
237 AlgorithmComputeElementData
*AlgorithmComputeElementDataBase::createEmptyLocal(BitVector bFlags
)
239 AlgorithmComputeElementData
*returnValue
;
241 newPtr
<AlgorithmComputeElementData
>(returnValue
, bFlags
);
243 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
248 //! create an empty new instance of the class, do not copy the prototype
249 AlgorithmComputeElementData
*AlgorithmComputeElementDataBase::createEmpty(void)
251 AlgorithmComputeElementData
*returnValue
;
253 newPtr
<AlgorithmComputeElementData
>(returnValue
, Thread::getCurrentLocalFlags());
255 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
256 ~Thread::getCurrentLocalFlags();
262 FieldContainerTransitPtr
AlgorithmComputeElementDataBase::shallowCopyLocal(
263 BitVector bFlags
) const
265 AlgorithmComputeElementData
*tmpPtr
;
267 newPtr(tmpPtr
, dynamic_cast<const AlgorithmComputeElementData
*>(this), bFlags
);
269 FieldContainerTransitPtr
returnValue(tmpPtr
);
271 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
276 FieldContainerTransitPtr
AlgorithmComputeElementDataBase::shallowCopyDependent(
277 BitVector bFlags
) const
279 AlgorithmComputeElementData
*tmpPtr
;
281 newPtr(tmpPtr
, dynamic_cast<const AlgorithmComputeElementData
*>(this), ~bFlags
);
283 FieldContainerTransitPtr
returnValue(tmpPtr
);
285 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
290 FieldContainerTransitPtr
AlgorithmComputeElementDataBase::shallowCopy(void) const
292 AlgorithmComputeElementData
*tmpPtr
;
295 dynamic_cast<const AlgorithmComputeElementData
*>(this),
296 Thread::getCurrentLocalFlags());
298 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
300 FieldContainerTransitPtr
returnValue(tmpPtr
);
308 /*------------------------- constructors ----------------------------------*/
310 AlgorithmComputeElementDataBase::AlgorithmComputeElementDataBase(void) :
315 AlgorithmComputeElementDataBase::AlgorithmComputeElementDataBase(const AlgorithmComputeElementDataBase
&source
) :
321 /*-------------------------- destructors ----------------------------------*/
323 AlgorithmComputeElementDataBase::~AlgorithmComputeElementDataBase(void)
329 #ifdef OSG_MT_CPTR_ASPECT
330 void AlgorithmComputeElementDataBase::execSyncV( FieldContainer
&oFrom
,
331 ConstFieldMaskArg whichField
,
332 AspectOffsetStore
&oOffsets
,
333 ConstFieldMaskArg syncMode
,
334 const UInt32 uiSyncInfo
)
336 AlgorithmComputeElementData
*pThis
= static_cast<AlgorithmComputeElementData
*>(this);
338 pThis
->execSync(static_cast<AlgorithmComputeElementData
*>(&oFrom
),
347 #ifdef OSG_MT_CPTR_ASPECT
348 FieldContainer
*AlgorithmComputeElementDataBase::createAspectCopy(
349 const FieldContainer
*pRefAspect
) const
351 AlgorithmComputeElementData
*returnValue
;
353 newAspectCopy(returnValue
,
354 dynamic_cast<const AlgorithmComputeElementData
*>(pRefAspect
),
355 dynamic_cast<const AlgorithmComputeElementData
*>(this));
361 void AlgorithmComputeElementDataBase::resolveLinks(void)
363 Inherited::resolveLinks();