9 #ifndef IMPBASE_REF_COUNTED_MACROS_H
10 #define IMPBASE_REF_COUNTED_MACROS_H
11 #include <IMP/base/base_config.h>
16 #define IMP_REF_COUNTED_DESTRUCTOR(Name) \
19 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
21 #define IMP_REF_COUNTED_INLINE_DESTRUCTOR(Name, dest) \
23 virtual ~Name() { dest } \
24 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
26 #define IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR(Name) \
32 #define IMP_REF_COUNTED_DESTRUCTOR(Name) \
35 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
37 #define IMP_REF_COUNTED_INLINE_DESTRUCTOR(Name, dest) \
39 virtual ~Name() { dest } \
40 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
42 #define IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR(Name) \
46 #elif defined(IMP_DOXYGEN)
61 #define IMP_REF_COUNTED_DESTRUCTOR(Name)
66 #define IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR(Name)
71 #define IMP_REF_COUNTED_NONTRIVIAL_VIRTUAL_DESTRUCTOR(Name)
76 #define IMP_REF_COUNTED_INLINE_DESTRUCTOR(Name, destructor)
79 #define IMP_REF_COUNTED_DESTRUCTOR(Name) \
81 template <class T, class E> \
82 friend struct IMP::base::internal::RefStuff; \
86 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
88 #define IMP_REF_COUNTED_INLINE_DESTRUCTOR(Name, dest) \
90 template <class T, class E> \
91 friend struct IMP::base::internal::RefStuff; \
92 virtual ~Name() { dest } \
95 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
97 #define IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR(Name) \
99 template <class T, class E> \
100 friend struct IMP::base::internal::RefStuff; \
104 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
106 #define IMP_REF_COUNTED_NONTRIVIAL_VIRTUAL_DESTRUCTOR(Name) \
108 template <class T, class E> \
109 friend struct IMP::base::internal::RefStuff; \
113 IMP_REQUIRE_SEMICOLON_CLASS(destructor)
Various general useful macros for IMP.