changed: auto add updateData callback to stages so that stagedata can be updated...
[opensg.git] / Source / Base / FieldContainer / Attachments / OSGGlobalsAttachmentBase.h
blob20291eed4aff0616a16fcae1731c6da0b063f275
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
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 GlobalsAttachment
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGGLOBALSATTACHMENTBASE_H_
55 #define _OSGGLOBALSATTACHMENTBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGBaseDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachment.h" // Parent
68 #include "OSGFieldContainerFields.h" // Elements type
70 #include "OSGGlobalsAttachmentFields.h"
72 OSG_BEGIN_NAMESPACE
75 class GlobalsAttachment;
77 //! \brief GlobalsAttachment Base Class.
79 class OSG_BASE_DLLMAPPING GlobalsAttachmentBase : public Attachment
81 public:
83 typedef Attachment Inherited;
84 typedef Attachment ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(GlobalsAttachment);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 ElementsFieldId = Inherited::NextFieldId,
98 NextFieldId = ElementsFieldId + 1
101 static const OSG::BitVector ElementsFieldMask =
102 (TypeTraits<BitVector>::One << ElementsFieldId);
103 static const OSG::BitVector NextFieldMask =
104 (TypeTraits<BitVector>::One << NextFieldId);
106 typedef MFUnrecFieldContainerPtr MFElementsType;
108 /*---------------------------------------------------------------------*/
109 /*! \name Class Get */
110 /*! \{ */
112 static FieldContainerType &getClassType (void);
113 static UInt32 getClassTypeId (void);
114 static UInt16 getClassGroupId(void);
116 /*! \} */
117 /*---------------------------------------------------------------------*/
118 /*! \name FieldContainer Get */
119 /*! \{ */
121 virtual FieldContainerType &getType (void);
122 virtual const FieldContainerType &getType (void) const;
124 virtual UInt32 getContainerSize(void) const;
126 /*! \} */
127 /*---------------------------------------------------------------------*/
128 /*! \name Field Get */
129 /*! \{ */
131 const MFUnrecFieldContainerPtr *getMFElements (void) const;
132 MFUnrecFieldContainerPtr *editMFElements (void);
135 FieldContainer * getElements (const UInt32 index) const;
137 /*! \} */
138 /*---------------------------------------------------------------------*/
139 /*! \name Field Set */
140 /*! \{ */
143 /*! \} */
144 /*---------------------------------------------------------------------*/
145 /*! \name Ptr Field Set */
146 /*! \{ */
148 /*! \} */
149 /*---------------------------------------------------------------------*/
150 /*! \name Ptr MField Set */
151 /*! \{ */
153 void pushToElements (FieldContainer * const value );
154 void assignElements (const MFUnrecFieldContainerPtr &value);
155 void removeFromElements (UInt32 uiIndex );
156 void removeObjFromElements(FieldContainer * const value );
157 void clearElements (void );
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Binary Access */
162 /*! \{ */
164 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
165 virtual void copyToBin (BinaryDataHandler &pMem,
166 ConstFieldMaskArg whichField);
167 virtual void copyFromBin(BinaryDataHandler &pMem,
168 ConstFieldMaskArg whichField);
171 /*! \} */
172 /*---------------------------------------------------------------------*/
173 /*! \name Construction */
174 /*! \{ */
176 static GlobalsAttachmentTransitPtr create (void);
177 static GlobalsAttachment *createEmpty (void);
179 static GlobalsAttachmentTransitPtr createLocal (
180 BitVector bFlags = FCLocal::All);
182 static GlobalsAttachment *createEmptyLocal(
183 BitVector bFlags = FCLocal::All);
185 static GlobalsAttachmentTransitPtr createDependent (BitVector bFlags);
187 /*! \} */
188 /*---------------------------------------------------------------------*/
189 /*! \name Copy */
190 /*! \{ */
192 virtual FieldContainerTransitPtr shallowCopy (void) const;
193 virtual FieldContainerTransitPtr shallowCopyLocal(
194 BitVector bFlags = FCLocal::All) const;
195 virtual FieldContainerTransitPtr shallowCopyDependent(
196 BitVector bFlags) const;
198 /*! \} */
199 /*========================= PROTECTED ===============================*/
201 protected:
203 static TypeObject _type;
205 static void classDescInserter(TypeObject &oType);
206 static const Char8 *getClassname (void );
208 /*---------------------------------------------------------------------*/
209 /*! \name Fields */
210 /*! \{ */
212 MFUnrecFieldContainerPtr _mfElements;
214 /*! \} */
215 /*---------------------------------------------------------------------*/
216 /*! \name Constructors */
217 /*! \{ */
219 GlobalsAttachmentBase(void);
220 GlobalsAttachmentBase(const GlobalsAttachmentBase &source);
222 /*! \} */
223 /*---------------------------------------------------------------------*/
224 /*! \name Destructors */
225 /*! \{ */
227 virtual ~GlobalsAttachmentBase(void);
229 /*! \} */
230 /*---------------------------------------------------------------------*/
231 /*! \name onCreate */
232 /*! \{ */
234 void onCreate(const GlobalsAttachment *source = NULL);
236 /*! \} */
237 /*---------------------------------------------------------------------*/
238 /*! \name Generic Field Access */
239 /*! \{ */
241 GetFieldHandlePtr getHandleElements (void) const;
242 EditFieldHandlePtr editHandleElements (void);
244 /*! \} */
245 /*---------------------------------------------------------------------*/
246 /*! \name Sync */
247 /*! \{ */
249 #ifdef OSG_MT_CPTR_ASPECT
250 virtual void execSyncV( FieldContainer &oFrom,
251 ConstFieldMaskArg whichField,
252 AspectOffsetStore &oOffsets,
253 ConstFieldMaskArg syncMode ,
254 const UInt32 uiSyncInfo);
256 void execSync ( GlobalsAttachmentBase *pFrom,
257 ConstFieldMaskArg whichField,
258 AspectOffsetStore &oOffsets,
259 ConstFieldMaskArg syncMode ,
260 const UInt32 uiSyncInfo);
261 #endif
263 /*! \} */
264 /*---------------------------------------------------------------------*/
265 /*! \name Edit */
266 /*! \{ */
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Aspect Create */
271 /*! \{ */
273 #ifdef OSG_MT_CPTR_ASPECT
274 virtual FieldContainer *createAspectCopy(
275 const FieldContainer *pRefAspect) const;
276 #endif
278 /*! \} */
279 /*---------------------------------------------------------------------*/
280 /*! \name Edit */
281 /*! \{ */
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Sync */
285 /*! \{ */
287 virtual void resolveLinks(void);
289 /*! \} */
290 /*========================== PRIVATE ================================*/
292 private:
293 /*---------------------------------------------------------------------*/
295 // prohibit default functions (move to 'public' if you need one)
296 void operator =(const GlobalsAttachmentBase &source);
299 typedef GlobalsAttachmentBase *GlobalsAttachmentBaseP;
301 OSG_END_NAMESPACE
303 #endif /* _OSGGLOBALSATTACHMENTBASE_H_ */