9 #ifndef IMPKERNEL_OBJECT_CAST_H
10 #define IMPKERNEL_OBJECT_CAST_H
12 #include <IMP/kernel_config.h>
16 IMPKERNEL_BEGIN_NAMESPACE
25 O *ret =
dynamic_cast<O *
>(o);
30 IMP_THROW(
"Object " << o->get_name() <<
" cannot be cast to "
38 IMPKERNEL_END_NAMESPACE
Common base class for heavy weight IMP objects.
O * object_cast(Object *o)
#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.