DLLExportAPI.h

00001 /* START_LICENSE_HEADER
00002 
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001 Replica Software
00005 
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009 
00010 END_LICENSE_HEADER */
00011 #ifndef __DLLEXPORTAPI_H__
00012 #define __DLLEXPORTAPI_H__
00013 
00014 // This turns off a harmless warning in Visual Studio about debug symbol lengths.
00015 #ifdef _MSC_VER
00016 #pragma warning(disable : 4786)
00017 #endif
00018 
00019 // These defines are here at the top-level so that they can be enabled by the user.
00020 // In an ideal world people will use the preprocessor define method, but in some cases the preprocessor defines cannot be changed so this file can be changed as a last resort.
00021 // Define this to enable ReplicaNet Visual Debugger information.
00022 //#define REPLICANET_VISUALDEBUGGER
00023 // Define this to disable all memory tracking, disable all overrides to new/delete/malloc/free/calloc/realloc
00024 //#define REPLICANET_NOMEMORYTRACKING
00025 // Define this to always include "RNPlatform/Inc/MemoryTracking.h"
00026 //#define REPLICANET_ALWAYSDOMEMORYTRACKING
00027 // Define this when using the DLL libraries instead of the default statically linked libraries.
00028 //#define DOREPNETEXPORTAPI
00029 
00030 // These two platform types do not have memory tracking enabled by default, regardless of what the preprocessor defines are.
00031 #if defined(_XBOX) || defined(_PS2)
00032 #ifndef REPLICANET_NOMEMORYTRACKING
00033 #define REPLICANET_NOMEMORYTRACKING
00034 #endif
00035 #ifdef REPLICANET_ALWAYSDOMEMORYTRACKING
00036 #undef REPLICANET_ALWAYSDOMEMORYTRACKING
00037 #endif
00038 #endif
00039 
00040 // This pragma removes the harmless warning from MSVC about browse information and the STL 
00041 #ifdef _MSC_VER
00042 #pragma warning(disable : 4786)
00043 #endif
00044 
00045 #if defined(_WIN32)
00046 
00047 // Remove some harmless warnings
00048 #pragma warning(disable: 4275)
00049 #pragma warning(disable: 4251)
00050 
00051 // Rules for creating DLL export/import or static LIB version of this library
00052 #ifdef DOREPNETEXPORTAPI
00053 
00054 #ifdef DOREPNETEXPORTAPIDEFS
00055 #define REPNETEXPORTAPI __declspec(dllexport)
00056 #else
00057 #define REPNETEXPORTAPI __declspec(dllimport)
00058 #endif
00059 #ifdef XPURLDLL_EXPORTS
00060 #define XPURLDLL_API __declspec(dllexport)
00061 #else
00062 #define XPURLDLL_API __declspec(dllimport)
00063 #endif
00064 #ifdef XPSESSIONDLL_EXPORTS
00065 #define XPSESSIONDLL_API __declspec(dllexport)
00066 #else
00067 #define XPSESSIONDLL_API __declspec(dllimport)
00068 #endif
00069 #ifdef REPLICANETDLL_EXPORTS
00070 #define REPLICANETDLL_API __declspec(dllexport)
00071 #else
00072 #define REPLICANETDLL_API __declspec(dllimport)
00073 #endif
00074 
00075 // If we are in DLL mode then auto-include the memory tracking if we can
00076 #ifndef REPLICANET_NOAUTOMATICINCLUDEMEMORYTRACKING
00077 #include "RNPlatform/Inc/MemoryTracking.h"
00078 #endif
00079 
00080 #else   // ifdef DOREPNETEXPORTAPIDEFS
00081 
00082 #define REPNETEXPORTAPI
00083 #define XPURLDLL_API
00084 #define XPSESSIONDLL_API
00085 #define REPLICANETDLL_API
00086 #endif
00087 
00088 
00090 #else   // if defined(_WIN32)
00092 
00093 #define REPNETEXPORTAPI
00094 #define XPURLDLL_API
00095 #define XPSESSIONDLL_API
00096 #define REPLICANETDLL_API
00097 
00098 #endif
00099 
00100 #ifdef REPLICANET_ALWAYSDOMEMORYTRACKING
00101 #include "RNPlatform/Inc/MemoryTracking.h"
00102 #endif
00103 
00104 
00105 #endif

Generated on Sat Jun 28 22:02:16 2008 for ReplicaNet and RNLobby by  doxygen 1.5.3