ML Reference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00009 //---------------------------------------------------------------------------------- 00010 00011 #ifndef __mlMacros_H 00012 #define __mlMacros_H 00013 00017 #define ML_DISALLOW_COPY_AND_ASSIGN(className) \ 00018 private: \ 00019 className(const className&); \ 00020 void operator=(const className &); 00021 00022 00023 #if (defined(UNIX) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))) 00024 #define _ML_DECL_DEPRECATED __attribute__ ((__deprecated__)) 00025 #elif defined(WIN32) && (_MSC_VER >= 1300) 00026 #define _ML_DECL_DEPRECATED __declspec(deprecated("This ML method/class has been deprecated.")) 00027 #else 00028 #define _ML_DECL_DEPRECATED 00029 #endif 00030 00031 #ifndef ML_DISABLE_DEPRECATED 00032 #undef ML_DEPRECATED_CONSTRUCTOR 00033 #undef ML_DEPRECATED 00034 // If the deprecated API is turned on, defining ML_WARN_DEPRECATED turns compile-time usage warnings on. 00035 #ifdef ML_WARN_DEPRECATED 00036 #define ML_DEPRECATED_CONSTRUCTOR _ML_DECL_DEPRECATED 00037 #define ML_DEPRECATED _ML_DECL_DEPRECATED 00038 #else 00039 #define ML_DEPRECATED_CONSTRUCTOR 00040 #define ML_DEPRECATED 00041 #endif 00042 #else 00043 // Defining ML_DISABLE_DEPRECATED hides the deprecated API completely. 00044 // If no deprecated API is enabled, these macros are not defined: 00045 #undef ML_DEPRECATED_CONSTRUCTOR 00046 #undef ML_DEPRECATED 00047 #endif 00048 00053 #define ML_FRIEND_TEST(test_case_name, test_name) \ 00054 friend class test_case_name##_##test_name##_Test 00055 00056 00062 #if defined(WIN32) 00063 00064 #define ML_UNIX_ONLY_EXPORT(A) 00065 #else 00066 00067 #define ML_UNIX_ONLY_EXPORT(A) A 00068 #endif 00069 00070 00071 #endif // __mlMacros_H 00072 00073