changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Base / OSGChunkOverrideGroup.h
blob675d0a2e88becd505b4396fd12f38a014df393e1
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 _OSGCHUNKOVERRIDEGROUP_H_
40 #define _OSGCHUNKOVERRIDEGROUP_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGChunkOverrideGroupBase.h"
47 #include "OSGChunkBlockMapFields.h"
48 #include "OSGChunkBlock.h"
49 #include "OSGMapCacheHandlerMixin.h"
50 #include "OSGState.h"
52 OSG_BEGIN_NAMESPACE
54 class StateChunk;
55 class ChunkOverrideGroup;
57 /*! \ingroup GrpSystemNodeCoreGroupsCores
58 \nohierarchy
61 struct ChunkOverrideMapCache
63 typedef ChunkOverrideGroupBase ParentT;
64 typedef ChunkOverrideGroup FinalContainer;
66 typedef SFChunkBlockPtrMap MapCacheField;
67 typedef MapCacheField::StoredType MapCache;
68 typedef SFChunkBlockPtrMap::EditHandle::KeyPool MapKeyPool;
70 typedef MapCache::mapped_type MapCacheElement;
71 typedef MapCache::key_type MapCacheKey;
73 typedef ChunkBlock FinalizedElement;
75 static const bool IsInternal = false;
77 static void setFallback(ParentT *pContainer, MapCacheElement pElem)
79 pContainer->setFallbackChunkBlock(pElem);
82 static MapCacheElement getFallback(ParentT *pContainer)
84 return pContainer->getFallbackChunkBlock();
87 static const Char8 *getFieldName(void)
89 return "chunkBlockStore";
93 /*! \brief ChunkOverrideGroup class. See \ref
94 PageSystemChunkOverrideGroup for a description.
95 \ingroup GrpSystemNodeCoreGroupsCores
96 \ingroup GrpLibOSGSystem
97 \includebasedoc
100 class OSG_SYSTEM_DLLMAPPING ChunkOverrideGroup :
101 public MapCacheHandlerMixin<ChunkOverrideMapCache>
103 protected:
105 /*========================== PUBLIC =================================*/
107 public:
109 typedef MapCacheHandlerMixin<ChunkOverrideMapCache> Inherited;
110 typedef ChunkOverrideGroup Self;
112 /*---------------------------------------------------------------------*/
113 /*! \name Sync */
114 /*! \{ */
116 virtual void changed(ConstFieldMaskArg whichField,
117 UInt32 origin,
118 BitVector details );
120 /*! \} */
121 /*---------------------------------------------------------------------*/
122 /*! \name Get */
123 /*! \{ */
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name Set */
128 /*! \{ */
130 void addChunkBlock(ChunkBlock * const pChunkBlock,
131 ChunkBlockMapKey key = 0);
133 void subChunkBlock(ChunkBlockMapKey key = 0);
135 /*! \} */
136 /*---------------------------------------------------------------------*/
137 /*! \name Set */
138 /*! \{ */
140 ChunkBlock *findChunkBlock(ChunkBlockMapKey key) const;
142 /*! \} */
143 /*---------------------------------------------------------------------*/
144 /*! \name your_category */
145 /*! \{ */
147 const SFChunkBlockPtrMap *getSFChunkBlockStore(void) const;
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name Rendering */
152 /*! \{ */
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Output */
157 /*! \{ */
159 bool addChunk(StateChunk *chunk,
160 Int32 slot = State::AutoSlotReplace);
162 bool subChunk(StateChunk *chunk,
163 Int32 slot = State::AutoSlotReplace);
165 /*! \} */
166 /*---------------------------------------------------------------------*/
167 /*! \name Output */
168 /*! \{ */
170 Int32 find( StateChunk *chunk);
171 StateChunk *find(const StateChunkClass &type,
172 Int32 slot =State::AutoSlotReplace);
174 /*! \} */
175 /*---------------------------------------------------------------------*/
176 /*! \name Output */
177 /*! \{ */
179 /*! \} */
180 /*---------------------------------------------------------------------*/
181 /*! \name Output */
182 /*! \{ */
184 virtual void dump( UInt32 uiIndent = 0,
185 const BitVector bvFlags = 0) const;
187 /*! \} */
188 /*========================= PROTECTED ===============================*/
190 protected:
192 /*---------------------------------------------------------------------*/
193 /*! \name Type information */
194 /*! \{ */
196 static void classDescInserter(TypeObject &oType);
198 /*! \} */
199 /*---------------------------------------------------------------------*/
200 /*! \name Fields */
201 /*! \{ */
203 /*! \} */
204 /*---------------------------------------------------------------------*/
205 /*! \name Constructors */
206 /*! \{ */
208 ChunkOverrideGroup(void);
209 ChunkOverrideGroup(const ChunkOverrideGroup &source);
211 /*! \} */
212 /*---------------------------------------------------------------------*/
213 /*! \name Destructors */
214 /*! \{ */
216 virtual ~ChunkOverrideGroup(void);
218 /*! \} */
219 /*---------------------------------------------------------------------*/
220 /*! \name Changed */
221 /*! \{ */
223 /*! \} */
224 /*---------------------------------------------------------------------*/
225 /*! \name MT Destruction */
226 /*! \{ */
228 /*! \} */
229 /*---------------------------------------------------------------------*/
230 /*! \name Render */
231 /*! \{ */
233 Action::ResultE renderEnter(Action *action);
234 Action::ResultE renderLeave(Action *action);
236 /*! \} */
237 /*---------------------------------------------------------------------*/
238 /*! \name Ptr MField Set */
239 /*! \{ */
241 /*! \} */
242 /*---------------------------------------------------------------------*/
243 /*! \name Init */
244 /*! \{ */
246 static void initMethod(InitPhase ePhase);
248 /*! \} */
249 /*---------------------------------------------------------------------*/
250 /*! \name Ptr MField Set */
251 /*! \{ */
253 /*! \} */
254 /*========================== PRIVATE ================================*/
256 private:
258 friend class FieldContainer;
259 friend class ChunkOverrideGroupBase;
261 // prohibit default functions (move to 'public' if you need one)
262 void operator =(const ChunkOverrideGroup &source);
265 typedef ChunkOverrideGroup *ChunkOverrideGroupP;
267 OSG_END_NAMESPACE
269 #include "OSGChunkOverrideGroupBase.inl"
270 #include "OSGChunkOverrideGroup.inl"
272 #endif /* _OSGCHUNKOVERRIDEGROUP_H_ */