IMP  2.2.1
The Integrative Modeling Platform
IMP::base::CreateLogContext Class Reference

Create a new log context. More...

#include <IMP/base/CreateLogContext.h>

+ Inheritance diagram for IMP::base::CreateLogContext:

Public Member Functions

 CreateLogContext (std::string fname, const Object *object=nullptr)
 
 CreateLogContext (const char *fname, const Object *object=nullptr)
 
void reset ()
 
void set (const char *fname, const Object *object=nullptr)
 
void show (std::ostream &out=std::cout) const
 

Detailed Description

The following produces

    myfunction:
       1
       2
       3
{
CreateLogContext ii("myfunction ");
}
IMP_LOG_VERBOSE( "Now it is has ended." << std::endl);

The more interesting use is that you can use it before calling a function to ensure that all the output of that function is nicely offset.

Definition at line 48 of file base/CreateLogContext.h.

Constructor & Destructor Documentation

IMP::base::CreateLogContext::CreateLogContext ( const char *  fname,
const Object object = nullptr 
)
explicit

explicit constructor that sets the properties of CreateLogContext

Definition at line 71 of file base/CreateLogContext.h.

Member Function Documentation

void IMP::base::CreateLogContext::reset ( )

resets the properties previously set for this class

Definition at line 71 of file base/CreateLogContext.h.

void IMP::base::CreateLogContext::set ( const char *  fname,
const Object object = nullptr 
)

sets the properties of the class to new ones

Definition at line 71 of file base/CreateLogContext.h.


The documentation for this class was generated from the following file: