9 #ifndef IMPKERNEL_OBJECT_MACROS_H
10 #define IMPKERNEL_OBJECT_MACROS_H
11 #include <IMP/kernel_config.h>
25 #define IMP_OBJECT_METHODS(Name) \
27 virtual std::string get_type_name() const IMP_OVERRIDE { return #Name; } \
28 virtual ::IMP::VersionInfo get_version_info() const IMP_OVERRIDE { \
29 return ::IMP::VersionInfo(get_module_name(), get_module_version()); \
33 virtual ~Name() { IMP::Object::_on_destruction(); } \
44 #define IMP_OBJECTS(Name, PluralName) \
46 typedef IMP::Vector<IMP::Pointer<Name> > PluralName; \
48 typedef IMP::Vector<IMP::WeakPointer<Name> > PluralName##Temp;
50 #define IMP_GENERIC_OBJECT(Name, lcname, targument, carguments, cparguments) \
51 typedef Generic##Name<targument> Name; \
52 template <class targument> \
53 Generic##Name<targument> *create_##lcname carguments { \
54 return new Generic##Name<targument> cparguments; \
64 #define IMP_NEW(Typename, varname, args) \
65 IMP::Pointer<Typename> varname(new Typename args)
Macros to help with reference counting.
A class to change and restore log state.
Helper macros for writing doxygen documentation.
A weak pointer to an Object or RefCountedObject.
A class for storing lists of IMP items.
A nullptr-initialized pointer to an IMP Object.