fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComputeBase / Base / OSGAlgorithmComputeElementDataBase.cpp
blob21f25479dd9dbf6367cd598663237484c8e21a22
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class AlgorithmComputeElementData!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
66 #include "OSGAlgorithmComputeElementDataBase.h"
67 #include "OSGAlgorithmComputeElementData.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
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",
93 "TraversalDataPtr",
94 AlgorithmComputeElementData::getClassType(),
95 nsOSG);
96 #endif
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(),
112 "NULL",
113 nsOSG, //Namespace
114 reinterpret_cast<PrototypeCreateF>(&AlgorithmComputeElementDataBase::createEmptyLocal),
115 reinterpret_cast<InitContainerF>(&AlgorithmComputeElementData::initMethod),
116 reinterpret_cast<ExitContainerF>(&AlgorithmComputeElementData::exitMethod),
117 reinterpret_cast<InitalInsertDescFunc>(&AlgorithmComputeElementData::classDescInserter),
118 false,
120 "<?xml version=\"1.0\"?>\n"
121 "\n"
122 "<FieldContainer\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"
134 " >\n"
135 " Data use for rendering by the HDR stage\n"
136 "\n"
137 "</FieldContainer>\n",
138 "Data use for rendering by the HDR stage\n"
141 /*------------------------------ get -----------------------------------*/
143 FieldContainerType &AlgorithmComputeElementDataBase::getType(void)
145 return _type;
148 const FieldContainerType &AlgorithmComputeElementDataBase::getType(void) const
150 return _type;
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);
172 return returnValue;
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);
202 return fc;
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);
218 return fc;
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);
234 return fc;
237 AlgorithmComputeElementData *AlgorithmComputeElementDataBase::createEmptyLocal(BitVector bFlags)
239 AlgorithmComputeElementData *returnValue;
241 newPtr<AlgorithmComputeElementData>(returnValue, bFlags);
243 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
245 return returnValue;
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();
258 return returnValue;
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;
273 return returnValue;
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;
287 return returnValue;
290 FieldContainerTransitPtr AlgorithmComputeElementDataBase::shallowCopy(void) const
292 AlgorithmComputeElementData *tmpPtr;
294 newPtr(tmpPtr,
295 dynamic_cast<const AlgorithmComputeElementData *>(this),
296 Thread::getCurrentLocalFlags());
298 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
300 FieldContainerTransitPtr returnValue(tmpPtr);
302 return returnValue;
308 /*------------------------- constructors ----------------------------------*/
310 AlgorithmComputeElementDataBase::AlgorithmComputeElementDataBase(void) :
311 Inherited()
315 AlgorithmComputeElementDataBase::AlgorithmComputeElementDataBase(const AlgorithmComputeElementDataBase &source) :
316 Inherited(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),
339 whichField,
340 oOffsets,
341 syncMode,
342 uiSyncInfo);
344 #endif
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));
357 return returnValue;
359 #endif
361 void AlgorithmComputeElementDataBase::resolveLinks(void)
363 Inherited::resolveLinks();
369 OSG_END_NAMESPACE