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

Core.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2005 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 
00034 
00035 
00036     //
00037     // Don't want Doxygen to look at this this stuff
00038     //
00039 #ifndef _DWFCORE_DEFINE_FOR_DOXYGEN_ONLY
00040 
00041 //
00042 // Hardware identification
00043 //
00044 
00045 #if     defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686) || defined(_M_IX86)
00046 #define _DWFCORE_X86_SYSTEM
00047 #elif   defined(_M_ALPHA)
00048 #define _DWFCORE_ALPHA_SYSTEM
00049 #elif   defined(_M_PPC)
00050 #define _DWFCORE_PPC_SYSTEM
00051 #elif   defined(_M_MRX000) || defined(_MIPS_)
00052 #define _DWFCORE_MIPS_SYSTEM
00053 #elif   defined(_M_M68K) || defined(_68K_)
00054 #define _DWFCORE_68K_SYSTEM
00055 #endif
00056 
00057 #ifdef  __BIG_ENDIAN__
00058 #define _DWFCORE_BIG_ENDIAN_SYSTEM
00059 #undef  _DWFCORE_LITTLE_ENDIAN_SYSTEM
00060 #else
00061 #define _DWFCORE_LITTLE_ENDIAN_SYSTEM
00062 #undef  _DWFCORE_BIG_ENDIAN_SYSTEM
00063 #endif
00064 
00065 
00066 //
00067 // System identification
00068 // 
00069 
00070 #if     defined (__APPLE__) && defined (__MACH__)
00071 #define _DWFCORE_MAC_SYSTEM
00072 
00073     //
00074     // Module API identification
00075     //
00076 #define _DWFCORE_API
00077 
00078 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00079 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00080 #endif
00081 
00082 #include "dwfcore/mac/Types.h"
00083 #include "dwfcore/mac/Core.h"
00084 
00085 #elif   defined (_MSC_VER)
00086 #define _DWFCORE_WIN32_SYSTEM
00087 
00088     //
00089     // Module API identification
00090     //
00091 #ifndef DWFCORE_STATIC
00092 #ifdef  DWFCORE_EXPORT_API
00093 #define _DWFCORE_API    __declspec( dllexport )
00094 #else
00095 #define _DWFCORE_API    __declspec( dllimport )
00096 #endif
00097 #else
00098 #define _DWFCORE_API
00099 #endif
00100 
00101 
00102 #undef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00103 
00104 #include "dwfcore/win32/Types.h"
00105 #include "dwfcore/win32/Core.h"
00106 
00107     //
00108     // MSVC compiler help us out?
00109     //
00110 #ifndef _DWFCORE_LITTLE_ENDIAN_SYSTEM
00111 #define _DWFCORE_LITTLE_ENDIAN_SYSTEM
00112 #undef  _DWFCORE_BIG_ENDIAN_SYSTEM
00113 #endif
00114 
00115 #elif   defined (__VMS)
00116 #define _DWFCORE_VMS_SYSTEM
00117 
00118     //
00119     // Module API identification
00120     //
00121 #define _DWFCORE_API
00122 
00123 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00124 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00125 #endif
00126 
00127 #include "dwfcore/vms/Types.h"
00128 #include "dwfcore/ansi/Core.h"
00129 
00130 #elif   defined (__sgi)
00131 #define _DWFCORE_SGI_SYSTEM
00132 
00133     //
00134     // Module API identification
00135     //
00136 #define _DWFCORE_API
00137 
00138 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00139 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00140 #endif
00141 
00142 #include "dwfcore/ansi/Types.h"
00143 #include "dwfcore/ansi/Core.h"
00144 
00145 #elif   defined (__linux__)
00146 #define _DWFCORE_LINUX_SYSTEM
00147 
00148     //
00149     // Module API identification
00150     //
00151 #define _DWFCORE_API
00152 
00153 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00154 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00155 #endif
00156 
00157 #include "dwfcore/ansi/Types.h"
00158 #include "dwfcore/ansi/Core.h"
00159 
00160 
00161 #elif   defined (BSD)
00162 #define _DWFCORE_BSD_SYSTEM
00163 
00164     //
00165     // Module API identification
00166     //
00167 #define _DWFCORE_API
00168 
00169 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00170 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00171 #endif
00172 
00173 #include "dwfcore/ansi/Types.h"
00174 #include "dwfcore/ansi/Core.h"
00175 
00176 #else
00177 #define _DWCORE_UNKNOWN_ANSI_SYSTEM
00178 
00179     //
00180     // Module API identification
00181     //
00182 #define _DWFCORE_API
00183 
00184 #ifndef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00185 #define  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00186 #endif
00187 
00188 #include "dwfcore/ansi/Types.h"
00189 #include "dwfcore/ansi/Core.h"
00190 
00191 #endif
00192 #endif   // _DWFCORE_DEFINE_FOR_DOXYGEN_ONLY
00193 
00194 
00201 namespace DWFCore
00202 {
00216     class _DWFCORE_API DWFCoreMemory
00217     {
00218     #ifdef  DWFCORE_ENABLE_MEMORY_BASE
00219         public:
00220 
00224             void* operator new( size_t );
00225 
00229             void* operator new( size_t, void* );
00230 
00234             void  operator delete( void* );
00235 
00239             void  operator delete( void*, void* );
00240 
00241     #endif
00242     };
00243         
00244 
00255     _DWFCORE_API int AtomicIncrement( volatile int* pValue ) throw();
00256 
00267     _DWFCORE_API int AtomicDecrement( volatile int* pValue ) throw();
00268 }
00269 
00270 
00271 
00272 #endif
00273 
00274 

Generated on Tue May 17 12:05:10 2005 for Autodesk DWF Core Library by  doxygen 1.4.1