fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Animation / OSGAnimTimeSensorBase.inl
blobd0346943c579933841546fcbe38dc9849cb86cc1
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *               Copyright (C) 2000-2013 by the OpenSG Forum                 *
6  *                                                                           *
7  * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net  *
8  *                                                                           *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
11  *                                License                                    *
12  *                                                                           *
13  * This library is free software; you can redistribute it and/or modify it   *
14  * under the terms of the GNU Library General Public License as published    *
15  * by the Free Software Foundation, version 2.                               *
16  *                                                                           *
17  * This library is distributed in the hope that it will be useful, but       *
18  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
20  * Library General Public License for more details.                          *
21  *                                                                           *
22  * You should have received a copy of the GNU Library General Public         *
23  * License along with this library; if not, write to the Free Software       *
24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
25  *                                                                           *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
28  *                                Changes                                    *
29  *                                                                           *
30  *                                                                           *
31  *                                                                           *
32  *                                                                           *
33  *                                                                           *
34  *                                                                           *
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38  *****************************************************************************
39  **                                                                         **
40  **                  This file is automatically generated.                  **
41  **                                                                         **
42  **          Any changes made to this file WILL be lost when it is          **
43  **           regenerated, which can become necessary at any time.          **
44  **                                                                         **
45  **     Do not change this file, changes should be done in the derived      **
46  **     class AnimTimeSensor!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &AnimTimeSensorBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 AnimTimeSensorBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 AnimTimeSensorBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the AnimTimeSensor::_sfEnabled field.
79 inline
80 bool &AnimTimeSensorBase::editEnabled(void)
82     editSField(EnabledFieldMask);
84     return _sfEnabled.getValue();
87 //! Get the value of the AnimTimeSensor::_sfEnabled field.
88 inline
89       bool  AnimTimeSensorBase::getEnabled(void) const
91     return _sfEnabled.getValue();
94 //! Set the value of the AnimTimeSensor::_sfEnabled field.
95 inline
96 void AnimTimeSensorBase::setEnabled(const bool value)
98     editSField(EnabledFieldMask);
100     _sfEnabled.setValue(value);
102 //! Get the value of the AnimTimeSensor::_sfIsActive field.
104 inline
105 bool &AnimTimeSensorBase::editIsActive(void)
107     editSField(IsActiveFieldMask);
109     return _sfIsActive.getValue();
112 //! Get the value of the AnimTimeSensor::_sfIsActive field.
113 inline
114       bool  AnimTimeSensorBase::getIsActive(void) const
116     return _sfIsActive.getValue();
119 //! Set the value of the AnimTimeSensor::_sfIsActive field.
120 inline
121 void AnimTimeSensorBase::setIsActive(const bool value)
123     editSField(IsActiveFieldMask);
125     _sfIsActive.setValue(value);
127 //! Get the value of the AnimTimeSensor::_sfLoop field.
129 inline
130 bool &AnimTimeSensorBase::editLoop(void)
132     editSField(LoopFieldMask);
134     return _sfLoop.getValue();
137 //! Get the value of the AnimTimeSensor::_sfLoop field.
138 inline
139       bool  AnimTimeSensorBase::getLoop(void) const
141     return _sfLoop.getValue();
144 //! Set the value of the AnimTimeSensor::_sfLoop field.
145 inline
146 void AnimTimeSensorBase::setLoop(const bool value)
148     editSField(LoopFieldMask);
150     _sfLoop.setValue(value);
152 //! Get the value of the AnimTimeSensor::_sfForward field.
154 inline
155 bool &AnimTimeSensorBase::editForward(void)
157     editSField(ForwardFieldMask);
159     return _sfForward.getValue();
162 //! Get the value of the AnimTimeSensor::_sfForward field.
163 inline
164       bool  AnimTimeSensorBase::getForward(void) const
166     return _sfForward.getValue();
169 //! Set the value of the AnimTimeSensor::_sfForward field.
170 inline
171 void AnimTimeSensorBase::setForward(const bool value)
173     editSField(ForwardFieldMask);
175     _sfForward.setValue(value);
177 //! Get the value of the AnimTimeSensor::_sfStartTime field.
179 inline
180 Time &AnimTimeSensorBase::editStartTime(void)
182     editSField(StartTimeFieldMask);
184     return _sfStartTime.getValue();
187 //! Get the value of the AnimTimeSensor::_sfStartTime field.
188 inline
189 const Time &AnimTimeSensorBase::getStartTime(void) const
191     return _sfStartTime.getValue();
194 //! Set the value of the AnimTimeSensor::_sfStartTime field.
195 inline
196 void AnimTimeSensorBase::setStartTime(const Time &value)
198     editSField(StartTimeFieldMask);
200     _sfStartTime.setValue(value);
202 //! Get the value of the AnimTimeSensor::_sfStopTime field.
204 inline
205 Time &AnimTimeSensorBase::editStopTime(void)
207     editSField(StopTimeFieldMask);
209     return _sfStopTime.getValue();
212 //! Get the value of the AnimTimeSensor::_sfStopTime field.
213 inline
214 const Time &AnimTimeSensorBase::getStopTime(void) const
216     return _sfStopTime.getValue();
219 //! Set the value of the AnimTimeSensor::_sfStopTime field.
220 inline
221 void AnimTimeSensorBase::setStopTime(const Time &value)
223     editSField(StopTimeFieldMask);
225     _sfStopTime.setValue(value);
227 //! Get the value of the AnimTimeSensor::_sfTime field.
229 inline
230 Time &AnimTimeSensorBase::editTime(void)
232     editSField(TimeFieldMask);
234     return _sfTime.getValue();
237 //! Get the value of the AnimTimeSensor::_sfTime field.
238 inline
239 const Time &AnimTimeSensorBase::getTime(void) const
241     return _sfTime.getValue();
244 //! Set the value of the AnimTimeSensor::_sfTime field.
245 inline
246 void AnimTimeSensorBase::setTime(const Time &value)
248     editSField(TimeFieldMask);
250     _sfTime.setValue(value);
252 //! Get the value of the AnimTimeSensor::_sfCycleLength field.
254 inline
255 Time &AnimTimeSensorBase::editCycleLength(void)
257     editSField(CycleLengthFieldMask);
259     return _sfCycleLength.getValue();
262 //! Get the value of the AnimTimeSensor::_sfCycleLength field.
263 inline
264 const Time &AnimTimeSensorBase::getCycleLength(void) const
266     return _sfCycleLength.getValue();
269 //! Set the value of the AnimTimeSensor::_sfCycleLength field.
270 inline
271 void AnimTimeSensorBase::setCycleLength(const Time &value)
273     editSField(CycleLengthFieldMask);
275     _sfCycleLength.setValue(value);
277 //! Get the value of the AnimTimeSensor::_sfTimeScale field.
279 inline
280 Real32 &AnimTimeSensorBase::editTimeScale(void)
282     editSField(TimeScaleFieldMask);
284     return _sfTimeScale.getValue();
287 //! Get the value of the AnimTimeSensor::_sfTimeScale field.
288 inline
289       Real32  AnimTimeSensorBase::getTimeScale(void) const
291     return _sfTimeScale.getValue();
294 //! Set the value of the AnimTimeSensor::_sfTimeScale field.
295 inline
296 void AnimTimeSensorBase::setTimeScale(const Real32 value)
298     editSField(TimeScaleFieldMask);
300     _sfTimeScale.setValue(value);
302 //! Get the value of the AnimTimeSensor::_sfFraction field.
304 inline
305 Real32 &AnimTimeSensorBase::editFraction(void)
307     editSField(FractionFieldMask);
309     return _sfFraction.getValue();
312 //! Get the value of the AnimTimeSensor::_sfFraction field.
313 inline
314       Real32  AnimTimeSensorBase::getFraction(void) const
316     return _sfFraction.getValue();
319 //! Set the value of the AnimTimeSensor::_sfFraction field.
320 inline
321 void AnimTimeSensorBase::setFraction(const Real32 value)
323     editSField(FractionFieldMask);
325     _sfFraction.setValue(value);
327 //! Get the value of the AnimTimeSensor::_sfAnimTime field.
329 inline
330 Real32 &AnimTimeSensorBase::editAnimTime(void)
332     editSField(AnimTimeFieldMask);
334     return _sfAnimTime.getValue();
337 //! Get the value of the AnimTimeSensor::_sfAnimTime field.
338 inline
339       Real32  AnimTimeSensorBase::getAnimTime(void) const
341     return _sfAnimTime.getValue();
344 //! Set the value of the AnimTimeSensor::_sfAnimTime field.
345 inline
346 void AnimTimeSensorBase::setAnimTime(const Real32 value)
348     editSField(AnimTimeFieldMask);
350     _sfAnimTime.setValue(value);
354 #ifdef OSG_MT_CPTR_ASPECT
355 inline
356 void AnimTimeSensorBase::execSync (      AnimTimeSensorBase *pFrom,
357                                         ConstFieldMaskArg  whichField,
358                                         AspectOffsetStore &oOffsets,
359                                         ConstFieldMaskArg  syncMode,
360                                   const UInt32             uiSyncInfo)
362     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
364     if(FieldBits::NoField != (EnabledFieldMask & whichField))
365         _sfEnabled.syncWith(pFrom->_sfEnabled);
367     if(FieldBits::NoField != (IsActiveFieldMask & whichField))
368         _sfIsActive.syncWith(pFrom->_sfIsActive);
370     if(FieldBits::NoField != (LoopFieldMask & whichField))
371         _sfLoop.syncWith(pFrom->_sfLoop);
373     if(FieldBits::NoField != (ForwardFieldMask & whichField))
374         _sfForward.syncWith(pFrom->_sfForward);
376     if(FieldBits::NoField != (StartTimeFieldMask & whichField))
377         _sfStartTime.syncWith(pFrom->_sfStartTime);
379     if(FieldBits::NoField != (StopTimeFieldMask & whichField))
380         _sfStopTime.syncWith(pFrom->_sfStopTime);
382     if(FieldBits::NoField != (TimeFieldMask & whichField))
383         _sfTime.syncWith(pFrom->_sfTime);
385     if(FieldBits::NoField != (CycleLengthFieldMask & whichField))
386         _sfCycleLength.syncWith(pFrom->_sfCycleLength);
388     if(FieldBits::NoField != (TimeScaleFieldMask & whichField))
389         _sfTimeScale.syncWith(pFrom->_sfTimeScale);
391     if(FieldBits::NoField != (FractionFieldMask & whichField))
392         _sfFraction.syncWith(pFrom->_sfFraction);
394     if(FieldBits::NoField != (AnimTimeFieldMask & whichField))
395         _sfAnimTime.syncWith(pFrom->_sfAnimTime);
397 #endif
400 inline
401 const Char8 *AnimTimeSensorBase::getClassname(void)
403     return "AnimTimeSensor";
405 OSG_GEN_CONTAINERPTR(AnimTimeSensor);
407 OSG_END_NAMESPACE