fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Base / OSGFrameHandlerBase.cpp
blob093805b2f6c3d000ca1297e94749ad33ec5e2056
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 FrameHandler!
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 "OSGFrameHandlerBase.h"
67 #include "OSGFrameHandler.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::FrameHandler
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
85 /*! \var UInt64 FrameHandlerBase::_sfFrameCount
89 /*! \var Time FrameHandlerBase::_sfStartTime
93 /*! \var Time FrameHandlerBase::_sfLastTime
97 /*! \var Time FrameHandlerBase::_sfCurrTime
101 /*! \var Time FrameHandlerBase::_sfTimeStamp
105 /*! \var Time FrameHandlerBase::_sfTimeScale
109 /*! \var Time FrameHandlerBase::_sfConstantTimeStep
113 /*! \var bool FrameHandlerBase::_sfConstantTime
117 /*! \var bool FrameHandlerBase::_sfPaused
122 /***************************************************************************\
123 * FieldType/FieldTrait Instantiation *
124 \***************************************************************************/
126 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
127 PointerType FieldTraits<FrameHandler *, nsOSG>::_type(
128 "FrameHandlerPtr",
129 "AttachmentContainerPtr",
130 FrameHandler::getClassType(),
131 nsOSG);
132 #endif
134 OSG_FIELDTRAITS_GETTYPE_NS(FrameHandler *, nsOSG)
136 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
137 FrameHandler *,
138 nsOSG)
141 /***************************************************************************\
142 * Field Description *
143 \***************************************************************************/
145 void FrameHandlerBase::classDescInserter(TypeObject &oType)
147 FieldDescriptionBase *pDesc = NULL;
150 pDesc = new SFUInt64::Description(
151 SFUInt64::getClassType(),
152 "frameCount",
154 FrameCountFieldId, FrameCountFieldMask,
155 true,
156 (Field::SFDefaultFlags | Field::FStdAccess),
157 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleFrameCount),
158 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleFrameCount));
160 oType.addInitialDesc(pDesc);
162 pDesc = new SFTime::Description(
163 SFTime::getClassType(),
164 "startTime",
166 StartTimeFieldId, StartTimeFieldMask,
167 true,
168 (Field::SFDefaultFlags | Field::FStdAccess),
169 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleStartTime),
170 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleStartTime));
172 oType.addInitialDesc(pDesc);
174 pDesc = new SFTime::Description(
175 SFTime::getClassType(),
176 "lastTime",
178 LastTimeFieldId, LastTimeFieldMask,
179 true,
180 (Field::SFDefaultFlags | Field::FStdAccess),
181 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleLastTime),
182 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleLastTime));
184 oType.addInitialDesc(pDesc);
186 pDesc = new SFTime::Description(
187 SFTime::getClassType(),
188 "currTime",
190 CurrTimeFieldId, CurrTimeFieldMask,
191 true,
192 (Field::SFDefaultFlags | Field::FStdAccess),
193 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleCurrTime),
194 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleCurrTime));
196 oType.addInitialDesc(pDesc);
198 pDesc = new SFTime::Description(
199 SFTime::getClassType(),
200 "timeStamp",
202 TimeStampFieldId, TimeStampFieldMask,
203 true,
204 (Field::SFDefaultFlags | Field::FStdAccess),
205 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleTimeStamp),
206 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleTimeStamp));
208 oType.addInitialDesc(pDesc);
210 pDesc = new SFTime::Description(
211 SFTime::getClassType(),
212 "timeScale",
214 TimeScaleFieldId, TimeScaleFieldMask,
215 true,
216 (Field::SFDefaultFlags | Field::FStdAccess),
217 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleTimeScale),
218 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleTimeScale));
220 oType.addInitialDesc(pDesc);
222 pDesc = new SFTime::Description(
223 SFTime::getClassType(),
224 "constantTimeStep",
226 ConstantTimeStepFieldId, ConstantTimeStepFieldMask,
227 true,
228 (Field::SFDefaultFlags | Field::FStdAccess),
229 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleConstantTimeStep),
230 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleConstantTimeStep));
232 oType.addInitialDesc(pDesc);
234 pDesc = new SFBool::Description(
235 SFBool::getClassType(),
236 "constantTime",
238 ConstantTimeFieldId, ConstantTimeFieldMask,
239 true,
240 (Field::SFDefaultFlags | Field::FStdAccess),
241 static_cast<FieldEditMethodSig>(&FrameHandler::editHandleConstantTime),
242 static_cast<FieldGetMethodSig >(&FrameHandler::getHandleConstantTime));
244 oType.addInitialDesc(pDesc);
246 pDesc = new SFBool::Description(
247 SFBool::getClassType(),
248 "paused",
250 PausedFieldId, PausedFieldMask,
251 true,
252 (Field::SFDefaultFlags | Field::FStdAccess),
253 static_cast<FieldEditMethodSig>(&FrameHandler::editHandlePaused),
254 static_cast<FieldGetMethodSig >(&FrameHandler::getHandlePaused));
256 oType.addInitialDesc(pDesc);
260 FrameHandlerBase::TypeObject FrameHandlerBase::_type(
261 FrameHandlerBase::getClassname(),
262 Inherited::getClassname(),
263 "NULL",
264 nsOSG, //Namespace
265 reinterpret_cast<PrototypeCreateF>(&FrameHandlerBase::createEmptyLocal),
266 reinterpret_cast<InitContainerF>(&FrameHandler::initMethod),
267 reinterpret_cast<ExitContainerF>(&FrameHandler::exitMethod),
268 reinterpret_cast<InitalInsertDescFunc>(
269 reinterpret_cast<void *>(&FrameHandler::classDescInserter)),
270 false,
272 "<?xml version=\"1.0\"?>\n"
273 "\n"
274 "<FieldContainer\n"
275 " name=\"FrameHandler\"\n"
276 " parent=\"AttachmentContainer\"\n"
277 " library=\"Dynamics\"\n"
278 " pointerfieldtypes=\"single\"\n"
279 " structure=\"concrete\"\n"
280 " systemcomponent=\"true\"\n"
281 " parentsystemcomponent=\"true\"\n"
282 " decoratable=\"false\"\n"
283 " useLocalIncludes=\"false\"\n"
284 " isNodeCore=\"false\"\n"
285 " isBundle=\"true\"\n"
286 " parentFields=\"none\"\n"
287 " docGroupBase=\"GrpDynamicsBase\"\n"
288 " >\n"
289 " <Field\n"
290 "\t name=\"frameCount\"\n"
291 "\t type=\"UInt64\"\n"
292 "\t cardinality=\"single\"\n"
293 "\t visibility=\"internal\"\n"
294 "\t access=\"public\"\n"
295 " defaultValue=\"0\"\n"
296 "\t >\n"
297 " </Field>\n"
298 "\n"
299 " <Field\n"
300 "\t name=\"startTime\"\n"
301 "\t type=\"Time\"\n"
302 "\t cardinality=\"single\"\n"
303 "\t visibility=\"internal\"\n"
304 "\t access=\"public\"\n"
305 " defaultValue=\"-1.0\"\n"
306 "\t >\n"
307 " </Field>\n"
308 "\n"
309 " <Field\n"
310 "\t name=\"lastTime\"\n"
311 "\t type=\"Time\"\n"
312 "\t cardinality=\"single\"\n"
313 "\t visibility=\"internal\"\n"
314 "\t access=\"public\"\n"
315 " defaultValue=\"0.0\"\n"
316 "\t >\n"
317 " </Field>\n"
318 " <Field\n"
319 "\t name=\"currTime\"\n"
320 "\t type=\"Time\"\n"
321 "\t cardinality=\"single\"\n"
322 "\t visibility=\"internal\"\n"
323 "\t access=\"public\"\n"
324 " defaultValue=\"0.0\"\n"
325 "\t >\n"
326 " </Field>\n"
327 " <Field\n"
328 "\t name=\"timeStamp\"\n"
329 "\t type=\"Time\"\n"
330 "\t cardinality=\"single\"\n"
331 "\t visibility=\"internal\"\n"
332 "\t access=\"public\"\n"
333 " defaultValue=\"0.0\"\n"
334 "\t >\n"
335 " </Field>\n"
336 " <Field\n"
337 "\t name=\"timeScale\"\n"
338 "\t type=\"Time\"\n"
339 "\t cardinality=\"single\"\n"
340 "\t visibility=\"internal\"\n"
341 "\t access=\"public\"\n"
342 " defaultValue=\"1.0\"\n"
343 "\t >\n"
344 " </Field>\n"
345 " <Field\n"
346 "\t name=\"constantTimeStep\"\n"
347 "\t type=\"Time\"\n"
348 "\t cardinality=\"single\"\n"
349 "\t visibility=\"internal\"\n"
350 "\t access=\"public\"\n"
351 " defaultValue=\"0.0\"\n"
352 "\t >\n"
353 " </Field>\n"
354 " <Field\n"
355 "\t name=\"constantTime\"\n"
356 "\t type=\"bool\"\n"
357 "\t cardinality=\"single\"\n"
358 "\t visibility=\"internal\"\n"
359 "\t access=\"public\"\n"
360 " defaultValue=\"false\"\n"
361 "\t >\n"
362 " </Field>\n"
363 " <Field\n"
364 "\t name=\"paused\"\n"
365 "\t type=\"bool\"\n"
366 "\t cardinality=\"single\"\n"
367 "\t visibility=\"internal\"\n"
368 "\t access=\"public\"\n"
369 " defaultValue=\"false\"\n"
370 "\t >\n"
371 " </Field>\n"
372 "\n"
373 "</FieldContainer>\n",
377 /*------------------------------ get -----------------------------------*/
379 FieldContainerType &FrameHandlerBase::getType(void)
381 return _type;
384 const FieldContainerType &FrameHandlerBase::getType(void) const
386 return _type;
389 UInt32 FrameHandlerBase::getContainerSize(void) const
391 return sizeof(FrameHandler);
394 /*------------------------- decorator get ------------------------------*/
397 SFUInt64 *FrameHandlerBase::editSFFrameCount(void)
399 editSField(FrameCountFieldMask);
401 return &_sfFrameCount;
404 const SFUInt64 *FrameHandlerBase::getSFFrameCount(void) const
406 return &_sfFrameCount;
410 SFTime *FrameHandlerBase::editSFStartTime(void)
412 editSField(StartTimeFieldMask);
414 return &_sfStartTime;
417 const SFTime *FrameHandlerBase::getSFStartTime(void) const
419 return &_sfStartTime;
423 SFTime *FrameHandlerBase::editSFLastTime(void)
425 editSField(LastTimeFieldMask);
427 return &_sfLastTime;
430 const SFTime *FrameHandlerBase::getSFLastTime(void) const
432 return &_sfLastTime;
436 SFTime *FrameHandlerBase::editSFCurrTime(void)
438 editSField(CurrTimeFieldMask);
440 return &_sfCurrTime;
443 const SFTime *FrameHandlerBase::getSFCurrTime(void) const
445 return &_sfCurrTime;
449 SFTime *FrameHandlerBase::editSFTimeStamp(void)
451 editSField(TimeStampFieldMask);
453 return &_sfTimeStamp;
456 const SFTime *FrameHandlerBase::getSFTimeStamp(void) const
458 return &_sfTimeStamp;
462 SFTime *FrameHandlerBase::editSFTimeScale(void)
464 editSField(TimeScaleFieldMask);
466 return &_sfTimeScale;
469 const SFTime *FrameHandlerBase::getSFTimeScale(void) const
471 return &_sfTimeScale;
475 SFTime *FrameHandlerBase::editSFConstantTimeStep(void)
477 editSField(ConstantTimeStepFieldMask);
479 return &_sfConstantTimeStep;
482 const SFTime *FrameHandlerBase::getSFConstantTimeStep(void) const
484 return &_sfConstantTimeStep;
488 SFBool *FrameHandlerBase::editSFConstantTime(void)
490 editSField(ConstantTimeFieldMask);
492 return &_sfConstantTime;
495 const SFBool *FrameHandlerBase::getSFConstantTime(void) const
497 return &_sfConstantTime;
501 SFBool *FrameHandlerBase::editSFPaused(void)
503 editSField(PausedFieldMask);
505 return &_sfPaused;
508 const SFBool *FrameHandlerBase::getSFPaused(void) const
510 return &_sfPaused;
518 /*------------------------------ access -----------------------------------*/
520 SizeT FrameHandlerBase::getBinSize(ConstFieldMaskArg whichField)
522 SizeT returnValue = Inherited::getBinSize(whichField);
524 if(FieldBits::NoField != (FrameCountFieldMask & whichField))
526 returnValue += _sfFrameCount.getBinSize();
528 if(FieldBits::NoField != (StartTimeFieldMask & whichField))
530 returnValue += _sfStartTime.getBinSize();
532 if(FieldBits::NoField != (LastTimeFieldMask & whichField))
534 returnValue += _sfLastTime.getBinSize();
536 if(FieldBits::NoField != (CurrTimeFieldMask & whichField))
538 returnValue += _sfCurrTime.getBinSize();
540 if(FieldBits::NoField != (TimeStampFieldMask & whichField))
542 returnValue += _sfTimeStamp.getBinSize();
544 if(FieldBits::NoField != (TimeScaleFieldMask & whichField))
546 returnValue += _sfTimeScale.getBinSize();
548 if(FieldBits::NoField != (ConstantTimeStepFieldMask & whichField))
550 returnValue += _sfConstantTimeStep.getBinSize();
552 if(FieldBits::NoField != (ConstantTimeFieldMask & whichField))
554 returnValue += _sfConstantTime.getBinSize();
556 if(FieldBits::NoField != (PausedFieldMask & whichField))
558 returnValue += _sfPaused.getBinSize();
561 return returnValue;
564 void FrameHandlerBase::copyToBin(BinaryDataHandler &pMem,
565 ConstFieldMaskArg whichField)
567 Inherited::copyToBin(pMem, whichField);
569 if(FieldBits::NoField != (FrameCountFieldMask & whichField))
571 _sfFrameCount.copyToBin(pMem);
573 if(FieldBits::NoField != (StartTimeFieldMask & whichField))
575 _sfStartTime.copyToBin(pMem);
577 if(FieldBits::NoField != (LastTimeFieldMask & whichField))
579 _sfLastTime.copyToBin(pMem);
581 if(FieldBits::NoField != (CurrTimeFieldMask & whichField))
583 _sfCurrTime.copyToBin(pMem);
585 if(FieldBits::NoField != (TimeStampFieldMask & whichField))
587 _sfTimeStamp.copyToBin(pMem);
589 if(FieldBits::NoField != (TimeScaleFieldMask & whichField))
591 _sfTimeScale.copyToBin(pMem);
593 if(FieldBits::NoField != (ConstantTimeStepFieldMask & whichField))
595 _sfConstantTimeStep.copyToBin(pMem);
597 if(FieldBits::NoField != (ConstantTimeFieldMask & whichField))
599 _sfConstantTime.copyToBin(pMem);
601 if(FieldBits::NoField != (PausedFieldMask & whichField))
603 _sfPaused.copyToBin(pMem);
607 void FrameHandlerBase::copyFromBin(BinaryDataHandler &pMem,
608 ConstFieldMaskArg whichField)
610 Inherited::copyFromBin(pMem, whichField);
612 if(FieldBits::NoField != (FrameCountFieldMask & whichField))
614 editSField(FrameCountFieldMask);
615 _sfFrameCount.copyFromBin(pMem);
617 if(FieldBits::NoField != (StartTimeFieldMask & whichField))
619 editSField(StartTimeFieldMask);
620 _sfStartTime.copyFromBin(pMem);
622 if(FieldBits::NoField != (LastTimeFieldMask & whichField))
624 editSField(LastTimeFieldMask);
625 _sfLastTime.copyFromBin(pMem);
627 if(FieldBits::NoField != (CurrTimeFieldMask & whichField))
629 editSField(CurrTimeFieldMask);
630 _sfCurrTime.copyFromBin(pMem);
632 if(FieldBits::NoField != (TimeStampFieldMask & whichField))
634 editSField(TimeStampFieldMask);
635 _sfTimeStamp.copyFromBin(pMem);
637 if(FieldBits::NoField != (TimeScaleFieldMask & whichField))
639 editSField(TimeScaleFieldMask);
640 _sfTimeScale.copyFromBin(pMem);
642 if(FieldBits::NoField != (ConstantTimeStepFieldMask & whichField))
644 editSField(ConstantTimeStepFieldMask);
645 _sfConstantTimeStep.copyFromBin(pMem);
647 if(FieldBits::NoField != (ConstantTimeFieldMask & whichField))
649 editSField(ConstantTimeFieldMask);
650 _sfConstantTime.copyFromBin(pMem);
652 if(FieldBits::NoField != (PausedFieldMask & whichField))
654 editSField(PausedFieldMask);
655 _sfPaused.copyFromBin(pMem);
659 //! create a new instance of the class
660 FrameHandlerTransitPtr FrameHandlerBase::createLocal(BitVector bFlags)
662 FrameHandlerTransitPtr fc;
664 if(getClassType().getPrototype() != NULL)
666 FieldContainerTransitPtr tmpPtr =
667 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
669 fc = dynamic_pointer_cast<FrameHandler>(tmpPtr);
672 return fc;
675 //! create a new instance of the class, copy the container flags
676 FrameHandlerTransitPtr FrameHandlerBase::createDependent(BitVector bFlags)
678 FrameHandlerTransitPtr fc;
680 if(getClassType().getPrototype() != NULL)
682 FieldContainerTransitPtr tmpPtr =
683 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
685 fc = dynamic_pointer_cast<FrameHandler>(tmpPtr);
688 return fc;
691 //! create a new instance of the class
692 FrameHandlerTransitPtr FrameHandlerBase::create(void)
694 return createLocal();
697 FrameHandler *FrameHandlerBase::createEmptyLocal(BitVector bFlags)
699 FrameHandler *returnValue;
701 newPtr<FrameHandler>(returnValue, bFlags);
703 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
705 return returnValue;
708 //! create an empty new instance of the class, do not copy the prototype
709 FrameHandler *FrameHandlerBase::createEmpty(void)
711 return createEmptyLocal();
715 FieldContainerTransitPtr FrameHandlerBase::shallowCopyLocal(
716 BitVector bFlags) const
718 FrameHandler *tmpPtr;
720 newPtr(tmpPtr, dynamic_cast<const FrameHandler *>(this), bFlags);
722 FieldContainerTransitPtr returnValue(tmpPtr);
724 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
726 return returnValue;
729 FieldContainerTransitPtr FrameHandlerBase::shallowCopyDependent(
730 BitVector bFlags) const
732 FrameHandler *tmpPtr;
734 newPtr(tmpPtr, dynamic_cast<const FrameHandler *>(this), ~bFlags);
736 FieldContainerTransitPtr returnValue(tmpPtr);
738 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
740 return returnValue;
743 FieldContainerTransitPtr FrameHandlerBase::shallowCopy(void) const
745 return shallowCopyLocal();
751 /*------------------------- constructors ----------------------------------*/
753 FrameHandlerBase::FrameHandlerBase(void) :
754 Inherited(),
755 _sfFrameCount (UInt64(0)),
756 _sfStartTime (Time(-1.0)),
757 _sfLastTime (Time(0.0)),
758 _sfCurrTime (Time(0.0)),
759 _sfTimeStamp (Time(0.0)),
760 _sfTimeScale (Time(1.0)),
761 _sfConstantTimeStep (Time(0.0)),
762 _sfConstantTime (bool(false)),
763 _sfPaused (bool(false))
767 FrameHandlerBase::FrameHandlerBase(const FrameHandlerBase &source) :
768 Inherited(source),
769 _sfFrameCount (source._sfFrameCount ),
770 _sfStartTime (source._sfStartTime ),
771 _sfLastTime (source._sfLastTime ),
772 _sfCurrTime (source._sfCurrTime ),
773 _sfTimeStamp (source._sfTimeStamp ),
774 _sfTimeScale (source._sfTimeScale ),
775 _sfConstantTimeStep (source._sfConstantTimeStep ),
776 _sfConstantTime (source._sfConstantTime ),
777 _sfPaused (source._sfPaused )
782 /*-------------------------- destructors ----------------------------------*/
784 FrameHandlerBase::~FrameHandlerBase(void)
789 GetFieldHandlePtr FrameHandlerBase::getHandleFrameCount (void) const
791 SFUInt64::GetHandlePtr returnValue(
792 new SFUInt64::GetHandle(
793 &_sfFrameCount,
794 this->getType().getFieldDesc(FrameCountFieldId),
795 const_cast<FrameHandlerBase *>(this)));
797 return returnValue;
800 EditFieldHandlePtr FrameHandlerBase::editHandleFrameCount (void)
802 SFUInt64::EditHandlePtr returnValue(
803 new SFUInt64::EditHandle(
804 &_sfFrameCount,
805 this->getType().getFieldDesc(FrameCountFieldId),
806 this));
809 editSField(FrameCountFieldMask);
811 return returnValue;
814 GetFieldHandlePtr FrameHandlerBase::getHandleStartTime (void) const
816 SFTime::GetHandlePtr returnValue(
817 new SFTime::GetHandle(
818 &_sfStartTime,
819 this->getType().getFieldDesc(StartTimeFieldId),
820 const_cast<FrameHandlerBase *>(this)));
822 return returnValue;
825 EditFieldHandlePtr FrameHandlerBase::editHandleStartTime (void)
827 SFTime::EditHandlePtr returnValue(
828 new SFTime::EditHandle(
829 &_sfStartTime,
830 this->getType().getFieldDesc(StartTimeFieldId),
831 this));
834 editSField(StartTimeFieldMask);
836 return returnValue;
839 GetFieldHandlePtr FrameHandlerBase::getHandleLastTime (void) const
841 SFTime::GetHandlePtr returnValue(
842 new SFTime::GetHandle(
843 &_sfLastTime,
844 this->getType().getFieldDesc(LastTimeFieldId),
845 const_cast<FrameHandlerBase *>(this)));
847 return returnValue;
850 EditFieldHandlePtr FrameHandlerBase::editHandleLastTime (void)
852 SFTime::EditHandlePtr returnValue(
853 new SFTime::EditHandle(
854 &_sfLastTime,
855 this->getType().getFieldDesc(LastTimeFieldId),
856 this));
859 editSField(LastTimeFieldMask);
861 return returnValue;
864 GetFieldHandlePtr FrameHandlerBase::getHandleCurrTime (void) const
866 SFTime::GetHandlePtr returnValue(
867 new SFTime::GetHandle(
868 &_sfCurrTime,
869 this->getType().getFieldDesc(CurrTimeFieldId),
870 const_cast<FrameHandlerBase *>(this)));
872 return returnValue;
875 EditFieldHandlePtr FrameHandlerBase::editHandleCurrTime (void)
877 SFTime::EditHandlePtr returnValue(
878 new SFTime::EditHandle(
879 &_sfCurrTime,
880 this->getType().getFieldDesc(CurrTimeFieldId),
881 this));
884 editSField(CurrTimeFieldMask);
886 return returnValue;
889 GetFieldHandlePtr FrameHandlerBase::getHandleTimeStamp (void) const
891 SFTime::GetHandlePtr returnValue(
892 new SFTime::GetHandle(
893 &_sfTimeStamp,
894 this->getType().getFieldDesc(TimeStampFieldId),
895 const_cast<FrameHandlerBase *>(this)));
897 return returnValue;
900 EditFieldHandlePtr FrameHandlerBase::editHandleTimeStamp (void)
902 SFTime::EditHandlePtr returnValue(
903 new SFTime::EditHandle(
904 &_sfTimeStamp,
905 this->getType().getFieldDesc(TimeStampFieldId),
906 this));
909 editSField(TimeStampFieldMask);
911 return returnValue;
914 GetFieldHandlePtr FrameHandlerBase::getHandleTimeScale (void) const
916 SFTime::GetHandlePtr returnValue(
917 new SFTime::GetHandle(
918 &_sfTimeScale,
919 this->getType().getFieldDesc(TimeScaleFieldId),
920 const_cast<FrameHandlerBase *>(this)));
922 return returnValue;
925 EditFieldHandlePtr FrameHandlerBase::editHandleTimeScale (void)
927 SFTime::EditHandlePtr returnValue(
928 new SFTime::EditHandle(
929 &_sfTimeScale,
930 this->getType().getFieldDesc(TimeScaleFieldId),
931 this));
934 editSField(TimeScaleFieldMask);
936 return returnValue;
939 GetFieldHandlePtr FrameHandlerBase::getHandleConstantTimeStep (void) const
941 SFTime::GetHandlePtr returnValue(
942 new SFTime::GetHandle(
943 &_sfConstantTimeStep,
944 this->getType().getFieldDesc(ConstantTimeStepFieldId),
945 const_cast<FrameHandlerBase *>(this)));
947 return returnValue;
950 EditFieldHandlePtr FrameHandlerBase::editHandleConstantTimeStep(void)
952 SFTime::EditHandlePtr returnValue(
953 new SFTime::EditHandle(
954 &_sfConstantTimeStep,
955 this->getType().getFieldDesc(ConstantTimeStepFieldId),
956 this));
959 editSField(ConstantTimeStepFieldMask);
961 return returnValue;
964 GetFieldHandlePtr FrameHandlerBase::getHandleConstantTime (void) const
966 SFBool::GetHandlePtr returnValue(
967 new SFBool::GetHandle(
968 &_sfConstantTime,
969 this->getType().getFieldDesc(ConstantTimeFieldId),
970 const_cast<FrameHandlerBase *>(this)));
972 return returnValue;
975 EditFieldHandlePtr FrameHandlerBase::editHandleConstantTime (void)
977 SFBool::EditHandlePtr returnValue(
978 new SFBool::EditHandle(
979 &_sfConstantTime,
980 this->getType().getFieldDesc(ConstantTimeFieldId),
981 this));
984 editSField(ConstantTimeFieldMask);
986 return returnValue;
989 GetFieldHandlePtr FrameHandlerBase::getHandlePaused (void) const
991 SFBool::GetHandlePtr returnValue(
992 new SFBool::GetHandle(
993 &_sfPaused,
994 this->getType().getFieldDesc(PausedFieldId),
995 const_cast<FrameHandlerBase *>(this)));
997 return returnValue;
1000 EditFieldHandlePtr FrameHandlerBase::editHandlePaused (void)
1002 SFBool::EditHandlePtr returnValue(
1003 new SFBool::EditHandle(
1004 &_sfPaused,
1005 this->getType().getFieldDesc(PausedFieldId),
1006 this));
1009 editSField(PausedFieldMask);
1011 return returnValue;
1015 #ifdef OSG_MT_CPTR_ASPECT
1016 void FrameHandlerBase::execSyncV( FieldContainer &oFrom,
1017 ConstFieldMaskArg whichField,
1018 AspectOffsetStore &oOffsets,
1019 ConstFieldMaskArg syncMode,
1020 const UInt32 uiSyncInfo)
1022 FrameHandler *pThis = static_cast<FrameHandler *>(this);
1024 pThis->execSync(static_cast<FrameHandler *>(&oFrom),
1025 whichField,
1026 oOffsets,
1027 syncMode,
1028 uiSyncInfo);
1030 #endif
1033 #ifdef OSG_MT_CPTR_ASPECT
1034 FieldContainer *FrameHandlerBase::createAspectCopy(
1035 const FieldContainer *pRefAspect) const
1037 FrameHandler *returnValue;
1039 newAspectCopy(returnValue,
1040 dynamic_cast<const FrameHandler *>(pRefAspect),
1041 dynamic_cast<const FrameHandler *>(this));
1043 return returnValue;
1045 #endif
1047 void FrameHandlerBase::resolveLinks(void)
1049 Inherited::resolveLinks();
1055 OSG_END_NAMESPACE