fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGCSMDrawerBase.h
blob8fb544129325f88a063aa9e6b0506d44c5d5175e
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 CSMDrawer
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCSMDRAWERBASE_H_
55 #define _OSGCSMDRAWERBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachmentContainer.h" // Parent
68 #include "OSGCSMWindowFields.h" // Windows type
69 #include "OSGBaseFields.h" // DisplayString type
70 #include "OSGAspectIdFields.h" // Aspect type
72 #include "OSGCSMDrawerFields.h"
74 OSG_BEGIN_NAMESPACE
77 class CSMDrawer;
79 //! \brief CSMDrawer Base Class.
81 class OSG_CONTRIBCSM_DLLMAPPING CSMDrawerBase : public AttachmentContainer
83 public:
85 typedef AttachmentContainer Inherited;
86 typedef AttachmentContainer ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(CSMDrawer);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 WindowsFieldId = Inherited::NextFieldId,
100 DisplayStringFieldId = WindowsFieldId + 1,
101 AspectFieldId = DisplayStringFieldId + 1,
102 NextFieldId = AspectFieldId + 1
105 static const OSG::BitVector WindowsFieldMask =
106 (TypeTraits<BitVector>::One << WindowsFieldId);
107 static const OSG::BitVector DisplayStringFieldMask =
108 (TypeTraits<BitVector>::One << DisplayStringFieldId);
109 static const OSG::BitVector AspectFieldMask =
110 (TypeTraits<BitVector>::One << AspectFieldId);
111 static const OSG::BitVector NextFieldMask =
112 (TypeTraits<BitVector>::One << NextFieldId);
114 typedef MFUnrecChildCSMWindowPtr MFWindowsType;
115 typedef SFString SFDisplayStringType;
116 typedef SFAspectId SFAspectType;
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 /*! \{ */
141 const MFUnrecChildCSMWindowPtr *getMFWindows (void) const;
142 MFUnrecChildCSMWindowPtr *editMFWindows (void);
144 SFString *editSFDisplayString (void);
145 const SFString *getSFDisplayString (void) const;
147 SFAspectId *editSFAspect (void);
148 const SFAspectId *getSFAspect (void) const;
151 CSMWindow * getWindows (const UInt32 index) const;
153 std::string &editDisplayString (void);
154 const std::string &getDisplayString (void) const;
156 AspectId &editAspect (void);
157 const AspectId &getAspect (void) const;
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
162 /*! \{ */
164 void setDisplayString (const std::string &value);
165 void setAspect (const AspectId &value);
167 /*! \} */
168 /*---------------------------------------------------------------------*/
169 /*! \name Ptr Field Set */
170 /*! \{ */
172 /*! \} */
173 /*---------------------------------------------------------------------*/
174 /*! \name Ptr MField Set */
175 /*! \{ */
177 void pushToWindows (CSMWindow * const value );
178 void assignWindows (const MFUnrecChildCSMWindowPtr &value);
179 void removeFromWindows (UInt32 uiIndex );
180 void removeObjFromWindows(CSMWindow * const value );
181 void clearWindows (void );
183 /*! \} */
184 /*---------------------------------------------------------------------*/
185 /*! \name Binary Access */
186 /*! \{ */
188 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
189 virtual void copyToBin (BinaryDataHandler &pMem,
190 ConstFieldMaskArg whichField);
191 virtual void copyFromBin(BinaryDataHandler &pMem,
192 ConstFieldMaskArg whichField);
195 /*! \} */
196 /*---------------------------------------------------------------------*/
197 /*! \name Construction */
198 /*! \{ */
200 static CSMDrawerTransitPtr create (void);
201 static CSMDrawer *createEmpty (void);
203 static CSMDrawerTransitPtr createLocal (
204 BitVector bFlags = FCLocal::All);
206 static CSMDrawer *createEmptyLocal(
207 BitVector bFlags = FCLocal::All);
209 static CSMDrawerTransitPtr createDependent (BitVector bFlags);
211 /*! \} */
212 /*---------------------------------------------------------------------*/
213 /*! \name Copy */
214 /*! \{ */
216 virtual FieldContainerTransitPtr shallowCopy (void) const;
217 virtual FieldContainerTransitPtr shallowCopyLocal(
218 BitVector bFlags = FCLocal::All) const;
219 virtual FieldContainerTransitPtr shallowCopyDependent(
220 BitVector bFlags) const;
222 /*! \} */
223 /*========================= PROTECTED ===============================*/
225 protected:
227 static TypeObject _type;
229 static void classDescInserter(TypeObject &oType);
230 static const Char8 *getClassname (void );
232 /*---------------------------------------------------------------------*/
233 /*! \name Fields */
234 /*! \{ */
236 MFUnrecChildCSMWindowPtr _mfWindows;
237 SFString _sfDisplayString;
238 SFAspectId _sfAspect;
240 /*! \} */
241 /*---------------------------------------------------------------------*/
242 /*! \name Constructors */
243 /*! \{ */
245 CSMDrawerBase(void);
246 CSMDrawerBase(const CSMDrawerBase &source);
248 /*! \} */
249 /*---------------------------------------------------------------------*/
250 /*! \name Destructors */
251 /*! \{ */
253 virtual ~CSMDrawerBase(void);
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name onCreate */
258 /*! \{ */
260 void onCreate(const CSMDrawer *source = NULL);
262 /*! \} */
263 /*---------------------------------------------------------------------*/
264 /*! \name Child linking */
265 /*! \{ */
267 virtual bool unlinkChild(FieldContainer * const pChild,
268 UInt16 const childFieldId);
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name Generic Field Access */
273 /*! \{ */
275 GetFieldHandlePtr getHandleWindows (void) const;
276 EditFieldHandlePtr editHandleWindows (void);
277 GetFieldHandlePtr getHandleDisplayString (void) const;
278 EditFieldHandlePtr editHandleDisplayString (void);
279 GetFieldHandlePtr getHandleAspect (void) const;
280 EditFieldHandlePtr editHandleAspect (void);
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Sync */
285 /*! \{ */
287 #ifdef OSG_MT_CPTR_ASPECT
288 virtual void execSyncV( FieldContainer &oFrom,
289 ConstFieldMaskArg whichField,
290 AspectOffsetStore &oOffsets,
291 ConstFieldMaskArg syncMode ,
292 const UInt32 uiSyncInfo);
294 void execSync ( CSMDrawerBase *pFrom,
295 ConstFieldMaskArg whichField,
296 AspectOffsetStore &oOffsets,
297 ConstFieldMaskArg syncMode ,
298 const UInt32 uiSyncInfo);
299 #endif
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Edit */
304 /*! \{ */
306 /*! \} */
307 /*---------------------------------------------------------------------*/
308 /*! \name Aspect Create */
309 /*! \{ */
311 #ifdef OSG_MT_CPTR_ASPECT
312 virtual FieldContainer *createAspectCopy(
313 const FieldContainer *pRefAspect) const;
314 #endif
316 /*! \} */
317 /*---------------------------------------------------------------------*/
318 /*! \name Edit */
319 /*! \{ */
320 /*! \} */
321 /*---------------------------------------------------------------------*/
322 /*! \name Sync */
323 /*! \{ */
325 virtual void resolveLinks(void);
327 /*! \} */
328 /*========================== PRIVATE ================================*/
330 private:
331 /*---------------------------------------------------------------------*/
333 // prohibit default functions (move to 'public' if you need one)
334 void operator =(const CSMDrawerBase &source);
337 typedef CSMDrawerBase *CSMDrawerBaseP;
339 OSG_END_NAMESPACE
341 #endif /* _OSGCSMDRAWERBASE_H_ */