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

Constructor & Destructor Documentation

log::log ( )
inline

Definition at line 683 of file remake.cpp.

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

Member Function Documentation

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

Definition at line 686 of file remake.cpp.

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

Definition at line 694 of file remake.cpp.

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

Member Data Documentation

bool log::active

Definition at line 681 of file remake.cpp.

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

int log::depth

Definition at line 682 of file remake.cpp.

Referenced by operator()().

bool log::open

Definition at line 681 of file remake.cpp.

Referenced by operator()().


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