1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class DeviceInterfaceSensor
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGDEVICEINTERFACESENSORBASE_H_
55 #define _OSGDEVICEINTERFACESENSORBASE_H_
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"
78 class DeviceInterfaceSensor
;
80 //! \brief DeviceInterfaceSensor Base Class.
82 class OSG_CONTRIBCSM_DLLMAPPING DeviceInterfaceSensorBase
: public NodeCoreSensorParent
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 =================================*/
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 */
119 static FieldContainerType
&getClassType (void);
120 static UInt32
getClassTypeId (void);
121 static UInt16
getClassGroupId(void);
124 /*---------------------------------------------------------------------*/
125 /*! \name FieldContainer Get */
128 virtual FieldContainerType
&getType (void);
129 virtual const FieldContainerType
&getType (void) const;
131 virtual UInt32
getContainerSize(void) const;
134 /*---------------------------------------------------------------------*/
135 /*! \name Field Get */
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;
151 /*---------------------------------------------------------------------*/
152 /*! \name Field Set */
155 void setInterfaceName (const std::string
&value
);
156 void setOptions (InterfaceOptions
* const value
);
159 /*---------------------------------------------------------------------*/
160 /*! \name Ptr Field Set */
164 /*---------------------------------------------------------------------*/
165 /*! \name Ptr MField Set */
169 /*---------------------------------------------------------------------*/
170 /*! \name Binary Access */
173 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
174 virtual void copyToBin (BinaryDataHandler
&pMem
,
175 ConstFieldMaskArg whichField
);
176 virtual void copyFromBin(BinaryDataHandler
&pMem
,
177 ConstFieldMaskArg whichField
);
181 /*========================= PROTECTED ===============================*/
185 static TypeObject _type
;
187 static void classDescInserter(TypeObject
&oType
);
188 static const Char8
*getClassname (void );
190 /*---------------------------------------------------------------------*/
194 SFString _sfInterfaceName
;
195 SFUnrecChildInterfaceOptionsPtr _sfOptions
;
198 /*---------------------------------------------------------------------*/
199 /*! \name Constructors */
202 DeviceInterfaceSensorBase(void);
203 DeviceInterfaceSensorBase(const DeviceInterfaceSensorBase
&source
);
206 /*---------------------------------------------------------------------*/
207 /*! \name Destructors */
210 virtual ~DeviceInterfaceSensorBase(void);
213 /*---------------------------------------------------------------------*/
214 /*! \name onCreate */
217 void onCreate(const DeviceInterfaceSensor
*source
= NULL
);
220 /*---------------------------------------------------------------------*/
221 /*! \name Child linking */
224 virtual bool unlinkChild(FieldContainer
* const pChild
,
225 UInt16
const childFieldId
);
228 /*---------------------------------------------------------------------*/
229 /*! \name Generic Field Access */
232 GetFieldHandlePtr
getHandleInterfaceName (void) const;
233 EditFieldHandlePtr
editHandleInterfaceName (void);
234 GetFieldHandlePtr
getHandleOptions (void) const;
235 EditFieldHandlePtr
editHandleOptions (void);
238 /*---------------------------------------------------------------------*/
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
);
257 /*---------------------------------------------------------------------*/
262 /*---------------------------------------------------------------------*/
263 /*! \name Aspect Create */
267 /*---------------------------------------------------------------------*/
271 /*---------------------------------------------------------------------*/
275 virtual void resolveLinks(void);
278 /*========================== PRIVATE ================================*/
281 /*---------------------------------------------------------------------*/
283 // prohibit default functions (move to 'public' if you need one)
284 void operator =(const DeviceInterfaceSensorBase
&source
);
287 typedef DeviceInterfaceSensorBase
*DeviceInterfaceSensorBaseP
;
291 #endif /* _OSGDEVICEINTERFACESENSORBASE_H_ */