A Discrete-Event Network Simulator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::FatalImpl::anonymous_namespace{fatal-impl.cc} Namespace Reference


struct  destructor


std::list< std::ostream * > * GetStreamList (void)
std::list< std::ostream * > ** PeekStreamList (void)
void sigHandler (int sig)

Detailed Description

Note on implementation: the singleton pattern we use here is tricky because it has to deal with:

  • make sure that whoever calls Register (potentially before main enters and before any constructor run in this file) succeeds
  • make sure that whoever calls Unregister (potentially before FlushStream runs but also after it runs) succeeds
  • make sure that the memory allocated with new is deallocated with delete before the program exits so that valgrind reports no leaks

This is why we go through all the painful hoops below.