1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 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 _OSGFIELDTYPE_H_
40 #define _OSGFIELDTYPE_H_
46 #include "OSGDataType.h"
47 #include "OSGFieldForwards.h"
53 #ifdef OSG_1_GET_COMPAT
54 #define SINGLE_FIELD SingleField
55 #define MULTI_FIELD MultiField
58 /*! \ingroup GrpBaseField
59 \ingroup GrpLibOSGBase
62 class OSG_BASE_DLLMAPPING FieldType
: public DataType
64 /*========================== PUBLIC =================================*/
83 /*---------------------------------------------------------------------*/
84 /*! \name Constructors */
87 FieldType(const Char8
*szName
,
88 const Char8
*szParentName
,
89 const DataType
&contentType
,
90 Cardinality cardinality
,
92 FieldDescCreator fCreator
= NULL
,
93 IndexedFieldDescCreator fIdxCreator
= NULL
,
94 const UInt32 uiNameSpace
= GlobalNamespace
);
96 FieldType(const Char8
*szName
,
97 const Char8
*szParentName
,
98 const DataType
&contentType
,
99 Cardinality cardinality
,
101 const FieldType
&pScanAsType
,
102 FieldDescCreator fCreator
= NULL
,
103 IndexedFieldDescCreator fIdxCreator
= NULL
,
104 const UInt32 uiNameSpace
= GlobalNamespace
);
107 /*---------------------------------------------------------------------*/
108 /*! \name Destructor */
111 virtual ~FieldType(void);
114 /*---------------------------------------------------------------------*/
118 // bool isFieldContainerPtrField(void);
121 /*---------------------------------------------------------------------*/
125 const DataType
&getContentType(void) const;
126 Cardinality
getCardinality(void) const;
127 Class
getClass (void) const;
129 UInt32
getScanTypeId (void) const;
130 bool isPtrField (void) const;
134 #if defined(OSG_STATIC_MEMEBER_NEEDS_COPY_ASIGN_INIT)
135 /*!\brief prohibit default function (move to 'public' if needed) */
136 FieldType(const FieldType
&source
);
137 /*!\brief prohibit default function (move to 'public' if needed) */
138 FieldType
&operator =(const FieldType
&obj
);
141 /*========================= PROTECTED ===============================*/
145 typedef DataType Inherited
;
147 /*---------------------------------------------------------------------*/
150 Cardinality _cardinality
;
151 UInt32 _uiLoadTypeId
;
154 const DataType
&_contentType
;
155 const FieldType
*_pScanAsType
;
157 /*========================== PRIVATE ================================*/
161 #if !defined(OSG_STATIC_MEMEBER_NEEDS_COPY_ASIGN_INIT)
162 /*!\brief prohibit default function (move to 'public' if needed) */
163 FieldType(const FieldType
&source
);
164 /*!\brief prohibit default function (move to 'public' if needed) */
165 FieldType
&operator =(const FieldType
&obj
);
171 #include "OSGFieldType.inl"
173 #endif /* _OSGFIELDTYPE_H_ */