changed: gcc8 base update
[opensg.git] / Source / Test / SystemLib / OSGTestFC.h
blob21c408bf9c7a984f5736c4a6cf13fd4c94964723
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2003 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 #ifndef _OSGTESTFC_H_
40 #define _OSGTESTFC_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGMatrix.h"
46 #include "OSGFieldContainer.h"
47 #include "OSGAttachmentContainer.h"
49 #include "OSGSysFields.h"
51 #include "OSGFieldContainerFactory.h"
53 #include "OSGSystemDef.h"
55 OSG_BEGIN_NAMESPACE
57 //! Brief
58 //! \ingroup baselib
60 class OSG_SYSTEM_DLLMAPPING TestFC : public AttachmentContainer
62 /*========================== PUBLIC =================================*/
64 public:
66 typedef AttachmentContainer Inherited;
67 typedef AttachmentContainer ParentContainer;
69 OSG_GEN_INTERNALPTR(TestFC);
71 typedef Inherited::TypeObject TypeObject;
73 typedef TestFC Self;
75 OSG_RC_FIRST_FIELD_DECL(Field1 );
77 OSG_RC_FIELD_DECL (Field2, Field1);
78 OSG_RC_FIELD_DECL (Field3, Field2);
79 OSG_RC_FIELD_DECL (Field4, Field3);
81 OSG_RC_LAST_FIELD_DECL (Field4 );
83 static const BitVector bLocalFieldMask = (Field1FieldMask |
84 Field2FieldMask |
85 Field3FieldMask |
86 Field4FieldMask );
88 static const BitVector bInvLocalFieldMask = ~bLocalFieldMask;
90 /*---------------------------------------------------------------------*/
91 /*! \name dcast */
92 /*! \{ */
94 OSG_FIELD_CONTAINER_DECL;
96 /*! \} */
97 /*---------------------------------------------------------------------*/
98 /*! \name General Fieldcontainer Declaration */
99 /*! \{ */
101 /*! \} */
102 /*---------------------------------------------------------------------*/
103 /*! \name Constructors */
104 /*! \{ */
106 /*! \} */
107 /*---------------------------------------------------------------------*/
108 /*! \name Destructor */
109 /*! \{ */
111 /*! \} */
112 /*---------------------------------------------------------------------*/
113 /*! \name Helper */
114 /*! \{ */
116 /*! \} */
117 /*---------------------------------------------------------------------*/
118 /*! \name Get */
119 /*! \{ */
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name Set */
124 /*! \{ */
126 /*! \} */
127 /*---------------------------------------------------------------------*/
128 /*! \name your_category */
129 /*! \{ */
131 /*! \} */
132 /*---------------------------------------------------------------------*/
133 /*! \name Container Access */
134 /*! \{ */
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Binary Access */
139 /*! \{ */
141 /*! \} */
142 /*---------------------------------------------------------------------*/
143 /*! \name your_operators */
144 /*! \{ */
146 /*! \} */
147 /*---------------------------------------------------------------------*/
148 /*! \name Assignment */
149 /*! \{ */
151 /*! \} */
152 /*---------------------------------------------------------------------*/
153 /*! \name Comparison */
154 /*! \{ */
156 virtual void changed(ConstFieldMaskArg whichField,
157 UInt32 origin,
158 BitVector detail);
160 /*! \} */
161 /*---------------------------------------------------------------------*/
162 /*! \name Dump */
163 /*! \{ */
165 virtual void dump( UInt32 uiIndent = 0,
166 const BitVector bvFlags = 0) const;
168 /*! \} */
169 /*---------------------------------------------------------------------*/
170 /*! \name Dump */
171 /*! \{ */
173 MFUInt32 *editMFField1(void);
174 const MFUInt32 *getMFField1 (void) const;
176 SFUInt32 *editSFField2(void);
177 const SFUInt32 *getSFField2 (void) const;
179 MFUInt32 *editMFField3(void);
180 const MFUInt32 *getMFField3 (void) const;
182 SFUInt32 *editSFField4(void);
183 const SFUInt32 *getSFField4 (void) const;
185 /*! \} */
186 /*========================= PROTECTED ===============================*/
188 protected:
190 /*---------------------------------------------------------------------*/
191 /*! \name Type information */
192 /*! \{ */
194 static TypeObject _type;
196 static void classDescInserter(TypeObject &oType);
197 static const Char8 *getClassname (void );
199 /*! \} */
200 /*---------------------------------------------------------------------*/
201 /*! \name Fields */
202 /*! \{ */
204 MFUInt32 _mfField1;
205 SFUInt32 _sfField2;
206 MFUInt32 _mfField3;
207 SFUInt32 _sfField4;
209 /*! \} */
210 /*---------------------------------------------------------------------*/
211 /*! \name Member */
212 /*! \{ */
214 TestFC(void);
215 TestFC(const TestFC &source);
217 virtual ~TestFC(void);
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Changed */
222 /*! \{ */
224 virtual void onDestroyAspect(UInt32 uiContainerId,
225 UInt32 uiAspect );
227 /*! \} */
228 /*---------------------------------------------------------------------*/
229 /*! \name MT Destruction */
230 /*! \{ */
232 #ifdef OSG_MT_CPTR_ASPECT
233 virtual ObjCPtr createAspectCopy(const FieldContainer *pRefAspect) const;
234 #endif
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 ( TestFC *pFrom,
249 ConstFieldMaskArg whichField,
250 AspectOffsetStore &oOffsets,
251 ConstFieldMaskArg syncMode ,
252 const UInt32 uiSyncInfo);
253 #endif
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Sync */
258 /*! \{ */
260 MFUInt32::EditHandlePtr editHandleField1(void);
261 MFUInt32::GetHandlePtr getHandleField1 (void) const;
263 SFUInt32::EditHandlePtr editHandleField2(void);
264 SFUInt32::GetHandlePtr getHandleField2 (void) const;
266 MFUInt32::EditHandlePtr editHandleField3(void);
267 MFUInt32::GetHandlePtr getHandleField3 (void) const;
269 SFUInt32::EditHandlePtr editHandleField4(void);
270 SFUInt32::GetHandlePtr getHandleField4 (void) const;
272 /*! \} */
273 /*---------------------------------------------------------------------*/
274 /*! \name Sync */
275 /*! \{ */
277 virtual void resolveLinks(void);
279 /*! \} */
280 /*========================== PRIVATE ================================*/
282 private:
284 friend class FieldContainer;
286 /*!\brief prohibit default function (move to 'public' if needed) */
287 void operator =(const TestFC &source);
290 typedef TestFC::ObjUnrecPtr TestFCUnrecPtr;
292 OSG_END_NAMESPACE
294 #include "OSGTestFC.inl"
296 #endif /* _OSGTESTFC_H_ */