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

OSGBaseTypes.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 _OSGBASETYPES_H_
00040 #define _OSGBASETYPES_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044 
00045 #include <OSGConfig.h>
00046 #include <OSGBase.h>
00047 #include <OSGReal16.h>
00048 
00049 #if defined(OSG_SGI_TYPES) || defined (OSG_LINUX_TYPES) || \
00050     defined(OSG_SUNOS_TYPES)
00051 #include <sys/types.h>
00052 #endif
00053 
00054 #include <stdlib.h>
00055 
00056 #include <utility>
00057 
00058 #include <float.h>
00059 #include <string>
00060 #include <stdio.h>
00061 
00062 #if defined(OSG_LINUX_TYPES)
00063 #    include <inttypes.h>
00064 #endif
00065 
00066 OSG_BEGIN_NAMESPACE
00067 
00068 #if defined(OSG_SGI_TYPES)
00069 
00074 typedef char           Char8;
00075 
00080 typedef unsigned char UChar8;
00081 
00086 typedef signed char   SChar8;
00087 
00092 typedef int8_t    Int8;
00093 
00098 typedef uint8_t   UInt8;
00099 
00104 typedef int16_t   Int16;
00105 
00110 typedef uint16_t  UInt16;
00111 
00116 typedef int32_t   Int32;
00117 
00122 typedef uint32_t  UInt32;
00123 
00128 typedef int64_t   Int64;
00129 
00134 typedef uint64_t  UInt64;
00135 
00140 typedef float     Real32;
00141 
00146 typedef double    Real64;
00147 
00152 typedef long double Real128;
00153 
00154 #elif defined(OSG_LINUX_TYPES)
00155 
00160 typedef char           Char8;
00161 
00166 typedef unsigned char UChar8;
00167 
00172 typedef signed char   SChar8;
00173 
00178 typedef int8_t     Int8;
00179 
00184 typedef uint8_t   UInt8;
00185 
00190 typedef int16_t    Int16;
00191 
00196 typedef uint16_t  UInt16;
00197 
00202 typedef int32_t    Int32;
00203 
00208 typedef uint32_t  UInt32;
00209 
00214 typedef int64_t    Int64;
00215 
00220 typedef uint64_t  UInt64;
00221 
00226 typedef float      Real32;
00227 
00232 typedef double     Real64;
00233 
00238 typedef long double Real128;
00239 
00240 #elif defined(OSG_HPUX_TYPES)
00241 
00246 typedef char           Char8;
00247 
00252 typedef unsigned char UChar8;
00253 
00258 typedef signed char   SChar8;
00259 
00264 typedef int8_t     Int8;
00265 
00270 typedef uint8_t   UInt8;
00271 
00276 typedef int16_t    Int16;
00277 
00282 typedef uint16_t  UInt16;
00283 
00288 typedef int32_t    Int32;
00289 
00294 typedef uint32_t  UInt32;
00295 
00300 typedef int64_t    Int64;
00301 
00306 typedef uint64_t  UInt64;
00307 
00312 typedef float      Real32;
00313 
00318 typedef double     Real64;
00319 
00324 typedef long double Real128;
00325 
00326 #elif defined(OSG_WIN_TYPES)
00327 
00332 #ifdef OSG_BOOL_IS_UNSIGNED
00333 #ifndef bool
00334 typedef unsigned      bool;
00335 #endif
00336 #endif
00337 
00342 typedef CHAR           Char8;
00343 
00348 typedef UCHAR         UChar8;
00349 
00354 typedef signed char   SChar8;
00355 
00360 typedef signed char   Int8;
00361 
00366 typedef UCHAR   UInt8;
00367 
00372 typedef SHORT   Int16;
00373 
00378 typedef USHORT  UInt16;
00379 
00384 typedef INT32   Int32;
00385 
00390 typedef UINT32  UInt32;
00391 
00396 typedef INT64   Int64;
00397 
00402 typedef UINT64  UInt64;
00403 
00408 typedef DWORD   DWord;
00409 
00414 typedef HANDLE  Handle;
00415 
00420 typedef float     Real32;
00421 
00426 typedef double    Real64;
00427 
00432 typedef long double Real128;
00433 
00434 #elif defined(OSG_SUN_TYPES)
00435 
00440 typedef char           Char8;
00441 
00446 typedef unsigned char UChar8;
00447 
00452 typedef signed char   SChar8;
00453 
00458 typedef int8_t     Int8;
00459 
00464 typedef uint8_t   UInt8;
00465 
00470 typedef int16_t    Int16;
00471 
00476 typedef uint16_t  UInt16;
00477 
00482 typedef int32_t    Int32;
00483 
00488 typedef uint32_t  UInt32;
00489 
00494 typedef long long    Int64;
00495 
00500 typedef unsigned long long  UInt64;
00501 
00506 typedef float      Real32;
00507 
00512 typedef double     Real64;
00513 
00518 typedef long double Real128;
00519 
00520 #else
00521 #error "Could not define base types, check your system/compiler combination"
00522 #endif
00523 
00528 typedef UInt64 BitVector;
00529 
00535 typedef UInt8 *MemoryHandle;
00536 
00540 const Real32 Eps = 1E-6f;
00541 
00545 const Real32 Pi  = 3.141592653589793f;
00546 
00550 const Real32 Sqrt2  = 1.41421356237309504f;
00551 
00555 const Real32 Inf = 1E30f;
00556 
00560 const Real32 NegInf = - 1E30f;
00561 
00562 #ifdef WIN32
00563 
00567 const Char8 PluginExt[]     = ".dll";
00568 
00572 const Char8 PluginPattern[] = "*.dll";
00573 
00577 const Char8  DirSep    = '\\';
00578 
00579 #else
00580 
00584 const Char8 PluginExt[]     = ".so";
00585 
00589 const Char8 PluginPattern[] = "*.so";
00590 
00594 const Char8  DirSep    = '/';
00595 
00596 #endif
00597 
00602 enum MathTypeProperties
00603 {
00604     RealValue,
00605     IntValue,
00606     BoolValue
00607 };
00608 
00609 struct SyncInfo
00610 {
00611     BitVector syncMode;
00612     UInt32    uiSyncInfo;
00613     UInt32    uiCopyOffset;
00614 };
00615 
00616 OSG_END_NAMESPACE
00617 
00618 #include <OSGBaseTypeTraits.h>
00619 
00620 #define OSGBASETPYES_HEADER_CVSID "@(#)$Id: $"
00621 
00622 #endif /* OSGBASETYPES_H */

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