fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / OpenGL / OSGClipPlaneChunkBase.h
blob374e3129ad0d42d387781e6b85dd1e6cbc7b6a7d
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 ClipPlaneChunk
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCLIPPLANECHUNKBASE_H_
55 #define _OSGCLIPPLANECHUNKBASE_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 "OSGVecFields.h" // Equation type
69 #include "OSGSysFields.h" // Enable type
70 #include "OSGNodeFields.h" // Beacon type
72 #include "OSGClipPlaneChunkFields.h"
74 OSG_BEGIN_NAMESPACE
77 class ClipPlaneChunk;
79 //! \brief ClipPlaneChunk Base Class.
81 class OSG_STATE_DLLMAPPING ClipPlaneChunkBase : public StateChunk
83 public:
85 typedef StateChunk Inherited;
86 typedef StateChunk ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(ClipPlaneChunk);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 EquationFieldId = Inherited::NextFieldId,
100 EnableFieldId = EquationFieldId + 1,
101 BeaconFieldId = EnableFieldId + 1,
102 NextFieldId = BeaconFieldId + 1
105 static const OSG::BitVector EquationFieldMask =
106 (TypeTraits<BitVector>::One << EquationFieldId);
107 static const OSG::BitVector EnableFieldMask =
108 (TypeTraits<BitVector>::One << EnableFieldId);
109 static const OSG::BitVector BeaconFieldMask =
110 (TypeTraits<BitVector>::One << BeaconFieldId);
111 static const OSG::BitVector NextFieldMask =
112 (TypeTraits<BitVector>::One << NextFieldId);
114 typedef SFVec4f SFEquationType;
115 typedef SFBool SFEnableType;
116 typedef SFWeakNodePtr SFBeaconType;
118 /*---------------------------------------------------------------------*/
119 /*! \name Class Get */
120 /*! \{ */
122 static FieldContainerType &getClassType (void);
123 static UInt32 getClassTypeId (void);
124 static UInt16 getClassGroupId(void);
126 /*! \} */
127 /*---------------------------------------------------------------------*/
128 /*! \name FieldContainer Get */
129 /*! \{ */
131 virtual FieldContainerType &getType (void);
132 virtual const FieldContainerType &getType (void) const;
134 virtual UInt32 getContainerSize(void) const;
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Field Get */
139 /*! \{ */
142 SFVec4f *editSFEquation (void);
143 const SFVec4f *getSFEquation (void) const;
145 SFBool *editSFEnable (void);
146 const SFBool *getSFEnable (void) const;
147 const SFWeakNodePtr *getSFBeacon (void) const;
148 SFWeakNodePtr *editSFBeacon (void);
151 Vec4f &editEquation (void);
152 const Vec4f &getEquation (void) const;
154 bool &editEnable (void);
155 bool getEnable (void) const;
157 Node * getBeacon (void) const;
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
162 /*! \{ */
164 void setEquation (const Vec4f &value);
165 void setEnable (const bool value);
166 void setBeacon (Node * const value);
168 /*! \} */
169 /*---------------------------------------------------------------------*/
170 /*! \name Ptr Field Set */
171 /*! \{ */
173 /*! \} */
174 /*---------------------------------------------------------------------*/
175 /*! \name Ptr MField Set */
176 /*! \{ */
178 /*! \} */
179 /*---------------------------------------------------------------------*/
180 /*! \name Binary Access */
181 /*! \{ */
183 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
184 virtual void copyToBin (BinaryDataHandler &pMem,
185 ConstFieldMaskArg whichField);
186 virtual void copyFromBin(BinaryDataHandler &pMem,
187 ConstFieldMaskArg whichField);
190 /*! \} */
191 /*---------------------------------------------------------------------*/
192 /*! \name Construction */
193 /*! \{ */
195 static ClipPlaneChunkTransitPtr create (void);
196 static ClipPlaneChunk *createEmpty (void);
198 static ClipPlaneChunkTransitPtr createLocal (
199 BitVector bFlags = FCLocal::All);
201 static ClipPlaneChunk *createEmptyLocal(
202 BitVector bFlags = FCLocal::All);
204 static ClipPlaneChunkTransitPtr createDependent (BitVector bFlags);
206 /*! \} */
207 /*---------------------------------------------------------------------*/
208 /*! \name Copy */
209 /*! \{ */
211 virtual FieldContainerTransitPtr shallowCopy (void) const;
212 virtual FieldContainerTransitPtr shallowCopyLocal(
213 BitVector bFlags = FCLocal::All) const;
214 virtual FieldContainerTransitPtr shallowCopyDependent(
215 BitVector bFlags) const;
217 /*! \} */
218 /*========================= PROTECTED ===============================*/
220 protected:
222 static TypeObject _type;
224 static void classDescInserter(TypeObject &oType);
225 static const Char8 *getClassname (void );
227 /*---------------------------------------------------------------------*/
228 /*! \name Fields */
229 /*! \{ */
231 SFVec4f _sfEquation;
232 SFBool _sfEnable;
233 SFWeakNodePtr _sfBeacon;
235 /*! \} */
236 /*---------------------------------------------------------------------*/
237 /*! \name Constructors */
238 /*! \{ */
240 ClipPlaneChunkBase(void);
241 ClipPlaneChunkBase(const ClipPlaneChunkBase &source);
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name Destructors */
246 /*! \{ */
248 virtual ~ClipPlaneChunkBase(void);
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name onCreate */
253 /*! \{ */
255 void onCreate(const ClipPlaneChunk *source = NULL);
257 /*! \} */
258 /*---------------------------------------------------------------------*/
259 /*! \name Generic Field Access */
260 /*! \{ */
262 GetFieldHandlePtr getHandleEquation (void) const;
263 EditFieldHandlePtr editHandleEquation (void);
264 GetFieldHandlePtr getHandleEnable (void) const;
265 EditFieldHandlePtr editHandleEnable (void);
266 GetFieldHandlePtr getHandleBeacon (void) const;
267 EditFieldHandlePtr editHandleBeacon (void);
269 /*! \} */
270 /*---------------------------------------------------------------------*/
271 /*! \name Sync */
272 /*! \{ */
274 #ifdef OSG_MT_CPTR_ASPECT
275 virtual void execSyncV( FieldContainer &oFrom,
276 ConstFieldMaskArg whichField,
277 AspectOffsetStore &oOffsets,
278 ConstFieldMaskArg syncMode ,
279 const UInt32 uiSyncInfo);
281 void execSync ( ClipPlaneChunkBase *pFrom,
282 ConstFieldMaskArg whichField,
283 AspectOffsetStore &oOffsets,
284 ConstFieldMaskArg syncMode ,
285 const UInt32 uiSyncInfo);
286 #endif
288 /*! \} */
289 /*---------------------------------------------------------------------*/
290 /*! \name Edit */
291 /*! \{ */
293 /*! \} */
294 /*---------------------------------------------------------------------*/
295 /*! \name Aspect Create */
296 /*! \{ */
298 #ifdef OSG_MT_CPTR_ASPECT
299 virtual FieldContainer *createAspectCopy(
300 const FieldContainer *pRefAspect) const;
301 #endif
303 /*! \} */
304 /*---------------------------------------------------------------------*/
305 /*! \name Edit */
306 /*! \{ */
307 /*! \} */
308 /*---------------------------------------------------------------------*/
309 /*! \name Sync */
310 /*! \{ */
312 virtual void resolveLinks(void);
314 /*! \} */
315 /*========================== PRIVATE ================================*/
317 private:
318 /*---------------------------------------------------------------------*/
320 // prohibit default functions (move to 'public' if you need one)
321 void operator =(const ClipPlaneChunkBase &source);
324 typedef ClipPlaneChunkBase *ClipPlaneChunkBaseP;
326 OSG_END_NAMESPACE
328 #endif /* _OSGCLIPPLANECHUNKBASE_H_ */