Core.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
00008 //  AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
00009 //  WORKS WHICH INCORPORATE IT.
00010 //
00011 //  AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
00012 //  AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
00013 //  CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00014 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00015 //
00016 //  Use, duplication, or disclosure by the U.S. Government is subject to
00017 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00018 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00019 //  Data and Computer Software), as applicable.
00020 //
00021 
00022 
00023 #ifndef _DWFCORE_CORE_H
00024 #define _DWFCORE_CORE_H
00025 
00026 //
00027 // we don't expose expat
00028 //
00029 #ifndef EXPAT_STATIC
00030 #define EXPAT_STATIC
00031 #endif
00032 
00041 
00042 
00043     //
00044     // Don't want Doxygen to look at this this stuff
00045     //
00046 #ifndef _DWFCORE_DEFINE_FOR_DOXYGEN_ONLY
00047 
00048 //
00049 // Hardware identification
00050 //
00051 #if     defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686) || defined(_M_IX86)
00052 #define _DWFCORE_X86_SYSTEM
00053 #elif   defined(_M_X64)
00054 #define _DWFCORE_X64_SYSTEM
00055 #elif   defined(_M_ALPHA)
00056 #define _DWFCORE_ALPHA_SYSTEM
00057 #elif   defined(_M_PPC)
00058 #define _DWFCORE_PPC_SYSTEM
00059 #elif   defined(_M_MRX000) || defined(_MIPS_)
00060 #define _DWFCORE_MIPS_SYSTEM
00061 #elif   defined(_M_M68K) || defined(_68K_)
00062 #define _DWFCORE_68K_SYSTEM
00063 #endif
00064 
00065 #ifdef  __BIG_ENDIAN__
00066 #define _DWFCORE_BIG_ENDIAN_SYSTEM
00067 #undef  _DWFCORE_LITTLE_ENDIAN_SYSTEM
00068 #else
00069 #define _DWFCORE_LITTLE_ENDIAN_SYSTEM
00070 #undef  _DWFCORE_BIG_ENDIAN_SYSTEM
00071 #endif
00072 
00073 
00074 //
00075 // System identification
00076 // 
00077 
00078 #if     defined (__APPLE__) && defined (__MACH__)
00079 #define _DWFCORE_MAC_SYSTEM
00080 
00081     //
00082     // Module API identification
00083     //
00084 #define _DWFCORE_API
00085 
00086 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00087 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00088 #endif
00089 
00090 #include "dwfcore/mac/Types.h"
00091 #include "dwfcore/mac/Core.h"
00092 
00093 
00094 
00095 #elif   defined (_MSC_VER)
00096 #define _DWFCORE_WIN32_SYSTEM
00097 
00098     //
00099     // Currently a lot of the code between the Win32 and Win64 are the same
00100     // hence we are defining _DWFCORE_WIN64_SYSTEM within the scope of Win32
00101 #ifdef  _WIN64
00102 #define _DWFCORE_WIN64_SYSTEM
00103 #endif
00104 
00105     //
00106     // Module API identification
00107     //
00108 #ifndef DWFCORE_STATIC
00109 #ifdef  DWFCORE_EXPORT_API
00110 #define _DWFCORE_API    __declspec( dllexport )
00111 #else
00112 #define _DWFCORE_API    __declspec( dllimport )
00113 #endif
00114 #else
00115 #define _DWFCORE_API
00116 #endif
00117 
00118 
00119 #undef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00120 
00121 #include "dwfcore/win32/Types.h"
00122 #include "dwfcore/win32/Core.h"
00123 
00124     //
00125     // MSVC compiler help us out?
00126     //
00127 #ifndef _DWFCORE_LITTLE_ENDIAN_SYSTEM
00128 #define _DWFCORE_LITTLE_ENDIAN_SYSTEM
00129 #undef  _DWFCORE_BIG_ENDIAN_SYSTEM
00130 #endif
00131 
00132 
00133 
00134 #elif   defined (__VMS)
00135 #define _DWFCORE_VMS_SYSTEM
00136 
00137     //
00138     // Module API identification
00139     //
00140 #define _DWFCORE_API
00141 
00142 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00143 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00144 #endif
00145 
00146 #include "dwfcore/vms/Types.h"
00147 #include "dwfcore/ansi/Core.h"
00148 
00149 #elif   defined (__sgi)
00150 #define _DWFCORE_SGI_SYSTEM
00151 
00152     //
00153     // Module API identification
00154     //
00155 #define _DWFCORE_API
00156 
00157 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00158 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00159 #endif
00160 
00161 #include "dwfcore/ansi/Types.h"
00162 #include "dwfcore/ansi/Core.h"
00163 
00164 #elif   defined (__linux__)
00165 #define _DWFCORE_LINUX_SYSTEM
00166 #ifndef BYTE;
00167 typedef unsigned char BYTE;
00168 #endif
00169     //
00170     // Module API identification
00171     //
00172 #define _DWFCORE_API
00173 
00174 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00175 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00176 #endif
00177 
00178 #include "dwfcore/ansi/Types.h"
00179 #include "dwfcore/ansi/Core.h"
00180 
00181 
00182 #elif   defined (BSD)
00183 #define _DWFCORE_BSD_SYSTEM
00184 
00185     //
00186     // Module API identification
00187     //
00188 #define _DWFCORE_API
00189 
00190 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00191 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00192 #endif
00193 
00194 #include "dwfcore/ansi/Types.h"
00195 #include "dwfcore/ansi/Core.h"
00196 
00197 #else
00198 #define _DWCORE_UNKNOWN_ANSI_SYSTEM
00199 
00200     //
00201     // Module API identification
00202     //
00203 #define _DWFCORE_API
00204 
00205 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00206 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00207 #endif
00208 
00209 #include "dwfcore/ansi/Types.h"
00210 #include "dwfcore/ansi/Core.h"
00211 
00212 #endif
00213 
00214 
00215 //
00216 // Some compilers (msvc 7.0) have a problem with the 'LL' suffix.
00217 //
00218 #if !defined( _DWFCORE_LARGE_CONSTANT )
00219 #define _DWFCORE_LARGE_CONSTANT(x) x##LL
00220 #endif
00221 
00222 
00223 #endif   // _DWFCORE_DEFINE_FOR_DOXYGEN_ONLY
00224 
00225 
00232 namespace DWFCore
00233 {
00247     class _DWFCORE_API DWFCoreMemory
00248     {
00249     #ifdef  DWFCORE_ENABLE_MEMORY_BASE
00250         public:
00251 
00255             void* operator new( size_t );
00256 
00260             void* operator new( size_t, void* );
00261 
00265             void  operator delete( void* );
00266 
00270             void  operator delete( void*, void* );
00271 
00272     #endif
00273     };
00274         
00275 
00286     _DWFCORE_API int AtomicIncrement( volatile int* pValue ) throw();
00287 
00298     _DWFCORE_API int AtomicDecrement( volatile int* pValue ) throw();
00299 }
00300 
00301 
00302 
00303 #endif
00304 
00305 

Generated on Tue Jan 6 22:39:28 2009 for Autodesk DWF Core Library by  doxygen 1.4.5