changed: gcc8 base update
[opensg.git] / Source / System / State / OpenGL / OSGLineChunkBase.h
blobd4589852f57e1d0f445a8deded06207222761583
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 LineChunk
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGLINECHUNKBASE_H_
55 #define _OSGLINECHUNKBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGStateDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGSysFields.h" // Width type
70 #include "OSGLineChunkFields.h"
72 OSG_BEGIN_NAMESPACE
75 class LineChunk;
77 //! \brief LineChunk Base Class.
79 class OSG_STATE_DLLMAPPING LineChunkBase : public StateChunk
81 public:
83 typedef StateChunk Inherited;
84 typedef StateChunk ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(LineChunk);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 WidthFieldId = Inherited::NextFieldId,
98 StippleRepeatFieldId = WidthFieldId + 1,
99 StipplePatternFieldId = StippleRepeatFieldId + 1,
100 SmoothFieldId = StipplePatternFieldId + 1,
101 NextFieldId = SmoothFieldId + 1
104 static const OSG::BitVector WidthFieldMask =
105 (TypeTraits<BitVector>::One << WidthFieldId);
106 static const OSG::BitVector StippleRepeatFieldMask =
107 (TypeTraits<BitVector>::One << StippleRepeatFieldId);
108 static const OSG::BitVector StipplePatternFieldMask =
109 (TypeTraits<BitVector>::One << StipplePatternFieldId);
110 static const OSG::BitVector SmoothFieldMask =
111 (TypeTraits<BitVector>::One << SmoothFieldId);
112 static const OSG::BitVector NextFieldMask =
113 (TypeTraits<BitVector>::One << NextFieldId);
115 typedef SFReal32 SFWidthType;
116 typedef SFInt32 SFStippleRepeatType;
117 typedef SFUInt16 SFStipplePatternType;
118 typedef SFBool SFSmoothType;
120 /*---------------------------------------------------------------------*/
121 /*! \name Class Get */
122 /*! \{ */
124 static FieldContainerType &getClassType (void);
125 static UInt32 getClassTypeId (void);
126 static UInt16 getClassGroupId(void);
128 /*! \} */
129 /*---------------------------------------------------------------------*/
130 /*! \name FieldContainer Get */
131 /*! \{ */
133 virtual FieldContainerType &getType (void);
134 virtual const FieldContainerType &getType (void) const;
136 virtual UInt32 getContainerSize(void) const;
138 /*! \} */
139 /*---------------------------------------------------------------------*/
140 /*! \name Field Get */
141 /*! \{ */
144 SFReal32 *editSFWidth (void);
145 const SFReal32 *getSFWidth (void) const;
147 SFInt32 *editSFStippleRepeat (void);
148 const SFInt32 *getSFStippleRepeat (void) const;
150 SFUInt16 *editSFStipplePattern (void);
151 const SFUInt16 *getSFStipplePattern (void) const;
153 SFBool *editSFSmooth (void);
154 const SFBool *getSFSmooth (void) const;
157 Real32 &editWidth (void);
158 Real32 getWidth (void) const;
160 Int32 &editStippleRepeat (void);
161 Int32 getStippleRepeat (void) const;
163 UInt16 &editStipplePattern (void);
164 UInt16 getStipplePattern (void) const;
166 bool &editSmooth (void);
167 bool getSmooth (void) const;
169 /*! \} */
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
172 /*! \{ */
174 void setWidth (const Real32 value);
175 void setStippleRepeat (const Int32 value);
176 void setStipplePattern (const UInt16 value);
177 void setSmooth (const bool value);
179 /*! \} */
180 /*---------------------------------------------------------------------*/
181 /*! \name Ptr MField Set */
182 /*! \{ */
184 /*! \} */
185 /*---------------------------------------------------------------------*/
186 /*! \name Binary Access */
187 /*! \{ */
189 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
190 virtual void copyToBin (BinaryDataHandler &pMem,
191 ConstFieldMaskArg whichField);
192 virtual void copyFromBin(BinaryDataHandler &pMem,
193 ConstFieldMaskArg whichField);
196 /*! \} */
197 /*---------------------------------------------------------------------*/
198 /*! \name Construction */
199 /*! \{ */
201 static LineChunkTransitPtr create (void);
202 static LineChunk *createEmpty (void);
204 static LineChunkTransitPtr createLocal (
205 BitVector bFlags = FCLocal::All);
207 static LineChunk *createEmptyLocal(
208 BitVector bFlags = FCLocal::All);
210 static LineChunkTransitPtr createDependent (BitVector bFlags);
212 /*! \} */
213 /*---------------------------------------------------------------------*/
214 /*! \name Copy */
215 /*! \{ */
217 virtual FieldContainerTransitPtr shallowCopy (void) const;
218 virtual FieldContainerTransitPtr shallowCopyLocal(
219 BitVector bFlags = FCLocal::All) const;
220 virtual FieldContainerTransitPtr shallowCopyDependent(
221 BitVector bFlags) const;
223 /*! \} */
224 /*========================= PROTECTED ===============================*/
226 protected:
228 static TypeObject _type;
230 static void classDescInserter(TypeObject &oType);
231 static const Char8 *getClassname (void );
233 /*---------------------------------------------------------------------*/
234 /*! \name Fields */
235 /*! \{ */
237 SFReal32 _sfWidth;
238 SFInt32 _sfStippleRepeat;
239 SFUInt16 _sfStipplePattern;
240 SFBool _sfSmooth;
242 /*! \} */
243 /*---------------------------------------------------------------------*/
244 /*! \name Constructors */
245 /*! \{ */
247 LineChunkBase(void);
248 LineChunkBase(const LineChunkBase &source);
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name Destructors */
253 /*! \{ */
255 virtual ~LineChunkBase(void);
257 /*! \} */
258 /*---------------------------------------------------------------------*/
259 /*! \name onCreate */
260 /*! \{ */
263 /*! \} */
264 /*---------------------------------------------------------------------*/
265 /*! \name Generic Field Access */
266 /*! \{ */
268 GetFieldHandlePtr getHandleWidth (void) const;
269 EditFieldHandlePtr editHandleWidth (void);
270 GetFieldHandlePtr getHandleStippleRepeat (void) const;
271 EditFieldHandlePtr editHandleStippleRepeat (void);
272 GetFieldHandlePtr getHandleStipplePattern (void) const;
273 EditFieldHandlePtr editHandleStipplePattern (void);
274 GetFieldHandlePtr getHandleSmooth (void) const;
275 EditFieldHandlePtr editHandleSmooth (void);
277 /*! \} */
278 /*---------------------------------------------------------------------*/
279 /*! \name Sync */
280 /*! \{ */
282 #ifdef OSG_MT_CPTR_ASPECT
283 virtual void execSyncV( FieldContainer &oFrom,
284 ConstFieldMaskArg whichField,
285 AspectOffsetStore &oOffsets,
286 ConstFieldMaskArg syncMode ,
287 const UInt32 uiSyncInfo);
289 void execSync ( LineChunkBase *pFrom,
290 ConstFieldMaskArg whichField,
291 AspectOffsetStore &oOffsets,
292 ConstFieldMaskArg syncMode ,
293 const UInt32 uiSyncInfo);
294 #endif
296 /*! \} */
297 /*---------------------------------------------------------------------*/
298 /*! \name Edit */
299 /*! \{ */
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Aspect Create */
304 /*! \{ */
306 #ifdef OSG_MT_CPTR_ASPECT
307 virtual FieldContainer *createAspectCopy(
308 const FieldContainer *pRefAspect) const;
309 #endif
311 /*! \} */
312 /*---------------------------------------------------------------------*/
313 /*! \name Edit */
314 /*! \{ */
315 /*! \} */
316 /*---------------------------------------------------------------------*/
317 /*! \name Sync */
318 /*! \{ */
320 virtual void resolveLinks(void);
322 /*! \} */
323 /*========================== PRIVATE ================================*/
325 private:
326 /*---------------------------------------------------------------------*/
328 // prohibit default functions (move to 'public' if you need one)
329 void operator =(const LineChunkBase &source);
332 typedef LineChunkBase *LineChunkBaseP;
334 OSG_END_NAMESPACE
336 #endif /* _OSGLINECHUNKBASE_H_ */