9 #ifndef IMPBASE_OBJECT_MACROS_H
10 #define IMPBASE_OBJECT_MACROS_H
11 #include <IMP/base/base_config.h>
25 #define IMP_OBJECT_METHODS(Name) \
27 virtual std::string get_type_name() const IMP_OVERRIDE { return #Name; } \
28 virtual ::IMP::base::VersionInfo get_version_info() const IMP_OVERRIDE { \
29 return ::IMP::base::VersionInfo(get_module_name(), get_module_version()); \
33 virtual ~Name() { IMP::base::Object::_on_destruction(); } \
38 #define IMP_OBJECT_NO_WARNING(Name) \
40 virtual std::string get_type_name() const IMP_OVERRIDE { return #Name; } \
41 virtual ::IMP::base::VersionInfo get_version_info() const IMP_OVERRIDE { \
42 return ::IMP::base::VersionInfo(get_module_name(), get_module_version()); \
44 void do_show(std::ostream &out) const; \
45 IMP_REF_COUNTED_INLINE_DESTRUCTOR(Name, IMP::base::Object::_on_destruction();)
52 #define IMP_OBJECTS(Name, PluralName) \
54 typedef IMP::base::Vector<IMP::base::Pointer<Name> > PluralName; \
56 typedef IMP::base::Vector<IMP::base::WeakPointer<Name> > PluralName##Temp;
58 #define IMP_GENERIC_OBJECT(Name, lcname, targument, carguments, cparguments) \
59 typedef Generic##Name<targument> Name; \
60 template <class targument> \
61 Generic##Name<targument> *create_##lcname carguments { \
62 return new Generic##Name<targument> cparguments; \
72 #define IMP_NEW(Typename, varname, args) \
73 IMP::base::Pointer<Typename> varname(new Typename args)
Various general useful macros for IMP.
Logging and error reporting support.
Various general useful macros for IMP.
A nullptr-initialized pointer to an Object.
A class for storing lists of IMP items.
A nullptr-initialized pointer to an IMP Object.