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 InterfaceOptions
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGINTERFACEOPTIONSBASE_H_
55 #define _OSGINTERFACEOPTIONSBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGFieldContainer.h" // Parent
68 #include "OSGDeviceInterfaceSensorFields.h" // Parent type
69 #include "OSGSysFields.h" // NapTime type
71 #include "OSGInterfaceOptionsFields.h"
76 class InterfaceOptions
;
78 //! \brief InterfaceOptions Base Class.
80 class OSG_CONTRIBCSM_DLLMAPPING InterfaceOptionsBase
: public FieldContainer
84 typedef FieldContainer Inherited
;
85 typedef FieldContainer ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(InterfaceOptions
);
92 /*========================== PUBLIC =================================*/
98 ParentFieldId
= Inherited::NextFieldId
,
99 NapTimeFieldId
= ParentFieldId
+ 1,
100 BufferSizeFieldId
= NapTimeFieldId
+ 1,
101 NextFieldId
= BufferSizeFieldId
+ 1
104 static const OSG::BitVector ParentFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< ParentFieldId
);
106 static const OSG::BitVector NapTimeFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< NapTimeFieldId
);
108 static const OSG::BitVector BufferSizeFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< BufferSizeFieldId
);
110 static const OSG::BitVector NextFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
113 typedef SFParentDeviceInterfaceSensorPtr SFParentType
;
114 typedef SFUInt32 SFNapTimeType
;
115 typedef SFUInt32 SFBufferSizeType
;
117 /*---------------------------------------------------------------------*/
118 /*! \name Class Get */
121 static FieldContainerType
&getClassType (void);
122 static UInt32
getClassTypeId (void);
123 static UInt16
getClassGroupId(void);
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
130 virtual FieldContainerType
&getType (void);
131 virtual const FieldContainerType
&getType (void) const;
133 virtual UInt32
getContainerSize(void) const;
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
141 SFUInt32
*editSFNapTime (void);
142 const SFUInt32
*getSFNapTime (void) const;
144 SFUInt32
*editSFBufferSize (void);
145 const SFUInt32
*getSFBufferSize (void) const;
148 UInt32
&editNapTime (void);
149 UInt32
getNapTime (void) const;
151 UInt32
&editBufferSize (void);
152 UInt32
getBufferSize (void) const;
155 /*---------------------------------------------------------------------*/
156 /*! \name Field Set */
159 void setNapTime (const UInt32 value
);
160 void setBufferSize (const UInt32 value
);
163 /*---------------------------------------------------------------------*/
164 /*! \name Ptr MField Set */
168 /*---------------------------------------------------------------------*/
169 /*! \name Binary Access */
172 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
173 virtual void copyToBin (BinaryDataHandler
&pMem
,
174 ConstFieldMaskArg whichField
);
175 virtual void copyFromBin(BinaryDataHandler
&pMem
,
176 ConstFieldMaskArg whichField
);
180 /*---------------------------------------------------------------------*/
181 /*! \name Construction */
184 static InterfaceOptionsTransitPtr
create (void);
185 static InterfaceOptions
*createEmpty (void);
187 static InterfaceOptionsTransitPtr
createLocal (
188 BitVector bFlags
= FCLocal::All
);
190 static InterfaceOptions
*createEmptyLocal(
191 BitVector bFlags
= FCLocal::All
);
193 static InterfaceOptionsTransitPtr
createDependent (BitVector bFlags
);
196 /*---------------------------------------------------------------------*/
200 virtual FieldContainerTransitPtr
shallowCopy (void) const;
201 virtual FieldContainerTransitPtr
shallowCopyLocal(
202 BitVector bFlags
= FCLocal::All
) const;
203 virtual FieldContainerTransitPtr
shallowCopyDependent(
204 BitVector bFlags
) const;
207 /*========================= PROTECTED ===============================*/
211 static TypeObject _type
;
213 static void classDescInserter(TypeObject
&oType
);
214 static const Char8
*getClassname (void );
216 /*---------------------------------------------------------------------*/
220 SFParentDeviceInterfaceSensorPtr _sfParent
;
222 SFUInt32 _sfBufferSize
;
225 /*---------------------------------------------------------------------*/
226 /*! \name Constructors */
229 InterfaceOptionsBase(void);
230 InterfaceOptionsBase(const InterfaceOptionsBase
&source
);
233 /*---------------------------------------------------------------------*/
234 /*! \name Destructors */
237 virtual ~InterfaceOptionsBase(void);
240 /*---------------------------------------------------------------------*/
241 /*! \name onCreate */
246 /*---------------------------------------------------------------------*/
247 /*! \name Parent linking */
250 virtual bool linkParent (FieldContainer
* const pParent
,
251 UInt16
const childFieldId
,
252 UInt16
const parentFieldId
);
253 virtual bool unlinkParent(FieldContainer
* const pParent
,
254 UInt16
const parentFieldId
);
257 /*---------------------------------------------------------------------*/
258 /*! \name Generic Field Access */
261 GetFieldHandlePtr
getHandleParent (void) const;
262 EditFieldHandlePtr
editHandleParent (void);
263 GetFieldHandlePtr
getHandleNapTime (void) const;
264 EditFieldHandlePtr
editHandleNapTime (void);
265 GetFieldHandlePtr
getHandleBufferSize (void) const;
266 EditFieldHandlePtr
editHandleBufferSize (void);
269 /*---------------------------------------------------------------------*/
273 #ifdef OSG_MT_CPTR_ASPECT
274 virtual void execSyncV( FieldContainer
&oFrom
,
275 ConstFieldMaskArg whichField
,
276 AspectOffsetStore
&oOffsets
,
277 ConstFieldMaskArg syncMode
,
278 const UInt32 uiSyncInfo
);
280 void execSync ( InterfaceOptionsBase
*pFrom
,
281 ConstFieldMaskArg whichField
,
282 AspectOffsetStore
&oOffsets
,
283 ConstFieldMaskArg syncMode
,
284 const UInt32 uiSyncInfo
);
288 /*---------------------------------------------------------------------*/
293 /*---------------------------------------------------------------------*/
294 /*! \name Aspect Create */
297 #ifdef OSG_MT_CPTR_ASPECT
298 virtual FieldContainer
*createAspectCopy(
299 const FieldContainer
*pRefAspect
) const;
303 /*---------------------------------------------------------------------*/
307 /*---------------------------------------------------------------------*/
311 virtual void resolveLinks(void);
314 /*========================== PRIVATE ================================*/
317 /*---------------------------------------------------------------------*/
319 // prohibit default functions (move to 'public' if you need one)
320 void operator =(const InterfaceOptionsBase
&source
);
323 typedef InterfaceOptionsBase
*InterfaceOptionsBaseP
;
327 #endif /* _OSGINTERFACEOPTIONSBASE_H_ */