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 LinuxEventOptions
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGLINUXEVENTOPTIONSBASE_H_
55 #define _OSGLINUXEVENTOPTIONSBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGInterfaceOptions.h" // Parent
68 #include "OSGBaseFields.h" // Device type
69 #include "OSGVecFields.h" // TRange type
71 #include "OSGLinuxEventOptionsFields.h"
76 class LinuxEventOptions
;
78 //! \brief LinuxEventOptions Base Class.
80 class OSG_CONTRIBCSM_DLLMAPPING LinuxEventOptionsBase
: public InterfaceOptions
84 typedef InterfaceOptions Inherited
;
85 typedef InterfaceOptions ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(LinuxEventOptions
);
92 /*========================== PUBLIC =================================*/
98 DeviceFieldId
= Inherited::NextFieldId
,
99 TRangeFieldId
= DeviceFieldId
+ 1,
100 RRangeFieldId
= TRangeFieldId
+ 1,
101 NextFieldId
= RRangeFieldId
+ 1
104 static const OSG::BitVector DeviceFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< DeviceFieldId
);
106 static const OSG::BitVector TRangeFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< TRangeFieldId
);
108 static const OSG::BitVector RRangeFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< RRangeFieldId
);
110 static const OSG::BitVector NextFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
113 typedef SFString SFDeviceType
;
114 typedef SFVec3f SFTRangeType
;
115 typedef SFVec3f SFRRangeType
;
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 SFString
*editSFDevice (void);
142 const SFString
*getSFDevice (void) const;
144 SFVec3f
*editSFTRange (void);
145 const SFVec3f
*getSFTRange (void) const;
147 SFVec3f
*editSFRRange (void);
148 const SFVec3f
*getSFRRange (void) const;
151 std::string
&editDevice (void);
152 const std::string
&getDevice (void) const;
154 Vec3f
&editTRange (void);
155 const Vec3f
&getTRange (void) const;
157 Vec3f
&editRRange (void);
158 const Vec3f
&getRRange (void) const;
161 /*---------------------------------------------------------------------*/
162 /*! \name Field Set */
165 void setDevice (const std::string
&value
);
166 void setTRange (const Vec3f
&value
);
167 void setRRange (const Vec3f
&value
);
170 /*---------------------------------------------------------------------*/
171 /*! \name Ptr MField Set */
175 /*---------------------------------------------------------------------*/
176 /*! \name Binary Access */
179 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
180 virtual void copyToBin (BinaryDataHandler
&pMem
,
181 ConstFieldMaskArg whichField
);
182 virtual void copyFromBin(BinaryDataHandler
&pMem
,
183 ConstFieldMaskArg whichField
);
187 /*---------------------------------------------------------------------*/
188 /*! \name Construction */
191 static LinuxEventOptionsTransitPtr
create (void);
192 static LinuxEventOptions
*createEmpty (void);
194 static LinuxEventOptionsTransitPtr
createLocal (
195 BitVector bFlags
= FCLocal::All
);
197 static LinuxEventOptions
*createEmptyLocal(
198 BitVector bFlags
= FCLocal::All
);
200 static LinuxEventOptionsTransitPtr
createDependent (BitVector bFlags
);
203 /*---------------------------------------------------------------------*/
207 virtual FieldContainerTransitPtr
shallowCopy (void) const;
208 virtual FieldContainerTransitPtr
shallowCopyLocal(
209 BitVector bFlags
= FCLocal::All
) const;
210 virtual FieldContainerTransitPtr
shallowCopyDependent(
211 BitVector bFlags
) const;
214 /*========================= PROTECTED ===============================*/
218 static TypeObject _type
;
220 static void classDescInserter(TypeObject
&oType
);
221 static const Char8
*getClassname (void );
223 /*---------------------------------------------------------------------*/
232 /*---------------------------------------------------------------------*/
233 /*! \name Constructors */
236 LinuxEventOptionsBase(void);
237 LinuxEventOptionsBase(const LinuxEventOptionsBase
&source
);
240 /*---------------------------------------------------------------------*/
241 /*! \name Destructors */
244 virtual ~LinuxEventOptionsBase(void);
247 /*---------------------------------------------------------------------*/
248 /*! \name onCreate */
253 /*---------------------------------------------------------------------*/
254 /*! \name Generic Field Access */
257 GetFieldHandlePtr
getHandleDevice (void) const;
258 EditFieldHandlePtr
editHandleDevice (void);
259 GetFieldHandlePtr
getHandleTRange (void) const;
260 EditFieldHandlePtr
editHandleTRange (void);
261 GetFieldHandlePtr
getHandleRRange (void) const;
262 EditFieldHandlePtr
editHandleRRange (void);
265 /*---------------------------------------------------------------------*/
269 #ifdef OSG_MT_CPTR_ASPECT
270 virtual void execSyncV( FieldContainer
&oFrom
,
271 ConstFieldMaskArg whichField
,
272 AspectOffsetStore
&oOffsets
,
273 ConstFieldMaskArg syncMode
,
274 const UInt32 uiSyncInfo
);
276 void execSync ( LinuxEventOptionsBase
*pFrom
,
277 ConstFieldMaskArg whichField
,
278 AspectOffsetStore
&oOffsets
,
279 ConstFieldMaskArg syncMode
,
280 const UInt32 uiSyncInfo
);
284 /*---------------------------------------------------------------------*/
289 /*---------------------------------------------------------------------*/
290 /*! \name Aspect Create */
293 #ifdef OSG_MT_CPTR_ASPECT
294 virtual FieldContainer
*createAspectCopy(
295 const FieldContainer
*pRefAspect
) const;
299 /*---------------------------------------------------------------------*/
303 /*---------------------------------------------------------------------*/
307 virtual void resolveLinks(void);
310 /*========================== PRIVATE ================================*/
313 /*---------------------------------------------------------------------*/
315 // prohibit default functions (move to 'public' if you need one)
316 void operator =(const LinuxEventOptionsBase
&source
);
319 typedef LinuxEventOptionsBase
*LinuxEventOptionsBaseP
;
323 #endif /* _OSGLINUXEVENTOPTIONSBASE_H_ */