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

OSGMFSysTypes.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 _OSGMFSYSTYPES_H_
00040 #define _OSGMFSYSTYPES_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044 
00045 //---------------------------------------------------------------------------
00046 //  Includes
00047 //---------------------------------------------------------------------------
00048 
00049 #include <OSGBase.h>
00050 #include <OSGMField.h>
00051 #include <OSGSysFieldDataType.h>
00052 
00053 #ifdef OSG_DOC_FILES_IN_MODULE
00054 
00058 #endif
00059 
00060 OSG_BEGIN_NAMESPACE
00061 
00062 
00063 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00064 
00070 typedef MField<bool, 2>   MFBool;
00071 #endif
00072 
00073 #if ! defined(OSG_WIN32_CL)     || \
00074       defined(OSG_WITH_STLPORT) || \
00075       defined(OSG_NEED_BOOL_MFIELD_SPEZ)
00076 
00077 template <> inline
00078 UInt32 MField<bool, 2>::getBinSize(void) const
00079 {
00080     return sizeof(UInt32) + // num elements
00081            sizeof(UInt8) * _values.size();
00082 }
00083 
00084 template <> inline
00085 void MField<bool, 2>::copyToBin(BinaryDataHandler &pMem) const
00086 {
00087     UInt32 n = _values.size();
00088 
00089     pMem.putValue(n);
00090 
00091     for(UInt32 i = 0; i < n; ++i)
00092     {
00093         UInt8 bval = _values[i];
00094 
00095         pMem.putValue(bval);
00096     }
00097 }
00098 
00099 template <> inline
00100 void MField<bool, 2>::copyFromBin(BinaryDataHandler &pMem)
00101 {
00102     UInt32 n;
00103     
00104      pMem  .getValue(n);
00105     _values.clear ( );
00106 
00107 #ifdef __hpux
00108     bool tmpVal;
00109 
00110     _values.resize(n, tmpVal);
00111 #else
00112     _values.resize(n);
00113 #endif
00114 
00115     UInt8 tmpBVal;
00116 
00117     for(UInt32 i = 0; i < n; ++i)
00118     {
00119         pMem.getValue(tmpBVal);
00120 
00121         _values[i] = (tmpBVal != 0);
00122     }
00123 }
00124 #endif
00125 
00126 #ifndef OSG_COMPILEFIELDINST
00127 OSG_DLLEXPORT_DECL2(MField, bool, 2, OSG_BASE_DLLTMPLMAPPING)
00128 #endif
00129 
00130 
00131 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00132 
00134 typedef MField<Int8>   MFInt8;
00135 #endif
00136 
00137 #ifndef OSG_COMPILEFIELDINST
00138 OSG_DLLEXPORT_DECL1(MField, Int8, OSG_BASE_DLLTMPLMAPPING)
00139 #endif
00140 
00141 
00142 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00143 
00145 typedef MField<UInt8>  MFUInt8;
00146 #endif
00147 
00148 #ifndef OSG_COMPILEFIELDINST
00149 OSG_DLLEXPORT_DECL1(MField, UInt8, OSG_BASE_DLLTMPLMAPPING)
00150 #endif
00151 
00152 
00153 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00154 
00156 typedef MField<Int16>  MFInt16;
00157 #endif
00158 
00159 #ifndef OSG_COMPILEFIELDINST
00160 OSG_DLLEXPORT_DECL1(MField, Int16, OSG_BASE_DLLTMPLMAPPING)
00161 #endif
00162 
00163 
00164 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00165 
00167 typedef MField<UInt16> MFUInt16;
00168 #endif
00169 
00170 #ifndef OSG_COMPILEFIELDINST
00171 OSG_DLLEXPORT_DECL1(MField, UInt16, OSG_BASE_DLLTMPLMAPPING)
00172 #endif
00173 
00174 
00175 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00176 
00178 typedef MField<Int32>  MFInt32;
00179 #endif
00180 
00181 #ifndef OSG_COMPILEFIELDINST
00182 OSG_DLLEXPORT_DECL1(MField, Int32, OSG_BASE_DLLTMPLMAPPING)
00183 #endif
00184 
00185 
00186 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00187 
00189 typedef MField<UInt32> MFUInt32;
00190 #endif
00191 
00192 #ifndef OSG_COMPILEFIELDINST
00193 OSG_DLLEXPORT_DECL1(MField, UInt32, OSG_BASE_DLLTMPLMAPPING)
00194 #endif
00195 
00196 
00197 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00198 
00200 typedef MField<Int64>  MFInt64;
00201 #endif
00202 
00203 #ifndef OSG_COMPILEFIELDINST
00204 OSG_DLLEXPORT_DECL1(MField, Int64, OSG_BASE_DLLTMPLMAPPING)
00205 #endif
00206 
00207 
00208 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00209 
00211 typedef MField<UInt64> MFUInt64;
00212 #endif
00213 
00214 #ifndef OSG_COMPILEFIELDINST
00215 OSG_DLLEXPORT_DECL1(MField, UInt64, OSG_BASE_DLLTMPLMAPPING)
00216 #endif
00217 
00218 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00219 
00221 typedef MField<Real16> MFReal16;
00222 #endif
00223 
00224 #ifndef OSG_COMPILEFIELDINST
00225 OSG_DLLEXPORT_DECL1(MField, Real16, OSG_BASE_DLLTMPLMAPPING)
00226 #endif
00227 
00228 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00229 
00231 typedef MField<Real32> MFReal32;
00232 #endif
00233 
00234 #ifndef OSG_COMPILEFIELDINST
00235 OSG_DLLEXPORT_DECL1(MField, Real32, OSG_BASE_DLLTMPLMAPPING)
00236 #endif
00237 
00238 
00239 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00240 
00242 typedef MField<Real64> MFReal64;
00243 #endif
00244 
00245 #ifndef OSG_COMPILEFIELDINST
00246 OSG_DLLEXPORT_DECL1(MField, Real64, OSG_BASE_DLLTMPLMAPPING)
00247 #endif
00248 
00249 
00250 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_FIELD_TYPEDEFS) 
00251 
00253 typedef MField<void *>   MFVoidP;
00254 #endif
00255 
00256 #ifndef OSG_COMPILEFIELDINST
00257 OSG_DLLEXPORT_DECL1(MField, void *, OSG_BASE_DLLTMPLMAPPING)
00258 #endif
00259 
00260 OSG_END_NAMESPACE
00261 
00262 #endif /* _OSGSFSYSTYPES_H_ */
00263 
00264 
00265 
00266 
00267 
00268 
00269 
00270 
00271 
00272 
00273 
00274 
00275 
00276 
00277 
00278 
00279 

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