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 BinarySwapComposer
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGBINARYSWAPCOMPOSERBASE_H_
55 #define _OSGBINARYSWAPCOMPOSERBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGClusterDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGImageComposer.h" // Parent
68 #include "OSGSysFields.h" // Short type
70 #include "OSGBinarySwapComposerFields.h"
75 class BinarySwapComposer
;
77 //! \brief BinarySwapComposer Base Class.
79 class OSG_CLUSTER_DLLMAPPING BinarySwapComposerBase
: public ImageComposer
83 typedef ImageComposer Inherited
;
84 typedef ImageComposer ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(BinarySwapComposer
);
91 /*========================== PUBLIC =================================*/
97 ShortFieldId
= Inherited::NextFieldId
,
98 AlphaFieldId
= ShortFieldId
+ 1,
99 TileSizeFieldId
= AlphaFieldId
+ 1,
100 NextFieldId
= TileSizeFieldId
+ 1
103 static const OSG::BitVector ShortFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< ShortFieldId
);
105 static const OSG::BitVector AlphaFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< AlphaFieldId
);
107 static const OSG::BitVector TileSizeFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< TileSizeFieldId
);
109 static const OSG::BitVector NextFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
112 typedef SFBool SFShortType
;
113 typedef SFBool SFAlphaType
;
114 typedef SFUInt32 SFTileSizeType
;
116 /*---------------------------------------------------------------------*/
117 /*! \name Class Get */
120 static FieldContainerType
&getClassType (void);
121 static UInt32
getClassTypeId (void);
122 static UInt16
getClassGroupId(void);
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
129 virtual FieldContainerType
&getType (void);
130 virtual const FieldContainerType
&getType (void) const;
132 virtual UInt32
getContainerSize(void) const;
135 /*---------------------------------------------------------------------*/
136 /*! \name Field Get */
140 SFBool
*editSFShort (void);
141 const SFBool
*getSFShort (void) const;
143 SFBool
*editSFAlpha (void);
144 const SFBool
*getSFAlpha (void) const;
146 SFUInt32
*editSFTileSize (void);
147 const SFUInt32
*getSFTileSize (void) const;
150 bool &editShort (void);
151 bool getShort (void) const;
153 bool &editAlpha (void);
154 bool getAlpha (void) const;
156 UInt32
&editTileSize (void);
157 UInt32
getTileSize (void) const;
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
164 void setShort (const bool value
);
165 void setAlpha (const bool value
);
166 void setTileSize (const UInt32 value
);
169 /*---------------------------------------------------------------------*/
170 /*! \name Ptr MField Set */
174 /*---------------------------------------------------------------------*/
175 /*! \name Binary Access */
178 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
179 virtual void copyToBin (BinaryDataHandler
&pMem
,
180 ConstFieldMaskArg whichField
);
181 virtual void copyFromBin(BinaryDataHandler
&pMem
,
182 ConstFieldMaskArg whichField
);
186 /*---------------------------------------------------------------------*/
187 /*! \name Construction */
190 static BinarySwapComposerTransitPtr
create (void);
191 static BinarySwapComposer
*createEmpty (void);
193 static BinarySwapComposerTransitPtr
createLocal (
194 BitVector bFlags
= FCLocal::All
);
196 static BinarySwapComposer
*createEmptyLocal(
197 BitVector bFlags
= FCLocal::All
);
199 static BinarySwapComposerTransitPtr
createDependent (BitVector bFlags
);
202 /*---------------------------------------------------------------------*/
206 virtual FieldContainerTransitPtr
shallowCopy (void) const;
207 virtual FieldContainerTransitPtr
shallowCopyLocal(
208 BitVector bFlags
= FCLocal::All
) const;
209 virtual FieldContainerTransitPtr
shallowCopyDependent(
210 BitVector bFlags
) const;
213 /*========================= PROTECTED ===============================*/
217 static TypeObject _type
;
219 static void classDescInserter(TypeObject
&oType
);
220 static const Char8
*getClassname (void );
222 /*---------------------------------------------------------------------*/
228 SFUInt32 _sfTileSize
;
231 /*---------------------------------------------------------------------*/
232 /*! \name Constructors */
235 BinarySwapComposerBase(void);
236 BinarySwapComposerBase(const BinarySwapComposerBase
&source
);
239 /*---------------------------------------------------------------------*/
240 /*! \name Destructors */
243 virtual ~BinarySwapComposerBase(void);
246 /*---------------------------------------------------------------------*/
247 /*! \name onCreate */
252 /*---------------------------------------------------------------------*/
253 /*! \name Generic Field Access */
256 GetFieldHandlePtr
getHandleShort (void) const;
257 EditFieldHandlePtr
editHandleShort (void);
258 GetFieldHandlePtr
getHandleAlpha (void) const;
259 EditFieldHandlePtr
editHandleAlpha (void);
260 GetFieldHandlePtr
getHandleTileSize (void) const;
261 EditFieldHandlePtr
editHandleTileSize (void);
264 /*---------------------------------------------------------------------*/
268 #ifdef OSG_MT_CPTR_ASPECT
269 virtual void execSyncV( FieldContainer
&oFrom
,
270 ConstFieldMaskArg whichField
,
271 AspectOffsetStore
&oOffsets
,
272 ConstFieldMaskArg syncMode
,
273 const UInt32 uiSyncInfo
);
275 void execSync ( BinarySwapComposerBase
*pFrom
,
276 ConstFieldMaskArg whichField
,
277 AspectOffsetStore
&oOffsets
,
278 ConstFieldMaskArg syncMode
,
279 const UInt32 uiSyncInfo
);
283 /*---------------------------------------------------------------------*/
288 /*---------------------------------------------------------------------*/
289 /*! \name Aspect Create */
292 #ifdef OSG_MT_CPTR_ASPECT
293 virtual FieldContainer
*createAspectCopy(
294 const FieldContainer
*pRefAspect
) const;
298 /*---------------------------------------------------------------------*/
302 /*---------------------------------------------------------------------*/
306 virtual void resolveLinks(void);
309 /*========================== PRIVATE ================================*/
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const BinarySwapComposerBase
&source
);
318 typedef BinarySwapComposerBase
*BinarySwapComposerBaseP
;
322 #endif /* _OSGBINARYSWAPCOMPOSERBASE_H_ */