export.hpp

Go to the documentation of this file.
00001 #ifndef s11n_net_S11N_EXPORT_HPP_INCLUDED
00002 #define s11n_net_S11N_EXPORT_HPP_INCLUDED
00003 /**********************************************************************
00004 This file defines some macros for "exporting" symbols when the code is
00005 compiled as a shared library (DLL). Windows platforms, and possibly
00006 others, need to be told exactly what symbols are to be exported.
00007 
00008 S11N_EXPORT_API should be used when declaring a class which needs to be
00009 visible from outside the DLL:
00010 
00011   class S11N_EXPORT_API my_class { ... };
00012 
00013 Free functions:
00014 
00015   S11N_EXPORT_API int my_func() { ... }
00016 
00017 
00018 **********************************************************************/
00019 #ifdef WIN32
00020 // #warning "Exporting Windows-style!"
00021  #  ifdef S11N_EXPORTS
00022 #    define S11N_EXPORT_API __declspec(dllexport)
00023  #  else
00024  #    define S11N_EXPORT_API __declspec(dllimport)
00025  #  endif
00026 #else
00027 #    define S11N_EXPORT_API
00028 #endif
00029 
00030 //#endif // s11n_net_S11N_EXPORT_HPP_INCLUDED
00031 
00032 /*
00033 #ifdef S11NEXPORT
00034 # undef S11NEXPORTAPI
00035 # ifndef S11NEXPORTAPI
00036 #  if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00037 #    if defined(STATIC_LINKED)
00038 #      define S11NEXPORTAPI
00039 #    else
00040 #      define S11NEXPORTAPI __declspec(dllexport)
00041 #    endif
00042 #  else
00043 #    if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
00044 #      define S11NEXPORTAPI __attribute__ ((visibility("default")))
00045 #    else
00046 #      define S11NEXPORTAPI
00047 #    endif
00048 #  endif
00049 # endif
00050 #else 
00051 # ifndef S11NEXPORTAPI
00052 #  if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
00053 #    if defined(STATIC_LINKED)
00054 #      define S11NEXPORTAPI
00055 #    else
00056 #      define S11NEXPORTAPI __declspec(dllimport)
00057 #    endif
00058 #  else
00059 #    if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
00060 #      define S11NEXPORTAPI __attribute__ ((visibility("default")))
00061 #    else
00062 #      define S11NEXPORTAPI
00063 #    endif
00064 #  endif
00065 # endif
00066 #endif
00067 */
00068 #endif
00069 

Generated on Sat Mar 20 12:29:24 2010 for libs11n-1.2.10 by  doxygen 1.6.1