rutz::backtrace Class Reference

Represents an instantaneous state of the call stack. More...

#include <rutz/backtrace.h>

Collaboration diagram for rutz::backtrace:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 backtrace () throw ()
 Default construct an empty call stack.
 backtrace (const backtrace &other) throw ()
 Copy constructor.
backtraceoperator= (const backtrace &other) throw ()
 Assignment operator.
 ~backtrace () throw ()
 Destructor.
bool push (rutz::prof *p) throw ()
 Push a new element onto the call stack. Returns true if successful.
void pop () throw ()
 Pop the most recent element off of the call stack.
unsigned int size () const throw ()
 Get the number of elements in the call stack.
rutz::proftop () const throw ()
 Get the top stack frame, or null if the backtrace is empty.
rutz::profat (unsigned int i) const throw ()
 Will return a null pointer if i is out of range.
rutz::profoperator[] (unsigned int i) const throw ()
 Shorthand for at(i).
void print () const throw ()
 Print the call stack on stderr.
void print (std::ostream &os) const throw ()
 Print the call stack to the given stream.

Static Public Member Functions

static backtracecurrent () throw ()
 Access the current call stack.

Detailed Description

Represents an instantaneous state of the call stack.

Definition at line 49 of file backtrace.h.


Constructor & Destructor Documentation

rutz::backtrace::backtrace (  )  throw ()

Default construct an empty call stack.

Definition at line 70 of file backtrace.cc.

rutz::backtrace::backtrace ( const backtrace other  )  throw ()

Copy constructor.

Definition at line 74 of file backtrace.cc.

rutz::backtrace::~backtrace (  )  throw ()

Destructor.

Definition at line 84 of file backtrace.cc.


Member Function Documentation

rutz::prof * rutz::backtrace::at ( unsigned int  i  )  const throw ()

Will return a null pointer if i is out of range.

Definition at line 134 of file backtrace.cc.

Referenced by operator[]().

rutz::backtrace & rutz::backtrace::current (  )  throw () [static]

Access the current call stack.

Definition at line 87 of file backtrace.cc.

References GVX_ABORT.

Referenced by rutz::trace::~trace().

rutz::backtrace & rutz::backtrace::operator= ( const backtrace other  )  throw ()

Assignment operator.

Definition at line 78 of file backtrace.cc.

rutz::prof* rutz::backtrace::operator[] ( unsigned int  i  )  const throw () [inline]

Shorthand for at(i).

Definition at line 83 of file backtrace.h.

References at().

void rutz::backtrace::pop ( void   )  throw ()

Pop the most recent element off of the call stack.

Definition at line 119 of file backtrace.cc.

Referenced by rutz::trace::~trace().

void rutz::backtrace::print ( std::ostream &  os  )  const throw ()

Print the call stack to the given stream.

Definition at line 158 of file backtrace.cc.

void rutz::backtrace::print (  )  const throw ()

Print the call stack on stderr.

Definition at line 139 of file backtrace.cc.

References size().

Referenced by rutz::error::error().

bool rutz::backtrace::push ( rutz::prof p  )  throw ()

Push a new element onto the call stack. Returns true if successful.

Definition at line 114 of file backtrace.cc.

unsigned int rutz::backtrace::size (  )  const throw ()

Get the number of elements in the call stack.

Definition at line 124 of file backtrace.cc.

Referenced by rutz::format(), and print().

rutz::prof * rutz::backtrace::top (  )  const throw ()

Get the top stack frame, or null if the backtrace is empty.

Definition at line 129 of file backtrace.cc.

Referenced by rutz::trace::~trace().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:44:43 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3