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 **
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 "OSGLightEnvBase.h"
67 #include "OSGLightEnv.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
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(
94 LightEnv::getClassType(),
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(),
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
)),
121 "<?xml version=\"1.0\"?>\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"
136 "</FieldContainer>\n",
140 /*------------------------------ get -----------------------------------*/
142 FieldContainerType
&LightEnvBase::getType(void)
147 const FieldContainerType
&LightEnvBase::getType(void) const
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
);
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
);
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
);
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
);
236 LightEnv
*LightEnvBase::createEmptyLocal(BitVector bFlags
)
238 LightEnv
*returnValue
;
240 newPtr
<LightEnv
>(returnValue
, bFlags
);
242 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
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();
261 FieldContainerTransitPtr
LightEnvBase::shallowCopyLocal(
262 BitVector bFlags
) const
266 newPtr(tmpPtr
, dynamic_cast<const LightEnv
*>(this), bFlags
);
268 FieldContainerTransitPtr
returnValue(tmpPtr
);
270 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
275 FieldContainerTransitPtr
LightEnvBase::shallowCopyDependent(
276 BitVector bFlags
) const
280 newPtr(tmpPtr
, dynamic_cast<const LightEnv
*>(this), ~bFlags
);
282 FieldContainerTransitPtr
returnValue(tmpPtr
);
284 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
289 FieldContainerTransitPtr
LightEnvBase::shallowCopy(void) const
294 dynamic_cast<const LightEnv
*>(this),
295 Thread::getCurrentLocalFlags());
297 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
299 FieldContainerTransitPtr
returnValue(tmpPtr
);
307 /*------------------------- constructors ----------------------------------*/
309 LightEnvBase::LightEnvBase(void) :
314 LightEnvBase::LightEnvBase(const LightEnvBase
&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
),
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));
360 void LightEnvBase::resolveLinks(void)
362 Inherited::resolveLinks();