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 "OSGScreenGroupBase.h"
67 #include "OSGScreenGroup.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::ScreenGroup
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<ScreenGroup
*, nsOSG
>::_type(
94 ScreenGroup::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(ScreenGroup
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void ScreenGroupBase::classDescInserter(TypeObject
&oType
)
117 ScreenGroupBase::TypeObject
ScreenGroupBase::_type(
118 ScreenGroupBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&ScreenGroupBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&ScreenGroup::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&ScreenGroup::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&ScreenGroup::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"ScreenGroup\"\n"
133 " parent=\"Group\"\n"
134 " library=\"Group\"\n"
135 " pointerfieldtypes=\"both\"\n"
136 " structure=\"concrete\"\n"
137 " systemcomponent=\"true\"\n"
138 " parentsystemcomponent=\"true\"\n"
139 " isNodeCore=\"true\"\n"
140 " docGroupBase=\"GrpGroupMisc\"\n"
142 "</FieldContainer>\n",
146 /*------------------------------ get -----------------------------------*/
148 FieldContainerType
&ScreenGroupBase::getType(void)
153 const FieldContainerType
&ScreenGroupBase::getType(void) const
158 UInt32
ScreenGroupBase::getContainerSize(void) const
160 return sizeof(ScreenGroup
);
163 /*------------------------- decorator get ------------------------------*/
170 /*------------------------------ access -----------------------------------*/
172 SizeT
ScreenGroupBase::getBinSize(ConstFieldMaskArg whichField
)
174 SizeT returnValue
= Inherited::getBinSize(whichField
);
180 void ScreenGroupBase::copyToBin(BinaryDataHandler
&pMem
,
181 ConstFieldMaskArg whichField
)
183 Inherited::copyToBin(pMem
, whichField
);
187 void ScreenGroupBase::copyFromBin(BinaryDataHandler
&pMem
,
188 ConstFieldMaskArg whichField
)
190 Inherited::copyFromBin(pMem
, whichField
);
194 //! create a new instance of the class
195 ScreenGroupTransitPtr
ScreenGroupBase::createLocal(BitVector bFlags
)
197 ScreenGroupTransitPtr fc
;
199 if(getClassType().getPrototype() != NULL
)
201 FieldContainerTransitPtr tmpPtr
=
202 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
204 fc
= dynamic_pointer_cast
<ScreenGroup
>(tmpPtr
);
210 //! create a new instance of the class, copy the container flags
211 ScreenGroupTransitPtr
ScreenGroupBase::createDependent(BitVector bFlags
)
213 ScreenGroupTransitPtr fc
;
215 if(getClassType().getPrototype() != NULL
)
217 FieldContainerTransitPtr tmpPtr
=
218 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
220 fc
= dynamic_pointer_cast
<ScreenGroup
>(tmpPtr
);
226 //! create a new instance of the class
227 ScreenGroupTransitPtr
ScreenGroupBase::create(void)
229 ScreenGroupTransitPtr fc
;
231 if(getClassType().getPrototype() != NULL
)
233 FieldContainerTransitPtr tmpPtr
=
234 getClassType().getPrototype()-> shallowCopy();
236 fc
= dynamic_pointer_cast
<ScreenGroup
>(tmpPtr
);
242 ScreenGroup
*ScreenGroupBase::createEmptyLocal(BitVector bFlags
)
244 ScreenGroup
*returnValue
;
246 newPtr
<ScreenGroup
>(returnValue
, bFlags
);
248 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
253 //! create an empty new instance of the class, do not copy the prototype
254 ScreenGroup
*ScreenGroupBase::createEmpty(void)
256 ScreenGroup
*returnValue
;
258 newPtr
<ScreenGroup
>(returnValue
, Thread::getCurrentLocalFlags());
260 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
261 ~Thread::getCurrentLocalFlags();
267 FieldContainerTransitPtr
ScreenGroupBase::shallowCopyLocal(
268 BitVector bFlags
) const
272 newPtr(tmpPtr
, dynamic_cast<const ScreenGroup
*>(this), bFlags
);
274 FieldContainerTransitPtr
returnValue(tmpPtr
);
276 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
281 FieldContainerTransitPtr
ScreenGroupBase::shallowCopyDependent(
282 BitVector bFlags
) const
286 newPtr(tmpPtr
, dynamic_cast<const ScreenGroup
*>(this), ~bFlags
);
288 FieldContainerTransitPtr
returnValue(tmpPtr
);
290 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
295 FieldContainerTransitPtr
ScreenGroupBase::shallowCopy(void) const
300 dynamic_cast<const ScreenGroup
*>(this),
301 Thread::getCurrentLocalFlags());
303 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
305 FieldContainerTransitPtr
returnValue(tmpPtr
);
313 /*------------------------- constructors ----------------------------------*/
315 ScreenGroupBase::ScreenGroupBase(void) :
320 ScreenGroupBase::ScreenGroupBase(const ScreenGroupBase
&source
) :
326 /*-------------------------- destructors ----------------------------------*/
328 ScreenGroupBase::~ScreenGroupBase(void)
334 #ifdef OSG_MT_CPTR_ASPECT
335 void ScreenGroupBase::execSyncV( FieldContainer
&oFrom
,
336 ConstFieldMaskArg whichField
,
337 AspectOffsetStore
&oOffsets
,
338 ConstFieldMaskArg syncMode
,
339 const UInt32 uiSyncInfo
)
341 ScreenGroup
*pThis
= static_cast<ScreenGroup
*>(this);
343 pThis
->execSync(static_cast<ScreenGroup
*>(&oFrom
),
352 #ifdef OSG_MT_CPTR_ASPECT
353 FieldContainer
*ScreenGroupBase::createAspectCopy(
354 const FieldContainer
*pRefAspect
) const
356 ScreenGroup
*returnValue
;
358 newAspectCopy(returnValue
,
359 dynamic_cast<const ScreenGroup
*>(pRefAspect
),
360 dynamic_cast<const ScreenGroup
*>(this));
366 void ScreenGroupBase::resolveLinks(void)
368 Inherited::resolveLinks();