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 CPUSkinningAlgorithm!
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 "OSGCPUSkinningAlgorithmBase.h"
67 #include "OSGCPUSkinningAlgorithm.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::CPUSkinningAlgorithm
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<CPUSkinningAlgorithm
*, nsOSG
>::_type(
92 "CPUSkinningAlgorithmPtr",
93 "SkinningAlgorithmPtr",
94 CPUSkinningAlgorithm::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(CPUSkinningAlgorithm
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
101 CPUSkinningAlgorithm
*,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
105 CPUSkinningAlgorithm
*,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void CPUSkinningAlgorithmBase::classDescInserter(TypeObject
&oType
)
117 CPUSkinningAlgorithmBase::TypeObject
CPUSkinningAlgorithmBase::_type(
118 CPUSkinningAlgorithmBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&CPUSkinningAlgorithmBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&CPUSkinningAlgorithm::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&CPUSkinningAlgorithm::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&CPUSkinningAlgorithm::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"CPUSkinningAlgorithm\"\n"
133 " parent=\"SkinningAlgorithm\"\n"
134 " library=\"Dynamics\"\n"
135 " pointerfieldtypes=\"both\"\n"
136 " structure=\"concrete\"\n"
137 " systemcomponent=\"true\"\n"
138 " parentsystemcomponent=\"true\"\n"
139 " decoratable=\"false\"\n"
140 " childFields=\"none\"\n"
141 " parentFields=\"none\"\n"
143 "</FieldContainer>\n",
147 /*------------------------------ get -----------------------------------*/
149 FieldContainerType
&CPUSkinningAlgorithmBase::getType(void)
154 const FieldContainerType
&CPUSkinningAlgorithmBase::getType(void) const
159 UInt32
CPUSkinningAlgorithmBase::getContainerSize(void) const
161 return sizeof(CPUSkinningAlgorithm
);
164 /*------------------------- decorator get ------------------------------*/
171 /*------------------------------ access -----------------------------------*/
173 SizeT
CPUSkinningAlgorithmBase::getBinSize(ConstFieldMaskArg whichField
)
175 SizeT returnValue
= Inherited::getBinSize(whichField
);
181 void CPUSkinningAlgorithmBase::copyToBin(BinaryDataHandler
&pMem
,
182 ConstFieldMaskArg whichField
)
184 Inherited::copyToBin(pMem
, whichField
);
188 void CPUSkinningAlgorithmBase::copyFromBin(BinaryDataHandler
&pMem
,
189 ConstFieldMaskArg whichField
)
191 Inherited::copyFromBin(pMem
, whichField
);
195 //! create a new instance of the class
196 CPUSkinningAlgorithmTransitPtr
CPUSkinningAlgorithmBase::createLocal(BitVector bFlags
)
198 CPUSkinningAlgorithmTransitPtr fc
;
200 if(getClassType().getPrototype() != NULL
)
202 FieldContainerTransitPtr tmpPtr
=
203 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
205 fc
= dynamic_pointer_cast
<CPUSkinningAlgorithm
>(tmpPtr
);
211 //! create a new instance of the class, copy the container flags
212 CPUSkinningAlgorithmTransitPtr
CPUSkinningAlgorithmBase::createDependent(BitVector bFlags
)
214 CPUSkinningAlgorithmTransitPtr fc
;
216 if(getClassType().getPrototype() != NULL
)
218 FieldContainerTransitPtr tmpPtr
=
219 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
221 fc
= dynamic_pointer_cast
<CPUSkinningAlgorithm
>(tmpPtr
);
227 //! create a new instance of the class
228 CPUSkinningAlgorithmTransitPtr
CPUSkinningAlgorithmBase::create(void)
230 CPUSkinningAlgorithmTransitPtr fc
;
232 if(getClassType().getPrototype() != NULL
)
234 FieldContainerTransitPtr tmpPtr
=
235 getClassType().getPrototype()-> shallowCopy();
237 fc
= dynamic_pointer_cast
<CPUSkinningAlgorithm
>(tmpPtr
);
243 CPUSkinningAlgorithm
*CPUSkinningAlgorithmBase::createEmptyLocal(BitVector bFlags
)
245 CPUSkinningAlgorithm
*returnValue
;
247 newPtr
<CPUSkinningAlgorithm
>(returnValue
, bFlags
);
249 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
254 //! create an empty new instance of the class, do not copy the prototype
255 CPUSkinningAlgorithm
*CPUSkinningAlgorithmBase::createEmpty(void)
257 CPUSkinningAlgorithm
*returnValue
;
259 newPtr
<CPUSkinningAlgorithm
>(returnValue
, Thread::getCurrentLocalFlags());
261 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
262 ~Thread::getCurrentLocalFlags();
268 FieldContainerTransitPtr
CPUSkinningAlgorithmBase::shallowCopyLocal(
269 BitVector bFlags
) const
271 CPUSkinningAlgorithm
*tmpPtr
;
273 newPtr(tmpPtr
, dynamic_cast<const CPUSkinningAlgorithm
*>(this), bFlags
);
275 FieldContainerTransitPtr
returnValue(tmpPtr
);
277 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
282 FieldContainerTransitPtr
CPUSkinningAlgorithmBase::shallowCopyDependent(
283 BitVector bFlags
) const
285 CPUSkinningAlgorithm
*tmpPtr
;
287 newPtr(tmpPtr
, dynamic_cast<const CPUSkinningAlgorithm
*>(this), ~bFlags
);
289 FieldContainerTransitPtr
returnValue(tmpPtr
);
291 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
296 FieldContainerTransitPtr
CPUSkinningAlgorithmBase::shallowCopy(void) const
298 CPUSkinningAlgorithm
*tmpPtr
;
301 dynamic_cast<const CPUSkinningAlgorithm
*>(this),
302 Thread::getCurrentLocalFlags());
304 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
306 FieldContainerTransitPtr
returnValue(tmpPtr
);
314 /*------------------------- constructors ----------------------------------*/
316 CPUSkinningAlgorithmBase::CPUSkinningAlgorithmBase(void) :
321 CPUSkinningAlgorithmBase::CPUSkinningAlgorithmBase(const CPUSkinningAlgorithmBase
&source
) :
327 /*-------------------------- destructors ----------------------------------*/
329 CPUSkinningAlgorithmBase::~CPUSkinningAlgorithmBase(void)
335 #ifdef OSG_MT_CPTR_ASPECT
336 void CPUSkinningAlgorithmBase::execSyncV( FieldContainer
&oFrom
,
337 ConstFieldMaskArg whichField
,
338 AspectOffsetStore
&oOffsets
,
339 ConstFieldMaskArg syncMode
,
340 const UInt32 uiSyncInfo
)
342 CPUSkinningAlgorithm
*pThis
= static_cast<CPUSkinningAlgorithm
*>(this);
344 pThis
->execSync(static_cast<CPUSkinningAlgorithm
*>(&oFrom
),
353 #ifdef OSG_MT_CPTR_ASPECT
354 FieldContainer
*CPUSkinningAlgorithmBase::createAspectCopy(
355 const FieldContainer
*pRefAspect
) const
357 CPUSkinningAlgorithm
*returnValue
;
359 newAspectCopy(returnValue
,
360 dynamic_cast<const CPUSkinningAlgorithm
*>(pRefAspect
),
361 dynamic_cast<const CPUSkinningAlgorithm
*>(this));
367 void CPUSkinningAlgorithmBase::resolveLinks(void)
369 Inherited::resolveLinks();