contract.hh File Reference

Definition of contract macros. More...

Include dependency graph for contract.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  utility
namespace  utility::contract

Defines

#define vcsn_trap_(Message, Cond)
#define vcsn_trap__(Message, Cond, Explanation)
#define vcsn_trap_2(Message1, Message2)
#define assertion(Cond)   static_cast<void>((Cond) ? static_cast<void>(0) : vcsn_trap_("Assertion failed", Cond))
#define precondition(Cond)   static_cast<void>((Cond) ? static_cast<void>(0) : vcsn_trap_("Precondition failed", Cond))
#define postcondition(Cond)   static_cast<void>((Cond) ? static_cast<void>(0) : vcsn_trap_("Postcondition failed", Cond))
#define unreachable(Explanation)   vcsn_trap_2("Unreachable code reached", Explanation)
#define assertion_(Cond, Explanation_if_false)   static_cast<void>((Cond) ? static_cast<void>(0) : vcsn_trap__("Assertion failed", Cond, Explanation_if_false))
#define precondition_(Cond, Explanation_if_false)   static_cast<void>((Cond) ? static_cast<void>(0) : vcsn_trap__("Precondition failed", Cond, Explanation_if_false))
#define postcondition_(Cond, Explanation_if_false)   static_cast<void>((Cond) ? static_cast<void>(0) : vcsn_trap__("Postcondition failed", Cond, Explanation_if_false))
#define result_not_computable_if(Cond)   static_cast<void>((Cond) ? vcsn_trap_("Result is not computable", Cond) : static_cast<void>(0))
#define result_not_computable(Message)   vcsn_trap_2("Result is not computable", Message)
#define pure_service_call(Service)   vcsn_trap_("Pure absract service called", Service)
#define static_assertion(Cond, Message)   { utility::static_if<Cond, int, utility::contract::fail<void> >::t Message; Message = 0; }
#define static_assertion_(Cond, Message)   { typename utility::static_if<Cond, int, utility::contract::fail<void> >::t Message; Message = 0; }
#define static_error(Message)
#define recommendation(Cond)   static_cast<void>(0)
#define deprecation(Feature)   static_cast<void>(0)
#define weakness(Feature)   static_cast<void>(0)
#define incompletion(Feature)   static_cast<void>(0)
#define warning(Message)   static_cast<void>(0)

Functions

static void utility::contract::trap (const char *file, int line, const char *location, const std::string &message)
 Internal function to report errors in failed contract macros.


Detailed Description

Definition of contract macros.

Definition in file contract.hh.


Generated on Fri Jul 28 12:20:59 2006 for Vaucanson by  doxygen 1.4.6