zypp::debug::TraceCAD< _Tp > Struct Template Reference
[Tracer]

A simple tracer. More...

#include <Debug.h>

Inheritance diagram for zypp::debug::TraceCAD< _Tp >:

zypp::base::ProvideNumericId< TraceCAD< _Tp >, unsigned long > zypp::debug::TraceCADBase List of all members.

Public Member Functions

 TraceCAD ()
 TraceCAD (const TraceCAD &rhs)
TraceCADoperator= (const TraceCAD &rhs)
virtual ~TraceCAD ()
void _PING () const

Static Public Member Functions

static unsigned long & _totalTraceCAD ()

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const TraceCAD< _Tp > &obj)

Detailed Description

template<class _Tp>
struct zypp::debug::TraceCAD< _Tp >

A simple tracer.

To trace class Foo, derive public from TraceCAD<Foo>. This tracer simply calls traceCAD in each traced method, and traceCAD simply drops a line in the log.

This tracer logs construction, copy construction, assignment, destruction and _PING.

assignment: In case the traced class defines an operator= it must be altered to call TraceCAD::operator=, otherwise it won't be triggered.

_PING: Completely up to you. Call _PING somewhere in the traced class to indicate something. In case you overload traceCAD, do whatever is appropriate on _PING. It's just an offer to perform logging or actions here, and not in the traced code.

But traceCAD may be overloaded to produce more stats.

See also:
Example.COW_debug.cc.

Definition at line 107 of file Debug.h.


Constructor & Destructor Documentation

template<class _Tp>
zypp::debug::TraceCAD< _Tp >::TraceCAD  )  [inline]
 

Definition at line 114 of file Debug.h.

References zypp::debug::TraceCADBase::_ident, zypp::debug::TraceCAD< _Tp >::_totalTraceCAD(), zypp::debug::TraceCADBase::CTOR, and zypp::debug::traceCAD().

template<class _Tp>
zypp::debug::TraceCAD< _Tp >::TraceCAD const TraceCAD< _Tp > &  rhs  )  [inline]
 

Definition at line 119 of file Debug.h.

References zypp::debug::TraceCAD< _Tp >::_totalTraceCAD(), zypp::debug::TraceCADBase::COPYCTOR, and zypp::debug::traceCAD().

template<class _Tp>
virtual zypp::debug::TraceCAD< _Tp >::~TraceCAD  )  [inline, virtual]
 

Definition at line 126 of file Debug.h.

References zypp::debug::TraceCAD< _Tp >::_totalTraceCAD(), zypp::debug::TraceCADBase::DTOR, and zypp::debug::traceCAD().


Member Function Documentation

template<class _Tp>
static unsigned long& zypp::debug::TraceCAD< _Tp >::_totalTraceCAD  )  [inline, static]
 

Definition at line 110 of file Debug.h.

Referenced by zypp::debug::TraceCAD< _Tp >::TraceCAD(), and zypp::debug::TraceCAD< _Tp >::~TraceCAD().

template<class _Tp>
TraceCAD& zypp::debug::TraceCAD< _Tp >::operator= const TraceCAD< _Tp > &  rhs  )  [inline]
 

Definition at line 123 of file Debug.h.

References zypp::debug::TraceCADBase::ASSIGN, and zypp::debug::traceCAD().

template<class _Tp>
void zypp::debug::TraceCAD< _Tp >::_PING  )  const [inline]
 

Definition at line 130 of file Debug.h.

References zypp::debug::TraceCADBase::PING, and zypp::debug::traceCAD().


The documentation for this struct was generated from the following file:
Generated on Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6