Platform.h

Go to the documentation of this file.
00001 #ifndef VERVE_PORTABILITY_H
00002 #define VERVE_PORTABILITY_H
00003 
00004 // General DLL interface notes: 
00005 // 
00006 // In general we can make each member function virtual to avoid exporting 
00007 // each one explicitly (instantiating an object through a factory function 
00008 // is all that is necessary to access the object's functions).  In the 
00009 // Verve DLL we export every member function explicitly to allow us to 
00010 // staticly allocate objects (mainly for the unit tests).  In most 
00011 // applications, developers will only interact with the Agent and 
00012 // Observation classes.  Agents are the only object that can be dynamically 
00013 // allocated, which occurs indirectly through a factory function.
00014 
00015 // Use the standard calling convention for Windows DLLs.
00016 #ifndef VERVE_CALL
00017         #if defined(WIN32) || defined(_WIN32)
00018                 #define VERVE_CALL __stdcall
00019         #else
00020                 #define VERVE_CALL
00021         #endif
00022 #endif
00023 
00024 // DLL import/export macro.
00025 #ifndef VERVE_DECL
00026         #if defined(WIN32) || defined(_WIN32)
00027                 // VERVE_DLL_EXPORTING should only be defined when building the 
00028                 // Verve library.
00029                 #ifdef VERVE_DLL_EXPORTING
00030                         #define VERVE_DECL __declspec(dllexport)
00031                 #else
00032                         #define VERVE_DECL __declspec(dllimport)
00033                 #endif
00034         #else
00035                 #define VERVE_DECL
00036         #endif
00037 #endif
00038 
00043 //#define VERVE_EXPORT_FUNCTION(returnType) extern "C" VERVE_DECL returnType VERVE_CALL
00044 #define VERVE_EXPORT_FUNCTION extern "C" VERVE_DECL
00045 
00046 #endif

Generated on Tue Jan 24 21:46:37 2006 for Verve by  doxygen 1.4.6-NO