changed: gcc8 base update
[opensg.git] / Source / System / Window / Foreground / OSGImageForegroundBase.h
blobbaa0e798d2eaa7dfbed9145a2467dc869f1e3edf
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 ImageForeground
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGIMAGEFOREGROUNDBASE_H_
55 #define _OSGIMAGEFOREGROUNDBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGWindowDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGForeground.h" // Parent
68 #include "OSGImageFields.h" // Images type
69 #include "OSGVecFields.h" // Positions type
71 #include "OSGImageForegroundFields.h"
73 OSG_BEGIN_NAMESPACE
76 class ImageForeground;
78 //! \brief ImageForeground Base Class.
80 class OSG_WINDOW_DLLMAPPING ImageForegroundBase : public Foreground
82 public:
84 typedef Foreground Inherited;
85 typedef Foreground ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(ImageForeground);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 ImagesFieldId = Inherited::NextFieldId,
99 PositionsFieldId = ImagesFieldId + 1,
100 ScalesFieldId = PositionsFieldId + 1,
101 NextFieldId = ScalesFieldId + 1
104 static const OSG::BitVector ImagesFieldMask =
105 (TypeTraits<BitVector>::One << ImagesFieldId);
106 static const OSG::BitVector PositionsFieldMask =
107 (TypeTraits<BitVector>::One << PositionsFieldId);
108 static const OSG::BitVector ScalesFieldMask =
109 (TypeTraits<BitVector>::One << ScalesFieldId);
110 static const OSG::BitVector NextFieldMask =
111 (TypeTraits<BitVector>::One << NextFieldId);
113 typedef MFUnrecImagePtr MFImagesType;
114 typedef MFPnt2f MFPositionsType;
115 typedef MFPnt2f MFScalesType;
117 /*---------------------------------------------------------------------*/
118 /*! \name Class Get */
119 /*! \{ */
121 static FieldContainerType &getClassType (void);
122 static UInt32 getClassTypeId (void);
123 static UInt16 getClassGroupId(void);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
128 /*! \{ */
130 virtual FieldContainerType &getType (void);
131 virtual const FieldContainerType &getType (void) const;
133 virtual UInt32 getContainerSize(void) const;
135 /*! \} */
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
138 /*! \{ */
140 const MFUnrecImagePtr *getMFImages (void) const;
141 MFUnrecImagePtr *editMFImages (void);
143 MFPnt2f *editMFPositions (void);
144 const MFPnt2f *getMFPositions (void) const;
146 MFPnt2f *editMFScales (void);
147 const MFPnt2f *getMFScales (void) const;
150 Image * getImages (const UInt32 index) const;
152 MFPnt2f ::reference editPositions (const UInt32 index);
153 const Pnt2f &getPositions (const UInt32 index) const;
155 MFPnt2f ::reference editScales (const UInt32 index);
156 const Pnt2f &getScales (const UInt32 index) const;
158 /*! \} */
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
161 /*! \{ */
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Ptr Field Set */
167 /*! \{ */
169 /*! \} */
170 /*---------------------------------------------------------------------*/
171 /*! \name Ptr MField Set */
172 /*! \{ */
174 void pushToImages (Image * const value );
175 void assignImages (const MFUnrecImagePtr &value);
176 void removeFromImages (UInt32 uiIndex );
177 void removeObjFromImages(Image * const value );
178 void clearImages (void );
180 /*! \} */
181 /*---------------------------------------------------------------------*/
182 /*! \name Binary Access */
183 /*! \{ */
185 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
186 virtual void copyToBin (BinaryDataHandler &pMem,
187 ConstFieldMaskArg whichField);
188 virtual void copyFromBin(BinaryDataHandler &pMem,
189 ConstFieldMaskArg whichField);
192 /*! \} */
193 /*---------------------------------------------------------------------*/
194 /*! \name Construction */
195 /*! \{ */
197 static ImageForegroundTransitPtr create (void);
198 static ImageForeground *createEmpty (void);
200 static ImageForegroundTransitPtr createLocal (
201 BitVector bFlags = FCLocal::All);
203 static ImageForeground *createEmptyLocal(
204 BitVector bFlags = FCLocal::All);
206 static ImageForegroundTransitPtr createDependent (BitVector bFlags);
208 /*! \} */
209 /*---------------------------------------------------------------------*/
210 /*! \name Copy */
211 /*! \{ */
213 virtual FieldContainerTransitPtr shallowCopy (void) const;
214 virtual FieldContainerTransitPtr shallowCopyLocal(
215 BitVector bFlags = FCLocal::All) const;
216 virtual FieldContainerTransitPtr shallowCopyDependent(
217 BitVector bFlags) const;
219 /*! \} */
220 /*========================= PROTECTED ===============================*/
222 protected:
224 static TypeObject _type;
226 static void classDescInserter(TypeObject &oType);
227 static const Char8 *getClassname (void );
229 /*---------------------------------------------------------------------*/
230 /*! \name Fields */
231 /*! \{ */
233 MFUnrecImagePtr _mfImages;
234 MFPnt2f _mfPositions;
235 MFPnt2f _mfScales;
237 /*! \} */
238 /*---------------------------------------------------------------------*/
239 /*! \name Constructors */
240 /*! \{ */
242 ImageForegroundBase(void);
243 ImageForegroundBase(const ImageForegroundBase &source);
245 /*! \} */
246 /*---------------------------------------------------------------------*/
247 /*! \name Destructors */
248 /*! \{ */
250 virtual ~ImageForegroundBase(void);
252 /*! \} */
253 /*---------------------------------------------------------------------*/
254 /*! \name onCreate */
255 /*! \{ */
257 void onCreate(const ImageForeground *source = NULL);
259 /*! \} */
260 /*---------------------------------------------------------------------*/
261 /*! \name Generic Field Access */
262 /*! \{ */
264 GetFieldHandlePtr getHandleImages (void) const;
265 EditFieldHandlePtr editHandleImages (void);
266 GetFieldHandlePtr getHandlePositions (void) const;
267 EditFieldHandlePtr editHandlePositions (void);
268 GetFieldHandlePtr getHandleScales (void) const;
269 EditFieldHandlePtr editHandleScales (void);
271 /*! \} */
272 /*---------------------------------------------------------------------*/
273 /*! \name Sync */
274 /*! \{ */
276 #ifdef OSG_MT_CPTR_ASPECT
277 virtual void execSyncV( FieldContainer &oFrom,
278 ConstFieldMaskArg whichField,
279 AspectOffsetStore &oOffsets,
280 ConstFieldMaskArg syncMode ,
281 const UInt32 uiSyncInfo);
283 void execSync ( ImageForegroundBase *pFrom,
284 ConstFieldMaskArg whichField,
285 AspectOffsetStore &oOffsets,
286 ConstFieldMaskArg syncMode ,
287 const UInt32 uiSyncInfo);
288 #endif
290 /*! \} */
291 /*---------------------------------------------------------------------*/
292 /*! \name Edit */
293 /*! \{ */
295 /*! \} */
296 /*---------------------------------------------------------------------*/
297 /*! \name Aspect Create */
298 /*! \{ */
300 #ifdef OSG_MT_CPTR_ASPECT
301 virtual FieldContainer *createAspectCopy(
302 const FieldContainer *pRefAspect) const;
303 #endif
305 /*! \} */
306 /*---------------------------------------------------------------------*/
307 /*! \name Edit */
308 /*! \{ */
309 /*! \} */
310 /*---------------------------------------------------------------------*/
311 /*! \name Sync */
312 /*! \{ */
314 virtual void resolveLinks(void);
316 /*! \} */
317 /*========================== PRIVATE ================================*/
319 private:
320 /*---------------------------------------------------------------------*/
322 // prohibit default functions (move to 'public' if you need one)
323 void operator =(const ImageForegroundBase &source);
326 typedef ImageForegroundBase *ImageForegroundBaseP;
328 OSG_END_NAMESPACE
330 #endif /* _OSGIMAGEFOREGROUNDBASE_H_ */