9 #ifndef IMPBASE_OBJECT_CAST_H
10 #define IMPBASE_OBJECT_CAST_H
12 #include <IMP/base/base_config.h>
16 IMPBASE_BEGIN_NAMESPACE
25 O *ret =
dynamic_cast<O *
>(o);
30 IMP_THROW(
"Object " << o->get_name() <<
" cannot be cast to "
O * object_cast(Object *o)
Common base class for heavy weight IMP objects.
#define IMP_THROW(message, exception_name)
Throw an exception with a message.
Exception definitions and assertions.
A shared base class to help in debugging and things.
An exception for an invalid value being passed to IMP.