changed: gcc8 base update
[opensg.git] / Source / System / State / Auxiliary / OSGTextureImageChunkBase.h
blobb6582024550e48f16740a7ef6c73955976fc690b
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 TextureImageChunk
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGTEXTUREIMAGECHUNKBASE_H_
55 #define _OSGTEXTUREIMAGECHUNKBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGStateDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGTextureBaseChunkFields.h" // Texture type
69 #include "OSGSysFields.h" // Level type
70 #include "OSGBaseFields.h" // Access type
72 #include "OSGTextureImageChunkFields.h"
74 OSG_BEGIN_NAMESPACE
77 class TextureImageChunk;
79 //! \brief TextureImageChunk Base Class.
81 class OSG_STATE_DLLMAPPING TextureImageChunkBase : public StateChunk
83 public:
85 typedef StateChunk Inherited;
86 typedef StateChunk ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(TextureImageChunk);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 TextureFieldId = Inherited::NextFieldId,
100 LevelFieldId = TextureFieldId + 1,
101 LayerFieldId = LevelFieldId + 1,
102 AccessFieldId = LayerFieldId + 1,
103 FormatFieldId = AccessFieldId + 1,
104 NextFieldId = FormatFieldId + 1
107 static const OSG::BitVector TextureFieldMask =
108 (TypeTraits<BitVector>::One << TextureFieldId);
109 static const OSG::BitVector LevelFieldMask =
110 (TypeTraits<BitVector>::One << LevelFieldId);
111 static const OSG::BitVector LayerFieldMask =
112 (TypeTraits<BitVector>::One << LayerFieldId);
113 static const OSG::BitVector AccessFieldMask =
114 (TypeTraits<BitVector>::One << AccessFieldId);
115 static const OSG::BitVector FormatFieldMask =
116 (TypeTraits<BitVector>::One << FormatFieldId);
117 static const OSG::BitVector NextFieldMask =
118 (TypeTraits<BitVector>::One << NextFieldId);
120 typedef SFUnrecTextureBaseChunkPtr SFTextureType;
121 typedef SFInt32 SFLevelType;
122 typedef SFInt32 SFLayerType;
123 typedef SFGLenum SFAccessType;
124 typedef SFGLenum SFFormatType;
126 /*---------------------------------------------------------------------*/
127 /*! \name Class Get */
128 /*! \{ */
130 static FieldContainerType &getClassType (void);
131 static UInt32 getClassTypeId (void);
132 static UInt16 getClassGroupId(void);
134 /*! \} */
135 /*---------------------------------------------------------------------*/
136 /*! \name FieldContainer Get */
137 /*! \{ */
139 virtual FieldContainerType &getType (void);
140 virtual const FieldContainerType &getType (void) const;
142 virtual UInt32 getContainerSize(void) const;
144 /*! \} */
145 /*---------------------------------------------------------------------*/
146 /*! \name Field Get */
147 /*! \{ */
149 const SFUnrecTextureBaseChunkPtr *getSFTexture (void) const;
150 SFUnrecTextureBaseChunkPtr *editSFTexture (void);
152 SFInt32 *editSFLevel (void);
153 const SFInt32 *getSFLevel (void) const;
155 SFInt32 *editSFLayer (void);
156 const SFInt32 *getSFLayer (void) const;
158 SFGLenum *editSFAccess (void);
159 const SFGLenum *getSFAccess (void) const;
161 SFGLenum *editSFFormat (void);
162 const SFGLenum *getSFFormat (void) const;
165 TextureBaseChunk * getTexture (void) const;
167 Int32 &editLevel (void);
168 Int32 getLevel (void) const;
170 Int32 &editLayer (void);
171 Int32 getLayer (void) const;
173 GLenum &editAccess (void);
174 const GLenum &getAccess (void) const;
176 GLenum &editFormat (void);
177 const GLenum &getFormat (void) const;
179 /*! \} */
180 /*---------------------------------------------------------------------*/
181 /*! \name Field Set */
182 /*! \{ */
184 void setTexture (TextureBaseChunk * const value);
185 void setLevel (const Int32 value);
186 void setLayer (const Int32 value);
187 void setAccess (const GLenum &value);
188 void setFormat (const GLenum &value);
190 /*! \} */
191 /*---------------------------------------------------------------------*/
192 /*! \name Ptr Field Set */
193 /*! \{ */
195 /*! \} */
196 /*---------------------------------------------------------------------*/
197 /*! \name Ptr MField Set */
198 /*! \{ */
200 /*! \} */
201 /*---------------------------------------------------------------------*/
202 /*! \name Binary Access */
203 /*! \{ */
205 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
206 virtual void copyToBin (BinaryDataHandler &pMem,
207 ConstFieldMaskArg whichField);
208 virtual void copyFromBin(BinaryDataHandler &pMem,
209 ConstFieldMaskArg whichField);
212 /*! \} */
213 /*---------------------------------------------------------------------*/
214 /*! \name Construction */
215 /*! \{ */
217 static TextureImageChunkTransitPtr create (void);
218 static TextureImageChunk *createEmpty (void);
220 static TextureImageChunkTransitPtr createLocal (
221 BitVector bFlags = FCLocal::All);
223 static TextureImageChunk *createEmptyLocal(
224 BitVector bFlags = FCLocal::All);
226 static TextureImageChunkTransitPtr createDependent (BitVector bFlags);
228 /*! \} */
229 /*---------------------------------------------------------------------*/
230 /*! \name Copy */
231 /*! \{ */
233 virtual FieldContainerTransitPtr shallowCopy (void) const;
234 virtual FieldContainerTransitPtr shallowCopyLocal(
235 BitVector bFlags = FCLocal::All) const;
236 virtual FieldContainerTransitPtr shallowCopyDependent(
237 BitVector bFlags) const;
239 /*! \} */
240 /*========================= PROTECTED ===============================*/
242 protected:
244 static TypeObject _type;
246 static void classDescInserter(TypeObject &oType);
247 static const Char8 *getClassname (void );
249 /*---------------------------------------------------------------------*/
250 /*! \name Fields */
251 /*! \{ */
253 SFUnrecTextureBaseChunkPtr _sfTexture;
254 SFInt32 _sfLevel;
255 SFInt32 _sfLayer;
256 SFGLenum _sfAccess;
257 SFGLenum _sfFormat;
259 /*! \} */
260 /*---------------------------------------------------------------------*/
261 /*! \name Constructors */
262 /*! \{ */
264 TextureImageChunkBase(void);
265 TextureImageChunkBase(const TextureImageChunkBase &source);
267 /*! \} */
268 /*---------------------------------------------------------------------*/
269 /*! \name Destructors */
270 /*! \{ */
272 virtual ~TextureImageChunkBase(void);
274 /*! \} */
275 /*---------------------------------------------------------------------*/
276 /*! \name onCreate */
277 /*! \{ */
279 void onCreate(const TextureImageChunk *source = NULL);
281 /*! \} */
282 /*---------------------------------------------------------------------*/
283 /*! \name Generic Field Access */
284 /*! \{ */
286 GetFieldHandlePtr getHandleTexture (void) const;
287 EditFieldHandlePtr editHandleTexture (void);
288 GetFieldHandlePtr getHandleLevel (void) const;
289 EditFieldHandlePtr editHandleLevel (void);
290 GetFieldHandlePtr getHandleLayer (void) const;
291 EditFieldHandlePtr editHandleLayer (void);
292 GetFieldHandlePtr getHandleAccess (void) const;
293 EditFieldHandlePtr editHandleAccess (void);
294 GetFieldHandlePtr getHandleFormat (void) const;
295 EditFieldHandlePtr editHandleFormat (void);
297 /*! \} */
298 /*---------------------------------------------------------------------*/
299 /*! \name Sync */
300 /*! \{ */
302 #ifdef OSG_MT_CPTR_ASPECT
303 virtual void execSyncV( FieldContainer &oFrom,
304 ConstFieldMaskArg whichField,
305 AspectOffsetStore &oOffsets,
306 ConstFieldMaskArg syncMode ,
307 const UInt32 uiSyncInfo);
309 void execSync ( TextureImageChunkBase *pFrom,
310 ConstFieldMaskArg whichField,
311 AspectOffsetStore &oOffsets,
312 ConstFieldMaskArg syncMode ,
313 const UInt32 uiSyncInfo);
314 #endif
316 /*! \} */
317 /*---------------------------------------------------------------------*/
318 /*! \name Edit */
319 /*! \{ */
321 /*! \} */
322 /*---------------------------------------------------------------------*/
323 /*! \name Aspect Create */
324 /*! \{ */
326 #ifdef OSG_MT_CPTR_ASPECT
327 virtual FieldContainer *createAspectCopy(
328 const FieldContainer *pRefAspect) const;
329 #endif
331 /*! \} */
332 /*---------------------------------------------------------------------*/
333 /*! \name Edit */
334 /*! \{ */
335 /*! \} */
336 /*---------------------------------------------------------------------*/
337 /*! \name Sync */
338 /*! \{ */
340 virtual void resolveLinks(void);
342 /*! \} */
343 /*========================== PRIVATE ================================*/
345 private:
346 /*---------------------------------------------------------------------*/
348 // prohibit default functions (move to 'public' if you need one)
349 void operator =(const TextureImageChunkBase &source);
352 typedef TextureImageChunkBase *TextureImageChunkBaseP;
354 OSG_END_NAMESPACE
356 #endif /* _OSGTEXTUREIMAGECHUNKBASE_H_ */