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 652 of file remake.cpp.

Constructor & Destructor Documentation

log::log ( )
inline

Definition at line 656 of file remake.cpp.

656  : active(false), open(false), depth(0)
657  {
658  }

Member Function Documentation

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

Definition at line 659 of file remake.cpp.

660  {
661  if (open) std::cerr << std::endl;
662  assert(depth >= 0);
663  std::cerr << std::string(depth * 2, ' ');
664  open = false;
665  return std::cerr;
666  }
std::ostream& log::operator() ( bool  o)
inline

Definition at line 667 of file remake.cpp.

668  {
669  if (o && open) std::cerr << std::endl;
670  if (!o) --depth;
671  assert(depth >= 0);
672  if (o || !open) std::cerr << std::string(depth * 2, ' ');
673  if (o) ++depth;
674  open = o;
675  return std::cerr;
676  }

Member Data Documentation

bool log::active

Definition at line 654 of file remake.cpp.

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

int log::depth

Definition at line 655 of file remake.cpp.

Referenced by operator()().

bool log::open

Definition at line 654 of file remake.cpp.

Referenced by operator()().


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