fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / VRMLAnimation / OSGVRMLScalarInterpolatorBase.h
blob35c53753290b5da42a9948a562881a6474428a48
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 VRMLScalarInterpolator
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGVRMLSCALARINTERPOLATORBASE_H_
55 #define _OSGVRMLSCALARINTERPOLATORBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGVRMLInterpolator.h" // Parent
68 #include "OSGSysFields.h" // KeyValue type
70 #include "OSGVRMLScalarInterpolatorFields.h"
72 OSG_BEGIN_NAMESPACE
75 class VRMLScalarInterpolator;
77 //! \brief VRMLScalarInterpolator Base Class.
79 class OSG_DYNAMICS_DLLMAPPING VRMLScalarInterpolatorBase : public VRMLInterpolator
81 public:
83 typedef VRMLInterpolator Inherited;
84 typedef VRMLInterpolator ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(VRMLScalarInterpolator);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 KeyValueFieldId = Inherited::NextFieldId,
98 OutValueFieldId = KeyValueFieldId + 1,
99 NextFieldId = OutValueFieldId + 1
102 static const OSG::BitVector KeyValueFieldMask =
103 (TypeTraits<BitVector>::One << KeyValueFieldId);
104 static const OSG::BitVector OutValueFieldMask =
105 (TypeTraits<BitVector>::One << OutValueFieldId);
106 static const OSG::BitVector NextFieldMask =
107 (TypeTraits<BitVector>::One << NextFieldId);
109 typedef MFReal32 MFKeyValueType;
110 typedef SFReal32 SFOutValueType;
112 /*---------------------------------------------------------------------*/
113 /*! \name Class Get */
114 /*! \{ */
116 static FieldContainerType &getClassType (void);
117 static UInt32 getClassTypeId (void);
118 static UInt16 getClassGroupId(void);
120 /*! \} */
121 /*---------------------------------------------------------------------*/
122 /*! \name FieldContainer Get */
123 /*! \{ */
125 virtual FieldContainerType &getType (void);
126 virtual const FieldContainerType &getType (void) const;
128 virtual UInt32 getContainerSize(void) const;
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name Field Get */
133 /*! \{ */
136 MFReal32 *editMFKeyValue (void);
137 const MFReal32 *getMFKeyValue (void) const;
139 SFReal32 *editSFOutValue (void);
140 const SFReal32 *getSFOutValue (void) const;
143 MFReal32 ::reference editKeyValue (const UInt32 index);
144 Real32 getKeyValue (const UInt32 index) const;
146 Real32 &editOutValue (void);
147 Real32 getOutValue (void) const;
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name Field Set */
152 /*! \{ */
154 void setOutValue (const Real32 value);
156 /*! \} */
157 /*---------------------------------------------------------------------*/
158 /*! \name Ptr MField Set */
159 /*! \{ */
161 /*! \} */
162 /*---------------------------------------------------------------------*/
163 /*! \name Binary Access */
164 /*! \{ */
166 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
167 virtual void copyToBin (BinaryDataHandler &pMem,
168 ConstFieldMaskArg whichField);
169 virtual void copyFromBin(BinaryDataHandler &pMem,
170 ConstFieldMaskArg whichField);
173 /*! \} */
174 /*---------------------------------------------------------------------*/
175 /*! \name Construction */
176 /*! \{ */
178 static VRMLScalarInterpolatorTransitPtr create (void);
179 static VRMLScalarInterpolator *createEmpty (void);
181 static VRMLScalarInterpolatorTransitPtr createLocal (
182 BitVector bFlags = FCLocal::All);
184 static VRMLScalarInterpolator *createEmptyLocal(
185 BitVector bFlags = FCLocal::All);
187 static VRMLScalarInterpolatorTransitPtr createDependent (BitVector bFlags);
189 /*! \} */
190 /*---------------------------------------------------------------------*/
191 /*! \name Copy */
192 /*! \{ */
194 virtual FieldContainerTransitPtr shallowCopy (void) const;
195 virtual FieldContainerTransitPtr shallowCopyLocal(
196 BitVector bFlags = FCLocal::All) const;
197 virtual FieldContainerTransitPtr shallowCopyDependent(
198 BitVector bFlags) const;
200 /*! \} */
201 /*========================= PROTECTED ===============================*/
203 protected:
205 static TypeObject _type;
207 static void classDescInserter(TypeObject &oType);
208 static const Char8 *getClassname (void );
210 /*---------------------------------------------------------------------*/
211 /*! \name Fields */
212 /*! \{ */
214 MFReal32 _mfKeyValue;
215 SFReal32 _sfOutValue;
217 /*! \} */
218 /*---------------------------------------------------------------------*/
219 /*! \name Constructors */
220 /*! \{ */
222 VRMLScalarInterpolatorBase(void);
223 VRMLScalarInterpolatorBase(const VRMLScalarInterpolatorBase &source);
225 /*! \} */
226 /*---------------------------------------------------------------------*/
227 /*! \name Destructors */
228 /*! \{ */
230 virtual ~VRMLScalarInterpolatorBase(void);
232 /*! \} */
233 /*---------------------------------------------------------------------*/
234 /*! \name onCreate */
235 /*! \{ */
238 /*! \} */
239 /*---------------------------------------------------------------------*/
240 /*! \name Generic Field Access */
241 /*! \{ */
243 GetFieldHandlePtr getHandleKeyValue (void) const;
244 EditFieldHandlePtr editHandleKeyValue (void);
245 GetFieldHandlePtr getHandleOutValue (void) const;
246 EditFieldHandlePtr editHandleOutValue (void);
248 /*! \} */
249 /*---------------------------------------------------------------------*/
250 /*! \name Sync */
251 /*! \{ */
253 #ifdef OSG_MT_CPTR_ASPECT
254 virtual void execSyncV( FieldContainer &oFrom,
255 ConstFieldMaskArg whichField,
256 AspectOffsetStore &oOffsets,
257 ConstFieldMaskArg syncMode ,
258 const UInt32 uiSyncInfo);
260 void execSync ( VRMLScalarInterpolatorBase *pFrom,
261 ConstFieldMaskArg whichField,
262 AspectOffsetStore &oOffsets,
263 ConstFieldMaskArg syncMode ,
264 const UInt32 uiSyncInfo);
265 #endif
267 /*! \} */
268 /*---------------------------------------------------------------------*/
269 /*! \name Edit */
270 /*! \{ */
272 /*! \} */
273 /*---------------------------------------------------------------------*/
274 /*! \name Aspect Create */
275 /*! \{ */
277 #ifdef OSG_MT_CPTR_ASPECT
278 virtual FieldContainer *createAspectCopy(
279 const FieldContainer *pRefAspect) const;
280 #endif
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Edit */
285 /*! \{ */
286 /*! \} */
287 /*---------------------------------------------------------------------*/
288 /*! \name Sync */
289 /*! \{ */
291 virtual void resolveLinks(void);
293 /*! \} */
294 /*========================== PRIVATE ================================*/
296 private:
297 /*---------------------------------------------------------------------*/
299 // prohibit default functions (move to 'public' if you need one)
300 void operator =(const VRMLScalarInterpolatorBase &source);
303 typedef VRMLScalarInterpolatorBase *VRMLScalarInterpolatorBaseP;
305 typedef CoredNodeRefPtr <VRMLScalarInterpolator> VRMLScalarInterpolatorNodeRefPtr;
306 typedef CoredNodeMTRefPtr<VRMLScalarInterpolator> VRMLScalarInterpolatorNodeMTRefPtr;
308 OSG_END_NAMESPACE
310 #endif /* _OSGVRMLSCALARINTERPOLATORBASE_H_ */