9 #ifndef IMPBASE_DEPRECATION_MACROS_H
10 #define IMPBASE_DEPRECATION_MACROS_H
12 #include <IMP/base/base_config.h>
17 #define IMP_DEPRECATED_MACRO(version, help_message) \
18 IMP_PRAGMA(message("This macro is deprecated as of IMP " #version \
23 #define IMP_DEPRECATED_OBJECT_RUNTIME_WARNING(version, help_message) \
25 std::ostringstream oss; \
26 oss << "Object " << get_module_name() << "::" << get_type_name() \
27 << " is deprecated. " << help_message << std::endl; \
28 IMP::base::handle_use_deprecated(oss.str()); \
33 #define IMP_DEPRECATED_VALUE_RUNTIME_WARNING(version, help_message) \
35 std::ostringstream oss; \
36 oss << "Class " << get_module_name() << "::" << IMP_CURRENT_FUNCTION \
37 << " is deprecated. " << help_message << std::endl; \
38 IMP::base::handle_use_deprecated(oss.str()); \
43 #define IMP_DEPRECATED_FUNCTION_RUNTIME_WARNING(version, help_message) \
45 std::ostringstream oss; \
46 oss << "Function " << IMP_CURRENT_PRETTY_FUNCTION << " is deprecated. " \
47 << help_message << std::endl; \
48 IMP::base::handle_use_deprecated(oss.str()); \
53 #define IMP_DEPRECATED_METHOD_RUNTIME_WARNING(version, help_message) \
55 std::ostringstream oss; \
56 oss << "Method " << IMP_CURRENT_PRETTY_FUNCTION << " is deprecated. " \
57 << "WARNING: " << help_message << std::endl; \
58 IMP::base::handle_use_deprecated(oss.str()); \
61 #define IMP_DEPRECATED_FUNCTION_DEF(version, message)
Control display of deprecation information.