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 AnimKeyFrameTemplate!
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 "OSGAnimKeyFrameTemplateBase.h"
67 #include "OSGAnimKeyFrameTemplate.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::AnimKeyFrameTemplate
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<AnimKeyFrameTemplate
*, nsOSG
>::_type(
92 "AnimKeyFrameTemplatePtr",
94 AnimKeyFrameTemplate::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(AnimKeyFrameTemplate
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
101 AnimKeyFrameTemplate
*,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
105 AnimKeyFrameTemplate
*,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void AnimKeyFrameTemplateBase::classDescInserter(TypeObject
&oType
)
117 AnimKeyFrameTemplateBase::TypeObject
AnimKeyFrameTemplateBase::_type(
118 AnimKeyFrameTemplateBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&AnimKeyFrameTemplateBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&AnimKeyFrameTemplate::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&AnimKeyFrameTemplate::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&AnimKeyFrameTemplate::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"AnimKeyFrameTemplate\"\n"
133 " parent=\"AnimTemplate\"\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 " useLocalIncludes=\"false\"\n"
141 " isNodeCore=\"false\"\n"
142 " isBundle=\"false\"\n"
143 " parentFields=\"none\"\n"
145 "</FieldContainer>\n",
149 /*------------------------------ get -----------------------------------*/
151 FieldContainerType
&AnimKeyFrameTemplateBase::getType(void)
156 const FieldContainerType
&AnimKeyFrameTemplateBase::getType(void) const
161 UInt32
AnimKeyFrameTemplateBase::getContainerSize(void) const
163 return sizeof(AnimKeyFrameTemplate
);
166 /*------------------------- decorator get ------------------------------*/
173 /*------------------------------ access -----------------------------------*/
175 SizeT
AnimKeyFrameTemplateBase::getBinSize(ConstFieldMaskArg whichField
)
177 SizeT returnValue
= Inherited::getBinSize(whichField
);
183 void AnimKeyFrameTemplateBase::copyToBin(BinaryDataHandler
&pMem
,
184 ConstFieldMaskArg whichField
)
186 Inherited::copyToBin(pMem
, whichField
);
190 void AnimKeyFrameTemplateBase::copyFromBin(BinaryDataHandler
&pMem
,
191 ConstFieldMaskArg whichField
)
193 Inherited::copyFromBin(pMem
, whichField
);
197 //! create a new instance of the class
198 AnimKeyFrameTemplateTransitPtr
AnimKeyFrameTemplateBase::createLocal(BitVector bFlags
)
200 AnimKeyFrameTemplateTransitPtr fc
;
202 if(getClassType().getPrototype() != NULL
)
204 FieldContainerTransitPtr tmpPtr
=
205 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
207 fc
= dynamic_pointer_cast
<AnimKeyFrameTemplate
>(tmpPtr
);
213 //! create a new instance of the class, copy the container flags
214 AnimKeyFrameTemplateTransitPtr
AnimKeyFrameTemplateBase::createDependent(BitVector bFlags
)
216 AnimKeyFrameTemplateTransitPtr fc
;
218 if(getClassType().getPrototype() != NULL
)
220 FieldContainerTransitPtr tmpPtr
=
221 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
223 fc
= dynamic_pointer_cast
<AnimKeyFrameTemplate
>(tmpPtr
);
229 //! create a new instance of the class
230 AnimKeyFrameTemplateTransitPtr
AnimKeyFrameTemplateBase::create(void)
232 AnimKeyFrameTemplateTransitPtr fc
;
234 if(getClassType().getPrototype() != NULL
)
236 FieldContainerTransitPtr tmpPtr
=
237 getClassType().getPrototype()-> shallowCopy();
239 fc
= dynamic_pointer_cast
<AnimKeyFrameTemplate
>(tmpPtr
);
245 AnimKeyFrameTemplate
*AnimKeyFrameTemplateBase::createEmptyLocal(BitVector bFlags
)
247 AnimKeyFrameTemplate
*returnValue
;
249 newPtr
<AnimKeyFrameTemplate
>(returnValue
, bFlags
);
251 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
256 //! create an empty new instance of the class, do not copy the prototype
257 AnimKeyFrameTemplate
*AnimKeyFrameTemplateBase::createEmpty(void)
259 AnimKeyFrameTemplate
*returnValue
;
261 newPtr
<AnimKeyFrameTemplate
>(returnValue
, Thread::getCurrentLocalFlags());
263 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
264 ~Thread::getCurrentLocalFlags();
270 FieldContainerTransitPtr
AnimKeyFrameTemplateBase::shallowCopyLocal(
271 BitVector bFlags
) const
273 AnimKeyFrameTemplate
*tmpPtr
;
275 newPtr(tmpPtr
, dynamic_cast<const AnimKeyFrameTemplate
*>(this), bFlags
);
277 FieldContainerTransitPtr
returnValue(tmpPtr
);
279 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
284 FieldContainerTransitPtr
AnimKeyFrameTemplateBase::shallowCopyDependent(
285 BitVector bFlags
) const
287 AnimKeyFrameTemplate
*tmpPtr
;
289 newPtr(tmpPtr
, dynamic_cast<const AnimKeyFrameTemplate
*>(this), ~bFlags
);
291 FieldContainerTransitPtr
returnValue(tmpPtr
);
293 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
298 FieldContainerTransitPtr
AnimKeyFrameTemplateBase::shallowCopy(void) const
300 AnimKeyFrameTemplate
*tmpPtr
;
303 dynamic_cast<const AnimKeyFrameTemplate
*>(this),
304 Thread::getCurrentLocalFlags());
306 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
308 FieldContainerTransitPtr
returnValue(tmpPtr
);
316 /*------------------------- constructors ----------------------------------*/
318 AnimKeyFrameTemplateBase::AnimKeyFrameTemplateBase(void) :
323 AnimKeyFrameTemplateBase::AnimKeyFrameTemplateBase(const AnimKeyFrameTemplateBase
&source
) :
329 /*-------------------------- destructors ----------------------------------*/
331 AnimKeyFrameTemplateBase::~AnimKeyFrameTemplateBase(void)
337 #ifdef OSG_MT_CPTR_ASPECT
338 void AnimKeyFrameTemplateBase::execSyncV( FieldContainer
&oFrom
,
339 ConstFieldMaskArg whichField
,
340 AspectOffsetStore
&oOffsets
,
341 ConstFieldMaskArg syncMode
,
342 const UInt32 uiSyncInfo
)
344 AnimKeyFrameTemplate
*pThis
= static_cast<AnimKeyFrameTemplate
*>(this);
346 pThis
->execSync(static_cast<AnimKeyFrameTemplate
*>(&oFrom
),
355 #ifdef OSG_MT_CPTR_ASPECT
356 FieldContainer
*AnimKeyFrameTemplateBase::createAspectCopy(
357 const FieldContainer
*pRefAspect
) const
359 AnimKeyFrameTemplate
*returnValue
;
361 newAspectCopy(returnValue
,
362 dynamic_cast<const AnimKeyFrameTemplate
*>(pRefAspect
),
363 dynamic_cast<const AnimKeyFrameTemplate
*>(this));
369 void AnimKeyFrameTemplateBase::resolveLinks(void)
371 Inherited::resolveLinks();