changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / DynamicStateGenerators / OSGDynamicStateGeneratorBase.h
blob9e15fcbb190f80ee784aedcb04e8a5302097bd9b
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 DynamicStateGenerator
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGDYNAMICSTATEGENERATORBASE_H_
55 #define _OSGDYNAMICSTATEGENERATORBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGChunkOverrideGroup.h" // Parent
68 #include "OSGFrameBufferObjectFields.h" // RenderTarget type
70 #include "OSGDynamicStateGeneratorFields.h"
72 #include "OSGDynamicStateGeneratorParent.h"
74 OSG_BEGIN_NAMESPACE
77 class DynamicStateGenerator;
79 //! \brief DynamicStateGenerator Base Class.
81 class OSG_GROUP_DLLMAPPING DynamicStateGeneratorBase : public DynamicStateGeneratorParent
83 public:
85 typedef DynamicStateGeneratorParent Inherited;
86 typedef ChunkOverrideGroup ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(DynamicStateGenerator);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 RenderTargetFieldId = Inherited::NextFieldId,
100 NextFieldId = RenderTargetFieldId + 1
103 static const OSG::BitVector RenderTargetFieldMask =
104 (TypeTraits<BitVector>::One << RenderTargetFieldId);
105 static const OSG::BitVector NextFieldMask =
106 (TypeTraits<BitVector>::One << NextFieldId);
108 typedef SFUnrecFrameBufferObjectPtr SFRenderTargetType;
110 /*---------------------------------------------------------------------*/
111 /*! \name Class Get */
112 /*! \{ */
114 static FieldContainerType &getClassType (void);
115 static UInt32 getClassTypeId (void);
116 static UInt16 getClassGroupId(void);
118 /*! \} */
119 /*---------------------------------------------------------------------*/
120 /*! \name FieldContainer Get */
121 /*! \{ */
123 virtual FieldContainerType &getType (void);
124 virtual const FieldContainerType &getType (void) const;
126 virtual UInt32 getContainerSize(void) const;
128 /*! \} */
129 /*---------------------------------------------------------------------*/
130 /*! \name Binary Access */
131 /*! \{ */
133 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
134 virtual void copyToBin (BinaryDataHandler &pMem,
135 ConstFieldMaskArg whichField);
136 virtual void copyFromBin(BinaryDataHandler &pMem,
137 ConstFieldMaskArg whichField);
140 /*! \} */
141 /*---------------------------------------------------------------------*/
142 /*! \name Construction */
143 /*! \{ */
145 static DynamicStateGeneratorTransitPtr create (void);
146 static DynamicStateGenerator *createEmpty (void);
148 static DynamicStateGeneratorTransitPtr createLocal (
149 BitVector bFlags = FCLocal::All);
151 static DynamicStateGenerator *createEmptyLocal(
152 BitVector bFlags = FCLocal::All);
154 static DynamicStateGeneratorTransitPtr createDependent (BitVector bFlags);
156 /*! \} */
157 /*---------------------------------------------------------------------*/
158 /*! \name Copy */
159 /*! \{ */
161 virtual FieldContainerTransitPtr shallowCopy (void) const;
162 virtual FieldContainerTransitPtr shallowCopyLocal(
163 BitVector bFlags = FCLocal::All) const;
164 virtual FieldContainerTransitPtr shallowCopyDependent(
165 BitVector bFlags) const;
167 /*! \} */
168 /*========================= PROTECTED ===============================*/
170 protected:
172 static TypeObject _type;
174 static void classDescInserter(TypeObject &oType);
175 static const Char8 *getClassname (void );
177 /*---------------------------------------------------------------------*/
178 /*! \name Fields */
179 /*! \{ */
181 SFUnrecFrameBufferObjectPtr _sfRenderTarget;
183 /*! \} */
184 /*---------------------------------------------------------------------*/
185 /*! \name Constructors */
186 /*! \{ */
188 DynamicStateGeneratorBase(void);
189 DynamicStateGeneratorBase(const DynamicStateGeneratorBase &source);
191 /*! \} */
192 /*---------------------------------------------------------------------*/
193 /*! \name Destructors */
194 /*! \{ */
196 virtual ~DynamicStateGeneratorBase(void);
198 /*! \} */
199 /*---------------------------------------------------------------------*/
200 /*! \name onCreate */
201 /*! \{ */
203 void onCreate(const DynamicStateGenerator *source = NULL);
205 /*! \} */
206 /*---------------------------------------------------------------------*/
207 /*! \name Generic Field Access */
208 /*! \{ */
210 GetFieldHandlePtr getHandleRenderTarget (void) const;
211 EditFieldHandlePtr editHandleRenderTarget (void);
213 /*! \} */
214 /*---------------------------------------------------------------------*/
215 /*! \name Field Get */
216 /*! \{ */
218 const SFUnrecFrameBufferObjectPtr *getSFRenderTarget (void) const;
219 SFUnrecFrameBufferObjectPtr *editSFRenderTarget (void);
222 FrameBufferObject * getRenderTarget (void) const;
224 /*! \} */
225 /*---------------------------------------------------------------------*/
226 /*! \name Field Set */
227 /*! \{ */
229 void setRenderTarget (FrameBufferObject * const value);
231 /*! \} */
232 /*---------------------------------------------------------------------*/
233 /*! \name Ptr MField Set */
234 /*! \{ */
236 /*! \} */
237 /*---------------------------------------------------------------------*/
238 /*! \name Sync */
239 /*! \{ */
241 #ifdef OSG_MT_CPTR_ASPECT
242 virtual void execSyncV( FieldContainer &oFrom,
243 ConstFieldMaskArg whichField,
244 AspectOffsetStore &oOffsets,
245 ConstFieldMaskArg syncMode ,
246 const UInt32 uiSyncInfo);
248 void execSync ( DynamicStateGeneratorBase *pFrom,
249 ConstFieldMaskArg whichField,
250 AspectOffsetStore &oOffsets,
251 ConstFieldMaskArg syncMode ,
252 const UInt32 uiSyncInfo);
253 #endif
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Edit */
258 /*! \{ */
260 /*! \} */
261 /*---------------------------------------------------------------------*/
262 /*! \name Aspect Create */
263 /*! \{ */
265 #ifdef OSG_MT_CPTR_ASPECT
266 virtual FieldContainer *createAspectCopy(
267 const FieldContainer *pRefAspect) const;
268 #endif
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name Edit */
273 /*! \{ */
274 /*! \} */
275 /*---------------------------------------------------------------------*/
276 /*! \name Sync */
277 /*! \{ */
279 virtual void resolveLinks(void);
281 /*! \} */
282 /*========================== PRIVATE ================================*/
284 private:
285 /*---------------------------------------------------------------------*/
287 // prohibit default functions (move to 'public' if you need one)
288 void operator =(const DynamicStateGeneratorBase &source);
291 typedef DynamicStateGeneratorBase *DynamicStateGeneratorBaseP;
293 typedef CoredNodeRefPtr <DynamicStateGenerator> DynamicStateGeneratorNodeRefPtr;
294 typedef CoredNodeMTRefPtr<DynamicStateGenerator> DynamicStateGeneratorNodeMTRefPtr;
296 OSG_END_NAMESPACE
298 #endif /* _OSGDYNAMICSTATEGENERATORBASE_H_ */