Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

DesignByContract Class Reference

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

#include <designbycontract.h>

Inheritance diagram for DesignByContract:

SolverBase< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt > SolverBase< Pressure, OtherProp, Temperature, 0, OtherPropAlt, 0 > SolverBase< Temperature, OtherProp, Pressure, 0, OtherPropAlt, 0 > SteamCalculator ZeroIn< Subject, Ordinate, Abscissa > Solver< MainProp, OtherProp, VaryProp, MainPropAlt, OtherPropAlt, VaryPropAlt > Solver< Pressure, OtherProp, Temperature, 0, OtherPropAlt, 0 > Solver< Temperature, OtherProp, Pressure, 0, OtherPropAlt, 0 > List of all members.

Public Member Functions

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

Static Public Member Functions

void __throw_error_ (const char *file, const int line, const char *expr, const char *type)
 Abort program and show error message.
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


Member Function Documentation

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

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.


The documentation for this class was generated from the following files:
Generated on Tue Mar 22 19:07:06 2005 for freesteam by doxygen 1.3.8