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 TraversalData!
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 "OSGTraversalDataBase.h"
67 #include "OSGTraversalData.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::TraversalData
78 Data use for rendering by the any stage, holds bookkeeping data
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<TraversalData
*, nsOSG
>::_type(
94 TraversalData::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(TraversalData
*, nsOSG
)
100 /***************************************************************************\
101 * Field Description *
102 \***************************************************************************/
104 void TraversalDataBase::classDescInserter(TypeObject
&oType
)
109 TraversalDataBase::TypeObject
TraversalDataBase::_type(
110 TraversalDataBase::getClassname(),
111 Inherited::getClassname(),
114 reinterpret_cast<PrototypeCreateF
>(&TraversalDataBase::createEmptyLocal
),
115 reinterpret_cast<InitContainerF
>(&TraversalData::initMethod
),
116 reinterpret_cast<ExitContainerF
>(&TraversalData::exitMethod
),
117 reinterpret_cast<InitalInsertDescFunc
>(
118 reinterpret_cast<void *>(&TraversalData::classDescInserter
)),
121 "<?xml version=\"1.0\"?>\n"
124 " name=\"TraversalData\"\n"
125 " parent=\"FieldContainer\"\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=\"false\"\n"
134 " isBundle=\"true\"\n"
135 " docGroupBase=\"GrpGroupStage\"\n"
137 " Data use for rendering by the any stage, holds bookkeeping data\n"
138 "</FieldContainer>\n",
139 "Data use for rendering by the any stage, holds bookkeeping data\n"
142 /*------------------------------ get -----------------------------------*/
144 FieldContainerType
&TraversalDataBase::getType(void)
149 const FieldContainerType
&TraversalDataBase::getType(void) const
154 UInt32
TraversalDataBase::getContainerSize(void) const
156 return sizeof(TraversalData
);
159 /*------------------------- decorator get ------------------------------*/
166 /*------------------------------ access -----------------------------------*/
168 SizeT
TraversalDataBase::getBinSize(ConstFieldMaskArg whichField
)
170 SizeT returnValue
= Inherited::getBinSize(whichField
);
176 void TraversalDataBase::copyToBin(BinaryDataHandler
&pMem
,
177 ConstFieldMaskArg whichField
)
179 Inherited::copyToBin(pMem
, whichField
);
183 void TraversalDataBase::copyFromBin(BinaryDataHandler
&pMem
,
184 ConstFieldMaskArg whichField
)
186 Inherited::copyFromBin(pMem
, whichField
);
190 //! create a new instance of the class
191 TraversalDataTransitPtr
TraversalDataBase::createLocal(BitVector bFlags
)
193 TraversalDataTransitPtr fc
;
195 if(getClassType().getPrototype() != NULL
)
197 FieldContainerTransitPtr tmpPtr
=
198 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
200 fc
= dynamic_pointer_cast
<TraversalData
>(tmpPtr
);
206 //! create a new instance of the class, copy the container flags
207 TraversalDataTransitPtr
TraversalDataBase::createDependent(BitVector bFlags
)
209 TraversalDataTransitPtr fc
;
211 if(getClassType().getPrototype() != NULL
)
213 FieldContainerTransitPtr tmpPtr
=
214 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
216 fc
= dynamic_pointer_cast
<TraversalData
>(tmpPtr
);
222 //! create a new instance of the class
223 TraversalDataTransitPtr
TraversalDataBase::create(void)
225 return createLocal();
228 TraversalData
*TraversalDataBase::createEmptyLocal(BitVector bFlags
)
230 TraversalData
*returnValue
;
232 newPtr
<TraversalData
>(returnValue
, bFlags
);
234 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
239 //! create an empty new instance of the class, do not copy the prototype
240 TraversalData
*TraversalDataBase::createEmpty(void)
242 return createEmptyLocal();
246 FieldContainerTransitPtr
TraversalDataBase::shallowCopyLocal(
247 BitVector bFlags
) const
249 TraversalData
*tmpPtr
;
251 newPtr(tmpPtr
, dynamic_cast<const TraversalData
*>(this), bFlags
);
253 FieldContainerTransitPtr
returnValue(tmpPtr
);
255 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
260 FieldContainerTransitPtr
TraversalDataBase::shallowCopyDependent(
261 BitVector bFlags
) const
263 TraversalData
*tmpPtr
;
265 newPtr(tmpPtr
, dynamic_cast<const TraversalData
*>(this), ~bFlags
);
267 FieldContainerTransitPtr
returnValue(tmpPtr
);
269 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
274 FieldContainerTransitPtr
TraversalDataBase::shallowCopy(void) const
276 return shallowCopyLocal();
282 /*------------------------- constructors ----------------------------------*/
284 TraversalDataBase::TraversalDataBase(void) :
289 TraversalDataBase::TraversalDataBase(const TraversalDataBase
&source
) :
295 /*-------------------------- destructors ----------------------------------*/
297 TraversalDataBase::~TraversalDataBase(void)
303 #ifdef OSG_MT_CPTR_ASPECT
304 void TraversalDataBase::execSyncV( FieldContainer
&oFrom
,
305 ConstFieldMaskArg whichField
,
306 AspectOffsetStore
&oOffsets
,
307 ConstFieldMaskArg syncMode
,
308 const UInt32 uiSyncInfo
)
310 TraversalData
*pThis
= static_cast<TraversalData
*>(this);
312 pThis
->execSync(static_cast<TraversalData
*>(&oFrom
),
321 #ifdef OSG_MT_CPTR_ASPECT
322 FieldContainer
*TraversalDataBase::createAspectCopy(
323 const FieldContainer
*pRefAspect
) const
325 TraversalData
*returnValue
;
327 newAspectCopy(returnValue
,
328 dynamic_cast<const TraversalData
*>(pRefAspect
),
329 dynamic_cast<const TraversalData
*>(this));
335 void TraversalDataBase::resolveLinks(void)
337 Inherited::resolveLinks();