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

Constructor & Destructor Documentation

log::log ( )
inline

Definition at line 756 of file remake.cpp.

756  : active(false), open(false), depth(0)
757  {
758  }

Member Function Documentation

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

Definition at line 759 of file remake.cpp.

760  {
761  if (open) std::cerr << std::endl;
762  assert(depth >= 0);
763  std::cerr << std::string(depth * 2, ' ');
764  open = false;
765  return std::cerr;
766  }
std::ostream& log::operator() ( bool  o)
inline

Definition at line 767 of file remake.cpp.

768  {
769  if (o && open) std::cerr << std::endl;
770  if (!o) --depth;
771  assert(depth >= 0);
772  if (o || !open) std::cerr << std::string(depth * 2, ' ');
773  if (o) ++depth;
774  open = o;
775  return std::cerr;
776  }

Member Data Documentation

bool log::active

Definition at line 754 of file remake.cpp.

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

int log::depth

Definition at line 755 of file remake.cpp.

Referenced by operator()().

bool log::open

Definition at line 754 of file remake.cpp.

Referenced by operator()().


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