9 #ifndef IMPKERNEL_CREATE_LOG_CONTEXT_H 
   10 #define IMPKERNEL_CREATE_LOG_CONTEXT_H 
   12 #include <IMP/kernel_config.h> 
   16 #if IMP_KERNEL_HAS_LOG4CXX 
   17 #include <log4cxx/ndc.h> 
   18 #include <boost/scoped_ptr.hpp> 
   21 IMPKERNEL_BEGIN_NAMESPACE
 
   48 #if IMP_KERNEL_HAS_LOG4CXX 
   50   boost::scoped_ptr<log4cxx::NDC> ndc1_;
 
   54       : ndc0_(object->get_quoted_name_c_string()),
 
   55         ndc1_(
new log4cxx::NDC(fname)) {}
 
   65       : pushed_(
true), name_(fname) {
 
   67     push_log_context(name_.c_str(), object);
 
   70            (
const char* fname, 
const Object* 
object = 
nullptr), ,
 
   71            { push_log_context(fname, 
object);
 
   73            { 
if (pushed_) pop_log_context();
 
   74              pushed_ = 
false; }, );
 
   80 IMPKERNEL_END_NAMESPACE
 
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed. 
 
Temporarily change something; undo the change when this object is destroyed. 
 
#define IMP_RAII(Name, args, Initialize, Set, Reset, Show)
Declares RAII-style methods in a class. 
 
Common base class for heavy weight IMP objects. 
 
#define IMP_UNUSED(variable)
 
A shared base class to help in debugging and things. 
 
Logging and error reporting support. 
 
Create a new log context. 
 
Macros to aid in writing RAII-style classes.