Remake
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
log Struct Reference

Public Member Functions

 log ()
 
std::ostream & operator() ()
 
std::ostream & operator() (bool o)
 

Public Attributes

bool active
 
bool open
 
int depth
 

Detailed Description

Definition at line 678 of file remake.cpp.

Constructor & Destructor Documentation

log::log ( )
inline

Definition at line 682 of file remake.cpp.

682  : active(false), open(false), depth(0)
683  {
684  }

Member Function Documentation

std::ostream& log::operator() ( )
inline

Definition at line 685 of file remake.cpp.

686  {
687  if (open) std::cerr << std::endl;
688  assert(depth >= 0);
689  std::cerr << std::string(depth * 2, ' ');
690  open = false;
691  return std::cerr;
692  }
std::ostream& log::operator() ( bool  o)
inline

Definition at line 693 of file remake.cpp.

694  {
695  if (o && open) std::cerr << std::endl;
696  if (!o) --depth;
697  assert(depth >= 0);
698  if (o || !open) std::cerr << std::string(depth * 2, ' ');
699  if (o) ++depth;
700  open = o;
701  return std::cerr;
702  }

Member Data Documentation

bool log::active

Definition at line 680 of file remake.cpp.

Referenced by main(), and log_auto_close::~log_auto_close().

int log::depth

Definition at line 681 of file remake.cpp.

Referenced by operator()().

bool log::open

Definition at line 680 of file remake.cpp.

Referenced by operator()().


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