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 SimpleSHLChunkFile
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSIMPLESHLCHUNKFILEBASE_H_
55 #define _OSGSIMPLESHLCHUNKFILEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGSimpleSHLChunk.h" // Parent
68 #include "OSGBaseFields.h" // VertexProgramUrl type
70 #include "OSGSimpleSHLChunkFileFields.h"
75 class SimpleSHLChunkFile
;
77 //! \brief SimpleSHLChunkFile Base Class.
79 class OSG_CONTRIBCSM_DLLMAPPING SimpleSHLChunkFileBase
: public SimpleSHLChunk
83 typedef SimpleSHLChunk Inherited
;
84 typedef SimpleSHLChunk ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(SimpleSHLChunkFile
);
91 /*========================== PUBLIC =================================*/
97 VertexProgramUrlFieldId
= Inherited::NextFieldId
,
98 GeometryProgramUrlFieldId
= VertexProgramUrlFieldId
+ 1,
99 FragmentProgramUrlFieldId
= GeometryProgramUrlFieldId
+ 1,
100 NextFieldId
= FragmentProgramUrlFieldId
+ 1
103 static const OSG::BitVector VertexProgramUrlFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< VertexProgramUrlFieldId
);
105 static const OSG::BitVector GeometryProgramUrlFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< GeometryProgramUrlFieldId
);
107 static const OSG::BitVector FragmentProgramUrlFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< FragmentProgramUrlFieldId
);
109 static const OSG::BitVector NextFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
112 typedef SFString SFVertexProgramUrlType
;
113 typedef SFString SFGeometryProgramUrlType
;
114 typedef SFString SFFragmentProgramUrlType
;
116 /*---------------------------------------------------------------------*/
117 /*! \name Class Get */
120 static FieldContainerType
&getClassType (void);
121 static UInt32
getClassTypeId (void);
122 static UInt16
getClassGroupId(void);
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
129 virtual FieldContainerType
&getType (void);
130 virtual const FieldContainerType
&getType (void) const;
132 virtual UInt32
getContainerSize(void) const;
135 /*---------------------------------------------------------------------*/
136 /*! \name Field Get */
140 SFString
*editSFVertexProgramUrl(void);
141 const SFString
*getSFVertexProgramUrl (void) const;
143 SFString
*editSFGeometryProgramUrl(void);
144 const SFString
*getSFGeometryProgramUrl (void) const;
146 SFString
*editSFFragmentProgramUrl(void);
147 const SFString
*getSFFragmentProgramUrl (void) const;
150 std::string
&editVertexProgramUrl(void);
151 const std::string
&getVertexProgramUrl (void) const;
153 std::string
&editGeometryProgramUrl(void);
154 const std::string
&getGeometryProgramUrl (void) const;
156 std::string
&editFragmentProgramUrl(void);
157 const std::string
&getFragmentProgramUrl (void) const;
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
164 void setVertexProgramUrl(const std::string
&value
);
165 void setGeometryProgramUrl(const std::string
&value
);
166 void setFragmentProgramUrl(const std::string
&value
);
169 /*---------------------------------------------------------------------*/
170 /*! \name Ptr MField Set */
174 /*---------------------------------------------------------------------*/
175 /*! \name Binary Access */
178 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
179 virtual void copyToBin (BinaryDataHandler
&pMem
,
180 ConstFieldMaskArg whichField
);
181 virtual void copyFromBin(BinaryDataHandler
&pMem
,
182 ConstFieldMaskArg whichField
);
186 /*---------------------------------------------------------------------*/
187 /*! \name Construction */
190 static SimpleSHLChunkFileTransitPtr
create (void);
191 static SimpleSHLChunkFile
*createEmpty (void);
193 static SimpleSHLChunkFileTransitPtr
createLocal (
194 BitVector bFlags
= FCLocal::All
);
196 static SimpleSHLChunkFile
*createEmptyLocal(
197 BitVector bFlags
= FCLocal::All
);
199 static SimpleSHLChunkFileTransitPtr
createDependent (BitVector bFlags
);
202 /*---------------------------------------------------------------------*/
206 virtual FieldContainerTransitPtr
shallowCopy (void) const;
207 virtual FieldContainerTransitPtr
shallowCopyLocal(
208 BitVector bFlags
= FCLocal::All
) const;
209 virtual FieldContainerTransitPtr
shallowCopyDependent(
210 BitVector bFlags
) const;
213 /*========================= PROTECTED ===============================*/
217 static TypeObject _type
;
219 static void classDescInserter(TypeObject
&oType
);
220 static const Char8
*getClassname (void );
222 /*---------------------------------------------------------------------*/
226 SFString _sfVertexProgramUrl
;
227 SFString _sfGeometryProgramUrl
;
228 SFString _sfFragmentProgramUrl
;
231 /*---------------------------------------------------------------------*/
232 /*! \name Constructors */
235 SimpleSHLChunkFileBase(void);
236 SimpleSHLChunkFileBase(const SimpleSHLChunkFileBase
&source
);
239 /*---------------------------------------------------------------------*/
240 /*! \name Destructors */
243 virtual ~SimpleSHLChunkFileBase(void);
246 /*---------------------------------------------------------------------*/
247 /*! \name onCreate */
252 /*---------------------------------------------------------------------*/
253 /*! \name Generic Field Access */
256 GetFieldHandlePtr
getHandleVertexProgramUrl (void) const;
257 EditFieldHandlePtr
editHandleVertexProgramUrl(void);
258 GetFieldHandlePtr
getHandleGeometryProgramUrl (void) const;
259 EditFieldHandlePtr
editHandleGeometryProgramUrl(void);
260 GetFieldHandlePtr
getHandleFragmentProgramUrl (void) const;
261 EditFieldHandlePtr
editHandleFragmentProgramUrl(void);
264 /*---------------------------------------------------------------------*/
268 #ifdef OSG_MT_CPTR_ASPECT
269 virtual void execSyncV( FieldContainer
&oFrom
,
270 ConstFieldMaskArg whichField
,
271 AspectOffsetStore
&oOffsets
,
272 ConstFieldMaskArg syncMode
,
273 const UInt32 uiSyncInfo
);
275 void execSync ( SimpleSHLChunkFileBase
*pFrom
,
276 ConstFieldMaskArg whichField
,
277 AspectOffsetStore
&oOffsets
,
278 ConstFieldMaskArg syncMode
,
279 const UInt32 uiSyncInfo
);
283 /*---------------------------------------------------------------------*/
288 /*---------------------------------------------------------------------*/
289 /*! \name Aspect Create */
292 #ifdef OSG_MT_CPTR_ASPECT
293 virtual FieldContainer
*createAspectCopy(
294 const FieldContainer
*pRefAspect
) const;
298 /*---------------------------------------------------------------------*/
302 /*---------------------------------------------------------------------*/
306 virtual void resolveLinks(void);
309 /*========================== PRIVATE ================================*/
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const SimpleSHLChunkFileBase
&source
);
318 typedef SimpleSHLChunkFileBase
*SimpleSHLChunkFileBaseP
;
322 #endif /* _OSGSIMPLESHLCHUNKFILEBASE_H_ */