9 #ifndef IMPBASE_UTILITY_MACROS_H
10 #define IMPBASE_UTILITY_MACROS_H
11 #include <IMP/base/base_config.h>
25 #define IMP_COPY_CONSTRUCTOR(Name, Base) \
26 Name(const Name& o) : Base() { copy_from(o); } \
27 IMP_NO_SWIG(Name& operator=(const Name& o) { \
30 }) IMP_REQUIRE_SEMICOLON_CLASS(copy)
33 #define IMP_PROTECTED_METHOD_DECL(protection, return_value, name, arguments, \
35 IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this."); \
37 return_value name arguments const_or_not body
40 #define IMP_PROTECTED_CONSTRUCTOR_DECL(protection, Name, arguments, body) \
45 #define IMP_PROTECTED_DESTRUCTOR_DECL(protection, Name, arguments, body) \
47 virtual ~Name arguments body
51 #define IMP_PROTECTED_METHOD(return_value, name, arguments, const_or_not, \
53 IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
54 IMP_PROTECTED_METHOD_DECL(protected, return_value, name, arguments, \
58 #define IMP_PROTECTED_CONSTRUCTOR(Name, arguments, body) \
59 IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
60 IMP_PROTECTED_CONSTRUCTOR_DECL(protected, Name, arguments, body)
63 #define IMP_PROTECTED_DESTRUCTOR(Name, arguments, body) \
64 IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
65 IMP_PROTECTED_DESTRUCTOR_DECL(protected, Name, arguments, body)
69 #define IMP_INTERNAL_METHOD(return_value, name, arguments, const_or_not, body) \
70 IMPBASE_DEPRECATED_MACRO(2.1, "Don't use this"); \
73 return_value name arguments const_or_not body
77 #define IMP_INTERNAL_METHOD(return_value, name, arguments, const_or_not, body)
81 #define IMP_PROTECTED_METHOD(return_value, name, arguments, const_or_not, \
83 % rename(_##name) name; \
84 IMP_PROTECTED_METHOD_DECL(public, return_value, name, arguments, \
87 #define IMP_INTERNAL_METHOD(return_value, name, arguments, const_or_not, body)
89 #define IMP_PROTECTED_CONSTRUCTOR(Name, arguments, body) \
90 IMP_PROTECTED_CONSTRUCTOR_DECL(public, Name, arguments, body)
92 #define IMP_PROTECTED_DESTRUCTOR(Name, arguments, body) \
93 IMP_PROTECTED_DESTRUCTOR_DECL(public, Name, arguments, body)
97 #define IMP_EXPAND_AND_STRINGIFY(x) IMP_STRINGIFY(x)
Control display of deprecation information.