1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2006 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 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCHUNKBLOCK_H_
40 #define _OSGCHUNKBLOCK_H_
45 #include "OSGChunkBlockBase.h"
51 class MapCacheHandlerMixin
;
53 /*! \brief ChunkBlock class. See \ref
54 PageSystemChunkBlock for a description.
56 \ingroup GrpSystemStateBase
57 \ingroup GrpLibOSGSystem
61 class OSG_SYSTEM_DLLMAPPING ChunkBlock
: public ChunkBlockBase
65 /*========================== PUBLIC =================================*/
69 typedef ChunkBlockBase Inherited
;
70 typedef ChunkBlock Self
;
72 /*---------------------------------------------------------------------*/
76 virtual void changed(ConstFieldMaskArg whichField
,
81 /*---------------------------------------------------------------------*/
85 bool addChunk (StateChunk
*chunk
,
86 Int32 slot
= State::AutoSlotReplace
);
88 bool subChunk (StateChunk
*chunk
,
89 Int32 slot
= State::AutoSlotReplace
);
91 void clearChunks(void );
94 /*---------------------------------------------------------------------*/
98 Int32
find( StateChunk
*chunk
);
99 StateChunk
*find(const StateChunkClass
&type
,
100 Int32 slot
=State::AutoSlotReplace
);
103 /*---------------------------------------------------------------------*/
107 MFUnrecStateChunkPtr::const_iterator
beginChunks(void) const;
108 MFUnrecStateChunkPtr::const_iterator
endChunks (void) const;
111 /*---------------------------------------------------------------------*/
115 virtual void dump( UInt32 uiIndent
= 0,
116 const BitVector bvFlags
= 0) const;
119 /*========================= PROTECTED ===============================*/
123 // Variables should all be in ChunkBlockBase.
125 /*---------------------------------------------------------------------*/
126 /*! \name Constructors */
130 ChunkBlock(const ChunkBlock
&source
);
133 /*---------------------------------------------------------------------*/
134 /*! \name Destructors */
137 virtual ~ChunkBlock(void);
140 /*---------------------------------------------------------------------*/
145 /*---------------------------------------------------------------------*/
146 /*! \name Ptr MField Set */
149 void pushToChunks (StateChunk
* const value
);
150 void removeFromChunks(UInt32 uiIndex
);
151 void removeFromChunks(StateChunk
* const value
);
154 /*---------------------------------------------------------------------*/
158 static void initMethod(InitPhase ePhase
);
161 /*========================== PRIVATE ================================*/
165 friend class FieldContainer
;
166 friend class ChunkBlockBase
;
168 template <class Desc
>
169 friend class MapCacheHandlerMixin
;
171 // prohibit default functions (move to 'public' if you need one)
172 void operator =(const ChunkBlock
&source
);
175 typedef ChunkBlock
*ChunkBlockP
;
179 #include "OSGChunkBlockBase.inl"
180 #include "OSGChunkBlock.inl"
182 #endif /* _OSGCHUNKBLOCK_H_ */