Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::lcore::Debugable Class Reference

Interface class for things that have certain common debugging functions. More...

#include <LCore/Debugable.h>

Inheritance diagram for strmod::lcore::Debugable:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual int AreYouA (const lcore::ClassIdent &cid) const
 Asks if a class is of a particular type, or publicly derived from that type.

virtual bool invariant () const=0
 This should ALWAYS return true. It says whether the class invariant holds or not.

virtual void printState (::std::ostream &os) const=0
 This should print out as much of the internal state of a class as would be needed to debug it properly.


Static Public Attributes

const LCore_ClassIdent identifier
 Globally unique identifier for this class.


Protected Methods

virtual const ClassIdent * i_GetIdent () const
 Returns the class identifier for the class the object actually is.


Detailed Description

Interface class for things that have certain common debugging functions.

You'll probable need to use a dynamic_cast to use this interface in a generic way in most cases.

Definition at line 41 of file Debugable.h.


Member Function Documentation

virtual int strmod::lcore::Debugable::AreYouA const lcore::ClassIdent &    cid const [inline, virtual]
 

Asks if a class is of a particular type, or publicly derived from that type.

Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.

Parameters:
cid Usually <class>::identifier for the class you want to ask if the object is an instance of.

Reimplemented from strmod::lcore::Protocol.

Reimplemented in strmod::unievent::TimerEventTracker, strmod::unievent::UnixEventPoll, strmod::strmod::BufferChunk, strmod::strmod::DynamicBuffer, and strmod::strmod::PreAllocBufferBase.

virtual const ClassIdent* strmod::lcore::Debugable::i_GetIdent   const [inline, protected, virtual]
 

Returns the class identifier for the class the object actually is.

Should always be overridden in any class that has a static identifier member.

Reimplemented from strmod::lcore::Protocol.

Reimplemented in strmod::unievent::TimerEventTracker, strmod::unievent::UnixEventPoll, strmod::strmod::BufferChunk, strmod::strmod::DynamicBuffer, and strmod::strmod::PreAllocBufferBase.

Definition at line 61 of file Debugable.h.

virtual bool strmod::lcore::Debugable::invariant   const [pure virtual]
 

This should ALWAYS return true. It says whether the class invariant holds or not.

Your class invariant should be as strict as possible. The class invariant is used to detect when the class goes into a bad state, so all possible bad states should be caught by the invariant.

Implemented in strmod::unievent::TimerEventTracker, strmod::unievent::UnixEventPoll, strmod::strmod::BufferChunk, strmod::strmod::PreAllocBufferBase, strmod::strmod::PreAllocBuffer< TInitialAlloc >, and strmod::strmod::PreAllocBuffer< 48 >.


Member Data Documentation

const LCore_ClassIdent strmod::lcore::Debugable::identifier [static]
 

Globally unique identifier for this class.

Every class that might need to be identified should have a public static const identifier object in it.

Reimplemented from strmod::lcore::Protocol.

Reimplemented in strmod::unievent::TimerEventTracker, strmod::unievent::UnixEventPoll, strmod::strmod::BufferChunk, strmod::strmod::DynamicBuffer, and strmod::strmod::PreAllocBufferBase.


The documentation for this class was generated from the following files:
Generated on Wed Jan 29 00:32:47 2003 for libNet by doxygen1.3-rc1