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 **
48 ** class SortLastWindow
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSORTLASTWINDOWBASE_H_
55 #define _OSGSORTLASTWINDOWBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGClusterDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGClusterWindow.h" // Parent
68 #include "OSGNodeFields.h" // GroupNodes type
69 #include "OSGSysFields.h" // GroupLengths type
71 #include "OSGSortLastWindowFields.h"
78 //! \brief SortLastWindow Base Class.
80 class OSG_CLUSTER_DLLMAPPING SortLastWindowBase
: public ClusterWindow
84 typedef ClusterWindow Inherited
;
85 typedef ClusterWindow ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(SortLastWindow
);
92 /*========================== PUBLIC =================================*/
98 GroupNodesFieldId
= Inherited::NextFieldId
,
99 GroupLengthsFieldId
= GroupNodesFieldId
+ 1,
100 GroupsChangedFieldId
= GroupLengthsFieldId
+ 1,
101 NextFieldId
= GroupsChangedFieldId
+ 1
104 static const OSG::BitVector GroupNodesFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< GroupNodesFieldId
);
106 static const OSG::BitVector GroupLengthsFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< GroupLengthsFieldId
);
108 static const OSG::BitVector GroupsChangedFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< GroupsChangedFieldId
);
110 static const OSG::BitVector NextFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
113 typedef MFUnrecNodePtr MFGroupNodesType
;
114 typedef MFUInt32 MFGroupLengthsType
;
115 typedef SFBool SFGroupsChangedType
;
117 /*---------------------------------------------------------------------*/
118 /*! \name Class Get */
121 static FieldContainerType
&getClassType (void);
122 static UInt32
getClassTypeId (void);
123 static UInt16
getClassGroupId(void);
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
130 virtual FieldContainerType
&getType (void);
131 virtual const FieldContainerType
&getType (void) const;
133 virtual UInt32
getContainerSize(void) const;
136 /*---------------------------------------------------------------------*/
137 /*! \name Binary Access */
140 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
141 virtual void copyToBin (BinaryDataHandler
&pMem
,
142 ConstFieldMaskArg whichField
);
143 virtual void copyFromBin(BinaryDataHandler
&pMem
,
144 ConstFieldMaskArg whichField
);
148 /*---------------------------------------------------------------------*/
149 /*! \name Construction */
152 static SortLastWindowTransitPtr
create (void);
153 static SortLastWindow
*createEmpty (void);
155 static SortLastWindowTransitPtr
createLocal (
156 BitVector bFlags
= FCLocal::All
);
158 static SortLastWindow
*createEmptyLocal(
159 BitVector bFlags
= FCLocal::All
);
161 static SortLastWindowTransitPtr
createDependent (BitVector bFlags
);
164 /*---------------------------------------------------------------------*/
168 virtual FieldContainerTransitPtr
shallowCopy (void) const;
169 virtual FieldContainerTransitPtr
shallowCopyLocal(
170 BitVector bFlags
= FCLocal::All
) const;
171 virtual FieldContainerTransitPtr
shallowCopyDependent(
172 BitVector bFlags
) const;
175 /*========================= PROTECTED ===============================*/
179 static TypeObject _type
;
181 static void classDescInserter(TypeObject
&oType
);
182 static const Char8
*getClassname (void );
184 /*---------------------------------------------------------------------*/
188 MFUnrecNodePtr _mfGroupNodes
;
189 MFUInt32 _mfGroupLengths
;
190 SFBool _sfGroupsChanged
;
193 /*---------------------------------------------------------------------*/
194 /*! \name Constructors */
197 SortLastWindowBase(void);
198 SortLastWindowBase(const SortLastWindowBase
&source
);
201 /*---------------------------------------------------------------------*/
202 /*! \name Destructors */
205 virtual ~SortLastWindowBase(void);
208 /*---------------------------------------------------------------------*/
209 /*! \name onCreate */
212 void onCreate(const SortLastWindow
*source
= NULL
);
215 /*---------------------------------------------------------------------*/
216 /*! \name Generic Field Access */
219 GetFieldHandlePtr
getHandleGroupNodes (void) const;
220 EditFieldHandlePtr
editHandleGroupNodes (void);
221 GetFieldHandlePtr
getHandleGroupLengths (void) const;
222 EditFieldHandlePtr
editHandleGroupLengths (void);
223 GetFieldHandlePtr
getHandleGroupsChanged (void) const;
224 EditFieldHandlePtr
editHandleGroupsChanged (void);
227 /*---------------------------------------------------------------------*/
228 /*! \name Field Get */
231 const MFUnrecNodePtr
*getMFGroupNodes (void) const;
232 MFUnrecNodePtr
*editMFGroupNodes (void);
234 MFUInt32
*editMFGroupLengths (void);
235 const MFUInt32
*getMFGroupLengths (void) const;
237 SFBool
*editSFGroupsChanged (void);
238 const SFBool
*getSFGroupsChanged (void) const;
241 Node
* getGroupNodes (const UInt32 index
) const;
243 MFUInt32 ::reference
editGroupLengths (const UInt32 index
);
244 UInt32
getGroupLengths (const UInt32 index
) const;
246 bool &editGroupsChanged (void);
247 bool getGroupsChanged (void) const;
250 /*---------------------------------------------------------------------*/
251 /*! \name Field Set */
254 void setGroupsChanged (const bool value
);
257 /*---------------------------------------------------------------------*/
258 /*! \name Ptr MField Set */
261 void pushToGroupNodes (Node
* const value
);
262 void assignGroupNodes (const MFUnrecNodePtr
&value
);
263 void removeFromGroupNodes (UInt32 uiIndex
);
264 void removeObjFromGroupNodes(Node
* const value
);
265 void clearGroupNodes (void );
268 /*---------------------------------------------------------------------*/
272 #ifdef OSG_MT_CPTR_ASPECT
273 virtual void execSyncV( FieldContainer
&oFrom
,
274 ConstFieldMaskArg whichField
,
275 AspectOffsetStore
&oOffsets
,
276 ConstFieldMaskArg syncMode
,
277 const UInt32 uiSyncInfo
);
279 void execSync ( SortLastWindowBase
*pFrom
,
280 ConstFieldMaskArg whichField
,
281 AspectOffsetStore
&oOffsets
,
282 ConstFieldMaskArg syncMode
,
283 const UInt32 uiSyncInfo
);
287 /*---------------------------------------------------------------------*/
292 /*---------------------------------------------------------------------*/
293 /*! \name Aspect Create */
296 #ifdef OSG_MT_CPTR_ASPECT
297 virtual FieldContainer
*createAspectCopy(
298 const FieldContainer
*pRefAspect
) const;
302 /*---------------------------------------------------------------------*/
306 /*---------------------------------------------------------------------*/
310 virtual void resolveLinks(void);
313 /*========================== PRIVATE ================================*/
316 /*---------------------------------------------------------------------*/
318 // prohibit default functions (move to 'public' if you need one)
319 void operator =(const SortLastWindowBase
&source
);
322 typedef SortLastWindowBase
*SortLastWindowBaseP
;
326 #endif /* _OSGSORTLASTWINDOWBASE_H_ */