changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Base / OSGLightEnvBase.cpp
blob48f85b3f1218891d1c544d52885283a3496945a0
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 LightEnv!
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 "OSGLightEnvBase.h"
67 #include "OSGLightEnv.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::LightEnv
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits<LightEnv *, nsOSG>::_type(
92 "LightEnvPtr",
93 "NodeCorePtr",
94 LightEnv::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(LightEnv *, nsOSG)
100 /***************************************************************************\
101 * Field Description *
102 \***************************************************************************/
104 void LightEnvBase::classDescInserter(TypeObject &oType)
109 LightEnvBase::TypeObject LightEnvBase::_type(
110 LightEnvBase::getClassname(),
111 Inherited::getClassname(),
112 "NULL",
113 nsOSG, //Namespace
114 reinterpret_cast<PrototypeCreateF>(&LightEnvBase::createEmptyLocal),
115 reinterpret_cast<InitContainerF>(&LightEnv::initMethod),
116 reinterpret_cast<ExitContainerF>(&LightEnv::exitMethod),
117 reinterpret_cast<InitalInsertDescFunc>(
118 reinterpret_cast<void *>(&LightEnv::classDescInserter)),
119 false,
121 "<?xml version=\"1.0\"?>\n"
122 "\n"
123 "<FieldContainer\n"
124 " name=\"LightEnv\"\n"
125 " parent=\"NodeCore\"\n"
126 " library=\"System\"\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=\"true\"\n"
134 " docGroupBase=\"GrpSystemNodeCoreGroups\"\n"
135 " >\n"
136 "</FieldContainer>\n",
140 /*------------------------------ get -----------------------------------*/
142 FieldContainerType &LightEnvBase::getType(void)
144 return _type;
147 const FieldContainerType &LightEnvBase::getType(void) const
149 return _type;
152 UInt32 LightEnvBase::getContainerSize(void) const
154 return sizeof(LightEnv);
157 /*------------------------- decorator get ------------------------------*/
164 /*------------------------------ access -----------------------------------*/
166 SizeT LightEnvBase::getBinSize(ConstFieldMaskArg whichField)
168 SizeT returnValue = Inherited::getBinSize(whichField);
171 return returnValue;
174 void LightEnvBase::copyToBin(BinaryDataHandler &pMem,
175 ConstFieldMaskArg whichField)
177 Inherited::copyToBin(pMem, whichField);
181 void LightEnvBase::copyFromBin(BinaryDataHandler &pMem,
182 ConstFieldMaskArg whichField)
184 Inherited::copyFromBin(pMem, whichField);
188 //! create a new instance of the class
189 LightEnvTransitPtr LightEnvBase::createLocal(BitVector bFlags)
191 LightEnvTransitPtr fc;
193 if(getClassType().getPrototype() != NULL)
195 FieldContainerTransitPtr tmpPtr =
196 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
198 fc = dynamic_pointer_cast<LightEnv>(tmpPtr);
201 return fc;
204 //! create a new instance of the class, copy the container flags
205 LightEnvTransitPtr LightEnvBase::createDependent(BitVector bFlags)
207 LightEnvTransitPtr fc;
209 if(getClassType().getPrototype() != NULL)
211 FieldContainerTransitPtr tmpPtr =
212 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
214 fc = dynamic_pointer_cast<LightEnv>(tmpPtr);
217 return fc;
220 //! create a new instance of the class
221 LightEnvTransitPtr LightEnvBase::create(void)
223 LightEnvTransitPtr fc;
225 if(getClassType().getPrototype() != NULL)
227 FieldContainerTransitPtr tmpPtr =
228 getClassType().getPrototype()-> shallowCopy();
230 fc = dynamic_pointer_cast<LightEnv>(tmpPtr);
233 return fc;
236 LightEnv *LightEnvBase::createEmptyLocal(BitVector bFlags)
238 LightEnv *returnValue;
240 newPtr<LightEnv>(returnValue, bFlags);
242 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
244 return returnValue;
247 //! create an empty new instance of the class, do not copy the prototype
248 LightEnv *LightEnvBase::createEmpty(void)
250 LightEnv *returnValue;
252 newPtr<LightEnv>(returnValue, Thread::getCurrentLocalFlags());
254 returnValue->_pFieldFlags->_bNamespaceMask &=
255 ~Thread::getCurrentLocalFlags();
257 return returnValue;
261 FieldContainerTransitPtr LightEnvBase::shallowCopyLocal(
262 BitVector bFlags) const
264 LightEnv *tmpPtr;
266 newPtr(tmpPtr, dynamic_cast<const LightEnv *>(this), bFlags);
268 FieldContainerTransitPtr returnValue(tmpPtr);
270 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
272 return returnValue;
275 FieldContainerTransitPtr LightEnvBase::shallowCopyDependent(
276 BitVector bFlags) const
278 LightEnv *tmpPtr;
280 newPtr(tmpPtr, dynamic_cast<const LightEnv *>(this), ~bFlags);
282 FieldContainerTransitPtr returnValue(tmpPtr);
284 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
286 return returnValue;
289 FieldContainerTransitPtr LightEnvBase::shallowCopy(void) const
291 LightEnv *tmpPtr;
293 newPtr(tmpPtr,
294 dynamic_cast<const LightEnv *>(this),
295 Thread::getCurrentLocalFlags());
297 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
299 FieldContainerTransitPtr returnValue(tmpPtr);
301 return returnValue;
307 /*------------------------- constructors ----------------------------------*/
309 LightEnvBase::LightEnvBase(void) :
310 Inherited()
314 LightEnvBase::LightEnvBase(const LightEnvBase &source) :
315 Inherited(source)
320 /*-------------------------- destructors ----------------------------------*/
322 LightEnvBase::~LightEnvBase(void)
328 #ifdef OSG_MT_CPTR_ASPECT
329 void LightEnvBase::execSyncV( FieldContainer &oFrom,
330 ConstFieldMaskArg whichField,
331 AspectOffsetStore &oOffsets,
332 ConstFieldMaskArg syncMode,
333 const UInt32 uiSyncInfo)
335 LightEnv *pThis = static_cast<LightEnv *>(this);
337 pThis->execSync(static_cast<LightEnv *>(&oFrom),
338 whichField,
339 oOffsets,
340 syncMode,
341 uiSyncInfo);
343 #endif
346 #ifdef OSG_MT_CPTR_ASPECT
347 FieldContainer *LightEnvBase::createAspectCopy(
348 const FieldContainer *pRefAspect) const
350 LightEnv *returnValue;
352 newAspectCopy(returnValue,
353 dynamic_cast<const LightEnv *>(pRefAspect),
354 dynamic_cast<const LightEnv *>(this));
356 return returnValue;
358 #endif
360 void LightEnvBase::resolveLinks(void)
362 Inherited::resolveLinks();
368 OSG_END_NAMESPACE