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 InverseTransform!
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 "OSGInverseTransformBase.h"
67 #include "OSGInverseTransform.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::InverseTransform
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<InverseTransform
*, nsOSG
>::_type(
92 "InverseTransformPtr",
94 InverseTransform::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(InverseTransform
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void InverseTransformBase::classDescInserter(TypeObject
&oType
)
117 InverseTransformBase::TypeObject
InverseTransformBase::_type(
118 InverseTransformBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&InverseTransformBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&InverseTransform::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&InverseTransform::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&InverseTransform::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"InverseTransform\"\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 " decoratable=\"false\"\n"
140 " useLocalIncludes=\"false\"\n"
141 " isNodeCore=\"true\"\n"
142 " docGroupBase=\"GrpGroupMisc\"\n"
144 "</FieldContainer>\n",
148 /*------------------------------ get -----------------------------------*/
150 FieldContainerType
&InverseTransformBase::getType(void)
155 const FieldContainerType
&InverseTransformBase::getType(void) const
160 UInt32
InverseTransformBase::getContainerSize(void) const
162 return sizeof(InverseTransform
);
165 /*------------------------- decorator get ------------------------------*/
172 /*------------------------------ access -----------------------------------*/
174 SizeT
InverseTransformBase::getBinSize(ConstFieldMaskArg whichField
)
176 SizeT returnValue
= Inherited::getBinSize(whichField
);
182 void InverseTransformBase::copyToBin(BinaryDataHandler
&pMem
,
183 ConstFieldMaskArg whichField
)
185 Inherited::copyToBin(pMem
, whichField
);
189 void InverseTransformBase::copyFromBin(BinaryDataHandler
&pMem
,
190 ConstFieldMaskArg whichField
)
192 Inherited::copyFromBin(pMem
, whichField
);
196 //! create a new instance of the class
197 InverseTransformTransitPtr
InverseTransformBase::createLocal(BitVector bFlags
)
199 InverseTransformTransitPtr fc
;
201 if(getClassType().getPrototype() != NULL
)
203 FieldContainerTransitPtr tmpPtr
=
204 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
206 fc
= dynamic_pointer_cast
<InverseTransform
>(tmpPtr
);
212 //! create a new instance of the class, copy the container flags
213 InverseTransformTransitPtr
InverseTransformBase::createDependent(BitVector bFlags
)
215 InverseTransformTransitPtr fc
;
217 if(getClassType().getPrototype() != NULL
)
219 FieldContainerTransitPtr tmpPtr
=
220 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
222 fc
= dynamic_pointer_cast
<InverseTransform
>(tmpPtr
);
228 //! create a new instance of the class
229 InverseTransformTransitPtr
InverseTransformBase::create(void)
231 InverseTransformTransitPtr fc
;
233 if(getClassType().getPrototype() != NULL
)
235 FieldContainerTransitPtr tmpPtr
=
236 getClassType().getPrototype()-> shallowCopy();
238 fc
= dynamic_pointer_cast
<InverseTransform
>(tmpPtr
);
244 InverseTransform
*InverseTransformBase::createEmptyLocal(BitVector bFlags
)
246 InverseTransform
*returnValue
;
248 newPtr
<InverseTransform
>(returnValue
, bFlags
);
250 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
255 //! create an empty new instance of the class, do not copy the prototype
256 InverseTransform
*InverseTransformBase::createEmpty(void)
258 InverseTransform
*returnValue
;
260 newPtr
<InverseTransform
>(returnValue
, Thread::getCurrentLocalFlags());
262 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
263 ~Thread::getCurrentLocalFlags();
269 FieldContainerTransitPtr
InverseTransformBase::shallowCopyLocal(
270 BitVector bFlags
) const
272 InverseTransform
*tmpPtr
;
274 newPtr(tmpPtr
, dynamic_cast<const InverseTransform
*>(this), bFlags
);
276 FieldContainerTransitPtr
returnValue(tmpPtr
);
278 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
283 FieldContainerTransitPtr
InverseTransformBase::shallowCopyDependent(
284 BitVector bFlags
) const
286 InverseTransform
*tmpPtr
;
288 newPtr(tmpPtr
, dynamic_cast<const InverseTransform
*>(this), ~bFlags
);
290 FieldContainerTransitPtr
returnValue(tmpPtr
);
292 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
297 FieldContainerTransitPtr
InverseTransformBase::shallowCopy(void) const
299 InverseTransform
*tmpPtr
;
302 dynamic_cast<const InverseTransform
*>(this),
303 Thread::getCurrentLocalFlags());
305 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
307 FieldContainerTransitPtr
returnValue(tmpPtr
);
315 /*------------------------- constructors ----------------------------------*/
317 InverseTransformBase::InverseTransformBase(void) :
322 InverseTransformBase::InverseTransformBase(const InverseTransformBase
&source
) :
328 /*-------------------------- destructors ----------------------------------*/
330 InverseTransformBase::~InverseTransformBase(void)
336 #ifdef OSG_MT_CPTR_ASPECT
337 void InverseTransformBase::execSyncV( FieldContainer
&oFrom
,
338 ConstFieldMaskArg whichField
,
339 AspectOffsetStore
&oOffsets
,
340 ConstFieldMaskArg syncMode
,
341 const UInt32 uiSyncInfo
)
343 InverseTransform
*pThis
= static_cast<InverseTransform
*>(this);
345 pThis
->execSync(static_cast<InverseTransform
*>(&oFrom
),
354 #ifdef OSG_MT_CPTR_ASPECT
355 FieldContainer
*InverseTransformBase::createAspectCopy(
356 const FieldContainer
*pRefAspect
) const
358 InverseTransform
*returnValue
;
360 newAspectCopy(returnValue
,
361 dynamic_cast<const InverseTransform
*>(pRefAspect
),
362 dynamic_cast<const InverseTransform
*>(this));
368 void InverseTransformBase::resolveLinks(void)
370 Inherited::resolveLinks();