1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ImageForeground
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGIMAGEFOREGROUNDBASE_H_
55 #define _OSGIMAGEFOREGROUNDBASE_H_
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"
76 class ImageForeground
;
78 //! \brief ImageForeground Base Class.
80 class OSG_WINDOW_DLLMAPPING ImageForegroundBase
: public Foreground
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 =================================*/
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 */
121 static FieldContainerType
&getClassType (void);
122 static UInt32
getClassTypeId (void);
123 static UInt16
getClassGroupId(void);
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
130 virtual FieldContainerType
&getType (void);
131 virtual const FieldContainerType
&getType (void) const;
133 virtual UInt32
getContainerSize(void) const;
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
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;
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
165 /*---------------------------------------------------------------------*/
166 /*! \name Ptr Field Set */
170 /*---------------------------------------------------------------------*/
171 /*! \name Ptr MField Set */
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 );
181 /*---------------------------------------------------------------------*/
182 /*! \name Binary Access */
185 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
186 virtual void copyToBin (BinaryDataHandler
&pMem
,
187 ConstFieldMaskArg whichField
);
188 virtual void copyFromBin(BinaryDataHandler
&pMem
,
189 ConstFieldMaskArg whichField
);
193 /*---------------------------------------------------------------------*/
194 /*! \name Construction */
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
);
209 /*---------------------------------------------------------------------*/
213 virtual FieldContainerTransitPtr
shallowCopy (void) const;
214 virtual FieldContainerTransitPtr
shallowCopyLocal(
215 BitVector bFlags
= FCLocal::All
) const;
216 virtual FieldContainerTransitPtr
shallowCopyDependent(
217 BitVector bFlags
) const;
220 /*========================= PROTECTED ===============================*/
224 static TypeObject _type
;
226 static void classDescInserter(TypeObject
&oType
);
227 static const Char8
*getClassname (void );
229 /*---------------------------------------------------------------------*/
233 MFUnrecImagePtr _mfImages
;
234 MFPnt2f _mfPositions
;
238 /*---------------------------------------------------------------------*/
239 /*! \name Constructors */
242 ImageForegroundBase(void);
243 ImageForegroundBase(const ImageForegroundBase
&source
);
246 /*---------------------------------------------------------------------*/
247 /*! \name Destructors */
250 virtual ~ImageForegroundBase(void);
253 /*---------------------------------------------------------------------*/
254 /*! \name onCreate */
257 void onCreate(const ImageForeground
*source
= NULL
);
260 /*---------------------------------------------------------------------*/
261 /*! \name Generic Field Access */
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);
272 /*---------------------------------------------------------------------*/
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
);
291 /*---------------------------------------------------------------------*/
296 /*---------------------------------------------------------------------*/
297 /*! \name Aspect Create */
300 #ifdef OSG_MT_CPTR_ASPECT
301 virtual FieldContainer
*createAspectCopy(
302 const FieldContainer
*pRefAspect
) const;
306 /*---------------------------------------------------------------------*/
310 /*---------------------------------------------------------------------*/
314 virtual void resolveLinks(void);
317 /*========================== PRIVATE ================================*/
320 /*---------------------------------------------------------------------*/
322 // prohibit default functions (move to 'public' if you need one)
323 void operator =(const ImageForegroundBase
&source
);
326 typedef ImageForegroundBase
*ImageForegroundBaseP
;
330 #endif /* _OSGIMAGEFOREGROUNDBASE_H_ */