SUMO - Simulation of Urban MObility
debug_new_recorder Class Reference

#include <debug_new.h>

Collaboration diagram for debug_new_recorder:
Collaboration graph

Public Member Functions

 debug_new_recorder (const char *file, int line)
 
template<class _Tp >
_Tp * operator->* (_Tp *ptr)
 

Private Member Functions

void _M_process (void *ptr)
 
 debug_new_recorder (const debug_new_recorder &)
 
debug_new_recorderoperator= (const debug_new_recorder &)
 

Private Attributes

const char * _M_file
 
const int _M_line
 

Detailed Description

Recorder class to remember the call context.

The idea comes from Greg Herlihy's post in comp.lang.c++.moderated.

Definition at line 138 of file debug_new.h.

Constructor & Destructor Documentation

debug_new_recorder::debug_new_recorder ( const char *  file,
int  line 
)
inline

Constructor to remember the call context. The information will be used in debug_new_recorder::operator->*.

Definition at line 148 of file debug_new.h.

Referenced by operator->*().

debug_new_recorder::debug_new_recorder ( const debug_new_recorder )
private

Member Function Documentation

void debug_new_recorder::_M_process ( void *  ptr)
private

Referenced by operator->*().

template<class _Tp >
_Tp* debug_new_recorder::operator->* ( _Tp *  ptr)
inline

Operator to write the context information to memory. operator->* is chosen because it has the right precedence, it is rarely used, and it looks good: so people can tell the special usage more quickly.

Definition at line 156 of file debug_new.h.

References _M_process(), debug_new_recorder(), and operator=().

debug_new_recorder& debug_new_recorder::operator= ( const debug_new_recorder )
private

Referenced by operator->*().

Field Documentation

const char* debug_new_recorder::_M_file
private

Definition at line 140 of file debug_new.h.

const int debug_new_recorder::_M_line
private

Definition at line 141 of file debug_new.h.


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