Remake
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros 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 595 of file remake.cpp.

Constructor & Destructor Documentation

log::log ( )
inline

Definition at line 599 of file remake.cpp.

599  : active(false), open(false), depth(0)
600  {
601  }

Member Function Documentation

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

Definition at line 602 of file remake.cpp.

603  {
604  if (open) std::cerr << std::endl;
605  assert(depth >= 0);
606  std::cerr << std::string(depth * 2, ' ');
607  open = false;
608  return std::cerr;
609  }
std::ostream& log::operator() ( bool  o)
inline

Definition at line 610 of file remake.cpp.

611  {
612  if (o && open) std::cerr << std::endl;
613  if (!o) --depth;
614  assert(depth >= 0);
615  if (o || !open) std::cerr << std::string(depth * 2, ' ');
616  if (o) ++depth;
617  open = o;
618  return std::cerr;
619  }

Member Data Documentation

bool log::active

Definition at line 597 of file remake.cpp.

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

int log::depth

Definition at line 598 of file remake.cpp.

Referenced by operator()().

bool log::open

Definition at line 597 of file remake.cpp.

Referenced by operator()().


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