fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Window / Base / OSGSolidBackgroundBase.h
blob1651970571e45685c3012624340a1ea082add4ef
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 SolidBackground
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSOLIDBACKGROUNDBASE_H_
55 #define _OSGSOLIDBACKGROUNDBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGBackground.h" // Parent
68 #include "OSGBaseFields.h" // Color type
69 #include "OSGSysFields.h" // Alpha type
71 #include "OSGSolidBackgroundFields.h"
73 OSG_BEGIN_NAMESPACE
76 class SolidBackground;
78 //! \brief SolidBackground Base Class.
80 class OSG_SYSTEM_DLLMAPPING SolidBackgroundBase : public Background
82 public:
84 typedef Background Inherited;
85 typedef Background ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(SolidBackground);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 ColorFieldId = Inherited::NextFieldId,
99 AlphaFieldId = ColorFieldId + 1,
100 NextFieldId = AlphaFieldId + 1
103 static const OSG::BitVector ColorFieldMask =
104 (TypeTraits<BitVector>::One << ColorFieldId);
105 static const OSG::BitVector AlphaFieldMask =
106 (TypeTraits<BitVector>::One << AlphaFieldId);
107 static const OSG::BitVector NextFieldMask =
108 (TypeTraits<BitVector>::One << NextFieldId);
110 typedef SFColor3f SFColorType;
111 typedef SFReal32 SFAlphaType;
113 /*---------------------------------------------------------------------*/
114 /*! \name Class Get */
115 /*! \{ */
117 static FieldContainerType &getClassType (void);
118 static UInt32 getClassTypeId (void);
119 static UInt16 getClassGroupId(void);
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name FieldContainer Get */
124 /*! \{ */
126 virtual FieldContainerType &getType (void);
127 virtual const FieldContainerType &getType (void) const;
129 virtual UInt32 getContainerSize(void) const;
131 /*! \} */
132 /*---------------------------------------------------------------------*/
133 /*! \name Field Get */
134 /*! \{ */
137 SFColor3f *editSFColor (void);
138 const SFColor3f *getSFColor (void) const;
140 SFReal32 *editSFAlpha (void);
141 const SFReal32 *getSFAlpha (void) const;
144 Color3f &editColor (void);
145 const Color3f &getColor (void) const;
147 Real32 &editAlpha (void);
148 Real32 getAlpha (void) const;
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name Field Set */
153 /*! \{ */
155 void setColor (const Color3f &value);
156 void setAlpha (const Real32 value);
158 /*! \} */
159 /*---------------------------------------------------------------------*/
160 /*! \name Ptr MField Set */
161 /*! \{ */
163 /*! \} */
164 /*---------------------------------------------------------------------*/
165 /*! \name Binary Access */
166 /*! \{ */
168 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
169 virtual void copyToBin (BinaryDataHandler &pMem,
170 ConstFieldMaskArg whichField);
171 virtual void copyFromBin(BinaryDataHandler &pMem,
172 ConstFieldMaskArg whichField);
175 /*! \} */
176 /*---------------------------------------------------------------------*/
177 /*! \name Construction */
178 /*! \{ */
180 static SolidBackgroundTransitPtr create (void);
181 static SolidBackground *createEmpty (void);
183 static SolidBackgroundTransitPtr createLocal (
184 BitVector bFlags = FCLocal::All);
186 static SolidBackground *createEmptyLocal(
187 BitVector bFlags = FCLocal::All);
189 static SolidBackgroundTransitPtr createDependent (BitVector bFlags);
191 /*! \} */
192 /*---------------------------------------------------------------------*/
193 /*! \name Copy */
194 /*! \{ */
196 virtual FieldContainerTransitPtr shallowCopy (void) const;
197 virtual FieldContainerTransitPtr shallowCopyLocal(
198 BitVector bFlags = FCLocal::All) const;
199 virtual FieldContainerTransitPtr shallowCopyDependent(
200 BitVector bFlags) const;
202 /*! \} */
203 /*========================= PROTECTED ===============================*/
205 protected:
207 static TypeObject _type;
209 static void classDescInserter(TypeObject &oType);
210 static const Char8 *getClassname (void );
212 /*---------------------------------------------------------------------*/
213 /*! \name Fields */
214 /*! \{ */
216 SFColor3f _sfColor;
217 SFReal32 _sfAlpha;
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Constructors */
222 /*! \{ */
224 SolidBackgroundBase(void);
225 SolidBackgroundBase(const SolidBackgroundBase &source);
227 /*! \} */
228 /*---------------------------------------------------------------------*/
229 /*! \name Destructors */
230 /*! \{ */
232 virtual ~SolidBackgroundBase(void);
234 /*! \} */
235 /*---------------------------------------------------------------------*/
236 /*! \name onCreate */
237 /*! \{ */
240 /*! \} */
241 /*---------------------------------------------------------------------*/
242 /*! \name Generic Field Access */
243 /*! \{ */
245 GetFieldHandlePtr getHandleColor (void) const;
246 EditFieldHandlePtr editHandleColor (void);
247 GetFieldHandlePtr getHandleAlpha (void) const;
248 EditFieldHandlePtr editHandleAlpha (void);
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name Sync */
253 /*! \{ */
255 #ifdef OSG_MT_CPTR_ASPECT
256 virtual void execSyncV( FieldContainer &oFrom,
257 ConstFieldMaskArg whichField,
258 AspectOffsetStore &oOffsets,
259 ConstFieldMaskArg syncMode ,
260 const UInt32 uiSyncInfo);
262 void execSync ( SolidBackgroundBase *pFrom,
263 ConstFieldMaskArg whichField,
264 AspectOffsetStore &oOffsets,
265 ConstFieldMaskArg syncMode ,
266 const UInt32 uiSyncInfo);
267 #endif
269 /*! \} */
270 /*---------------------------------------------------------------------*/
271 /*! \name Edit */
272 /*! \{ */
274 /*! \} */
275 /*---------------------------------------------------------------------*/
276 /*! \name Aspect Create */
277 /*! \{ */
279 #ifdef OSG_MT_CPTR_ASPECT
280 virtual FieldContainer *createAspectCopy(
281 const FieldContainer *pRefAspect) const;
282 #endif
284 /*! \} */
285 /*---------------------------------------------------------------------*/
286 /*! \name Edit */
287 /*! \{ */
288 /*! \} */
289 /*---------------------------------------------------------------------*/
290 /*! \name Sync */
291 /*! \{ */
293 virtual void resolveLinks(void);
295 /*! \} */
296 /*========================== PRIVATE ================================*/
298 private:
299 /*---------------------------------------------------------------------*/
301 // prohibit default functions (move to 'public' if you need one)
302 void operator =(const SolidBackgroundBase &source);
305 typedef SolidBackgroundBase *SolidBackgroundBaseP;
307 OSG_END_NAMESPACE
309 #endif /* _OSGSOLIDBACKGROUNDBASE_H_ */