DesignByContract Class Reference

Design-by-contract base class. More...

#include <designbycontract.h>

Inheritance diagram for DesignByContract:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~DesignByContract ()
virtual bool isValid () const
 Design-by-contract consistency checking.

Static Public Member Functions

static void __throw_error_ (const char *file, const int line, const char *expr, const char *type)
 Abort program and show error message.
static void __report_Message_ (const char *file, const int line, const char *msg)


Detailed Description

Design-by-contract base class.

Base class for all objects in the system. All classes inheriting from this class need to define a method IsValid. This method should perform a consistency check on the state of the object. Note that this method needs to be defined only when a debug build is made.

See also:
http://www.eventhelix.com/RealtimeMantra/Object_Oriented/design_by_contract.htm

Constructor & Destructor Documentation

DesignByContract::~DesignByContract (  )  [virtual]


Member Function Documentation

bool DesignByContract::isValid ( void   )  const [virtual]

Design-by-contract consistency checking.

All classes inheriting from this class need to define a method IsValid. This method should perform a consistency check on the state of the object. Note that this method needs to be defined only when a debug build is made.

Reimplemented in SteamCalculator.

void DesignByContract::__throw_error_ ( const char *  file,
const int  line,
const char *  expr,
const char *  type 
) [static]

Abort program and show error message.

This routine may need to be changed for different console/interface scenarios

void DesignByContract::__report_Message_ ( const char *  file,
const int  line,
const char *  msg 
) [static]


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

Generated on Tue Feb 10 18:37:37 2009 for freesteam by  doxygen 1.5.6