changed: gcc8 base update
[opensg.git] / Source / System / Dynamics / Animation / OSGAnimKeyFrameTemplateBase.cpp
blob3e6ba26f7e5854941eb327e722f9ef47d8da1971
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class AnimKeyFrameTemplate!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
66 #include "OSGAnimKeyFrameTemplateBase.h"
67 #include "OSGAnimKeyFrameTemplate.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
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",
93 "AnimTemplatePtr",
94 AnimKeyFrameTemplate::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(AnimKeyFrameTemplate *, nsOSG)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
101 AnimKeyFrameTemplate *,
102 nsOSG)
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
105 AnimKeyFrameTemplate *,
106 nsOSG)
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void AnimKeyFrameTemplateBase::classDescInserter(TypeObject &oType)
117 AnimKeyFrameTemplateBase::TypeObject AnimKeyFrameTemplateBase::_type(
118 AnimKeyFrameTemplateBase::getClassname(),
119 Inherited::getClassname(),
120 "NULL",
121 nsOSG, //Namespace
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)),
127 false,
129 "<?xml version=\"1.0\"?>\n"
130 "\n"
131 "<FieldContainer\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"
144 " >\n"
145 "</FieldContainer>\n",
149 /*------------------------------ get -----------------------------------*/
151 FieldContainerType &AnimKeyFrameTemplateBase::getType(void)
153 return _type;
156 const FieldContainerType &AnimKeyFrameTemplateBase::getType(void) const
158 return _type;
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);
180 return returnValue;
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);
210 return fc;
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);
226 return fc;
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);
242 return fc;
245 AnimKeyFrameTemplate *AnimKeyFrameTemplateBase::createEmptyLocal(BitVector bFlags)
247 AnimKeyFrameTemplate *returnValue;
249 newPtr<AnimKeyFrameTemplate>(returnValue, bFlags);
251 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
253 return returnValue;
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();
266 return returnValue;
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;
281 return returnValue;
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;
295 return returnValue;
298 FieldContainerTransitPtr AnimKeyFrameTemplateBase::shallowCopy(void) const
300 AnimKeyFrameTemplate *tmpPtr;
302 newPtr(tmpPtr,
303 dynamic_cast<const AnimKeyFrameTemplate *>(this),
304 Thread::getCurrentLocalFlags());
306 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
308 FieldContainerTransitPtr returnValue(tmpPtr);
310 return returnValue;
316 /*------------------------- constructors ----------------------------------*/
318 AnimKeyFrameTemplateBase::AnimKeyFrameTemplateBase(void) :
319 Inherited()
323 AnimKeyFrameTemplateBase::AnimKeyFrameTemplateBase(const AnimKeyFrameTemplateBase &source) :
324 Inherited(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),
347 whichField,
348 oOffsets,
349 syncMode,
350 uiSyncInfo);
352 #endif
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));
365 return returnValue;
367 #endif
369 void AnimKeyFrameTemplateBase::resolveLinks(void)
371 Inherited::resolveLinks();
377 OSG_END_NAMESPACE