changed: gcc8 base update
[opensg.git] / Source / System / Window / Background / OSGGradientBackgroundBase.h
blob61258430027f8453c3aeba96a5b1d03abcc5fdb9
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 GradientBackground
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGGRADIENTBACKGROUNDBASE_H_
55 #define _OSGGRADIENTBACKGROUNDBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGWindowDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGTileableBackground.h" // Parent
68 #include "OSGBaseFields.h" // Color type
69 #include "OSGSysFields.h" // Position type
71 #include "OSGGradientBackgroundFields.h"
73 OSG_BEGIN_NAMESPACE
76 class GradientBackground;
78 //! \brief GradientBackground Base Class.
80 class OSG_WINDOW_DLLMAPPING GradientBackgroundBase : public TileableBackground
82 public:
84 typedef TileableBackground Inherited;
85 typedef TileableBackground ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(GradientBackground);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 ColorFieldId = Inherited::NextFieldId,
99 PositionFieldId = ColorFieldId + 1,
100 NormPositionFieldId = PositionFieldId + 1,
101 StyleFieldId = NormPositionFieldId + 1,
102 NextFieldId = StyleFieldId + 1
105 static const OSG::BitVector ColorFieldMask =
106 (TypeTraits<BitVector>::One << ColorFieldId);
107 static const OSG::BitVector PositionFieldMask =
108 (TypeTraits<BitVector>::One << PositionFieldId);
109 static const OSG::BitVector NormPositionFieldMask =
110 (TypeTraits<BitVector>::One << NormPositionFieldId);
111 static const OSG::BitVector StyleFieldMask =
112 (TypeTraits<BitVector>::One << StyleFieldId);
113 static const OSG::BitVector NextFieldMask =
114 (TypeTraits<BitVector>::One << NextFieldId);
116 typedef MFColor3f MFColorType;
117 typedef MFReal32 MFPositionType;
118 typedef SFBool SFNormPositionType;
119 typedef SFUInt32 SFStyleType;
121 /*---------------------------------------------------------------------*/
122 /*! \name Class Get */
123 /*! \{ */
125 static FieldContainerType &getClassType (void);
126 static UInt32 getClassTypeId (void);
127 static UInt16 getClassGroupId(void);
129 /*! \} */
130 /*---------------------------------------------------------------------*/
131 /*! \name FieldContainer Get */
132 /*! \{ */
134 virtual FieldContainerType &getType (void);
135 virtual const FieldContainerType &getType (void) const;
137 virtual UInt32 getContainerSize(void) const;
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Field Get */
142 /*! \{ */
145 SFUInt32 *editSFStyle (void);
146 const SFUInt32 *getSFStyle (void) const;
149 UInt32 &editStyle (void);
150 UInt32 getStyle (void) const;
152 /*! \} */
153 /*---------------------------------------------------------------------*/
154 /*! \name Field Set */
155 /*! \{ */
157 void setStyle (const UInt32 value);
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Ptr MField Set */
162 /*! \{ */
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Binary Access */
167 /*! \{ */
169 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
170 virtual void copyToBin (BinaryDataHandler &pMem,
171 ConstFieldMaskArg whichField);
172 virtual void copyFromBin(BinaryDataHandler &pMem,
173 ConstFieldMaskArg whichField);
176 /*! \} */
177 /*---------------------------------------------------------------------*/
178 /*! \name Construction */
179 /*! \{ */
181 static GradientBackgroundTransitPtr create (void);
182 static GradientBackground *createEmpty (void);
184 static GradientBackgroundTransitPtr createLocal (
185 BitVector bFlags = FCLocal::All);
187 static GradientBackground *createEmptyLocal(
188 BitVector bFlags = FCLocal::All);
190 static GradientBackgroundTransitPtr createDependent (BitVector bFlags);
192 /*! \} */
193 /*---------------------------------------------------------------------*/
194 /*! \name Copy */
195 /*! \{ */
197 virtual FieldContainerTransitPtr shallowCopy (void) const;
198 virtual FieldContainerTransitPtr shallowCopyLocal(
199 BitVector bFlags = FCLocal::All) const;
200 virtual FieldContainerTransitPtr shallowCopyDependent(
201 BitVector bFlags) const;
203 /*! \} */
204 /*========================= PROTECTED ===============================*/
206 protected:
208 static TypeObject _type;
210 static void classDescInserter(TypeObject &oType);
211 static const Char8 *getClassname (void );
213 /*---------------------------------------------------------------------*/
214 /*! \name Fields */
215 /*! \{ */
217 MFColor3f _mfColor;
218 MFReal32 _mfPosition;
219 SFBool _sfNormPosition;
220 SFUInt32 _sfStyle;
222 /*! \} */
223 /*---------------------------------------------------------------------*/
224 /*! \name Constructors */
225 /*! \{ */
227 GradientBackgroundBase(void);
228 GradientBackgroundBase(const GradientBackgroundBase &source);
230 /*! \} */
231 /*---------------------------------------------------------------------*/
232 /*! \name Destructors */
233 /*! \{ */
235 virtual ~GradientBackgroundBase(void);
237 /*! \} */
238 /*---------------------------------------------------------------------*/
239 /*! \name onCreate */
240 /*! \{ */
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name Generic Field Access */
246 /*! \{ */
248 GetFieldHandlePtr getHandleColor (void) const;
249 EditFieldHandlePtr editHandleColor (void);
250 GetFieldHandlePtr getHandlePosition (void) const;
251 EditFieldHandlePtr editHandlePosition (void);
252 GetFieldHandlePtr getHandleNormPosition (void) const;
253 EditFieldHandlePtr editHandleNormPosition (void);
254 GetFieldHandlePtr getHandleStyle (void) const;
255 EditFieldHandlePtr editHandleStyle (void);
257 /*! \} */
258 /*---------------------------------------------------------------------*/
259 /*! \name Field Get */
260 /*! \{ */
263 MFColor3f *editMFColor (void);
264 const MFColor3f *getMFColor (void) const;
266 MFReal32 *editMFPosition (void);
267 const MFReal32 *getMFPosition (void) const;
269 SFBool *editSFNormPosition (void);
270 const SFBool *getSFNormPosition (void) const;
273 MFColor3f ::reference editColor (const UInt32 index);
274 const Color3f &getColor (const UInt32 index) const;
276 MFReal32 ::reference editPosition (const UInt32 index);
277 Real32 getPosition (const UInt32 index) const;
279 bool &editNormPosition (void);
280 bool getNormPosition (void) const;
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Field Set */
285 /*! \{ */
287 void setNormPosition (const bool value);
289 /*! \} */
290 /*---------------------------------------------------------------------*/
291 /*! \name Ptr MField Set */
292 /*! \{ */
294 /*! \} */
295 /*---------------------------------------------------------------------*/
296 /*! \name Sync */
297 /*! \{ */
299 #ifdef OSG_MT_CPTR_ASPECT
300 virtual void execSyncV( FieldContainer &oFrom,
301 ConstFieldMaskArg whichField,
302 AspectOffsetStore &oOffsets,
303 ConstFieldMaskArg syncMode ,
304 const UInt32 uiSyncInfo);
306 void execSync ( GradientBackgroundBase *pFrom,
307 ConstFieldMaskArg whichField,
308 AspectOffsetStore &oOffsets,
309 ConstFieldMaskArg syncMode ,
310 const UInt32 uiSyncInfo);
311 #endif
313 /*! \} */
314 /*---------------------------------------------------------------------*/
315 /*! \name Edit */
316 /*! \{ */
318 /*! \} */
319 /*---------------------------------------------------------------------*/
320 /*! \name Aspect Create */
321 /*! \{ */
323 #ifdef OSG_MT_CPTR_ASPECT
324 virtual FieldContainer *createAspectCopy(
325 const FieldContainer *pRefAspect) const;
326 #endif
328 /*! \} */
329 /*---------------------------------------------------------------------*/
330 /*! \name Edit */
331 /*! \{ */
332 /*! \} */
333 /*---------------------------------------------------------------------*/
334 /*! \name Sync */
335 /*! \{ */
337 virtual void resolveLinks(void);
339 /*! \} */
340 /*========================== PRIVATE ================================*/
342 private:
343 /*---------------------------------------------------------------------*/
345 // prohibit default functions (move to 'public' if you need one)
346 void operator =(const GradientBackgroundBase &source);
349 typedef GradientBackgroundBase *GradientBackgroundBaseP;
351 OSG_END_NAMESPACE
353 #endif /* _OSGGRADIENTBACKGROUNDBASE_H_ */