changed: reactivated field changes, thanks M. Lancelle for the patch
[opensg.git] / Source / System / State / Base / OSGChunkBlock.h
blob7544585a0a11ebdf1bcd42058909e55e8db45642
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
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 #ifndef _OSGCHUNKBLOCK_H_
40 #define _OSGCHUNKBLOCK_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGChunkBlockBase.h"
46 #include "OSGState.h"
48 OSG_BEGIN_NAMESPACE
50 template <class Desc>
51 class MapCacheHandlerMixin;
53 /*! \brief ChunkBlock class. See \ref
54 PageSystemChunkBlock for a description.
56 \ingroup GrpSystemStateBase
57 \ingroup GrpLibOSGSystem
58 \includebasedoc
61 class OSG_SYSTEM_DLLMAPPING ChunkBlock : public ChunkBlockBase
63 protected:
65 /*========================== PUBLIC =================================*/
67 public:
69 typedef ChunkBlockBase Inherited;
70 typedef ChunkBlock Self;
72 /*---------------------------------------------------------------------*/
73 /*! \name Sync */
74 /*! \{ */
76 virtual void changed(ConstFieldMaskArg whichField,
77 UInt32 origin,
78 BitVector details );
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Output */
83 /*! \{ */
85 bool addChunk (StateChunk *chunk,
86 Int32 slot = State::AutoSlotReplace);
88 bool subChunk (StateChunk *chunk,
89 Int32 slot = State::AutoSlotReplace);
91 void clearChunks(void );
93 /*! \} */
94 /*---------------------------------------------------------------------*/
95 /*! \name Output */
96 /*! \{ */
98 Int32 find( StateChunk *chunk);
99 StateChunk *find(const StateChunkClass &type,
100 Int32 slot =State::AutoSlotReplace);
102 /*! \} */
103 /*---------------------------------------------------------------------*/
104 /*! \name Output */
105 /*! \{ */
107 MFUnrecStateChunkPtr::const_iterator beginChunks(void) const;
108 MFUnrecStateChunkPtr::const_iterator endChunks (void) const;
110 /*! \} */
111 /*---------------------------------------------------------------------*/
112 /*! \name Output */
113 /*! \{ */
115 virtual void dump( UInt32 uiIndent = 0,
116 const BitVector bvFlags = 0) const;
118 /*! \} */
119 /*========================= PROTECTED ===============================*/
121 protected:
123 // Variables should all be in ChunkBlockBase.
125 /*---------------------------------------------------------------------*/
126 /*! \name Constructors */
127 /*! \{ */
129 ChunkBlock(void);
130 ChunkBlock(const ChunkBlock &source);
132 /*! \} */
133 /*---------------------------------------------------------------------*/
134 /*! \name Destructors */
135 /*! \{ */
137 virtual ~ChunkBlock(void);
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Render */
142 /*! \{ */
144 /*! \} */
145 /*---------------------------------------------------------------------*/
146 /*! \name Ptr MField Set */
147 /*! \{ */
149 void pushToChunks (StateChunk * const value );
150 void removeFromChunks(UInt32 uiIndex );
151 void removeFromChunks(StateChunk * const value );
153 /*! \} */
154 /*---------------------------------------------------------------------*/
155 /*! \name Init */
156 /*! \{ */
158 static void initMethod(InitPhase ePhase);
160 /*! \} */
161 /*========================== PRIVATE ================================*/
163 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;
177 OSG_END_NAMESPACE
179 #include "OSGChunkBlockBase.inl"
180 #include "OSGChunkBlock.inl"
182 #endif /* _OSGCHUNKBLOCK_H_ */