fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComplexSceneManager / Sensor / InterfaceSensors / OSGDeviceInterfaceSensorBase.h
blobc04e8961dda10e76551447f619105e4409a42037
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 DeviceInterfaceSensor
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGDEVICEINTERFACESENSORBASE_H_
55 #define _OSGDEVICEINTERFACESENSORBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGNodeCore.h" // Parent
68 #include "OSGBaseFields.h" // InterfaceName type
69 #include "OSGInterfaceOptionsFields.h" // Options type
71 #include "OSGDeviceInterfaceSensorFields.h"
73 #include "OSGNodeCoreSensorParent.h"
75 OSG_BEGIN_NAMESPACE
78 class DeviceInterfaceSensor;
80 //! \brief DeviceInterfaceSensor Base Class.
82 class OSG_CONTRIBCSM_DLLMAPPING DeviceInterfaceSensorBase : public NodeCoreSensorParent
84 public:
86 typedef NodeCoreSensorParent Inherited;
87 typedef NodeCore ParentContainer;
89 typedef Inherited::TypeObject TypeObject;
90 typedef TypeObject::InitPhase InitPhase;
92 OSG_GEN_INTERNALPTR(DeviceInterfaceSensor);
94 /*========================== PUBLIC =================================*/
96 public:
98 enum
100 InterfaceNameFieldId = Inherited::NextFieldId,
101 OptionsFieldId = InterfaceNameFieldId + 1,
102 NextFieldId = OptionsFieldId + 1
105 static const OSG::BitVector InterfaceNameFieldMask =
106 (TypeTraits<BitVector>::One << InterfaceNameFieldId);
107 static const OSG::BitVector OptionsFieldMask =
108 (TypeTraits<BitVector>::One << OptionsFieldId);
109 static const OSG::BitVector NextFieldMask =
110 (TypeTraits<BitVector>::One << NextFieldId);
112 typedef SFString SFInterfaceNameType;
113 typedef SFUnrecChildInterfaceOptionsPtr SFOptionsType;
115 /*---------------------------------------------------------------------*/
116 /*! \name Class Get */
117 /*! \{ */
119 static FieldContainerType &getClassType (void);
120 static UInt32 getClassTypeId (void);
121 static UInt16 getClassGroupId(void);
123 /*! \} */
124 /*---------------------------------------------------------------------*/
125 /*! \name FieldContainer Get */
126 /*! \{ */
128 virtual FieldContainerType &getType (void);
129 virtual const FieldContainerType &getType (void) const;
131 virtual UInt32 getContainerSize(void) const;
133 /*! \} */
134 /*---------------------------------------------------------------------*/
135 /*! \name Field Get */
136 /*! \{ */
139 SFString *editSFInterfaceName (void);
140 const SFString *getSFInterfaceName (void) const;
141 const SFUnrecChildInterfaceOptionsPtr *getSFOptions (void) const;
142 SFUnrecChildInterfaceOptionsPtr *editSFOptions (void);
145 std::string &editInterfaceName (void);
146 const std::string &getInterfaceName (void) const;
148 InterfaceOptions * getOptions (void) const;
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name Field Set */
153 /*! \{ */
155 void setInterfaceName (const std::string &value);
156 void setOptions (InterfaceOptions * const value);
158 /*! \} */
159 /*---------------------------------------------------------------------*/
160 /*! \name Ptr Field Set */
161 /*! \{ */
163 /*! \} */
164 /*---------------------------------------------------------------------*/
165 /*! \name Ptr MField Set */
166 /*! \{ */
168 /*! \} */
169 /*---------------------------------------------------------------------*/
170 /*! \name Binary Access */
171 /*! \{ */
173 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
174 virtual void copyToBin (BinaryDataHandler &pMem,
175 ConstFieldMaskArg whichField);
176 virtual void copyFromBin(BinaryDataHandler &pMem,
177 ConstFieldMaskArg whichField);
180 /*! \} */
181 /*========================= PROTECTED ===============================*/
183 protected:
185 static TypeObject _type;
187 static void classDescInserter(TypeObject &oType);
188 static const Char8 *getClassname (void );
190 /*---------------------------------------------------------------------*/
191 /*! \name Fields */
192 /*! \{ */
194 SFString _sfInterfaceName;
195 SFUnrecChildInterfaceOptionsPtr _sfOptions;
197 /*! \} */
198 /*---------------------------------------------------------------------*/
199 /*! \name Constructors */
200 /*! \{ */
202 DeviceInterfaceSensorBase(void);
203 DeviceInterfaceSensorBase(const DeviceInterfaceSensorBase &source);
205 /*! \} */
206 /*---------------------------------------------------------------------*/
207 /*! \name Destructors */
208 /*! \{ */
210 virtual ~DeviceInterfaceSensorBase(void);
212 /*! \} */
213 /*---------------------------------------------------------------------*/
214 /*! \name onCreate */
215 /*! \{ */
217 void onCreate(const DeviceInterfaceSensor *source = NULL);
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Child linking */
222 /*! \{ */
224 virtual bool unlinkChild(FieldContainer * const pChild,
225 UInt16 const childFieldId);
227 /*! \} */
228 /*---------------------------------------------------------------------*/
229 /*! \name Generic Field Access */
230 /*! \{ */
232 GetFieldHandlePtr getHandleInterfaceName (void) const;
233 EditFieldHandlePtr editHandleInterfaceName (void);
234 GetFieldHandlePtr getHandleOptions (void) const;
235 EditFieldHandlePtr editHandleOptions (void);
237 /*! \} */
238 /*---------------------------------------------------------------------*/
239 /*! \name Sync */
240 /*! \{ */
242 #ifdef OSG_MT_CPTR_ASPECT
243 virtual void execSyncV( FieldContainer &oFrom,
244 ConstFieldMaskArg whichField,
245 AspectOffsetStore &oOffsets,
246 ConstFieldMaskArg syncMode ,
247 const UInt32 uiSyncInfo);
249 void execSync ( DeviceInterfaceSensorBase *pFrom,
250 ConstFieldMaskArg whichField,
251 AspectOffsetStore &oOffsets,
252 ConstFieldMaskArg syncMode ,
253 const UInt32 uiSyncInfo);
254 #endif
256 /*! \} */
257 /*---------------------------------------------------------------------*/
258 /*! \name Edit */
259 /*! \{ */
261 /*! \} */
262 /*---------------------------------------------------------------------*/
263 /*! \name Aspect Create */
264 /*! \{ */
266 /*! \} */
267 /*---------------------------------------------------------------------*/
268 /*! \name Edit */
269 /*! \{ */
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name Sync */
273 /*! \{ */
275 virtual void resolveLinks(void);
277 /*! \} */
278 /*========================== PRIVATE ================================*/
280 private:
281 /*---------------------------------------------------------------------*/
283 // prohibit default functions (move to 'public' if you need one)
284 void operator =(const DeviceInterfaceSensorBase &source);
287 typedef DeviceInterfaceSensorBase *DeviceInterfaceSensorBaseP;
289 OSG_END_NAMESPACE
291 #endif /* _OSGDEVICEINTERFACESENSORBASE_H_ */