macros.hpp
Go to the documentation of this file.
00001 
00010 /*****************************************************************************
00011 ** Ifdefs
00012 *****************************************************************************/
00013 
00014 #ifndef ECL_ERRORS_MACROS_HPP_
00015 #define ECL_ERRORS_MACROS_HPP_
00016 
00017 /*****************************************************************************
00018 ** Includes
00019 *****************************************************************************/
00020 
00021 #include <ecl/config/macros.hpp>
00022 
00023 /*****************************************************************************
00024 ** PreProcessing
00025 *****************************************************************************/
00026 /*
00027  * Import/exports symbols for the library
00028  */
00029 #ifdef ECL_HAS_SHARED_LIBS // ecl is being built around shared libraries
00030   #ifdef ecl_errors_EXPORTS // we are building a shared lib/dll
00031     #define ecl_errors_PUBLIC ECL_HELPER_EXPORT
00032   #else // we are using shared lib/dll
00033     #define ecl_errors_PUBLIC ECL_HELPER_IMPORT
00034   #endif
00035   #define ecl_errors_LOCAL ECL_HELPERS_LOCAL
00036 #else // ecl is being built around static libraries
00037   #define ecl_errors_PUBLIC
00038   #define ecl_errors_LOCAL
00039 #endif
00040 
00041 /*
00042  * Convert a variable name to a string.
00043  */
00044 #define STRINGIFY(x) #x
00045 #define TOSTRING(x)  STRINGIFY(x)
00046 
00047 /*
00048  * Joints two arguments together.
00049  * The following piece of macro magic joins the two
00050  * arguments together, even when one of the arguments is
00051  * itself a macro (see 16.3.1 in C++ standard).  The key
00052  * is that macro expansion of macro arguments does not
00053  * occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
00054  */
00055 #define JOIN( X, Y ) DO_JOIN( X, Y )
00056 #define DO_JOIN( X, Y ) DO_JOIN2(X,Y)
00057 #define DO_JOIN2( X, Y ) X##Y
00058 
00067 #define LOC __FILE__ ":" TOSTRING(__LINE__) " "
00068 
00069 
00070 #endif /* ECL_ERRORS_MACROS_HPP_*/


ecl_errors
Author(s): Daniel Stonier
autogenerated on Thu Jun 16 2016 09:47:14