fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / VRMLAnimation / OSGVRMLInterpolatorBase.h
bloba5bb3d92f221041c3aa9cbeafda0951b589cfec4
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 VRMLInterpolator
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGVRMLINTERPOLATORBASE_H_
55 #define _OSGVRMLINTERPOLATORBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGNodeCore.h" // Parent
68 #include "OSGSysFields.h" // InValue type
70 #include "OSGVRMLInterpolatorFields.h"
72 OSG_BEGIN_NAMESPACE
75 class VRMLInterpolator;
77 //! \brief VRMLInterpolator Base Class.
79 class OSG_DYNAMICS_DLLMAPPING VRMLInterpolatorBase : public NodeCore
81 public:
83 typedef NodeCore Inherited;
84 typedef NodeCore ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(VRMLInterpolator);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 InValueFieldId = Inherited::NextFieldId,
98 KeyFieldId = InValueFieldId + 1,
99 ResortIndexFieldId = KeyFieldId + 1,
100 NextFieldId = ResortIndexFieldId + 1
103 static const OSG::BitVector InValueFieldMask =
104 (TypeTraits<BitVector>::One << InValueFieldId);
105 static const OSG::BitVector KeyFieldMask =
106 (TypeTraits<BitVector>::One << KeyFieldId);
107 static const OSG::BitVector ResortIndexFieldMask =
108 (TypeTraits<BitVector>::One << ResortIndexFieldId);
109 static const OSG::BitVector NextFieldMask =
110 (TypeTraits<BitVector>::One << NextFieldId);
112 typedef SFReal32 SFInValueType;
113 typedef MFReal32 MFKeyType;
114 typedef MFUInt32 MFResortIndexType;
116 /*---------------------------------------------------------------------*/
117 /*! \name Class Get */
118 /*! \{ */
120 static FieldContainerType &getClassType (void);
121 static UInt32 getClassTypeId (void);
122 static UInt16 getClassGroupId(void);
124 /*! \} */
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
127 /*! \{ */
129 virtual FieldContainerType &getType (void);
130 virtual const FieldContainerType &getType (void) const;
132 virtual UInt32 getContainerSize(void) const;
134 /*! \} */
135 /*---------------------------------------------------------------------*/
136 /*! \name Field Get */
137 /*! \{ */
140 SFReal32 *editSFInValue (void);
141 const SFReal32 *getSFInValue (void) const;
143 MFReal32 *editMFKey (void);
144 const MFReal32 *getMFKey (void) const;
146 MFUInt32 *editMFResortIndex (void);
147 const MFUInt32 *getMFResortIndex (void) const;
150 Real32 &editInValue (void);
151 Real32 getInValue (void) const;
153 MFReal32 ::reference editKey (const UInt32 index);
154 Real32 getKey (const UInt32 index) const;
156 MFUInt32 ::reference editResortIndex (const UInt32 index);
157 UInt32 getResortIndex (const UInt32 index) const;
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
162 /*! \{ */
164 void setInValue (const Real32 value);
166 /*! \} */
167 /*---------------------------------------------------------------------*/
168 /*! \name Ptr MField Set */
169 /*! \{ */
171 /*! \} */
172 /*---------------------------------------------------------------------*/
173 /*! \name Binary Access */
174 /*! \{ */
176 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
177 virtual void copyToBin (BinaryDataHandler &pMem,
178 ConstFieldMaskArg whichField);
179 virtual void copyFromBin(BinaryDataHandler &pMem,
180 ConstFieldMaskArg whichField);
183 /*! \} */
184 /*---------------------------------------------------------------------*/
185 /*! \name Construction */
186 /*! \{ */
188 static VRMLInterpolatorTransitPtr create (void);
189 static VRMLInterpolator *createEmpty (void);
191 static VRMLInterpolatorTransitPtr createLocal (
192 BitVector bFlags = FCLocal::All);
194 static VRMLInterpolator *createEmptyLocal(
195 BitVector bFlags = FCLocal::All);
197 static VRMLInterpolatorTransitPtr createDependent (BitVector bFlags);
199 /*! \} */
200 /*---------------------------------------------------------------------*/
201 /*! \name Copy */
202 /*! \{ */
204 virtual FieldContainerTransitPtr shallowCopy (void) const;
205 virtual FieldContainerTransitPtr shallowCopyLocal(
206 BitVector bFlags = FCLocal::All) const;
207 virtual FieldContainerTransitPtr shallowCopyDependent(
208 BitVector bFlags) const;
210 /*! \} */
211 /*========================= PROTECTED ===============================*/
213 protected:
215 static TypeObject _type;
217 static void classDescInserter(TypeObject &oType);
218 static const Char8 *getClassname (void );
220 /*---------------------------------------------------------------------*/
221 /*! \name Fields */
222 /*! \{ */
224 SFReal32 _sfInValue;
225 MFReal32 _mfKey;
226 MFUInt32 _mfResortIndex;
228 /*! \} */
229 /*---------------------------------------------------------------------*/
230 /*! \name Constructors */
231 /*! \{ */
233 VRMLInterpolatorBase(void);
234 VRMLInterpolatorBase(const VRMLInterpolatorBase &source);
236 /*! \} */
237 /*---------------------------------------------------------------------*/
238 /*! \name Destructors */
239 /*! \{ */
241 virtual ~VRMLInterpolatorBase(void);
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name onCreate */
246 /*! \{ */
249 /*! \} */
250 /*---------------------------------------------------------------------*/
251 /*! \name Generic Field Access */
252 /*! \{ */
254 GetFieldHandlePtr getHandleInValue (void) const;
255 EditFieldHandlePtr editHandleInValue (void);
256 GetFieldHandlePtr getHandleKey (void) const;
257 EditFieldHandlePtr editHandleKey (void);
258 GetFieldHandlePtr getHandleResortIndex (void) const;
259 EditFieldHandlePtr editHandleResortIndex (void);
261 /*! \} */
262 /*---------------------------------------------------------------------*/
263 /*! \name Sync */
264 /*! \{ */
266 #ifdef OSG_MT_CPTR_ASPECT
267 virtual void execSyncV( FieldContainer &oFrom,
268 ConstFieldMaskArg whichField,
269 AspectOffsetStore &oOffsets,
270 ConstFieldMaskArg syncMode ,
271 const UInt32 uiSyncInfo);
273 void execSync ( VRMLInterpolatorBase *pFrom,
274 ConstFieldMaskArg whichField,
275 AspectOffsetStore &oOffsets,
276 ConstFieldMaskArg syncMode ,
277 const UInt32 uiSyncInfo);
278 #endif
280 /*! \} */
281 /*---------------------------------------------------------------------*/
282 /*! \name Edit */
283 /*! \{ */
285 /*! \} */
286 /*---------------------------------------------------------------------*/
287 /*! \name Aspect Create */
288 /*! \{ */
290 #ifdef OSG_MT_CPTR_ASPECT
291 virtual FieldContainer *createAspectCopy(
292 const FieldContainer *pRefAspect) const;
293 #endif
295 /*! \} */
296 /*---------------------------------------------------------------------*/
297 /*! \name Edit */
298 /*! \{ */
299 /*! \} */
300 /*---------------------------------------------------------------------*/
301 /*! \name Sync */
302 /*! \{ */
304 virtual void resolveLinks(void);
306 /*! \} */
307 /*========================== PRIVATE ================================*/
309 private:
310 /*---------------------------------------------------------------------*/
312 // prohibit default functions (move to 'public' if you need one)
313 void operator =(const VRMLInterpolatorBase &source);
316 typedef VRMLInterpolatorBase *VRMLInterpolatorBaseP;
318 typedef CoredNodeRefPtr <VRMLInterpolator> VRMLInterpolatorNodeRefPtr;
319 typedef CoredNodeMTRefPtr<VRMLInterpolator> VRMLInterpolatorNodeMTRefPtr;
321 OSG_END_NAMESPACE
323 #endif /* _OSGVRMLINTERPOLATORBASE_H_ */