fixed: gcc8 compile issues
[opensg.git] / Source / Base / FieldContainer / Base / OSGReflexiveContainerType.h
blobddefcc3b28539455198f02446153e234d3f59a80
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2003 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 _OSGREFLEXIVECONTAINERTYPE_H_
40 #define _OSGREFLEXIVECONTAINERTYPE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGDataType.h"
46 #include "OSGContainerForwards.h"
48 #include <vector>
49 #include<map>
51 OSG_BEGIN_NAMESPACE
53 class ReflexiveContainerType;
55 /*! \ingroup GrpBaseFieldContainerBase
58 typedef void (*InitalInsertDescFunc)(OSG::ReflexiveContainerType &);
60 /*! \class ReflexiveContainerType
61 \ingroup GrpBaseFieldContainerBase
62 \ingroup GrpLibOSGBase
65 class OSG_BASE_DLLMAPPING ReflexiveContainerType : public DataType
67 /*========================== PUBLIC =================================*/
69 public:
71 /*---------------------------------------------------------------------*/
72 /*! \name Constants */
73 /*! \{ */
75 /*! \} */
76 /*---------------------------------------------------------------------*/
77 /*! \name General Fieldcontainer Declaration */
78 /*! \{ */
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Constructors */
83 /*! \{ */
85 ReflexiveContainerType(const Char8 *szName,
86 const Char8 *szParentName = NULL,
87 const Char8 *szGroupName = NULL,
88 const UInt32 uiNameSpace = 0,
89 InitalInsertDescFunc descInsertFunc = NULL,
90 bool bDescsAddable = false,
91 BitVector bvUnmarkedOnCreate = 0);
93 /*! \} */
94 /*---------------------------------------------------------------------*/
95 /*! \name Destructor */
96 /*! \{ */
98 virtual ~ReflexiveContainerType(void);
100 /*! \} */
101 /*---------------------------------------------------------------------*/
102 /*! \name Helper */
103 /*! \{ */
105 UInt16 getGroupId(void) const;
107 /*! \} */
108 /*---------------------------------------------------------------------*/
109 /*! \name Get */
110 /*! \{ */
112 FieldDescriptionBase *getFieldDesc ( UInt32 uiFieldId );
113 FieldDescriptionBase *getFieldDesc ( UInt32 uiFieldId ) const;
115 FieldDescriptionBase *getFieldDesc (const Char8 *szFieldName);
116 FieldDescriptionBase *getFieldDesc (const Char8 *szFieldName) const;
118 UInt32 getNumFieldDescs( void ) const;
120 /*! \} */
121 /*---------------------------------------------------------------------*/
122 /*! \name Set */
123 /*! \{ */
125 BitVector getUnmarkedOnCreate ( void ) const;
126 void setFieldsUnmarkedOnCreate (const BitVector bvFieldMasks);
127 void clearFieldsUnmarkedOnCreate(const BitVector bvFieldMasks);
129 /*! \} */
130 /*---------------------------------------------------------------------*/
131 /*! \name your_category */
132 /*! \{ */
134 void addInitialDesc(FieldDescriptionBase *pDesc);
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Container Access */
139 /*! \{ */
141 UInt32 addDescription(const FieldDescriptionBase &desc );
142 bool subDescription( UInt32 uiFieldId);
144 /*! \} */
145 /*---------------------------------------------------------------------*/
146 /*! \name Binary Access */
147 /*! \{ */
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name your_operators */
152 /*! \{ */
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Assignment */
157 /*! \{ */
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Comparison */
162 /*! \{ */
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Dump */
167 /*! \{ */
169 void dumpFieldInfo(void) const;
171 /*! \} */
172 /*========================= PROTECTED ===============================*/
174 protected:
176 /*---------------------------------------------------------------------*/
177 /*! \name Type information */
178 /*! \{ */
180 typedef std::map <std::string, FieldDescriptionBase *> DescMap;
181 typedef std::vector< FieldDescriptionBase *> DescVec;
183 typedef DescMap::iterator DescMapIt;
184 typedef DescMap::const_iterator DescMapConstIt;
186 typedef DescVec::iterator DescVecIt;
187 typedef DescVec::const_iterator DescVecConstIt;
189 /*! \} */
190 /*---------------------------------------------------------------------*/
191 /*! \name Fields */
192 /*! \{ */
194 ReflexiveContainerType(const ReflexiveContainerType &source);
196 /*! \} */
197 /*---------------------------------------------------------------------*/
198 /*! \name Member */
199 /*! \{ */
201 UInt16 _uiGroupId;
203 bool _bDescsAddable;
204 std::string _szGroupName;
206 DescVec _vInitialDescs;
208 DescMap _mDescMap;
209 DescVec _vDescVec;
211 InitalInsertDescFunc _descInsertFunc;
213 BitVector _bvUnmarkedOnCreate;
215 /*! \} */
216 /*---------------------------------------------------------------------*/
217 /*! \name Changed */
218 /*! \{ */
220 bool initFields (void);
221 bool initParentFields(void);
224 virtual bool initialize (void);
225 virtual void terminate (void);
227 /*! \} */
228 /*---------------------------------------------------------------------*/
229 /*! \name MT Destruction */
230 /*! \{ */
232 /*! \} */
233 /*---------------------------------------------------------------------*/
234 /*! \name Sync */
235 /*! \{ */
237 /*! \} */
238 /*========================== PRIVATE ================================*/
240 private:
242 typedef DataType Inherited;
244 /*!\brief prohibit default function (move to 'public' if needed) */
245 void operator =(const ReflexiveContainerType &source);
248 OSG_END_NAMESPACE
250 #include "OSGReflexiveContainerType.inl"
252 #endif /* _OSGREFLEXIVECONTAINERTYPE_H_ */