1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2003 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
45 #include "OSGMatrix.h"
46 #include "OSGFieldContainer.h"
47 #include "OSGAttachmentContainer.h"
49 #include "OSGSysFields.h"
51 #include "OSGFieldContainerFactory.h"
53 #include "OSGSystemDef.h"
60 class OSG_SYSTEM_DLLMAPPING TestFC
: public AttachmentContainer
62 /*========================== PUBLIC =================================*/
66 typedef AttachmentContainer Inherited
;
67 typedef AttachmentContainer ParentContainer
;
69 OSG_GEN_INTERNALPTR(TestFC
);
71 typedef Inherited::TypeObject TypeObject
;
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
|
88 static const BitVector bInvLocalFieldMask
= ~bLocalFieldMask
;
90 /*---------------------------------------------------------------------*/
94 OSG_FIELD_CONTAINER_DECL
;
97 /*---------------------------------------------------------------------*/
98 /*! \name General Fieldcontainer Declaration */
102 /*---------------------------------------------------------------------*/
103 /*! \name Constructors */
107 /*---------------------------------------------------------------------*/
108 /*! \name Destructor */
112 /*---------------------------------------------------------------------*/
117 /*---------------------------------------------------------------------*/
122 /*---------------------------------------------------------------------*/
127 /*---------------------------------------------------------------------*/
128 /*! \name your_category */
132 /*---------------------------------------------------------------------*/
133 /*! \name Container Access */
137 /*---------------------------------------------------------------------*/
138 /*! \name Binary Access */
142 /*---------------------------------------------------------------------*/
143 /*! \name your_operators */
147 /*---------------------------------------------------------------------*/
148 /*! \name Assignment */
152 /*---------------------------------------------------------------------*/
153 /*! \name Comparison */
156 virtual void changed(ConstFieldMaskArg whichField
,
161 /*---------------------------------------------------------------------*/
165 virtual void dump( UInt32 uiIndent
= 0,
166 const BitVector bvFlags
= 0) const;
169 /*---------------------------------------------------------------------*/
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;
186 /*========================= PROTECTED ===============================*/
190 /*---------------------------------------------------------------------*/
191 /*! \name Type information */
194 static TypeObject _type
;
196 static void classDescInserter(TypeObject
&oType
);
197 static const Char8
*getClassname (void );
200 /*---------------------------------------------------------------------*/
210 /*---------------------------------------------------------------------*/
215 TestFC(const TestFC
&source
);
217 virtual ~TestFC(void);
220 /*---------------------------------------------------------------------*/
224 virtual void onDestroyAspect(UInt32 uiContainerId
,
228 /*---------------------------------------------------------------------*/
229 /*! \name MT Destruction */
232 #ifdef OSG_MT_CPTR_ASPECT
233 virtual ObjCPtr
createAspectCopy(const FieldContainer
*pRefAspect
) const;
237 /*---------------------------------------------------------------------*/
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
);
256 /*---------------------------------------------------------------------*/
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;
273 /*---------------------------------------------------------------------*/
277 virtual void resolveLinks(void);
280 /*========================== 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
;
294 #include "OSGTestFC.inl"
296 #endif /* _OSGTESTFC_H_ */