1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGINLINEBASE_H_
55 #define _OSGINLINEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGRootGroup.h" // Parent
68 #include "OSGBaseFields.h" // Url type
69 #include "OSGSysFields.h" // Loaded type
70 #include "OSGNodeFields.h" // Root type
72 #include "OSGInlineFields.h"
79 //! \brief Inline Base Class.
81 class OSG_GROUP_DLLMAPPING InlineBase
: public RootGroup
85 typedef RootGroup Inherited
;
86 typedef RootGroup ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(Inline
);
93 /*========================== PUBLIC =================================*/
99 UrlFieldId
= Inherited::NextFieldId
,
100 LoadedFieldId
= UrlFieldId
+ 1,
101 RootFieldId
= LoadedFieldId
+ 1,
102 GraphOpFieldId
= RootFieldId
+ 1,
103 OptionsFieldId
= GraphOpFieldId
+ 1,
104 NextFieldId
= OptionsFieldId
+ 1
107 static const OSG::BitVector UrlFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< UrlFieldId
);
109 static const OSG::BitVector LoadedFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< LoadedFieldId
);
111 static const OSG::BitVector RootFieldMask
=
112 (TypeTraits
<BitVector
>::One
<< RootFieldId
);
113 static const OSG::BitVector GraphOpFieldMask
=
114 (TypeTraits
<BitVector
>::One
<< GraphOpFieldId
);
115 static const OSG::BitVector OptionsFieldMask
=
116 (TypeTraits
<BitVector
>::One
<< OptionsFieldId
);
117 static const OSG::BitVector NextFieldMask
=
118 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
120 typedef MFString MFUrlType
;
121 typedef SFBool SFLoadedType
;
122 typedef SFUnrecNodePtr SFRootType
;
123 typedef SFString SFGraphOpType
;
124 typedef MFString MFOptionsType
;
126 /*---------------------------------------------------------------------*/
127 /*! \name Class Get */
130 static FieldContainerType
&getClassType (void);
131 static UInt32
getClassTypeId (void);
132 static UInt16
getClassGroupId(void);
135 /*---------------------------------------------------------------------*/
136 /*! \name FieldContainer Get */
139 virtual FieldContainerType
&getType (void);
140 virtual const FieldContainerType
&getType (void) const;
142 virtual UInt32
getContainerSize(void) const;
145 /*---------------------------------------------------------------------*/
146 /*! \name Field Get */
150 MFString
*editMFUrl (void);
151 const MFString
*getMFUrl (void) const;
153 SFBool
*editSFLoaded (void);
154 const SFBool
*getSFLoaded (void) const;
156 SFString
*editSFGraphOp (void);
157 const SFString
*getSFGraphOp (void) const;
159 MFString
*editMFOptions (void);
160 const MFString
*getMFOptions (void) const;
163 MFString ::reference
editUrl (const UInt32 index
);
164 const std::string
&getUrl (const UInt32 index
) const;
166 bool &editLoaded (void);
167 bool getLoaded (void) const;
169 std::string
&editGraphOp (void);
170 const std::string
&getGraphOp (void) const;
172 MFString ::reference
editOptions (const UInt32 index
);
173 const std::string
&getOptions (const UInt32 index
) const;
176 /*---------------------------------------------------------------------*/
177 /*! \name Field Set */
180 void setLoaded (const bool value
);
181 void setGraphOp (const std::string
&value
);
184 /*---------------------------------------------------------------------*/
185 /*! \name Ptr Field Set */
189 /*---------------------------------------------------------------------*/
190 /*! \name Ptr MField Set */
194 /*---------------------------------------------------------------------*/
195 /*! \name Binary Access */
198 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
199 virtual void copyToBin (BinaryDataHandler
&pMem
,
200 ConstFieldMaskArg whichField
);
201 virtual void copyFromBin(BinaryDataHandler
&pMem
,
202 ConstFieldMaskArg whichField
);
206 /*---------------------------------------------------------------------*/
207 /*! \name Construction */
210 static InlineTransitPtr
create (void);
211 static Inline
*createEmpty (void);
213 static InlineTransitPtr
createLocal (
214 BitVector bFlags
= FCLocal::All
);
216 static Inline
*createEmptyLocal(
217 BitVector bFlags
= FCLocal::All
);
219 static InlineTransitPtr
createDependent (BitVector bFlags
);
222 /*---------------------------------------------------------------------*/
226 virtual FieldContainerTransitPtr
shallowCopy (void) const;
227 virtual FieldContainerTransitPtr
shallowCopyLocal(
228 BitVector bFlags
= FCLocal::All
) const;
229 virtual FieldContainerTransitPtr
shallowCopyDependent(
230 BitVector bFlags
) const;
233 /*========================= PROTECTED ===============================*/
237 static TypeObject _type
;
239 static void classDescInserter(TypeObject
&oType
);
240 static const Char8
*getClassname (void );
242 /*---------------------------------------------------------------------*/
248 SFUnrecNodePtr _sfRoot
;
253 /*---------------------------------------------------------------------*/
254 /*! \name Constructors */
258 InlineBase(const InlineBase
&source
);
261 /*---------------------------------------------------------------------*/
262 /*! \name Destructors */
265 virtual ~InlineBase(void);
268 /*---------------------------------------------------------------------*/
269 /*! \name onCreate */
272 void onCreate(const Inline
*source
= NULL
);
275 /*---------------------------------------------------------------------*/
276 /*! \name Generic Field Access */
279 GetFieldHandlePtr
getHandleUrl (void) const;
280 EditFieldHandlePtr
editHandleUrl (void);
281 GetFieldHandlePtr
getHandleLoaded (void) const;
282 EditFieldHandlePtr
editHandleLoaded (void);
283 GetFieldHandlePtr
getHandleRoot (void) const;
284 EditFieldHandlePtr
editHandleRoot (void);
285 GetFieldHandlePtr
getHandleGraphOp (void) const;
286 EditFieldHandlePtr
editHandleGraphOp (void);
287 GetFieldHandlePtr
getHandleOptions (void) const;
288 EditFieldHandlePtr
editHandleOptions (void);
291 /*---------------------------------------------------------------------*/
292 /*! \name Field Get */
295 const SFUnrecNodePtr
*getSFRoot (void) const;
296 SFUnrecNodePtr
*editSFRoot (void);
299 Node
* getRoot (void) const;
302 /*---------------------------------------------------------------------*/
303 /*! \name Field Set */
306 void setRoot (Node
* const value
);
309 /*---------------------------------------------------------------------*/
310 /*! \name Ptr MField Set */
314 /*---------------------------------------------------------------------*/
318 #ifdef OSG_MT_CPTR_ASPECT
319 virtual void execSyncV( FieldContainer
&oFrom
,
320 ConstFieldMaskArg whichField
,
321 AspectOffsetStore
&oOffsets
,
322 ConstFieldMaskArg syncMode
,
323 const UInt32 uiSyncInfo
);
325 void execSync ( InlineBase
*pFrom
,
326 ConstFieldMaskArg whichField
,
327 AspectOffsetStore
&oOffsets
,
328 ConstFieldMaskArg syncMode
,
329 const UInt32 uiSyncInfo
);
333 /*---------------------------------------------------------------------*/
338 /*---------------------------------------------------------------------*/
339 /*! \name Aspect Create */
342 #ifdef OSG_MT_CPTR_ASPECT
343 virtual FieldContainer
*createAspectCopy(
344 const FieldContainer
*pRefAspect
) const;
348 /*---------------------------------------------------------------------*/
352 /*---------------------------------------------------------------------*/
356 virtual void resolveLinks(void);
359 /*========================== PRIVATE ================================*/
362 /*---------------------------------------------------------------------*/
364 // prohibit default functions (move to 'public' if you need one)
365 void operator =(const InlineBase
&source
);
368 typedef InlineBase
*InlineBaseP
;
370 typedef CoredNodeRefPtr
<Inline
> InlineNodeRefPtr
;
371 typedef CoredNodeMTRefPtr
<Inline
> InlineNodeMTRefPtr
;
375 #endif /* _OSGINLINEBASE_H_ */