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 GeoReferenceAttachment
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGGEOREFERENCEATTACHMENTBASE_H_
55 #define _OSGGEOREFERENCEATTACHMENTBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachment.h" // Parent
68 #include "OSGSysFields.h" // Datum type
69 #include "OSGVecFields.h" // EllipsoidAxis type
71 #include "OSGGeoReferenceAttachmentFields.h"
76 class GeoReferenceAttachment
;
78 //! \brief GeoReferenceAttachment Base Class.
80 class OSG_SYSTEM_DLLMAPPING GeoReferenceAttachmentBase
: public Attachment
84 typedef Attachment Inherited
;
85 typedef Attachment ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(GeoReferenceAttachment
);
92 /*========================== PUBLIC =================================*/
98 DatumFieldId
= Inherited::NextFieldId
,
99 EllipsoidAxisFieldId
= DatumFieldId
+ 1,
100 OriginFieldId
= EllipsoidAxisFieldId
+ 1,
101 PixelSizeFieldId
= OriginFieldId
+ 1,
102 NoDataValueFieldId
= PixelSizeFieldId
+ 1,
103 NextFieldId
= NoDataValueFieldId
+ 1
106 static const OSG::BitVector DatumFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< DatumFieldId
);
108 static const OSG::BitVector EllipsoidAxisFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< EllipsoidAxisFieldId
);
110 static const OSG::BitVector OriginFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< OriginFieldId
);
112 static const OSG::BitVector PixelSizeFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< PixelSizeFieldId
);
114 static const OSG::BitVector NoDataValueFieldMask
=
115 (TypeTraits
<BitVector
>::One
<< NoDataValueFieldId
);
116 static const OSG::BitVector NextFieldMask
=
117 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
119 typedef SFUInt32 SFDatumType
;
120 typedef SFVec2f SFEllipsoidAxisType
;
121 typedef SFVec2f SFOriginType
;
122 typedef SFVec2f SFPixelSizeType
;
123 typedef SFReal64 SFNoDataValueType
;
125 /*---------------------------------------------------------------------*/
126 /*! \name Class Get */
129 static FieldContainerType
&getClassType (void);
130 static UInt32
getClassTypeId (void);
131 static UInt16
getClassGroupId(void);
134 /*---------------------------------------------------------------------*/
135 /*! \name FieldContainer Get */
138 virtual FieldContainerType
&getType (void);
139 virtual const FieldContainerType
&getType (void) const;
141 virtual UInt32
getContainerSize(void) const;
144 /*---------------------------------------------------------------------*/
145 /*! \name Field Get */
149 SFUInt32
*editSFDatum (void);
150 const SFUInt32
*getSFDatum (void) const;
152 SFVec2f
*editSFEllipsoidAxis (void);
153 const SFVec2f
*getSFEllipsoidAxis (void) const;
155 SFVec2f
*editSFOrigin (void);
156 const SFVec2f
*getSFOrigin (void) const;
158 SFVec2f
*editSFPixelSize (void);
159 const SFVec2f
*getSFPixelSize (void) const;
161 SFReal64
*editSFNoDataValue (void);
162 const SFReal64
*getSFNoDataValue (void) const;
165 UInt32
&editDatum (void);
166 UInt32
getDatum (void) const;
168 Vec2f
&editEllipsoidAxis (void);
169 const Vec2f
&getEllipsoidAxis (void) const;
171 Vec2f
&editOrigin (void);
172 const Vec2f
&getOrigin (void) const;
174 Vec2f
&editPixelSize (void);
175 const Vec2f
&getPixelSize (void) const;
177 Real64
&editNoDataValue (void);
178 Real64
getNoDataValue (void) const;
181 /*---------------------------------------------------------------------*/
182 /*! \name Field Set */
185 void setDatum (const UInt32 value
);
186 void setEllipsoidAxis (const Vec2f
&value
);
187 void setOrigin (const Vec2f
&value
);
188 void setPixelSize (const Vec2f
&value
);
189 void setNoDataValue (const Real64 value
);
192 /*---------------------------------------------------------------------*/
193 /*! \name Ptr MField Set */
197 /*---------------------------------------------------------------------*/
198 /*! \name Binary Access */
201 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
202 virtual void copyToBin (BinaryDataHandler
&pMem
,
203 ConstFieldMaskArg whichField
);
204 virtual void copyFromBin(BinaryDataHandler
&pMem
,
205 ConstFieldMaskArg whichField
);
209 /*---------------------------------------------------------------------*/
210 /*! \name Construction */
213 static GeoReferenceAttachmentTransitPtr
create (void);
214 static GeoReferenceAttachment
*createEmpty (void);
216 static GeoReferenceAttachmentTransitPtr
createLocal (
217 BitVector bFlags
= FCLocal::All
);
219 static GeoReferenceAttachment
*createEmptyLocal(
220 BitVector bFlags
= FCLocal::All
);
222 static GeoReferenceAttachmentTransitPtr
createDependent (BitVector bFlags
);
225 /*---------------------------------------------------------------------*/
229 virtual FieldContainerTransitPtr
shallowCopy (void) const;
230 virtual FieldContainerTransitPtr
shallowCopyLocal(
231 BitVector bFlags
= FCLocal::All
) const;
232 virtual FieldContainerTransitPtr
shallowCopyDependent(
233 BitVector bFlags
) const;
236 /*========================= PROTECTED ===============================*/
240 static TypeObject _type
;
242 static void classDescInserter(TypeObject
&oType
);
243 static const Char8
*getClassname (void );
245 /*---------------------------------------------------------------------*/
250 SFVec2f _sfEllipsoidAxis
;
252 SFVec2f _sfPixelSize
;
253 SFReal64 _sfNoDataValue
;
256 /*---------------------------------------------------------------------*/
257 /*! \name Constructors */
260 GeoReferenceAttachmentBase(void);
261 GeoReferenceAttachmentBase(const GeoReferenceAttachmentBase
&source
);
264 /*---------------------------------------------------------------------*/
265 /*! \name Destructors */
268 virtual ~GeoReferenceAttachmentBase(void);
271 /*---------------------------------------------------------------------*/
272 /*! \name onCreate */
277 /*---------------------------------------------------------------------*/
278 /*! \name Generic Field Access */
281 GetFieldHandlePtr
getHandleDatum (void) const;
282 EditFieldHandlePtr
editHandleDatum (void);
283 GetFieldHandlePtr
getHandleEllipsoidAxis (void) const;
284 EditFieldHandlePtr
editHandleEllipsoidAxis (void);
285 GetFieldHandlePtr
getHandleOrigin (void) const;
286 EditFieldHandlePtr
editHandleOrigin (void);
287 GetFieldHandlePtr
getHandlePixelSize (void) const;
288 EditFieldHandlePtr
editHandlePixelSize (void);
289 GetFieldHandlePtr
getHandleNoDataValue (void) const;
290 EditFieldHandlePtr
editHandleNoDataValue (void);
293 /*---------------------------------------------------------------------*/
297 #ifdef OSG_MT_CPTR_ASPECT
298 virtual void execSyncV( FieldContainer
&oFrom
,
299 ConstFieldMaskArg whichField
,
300 AspectOffsetStore
&oOffsets
,
301 ConstFieldMaskArg syncMode
,
302 const UInt32 uiSyncInfo
);
304 void execSync ( GeoReferenceAttachmentBase
*pFrom
,
305 ConstFieldMaskArg whichField
,
306 AspectOffsetStore
&oOffsets
,
307 ConstFieldMaskArg syncMode
,
308 const UInt32 uiSyncInfo
);
312 /*---------------------------------------------------------------------*/
317 /*---------------------------------------------------------------------*/
318 /*! \name Aspect Create */
321 #ifdef OSG_MT_CPTR_ASPECT
322 virtual FieldContainer
*createAspectCopy(
323 const FieldContainer
*pRefAspect
) const;
327 /*---------------------------------------------------------------------*/
331 /*---------------------------------------------------------------------*/
335 virtual void resolveLinks(void);
338 /*========================== PRIVATE ================================*/
341 /*---------------------------------------------------------------------*/
343 // prohibit default functions (move to 'public' if you need one)
344 void operator =(const GeoReferenceAttachmentBase
&source
);
347 typedef GeoReferenceAttachmentBase
*GeoReferenceAttachmentBaseP
;
351 #endif /* _OSGGEOREFERENCEATTACHMENTBASE_H_ */