Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGFieldType.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
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     /*==========================  PUBLIC  =================================*/
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     /*=========================  PROTECTED  ===============================*/
00120 
00121   protected:
00122 
00123     typedef DataType Inherited;
00124 
00125     /*---------------------------------------------------------------------*/
00126     /*                             Member                                  */
00127 
00128           Cardinality        _cardinality;
00129           UInt32             _uiLoadTypeId;
00130 
00131     const DataType          &_contentType;
00132     const FieldType         *_pScanAsType;
00133 
00134     const CreateFieldMethod  _createMethod;
00135 
00136     /*==========================  PRIVATE  ================================*/
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 /* _OSGFIELDTYPE_H_ */
00154 
00155 
00156 

Generated on Thu Aug 25 04:04:49 2005 for OpenSG by  doxygen 1.4.3