changed: gcc8 base update
[opensg.git] / Source / Contrib / ComplexSceneManager / Sensor / InterfaceSensors / OSGInterfaceOptionsBase.h
blobe04d6ae4d559ef5b54f7471c57978a9beac17653
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 InterfaceOptions
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGINTERFACEOPTIONSBASE_H_
55 #define _OSGINTERFACEOPTIONSBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
73 OSG_BEGIN_NAMESPACE
76 class InterfaceOptions;
78 //! \brief InterfaceOptions Base Class.
80 class OSG_CONTRIBCSM_DLLMAPPING InterfaceOptionsBase : public FieldContainer
82 public:
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 =================================*/
94 public:
96 enum
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 */
119 /*! \{ */
121 static FieldContainerType &getClassType (void);
122 static UInt32 getClassTypeId (void);
123 static UInt16 getClassGroupId(void);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
128 /*! \{ */
130 virtual FieldContainerType &getType (void);
131 virtual const FieldContainerType &getType (void) const;
133 virtual UInt32 getContainerSize(void) const;
135 /*! \} */
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
138 /*! \{ */
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;
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Field Set */
157 /*! \{ */
159 void setNapTime (const UInt32 value);
160 void setBufferSize (const UInt32 value);
162 /*! \} */
163 /*---------------------------------------------------------------------*/
164 /*! \name Ptr MField Set */
165 /*! \{ */
167 /*! \} */
168 /*---------------------------------------------------------------------*/
169 /*! \name Binary Access */
170 /*! \{ */
172 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
173 virtual void copyToBin (BinaryDataHandler &pMem,
174 ConstFieldMaskArg whichField);
175 virtual void copyFromBin(BinaryDataHandler &pMem,
176 ConstFieldMaskArg whichField);
179 /*! \} */
180 /*---------------------------------------------------------------------*/
181 /*! \name Construction */
182 /*! \{ */
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);
195 /*! \} */
196 /*---------------------------------------------------------------------*/
197 /*! \name Copy */
198 /*! \{ */
200 virtual FieldContainerTransitPtr shallowCopy (void) const;
201 virtual FieldContainerTransitPtr shallowCopyLocal(
202 BitVector bFlags = FCLocal::All) const;
203 virtual FieldContainerTransitPtr shallowCopyDependent(
204 BitVector bFlags) const;
206 /*! \} */
207 /*========================= PROTECTED ===============================*/
209 protected:
211 static TypeObject _type;
213 static void classDescInserter(TypeObject &oType);
214 static const Char8 *getClassname (void );
216 /*---------------------------------------------------------------------*/
217 /*! \name Fields */
218 /*! \{ */
220 SFParentDeviceInterfaceSensorPtr _sfParent;
221 SFUInt32 _sfNapTime;
222 SFUInt32 _sfBufferSize;
224 /*! \} */
225 /*---------------------------------------------------------------------*/
226 /*! \name Constructors */
227 /*! \{ */
229 InterfaceOptionsBase(void);
230 InterfaceOptionsBase(const InterfaceOptionsBase &source);
232 /*! \} */
233 /*---------------------------------------------------------------------*/
234 /*! \name Destructors */
235 /*! \{ */
237 virtual ~InterfaceOptionsBase(void);
239 /*! \} */
240 /*---------------------------------------------------------------------*/
241 /*! \name onCreate */
242 /*! \{ */
245 /*! \} */
246 /*---------------------------------------------------------------------*/
247 /*! \name Parent linking */
248 /*! \{ */
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);
256 /*! \} */
257 /*---------------------------------------------------------------------*/
258 /*! \name Generic Field Access */
259 /*! \{ */
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);
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Sync */
271 /*! \{ */
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);
285 #endif
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Edit */
290 /*! \{ */
292 /*! \} */
293 /*---------------------------------------------------------------------*/
294 /*! \name Aspect Create */
295 /*! \{ */
297 #ifdef OSG_MT_CPTR_ASPECT
298 virtual FieldContainer *createAspectCopy(
299 const FieldContainer *pRefAspect) const;
300 #endif
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name Edit */
305 /*! \{ */
306 /*! \} */
307 /*---------------------------------------------------------------------*/
308 /*! \name Sync */
309 /*! \{ */
311 virtual void resolveLinks(void);
313 /*! \} */
314 /*========================== PRIVATE ================================*/
316 private:
317 /*---------------------------------------------------------------------*/
319 // prohibit default functions (move to 'public' if you need one)
320 void operator =(const InterfaceOptionsBase &source);
323 typedef InterfaceOptionsBase *InterfaceOptionsBaseP;
325 OSG_END_NAMESPACE
327 #endif /* _OSGINTERFACEOPTIONSBASE_H_ */