fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Cluster / Window / SortLast / OSGSortLastWindowBase.h
blob5cdbbfeb75ff408134dd3ddc1d88fb0291a646e1
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 SortLastWindow
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSORTLASTWINDOWBASE_H_
55 #define _OSGSORTLASTWINDOWBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
73 OSG_BEGIN_NAMESPACE
76 class SortLastWindow;
78 //! \brief SortLastWindow Base Class.
80 class OSG_CLUSTER_DLLMAPPING SortLastWindowBase : public ClusterWindow
82 public:
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 =================================*/
94 public:
96 enum
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 */
119 /*! \{ */
121 static FieldContainerType &getClassType (void);
122 static UInt32 getClassTypeId (void);
123 static UInt16 getClassGroupId(void);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
128 /*! \{ */
130 virtual FieldContainerType &getType (void);
131 virtual const FieldContainerType &getType (void) const;
133 virtual UInt32 getContainerSize(void) const;
135 /*! \} */
136 /*---------------------------------------------------------------------*/
137 /*! \name Binary Access */
138 /*! \{ */
140 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
141 virtual void copyToBin (BinaryDataHandler &pMem,
142 ConstFieldMaskArg whichField);
143 virtual void copyFromBin(BinaryDataHandler &pMem,
144 ConstFieldMaskArg whichField);
147 /*! \} */
148 /*---------------------------------------------------------------------*/
149 /*! \name Construction */
150 /*! \{ */
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);
163 /*! \} */
164 /*---------------------------------------------------------------------*/
165 /*! \name Copy */
166 /*! \{ */
168 virtual FieldContainerTransitPtr shallowCopy (void) const;
169 virtual FieldContainerTransitPtr shallowCopyLocal(
170 BitVector bFlags = FCLocal::All) const;
171 virtual FieldContainerTransitPtr shallowCopyDependent(
172 BitVector bFlags) const;
174 /*! \} */
175 /*========================= PROTECTED ===============================*/
177 protected:
179 static TypeObject _type;
181 static void classDescInserter(TypeObject &oType);
182 static const Char8 *getClassname (void );
184 /*---------------------------------------------------------------------*/
185 /*! \name Fields */
186 /*! \{ */
188 MFUnrecNodePtr _mfGroupNodes;
189 MFUInt32 _mfGroupLengths;
190 SFBool _sfGroupsChanged;
192 /*! \} */
193 /*---------------------------------------------------------------------*/
194 /*! \name Constructors */
195 /*! \{ */
197 SortLastWindowBase(void);
198 SortLastWindowBase(const SortLastWindowBase &source);
200 /*! \} */
201 /*---------------------------------------------------------------------*/
202 /*! \name Destructors */
203 /*! \{ */
205 virtual ~SortLastWindowBase(void);
207 /*! \} */
208 /*---------------------------------------------------------------------*/
209 /*! \name onCreate */
210 /*! \{ */
212 void onCreate(const SortLastWindow *source = NULL);
214 /*! \} */
215 /*---------------------------------------------------------------------*/
216 /*! \name Generic Field Access */
217 /*! \{ */
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);
226 /*! \} */
227 /*---------------------------------------------------------------------*/
228 /*! \name Field Get */
229 /*! \{ */
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;
249 /*! \} */
250 /*---------------------------------------------------------------------*/
251 /*! \name Field Set */
252 /*! \{ */
254 void setGroupsChanged (const bool value);
256 /*! \} */
257 /*---------------------------------------------------------------------*/
258 /*! \name Ptr MField Set */
259 /*! \{ */
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 );
267 /*! \} */
268 /*---------------------------------------------------------------------*/
269 /*! \name Sync */
270 /*! \{ */
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);
284 #endif
286 /*! \} */
287 /*---------------------------------------------------------------------*/
288 /*! \name Edit */
289 /*! \{ */
291 /*! \} */
292 /*---------------------------------------------------------------------*/
293 /*! \name Aspect Create */
294 /*! \{ */
296 #ifdef OSG_MT_CPTR_ASPECT
297 virtual FieldContainer *createAspectCopy(
298 const FieldContainer *pRefAspect) const;
299 #endif
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Edit */
304 /*! \{ */
305 /*! \} */
306 /*---------------------------------------------------------------------*/
307 /*! \name Sync */
308 /*! \{ */
310 virtual void resolveLinks(void);
312 /*! \} */
313 /*========================== PRIVATE ================================*/
315 private:
316 /*---------------------------------------------------------------------*/
318 // prohibit default functions (move to 'public' if you need one)
319 void operator =(const SortLastWindowBase &source);
322 typedef SortLastWindowBase *SortLastWindowBaseP;
324 OSG_END_NAMESPACE
326 #endif /* _OSGSORTLASTWINDOWBASE_H_ */