File indexing completed on 2024-04-14 14:10:46
0001 #if !defined(_SpatialGeneral_h) 0002 #define _SpatialGeneral_h 0003 //# Filename: SpatialGeneral.h 0004 //# 0005 //# This file contains all SDSS Science Archive global information, 0006 //# including Global Type Definitions, Global Macros, and Global Inlines 0007 //# 0008 //# Author: Peter Z. Kunszt 0009 //# 0010 //# Date: October 19, 1999 0011 //# 0012 //# SPDX-FileCopyrightText: 2000 Peter Z. Kunszt Alex S. Szalay, Aniruddha R. Thakar 0013 //# The Johns Hopkins University 0014 //# 0015 //# Modification History: 0016 //# 0017 //# Oct 18, 2001 : Dennis C. Dinge -- Replaced ValVec with std::vector: 0018 //# 0019 0020 // Type Definitions 0021 0022 // define portable int and float types where not already defined 0023 // The SDSS Science Archive and Objectivity define the very same thing. 0024 // Objectivity defines these in ooMachine.h (version 4) and 0025 // in ooConfig.h (version 5). 0026 // 0027 0028 // The following list is for different machines: 0029 // 0030 // ------------------------------------------------------------------------ 0031 // MACHINE | CHAR | SHORT | INT | LONG | FLOAT | DOUBLE | LONG DOUBLE | 0032 // ------------------------------------------------------------------------ 0033 // SUN | 8 | 16 | 32 | 32 | 32 | 64 | 128 | 0034 // ------------------------------------------------------------------------ 0035 // ALPHA | 8 | 16 | 32 | 64 | 32 | 64 | 64 | 0036 // ------------------------------------------------------------------------ 0037 // SGI-n32| 8 | 16 | 32 | 32 | 32 | 64 | 128 | 0038 // ------------------------------------------------------------------------ 0039 // SGI | 8 | 16 | 32 | 32 | 32 | 64 | 64 | 0040 // ------------------------------------------------------------------------ 0041 // NT | 8 | 16 | 32 | 32 | 32 | 64 | 64 | 0042 // ------------------------------------------------------------------------ 0043 // LINUX | 8 | 16 | 32 | 32 | 32 | 64 | 96 | 0044 // ------------------------------------------------------------------------ 0045 // 0046 0047 /* get all the standard defines from the platform */ 0048 #include <cstdlib> 0049 0050 #if !defined(OO_MACHINE_H) && !defined(OO_CONFIG_H) && !defined(SXGENERAL_H) 0051 typedef char int8; 0052 typedef unsigned char uint8; 0053 typedef short int int16; 0054 typedef unsigned short int uint16; 0055 typedef int int32; 0056 typedef unsigned int uint32; 0057 typedef float float32; 0058 typedef double float64; 0059 #ifdef _WIN32 0060 #ifdef _MSC_VER 0061 typedef __int64 int64; 0062 typedef unsigned __int64 uint64; 0063 #else 0064 typedef long long int64; 0065 typedef unsigned long long uint64; 0066 #endif 0067 #else 0068 typedef long long int64; 0069 typedef unsigned long long uint64; 0070 #endif 0071 #endif 0072 0073 #if defined(__sun) || defined(__sgi) 0074 #define SPATIALBIGENDIAN 0075 #endif 0076 0077 #define IDSIZE 64 0078 #define HTMNAMEMAX 32 0079 #define HTMMAXDEPTH 25 0080 #define MAX_SQL_DEPTH 20 0081 #define HTMMAXKEEP 12 0082 #define HTMMAXBIT 14 0083 0084 // Global Math Constants 0085 0086 const float64 gPi = 3.1415926535897932385E0; 0087 const float64 gPr = gPi / 180.0; 0088 const float64 gEpsilon = 1.0E-15; 0089 // CVSversion = "$Name: $"; 0090 0091 // 0092 // To Simplify Porting, define our platforms: 0093 // Digital UNIX -> SpatialDigitalUnix 0094 // SGI -> SpatialSGI 0095 // WINNT -> SpatialWinNT 0096 // 0097 // These are set here, and then included by everything else. 0098 0099 // Flag SpatialStandardTemplate: Defined to indicating proper method 0100 // for explicit template instantiation. If a compiler supports the 0101 // standard explicit template instantiation, define. 0102 // 0103 0104 #if defined(__APPLE__) 0105 #define LINKAGE 0106 #endif 0107 0108 #if defined(__unix__) || defined(__unix) 0109 #define LINKAGE 0110 #elif defined(_WIN32) 0111 #define SpatialWinNT 1 0112 // This warning is about template instances being exported in the dll... 0113 #pragma warning(disable : 4251) 0114 0115 // Define LINKAGE for NT VC++6 compiler 0116 0117 #ifdef _EXPORTING 0118 #define LINKAGE __declspec(dllexport) 0119 #else 0120 #define LINKAGE __declspec(dllimport) 0121 #endif 0122 0123 #endif /* _WIN32 */ 0124 0125 #ifndef SpatialWinNT 0126 #define IDHIGHBIT 0x8000000000000000LL 0127 #define IDHIGHBIT2 0x4000000000000000LL 0128 #endif 0129 0130 #endif /* SPATIALGENERAL_H */