00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _OSGFIELDTYPE_H_
00040 #define _OSGFIELDTYPE_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044
00045 #include <typeinfo>
00046 #include <OSGBase.h>
00047 #include <OSGBaseTypes.h>
00048 #include <OSGFieldDataType.h>
00049 #include <OSGDataType.h>
00050
00051 OSG_BEGIN_NAMESPACE
00052
00053 #ifdef OSG_DOC_FILES_IN_MODULE
00054
00057 #endif
00058
00059 class Field;
00060
00064 class OSG_BASE_DLLMAPPING FieldType : public DataType
00065 {
00066
00067
00068 public:
00069
00070 enum Cardinality
00071 {
00072 SINGLE_FIELD,
00073 MULTI_FIELD
00074 };
00075
00076 typedef Field *(*CreateFieldMethod)(void);
00077
00078
00082 FieldType(const Char8 *szName,
00083 const Char8 *szParentName,
00084 const DataType &contentType,
00085 CreateFieldMethod createMethod,
00086 Cardinality cardinality);
00087
00088 FieldType(const Char8 *szName,
00089 const Char8 *szParentName,
00090 const DataType &contentType ,
00091 CreateFieldMethod createMethod,
00092 Cardinality cardinality ,
00093 const FieldType &pScanAsType );
00094
00096
00100 virtual ~FieldType(void);
00101
00104 #if defined(OSG_MICROSOFT_COMPILER_ALERT)
00105 FieldType(const FieldType &source);
00106 FieldType &operator =(const FieldType &obj);
00107 #endif
00108
00109
00113 const DataType &getContentType(void) const;
00114 Cardinality getCardinality(void) const;
00115
00116 UInt32 getScanTypeId (void) const;
00117
00119
00120
00121 protected:
00122
00123 typedef DataType Inherited;
00124
00125
00126
00127
00128 Cardinality _cardinality;
00129 UInt32 _uiLoadTypeId;
00130
00131 const DataType &_contentType;
00132 const FieldType *_pScanAsType;
00133
00134 const CreateFieldMethod _createMethod;
00135
00136
00137 private:
00138
00139 friend class FieldFactory;
00140
00141 #if !defined(OSG_MICROSOFT_COMPILER_ALERT)
00142
00143 FieldType(const FieldType &source);
00145 FieldType &operator =(const FieldType &obj);
00146 #endif
00147 };
00148
00149 OSG_END_NAMESPACE
00150
00151 #define OSGFIELDTYPE_HEADER_CVSID "@(#)$Id: $"
00152
00153 #endif
00154
00155
00156