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

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

Classes

struct  destructor
 

Functions

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.

Function Documentation

std::list<std::ostream*>* ns3::FatalImpl::anonymous_namespace{fatal-impl.cc}::GetStreamList ( void  )

Definition at line 57 of file fatal-impl.cc.

References NS_LOG_FUNCTION_NOARGS, and PeekStreamList().

Referenced by ns3::FatalImpl::RegisterStream().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::list<std::ostream*>** ns3::FatalImpl::anonymous_namespace{fatal-impl.cc}::PeekStreamList ( void  )
void ns3::FatalImpl::anonymous_namespace{fatal-impl.cc}::sigHandler ( int  sig)

Definition at line 107 of file fatal-impl.cc.

References ns3::FatalImpl::FlushStreams(), and NS_LOG_FUNCTION.

Referenced by ns3::FatalImpl::FlushStreams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: