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 ColorMaskChunk
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCOLORMASKCHUNKBASE_H_
55 #define _OSGCOLORMASKCHUNKBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGSysFields.h" // MaskR type
70 #include "OSGColorMaskChunkFields.h"
77 //! \brief ColorMaskChunk Base Class.
79 class OSG_SYSTEM_DLLMAPPING ColorMaskChunkBase
: public StateChunk
83 typedef StateChunk Inherited
;
84 typedef StateChunk ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(ColorMaskChunk
);
91 /*========================== PUBLIC =================================*/
97 MaskRFieldId
= Inherited::NextFieldId
,
98 MaskGFieldId
= MaskRFieldId
+ 1,
99 MaskBFieldId
= MaskGFieldId
+ 1,
100 MaskAFieldId
= MaskBFieldId
+ 1,
101 NextFieldId
= MaskAFieldId
+ 1
104 static const OSG::BitVector MaskRFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< MaskRFieldId
);
106 static const OSG::BitVector MaskGFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< MaskGFieldId
);
108 static const OSG::BitVector MaskBFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< MaskBFieldId
);
110 static const OSG::BitVector MaskAFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< MaskAFieldId
);
112 static const OSG::BitVector NextFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
115 typedef SFBool SFMaskRType
;
116 typedef SFBool SFMaskGType
;
117 typedef SFBool SFMaskBType
;
118 typedef SFBool SFMaskAType
;
120 /*---------------------------------------------------------------------*/
121 /*! \name Class Get */
124 static FieldContainerType
&getClassType (void);
125 static UInt32
getClassTypeId (void);
126 static UInt16
getClassGroupId(void);
129 /*---------------------------------------------------------------------*/
130 /*! \name FieldContainer Get */
133 virtual FieldContainerType
&getType (void);
134 virtual const FieldContainerType
&getType (void) const;
136 virtual UInt32
getContainerSize(void) const;
139 /*---------------------------------------------------------------------*/
140 /*! \name Field Get */
144 SFBool
*editSFMaskR (void);
145 const SFBool
*getSFMaskR (void) const;
147 SFBool
*editSFMaskG (void);
148 const SFBool
*getSFMaskG (void) const;
150 SFBool
*editSFMaskB (void);
151 const SFBool
*getSFMaskB (void) const;
153 SFBool
*editSFMaskA (void);
154 const SFBool
*getSFMaskA (void) const;
157 bool &editMaskR (void);
158 bool getMaskR (void) const;
160 bool &editMaskG (void);
161 bool getMaskG (void) const;
163 bool &editMaskB (void);
164 bool getMaskB (void) const;
166 bool &editMaskA (void);
167 bool getMaskA (void) const;
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
174 void setMaskR (const bool value
);
175 void setMaskG (const bool value
);
176 void setMaskB (const bool value
);
177 void setMaskA (const bool value
);
180 /*---------------------------------------------------------------------*/
181 /*! \name Ptr MField Set */
185 /*---------------------------------------------------------------------*/
186 /*! \name Binary Access */
189 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
190 virtual void copyToBin (BinaryDataHandler
&pMem
,
191 ConstFieldMaskArg whichField
);
192 virtual void copyFromBin(BinaryDataHandler
&pMem
,
193 ConstFieldMaskArg whichField
);
197 /*---------------------------------------------------------------------*/
198 /*! \name Construction */
201 static ColorMaskChunkTransitPtr
create (void);
202 static ColorMaskChunk
*createEmpty (void);
204 static ColorMaskChunkTransitPtr
createLocal (
205 BitVector bFlags
= FCLocal::All
);
207 static ColorMaskChunk
*createEmptyLocal(
208 BitVector bFlags
= FCLocal::All
);
210 static ColorMaskChunkTransitPtr
createDependent (BitVector bFlags
);
213 /*---------------------------------------------------------------------*/
217 virtual FieldContainerTransitPtr
shallowCopy (void) const;
218 virtual FieldContainerTransitPtr
shallowCopyLocal(
219 BitVector bFlags
= FCLocal::All
) const;
220 virtual FieldContainerTransitPtr
shallowCopyDependent(
221 BitVector bFlags
) const;
224 /*========================= PROTECTED ===============================*/
228 static TypeObject _type
;
230 static void classDescInserter(TypeObject
&oType
);
231 static const Char8
*getClassname (void );
233 /*---------------------------------------------------------------------*/
243 /*---------------------------------------------------------------------*/
244 /*! \name Constructors */
247 ColorMaskChunkBase(void);
248 ColorMaskChunkBase(const ColorMaskChunkBase
&source
);
251 /*---------------------------------------------------------------------*/
252 /*! \name Destructors */
255 virtual ~ColorMaskChunkBase(void);
258 /*---------------------------------------------------------------------*/
259 /*! \name onCreate */
264 /*---------------------------------------------------------------------*/
265 /*! \name Generic Field Access */
268 GetFieldHandlePtr
getHandleMaskR (void) const;
269 EditFieldHandlePtr
editHandleMaskR (void);
270 GetFieldHandlePtr
getHandleMaskG (void) const;
271 EditFieldHandlePtr
editHandleMaskG (void);
272 GetFieldHandlePtr
getHandleMaskB (void) const;
273 EditFieldHandlePtr
editHandleMaskB (void);
274 GetFieldHandlePtr
getHandleMaskA (void) const;
275 EditFieldHandlePtr
editHandleMaskA (void);
278 /*---------------------------------------------------------------------*/
282 #ifdef OSG_MT_CPTR_ASPECT
283 virtual void execSyncV( FieldContainer
&oFrom
,
284 ConstFieldMaskArg whichField
,
285 AspectOffsetStore
&oOffsets
,
286 ConstFieldMaskArg syncMode
,
287 const UInt32 uiSyncInfo
);
289 void execSync ( ColorMaskChunkBase
*pFrom
,
290 ConstFieldMaskArg whichField
,
291 AspectOffsetStore
&oOffsets
,
292 ConstFieldMaskArg syncMode
,
293 const UInt32 uiSyncInfo
);
297 /*---------------------------------------------------------------------*/
302 /*---------------------------------------------------------------------*/
303 /*! \name Aspect Create */
306 #ifdef OSG_MT_CPTR_ASPECT
307 virtual FieldContainer
*createAspectCopy(
308 const FieldContainer
*pRefAspect
) const;
312 /*---------------------------------------------------------------------*/
316 /*---------------------------------------------------------------------*/
320 virtual void resolveLinks(void);
323 /*========================== PRIVATE ================================*/
326 /*---------------------------------------------------------------------*/
328 // prohibit default functions (move to 'public' if you need one)
329 void operator =(const ColorMaskChunkBase
&source
);
332 typedef ColorMaskChunkBase
*ColorMaskChunkBaseP
;
336 #endif /* _OSGCOLORMASKCHUNKBASE_H_ */