fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Cluster / Window / SortLast / OSGBinarySwapComposerBase.h
blobff0a90d5691427a209e866addf7bd693e5b49971
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 BinarySwapComposer
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGBINARYSWAPCOMPOSERBASE_H_
55 #define _OSGBINARYSWAPCOMPOSERBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
72 OSG_BEGIN_NAMESPACE
75 class BinarySwapComposer;
77 //! \brief BinarySwapComposer Base Class.
79 class OSG_CLUSTER_DLLMAPPING BinarySwapComposerBase : public ImageComposer
81 public:
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 =================================*/
93 public:
95 enum
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 */
118 /*! \{ */
120 static FieldContainerType &getClassType (void);
121 static UInt32 getClassTypeId (void);
122 static UInt16 getClassGroupId(void);
124 /*! \} */
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
127 /*! \{ */
129 virtual FieldContainerType &getType (void);
130 virtual const FieldContainerType &getType (void) const;
132 virtual UInt32 getContainerSize(void) const;
134 /*! \} */
135 /*---------------------------------------------------------------------*/
136 /*! \name Field Get */
137 /*! \{ */
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;
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
162 /*! \{ */
164 void setShort (const bool value);
165 void setAlpha (const bool value);
166 void setTileSize (const UInt32 value);
168 /*! \} */
169 /*---------------------------------------------------------------------*/
170 /*! \name Ptr MField Set */
171 /*! \{ */
173 /*! \} */
174 /*---------------------------------------------------------------------*/
175 /*! \name Binary Access */
176 /*! \{ */
178 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
179 virtual void copyToBin (BinaryDataHandler &pMem,
180 ConstFieldMaskArg whichField);
181 virtual void copyFromBin(BinaryDataHandler &pMem,
182 ConstFieldMaskArg whichField);
185 /*! \} */
186 /*---------------------------------------------------------------------*/
187 /*! \name Construction */
188 /*! \{ */
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);
201 /*! \} */
202 /*---------------------------------------------------------------------*/
203 /*! \name Copy */
204 /*! \{ */
206 virtual FieldContainerTransitPtr shallowCopy (void) const;
207 virtual FieldContainerTransitPtr shallowCopyLocal(
208 BitVector bFlags = FCLocal::All) const;
209 virtual FieldContainerTransitPtr shallowCopyDependent(
210 BitVector bFlags) const;
212 /*! \} */
213 /*========================= PROTECTED ===============================*/
215 protected:
217 static TypeObject _type;
219 static void classDescInserter(TypeObject &oType);
220 static const Char8 *getClassname (void );
222 /*---------------------------------------------------------------------*/
223 /*! \name Fields */
224 /*! \{ */
226 SFBool _sfShort;
227 SFBool _sfAlpha;
228 SFUInt32 _sfTileSize;
230 /*! \} */
231 /*---------------------------------------------------------------------*/
232 /*! \name Constructors */
233 /*! \{ */
235 BinarySwapComposerBase(void);
236 BinarySwapComposerBase(const BinarySwapComposerBase &source);
238 /*! \} */
239 /*---------------------------------------------------------------------*/
240 /*! \name Destructors */
241 /*! \{ */
243 virtual ~BinarySwapComposerBase(void);
245 /*! \} */
246 /*---------------------------------------------------------------------*/
247 /*! \name onCreate */
248 /*! \{ */
251 /*! \} */
252 /*---------------------------------------------------------------------*/
253 /*! \name Generic Field Access */
254 /*! \{ */
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);
263 /*! \} */
264 /*---------------------------------------------------------------------*/
265 /*! \name Sync */
266 /*! \{ */
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);
280 #endif
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Edit */
285 /*! \{ */
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Aspect Create */
290 /*! \{ */
292 #ifdef OSG_MT_CPTR_ASPECT
293 virtual FieldContainer *createAspectCopy(
294 const FieldContainer *pRefAspect) const;
295 #endif
297 /*! \} */
298 /*---------------------------------------------------------------------*/
299 /*! \name Edit */
300 /*! \{ */
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Sync */
304 /*! \{ */
306 virtual void resolveLinks(void);
308 /*! \} */
309 /*========================== PRIVATE ================================*/
311 private:
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const BinarySwapComposerBase &source);
318 typedef BinarySwapComposerBase *BinarySwapComposerBaseP;
320 OSG_END_NAMESPACE
322 #endif /* _OSGBINARYSWAPCOMPOSERBASE_H_ */