Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

pantheios/quality/contract.h File Reference


Detailed Description

[C, C++] Defines the contract enforcement constructs used in the Pantheios core and APIs.

#include <pantheios/pantheios.h>
#include <stlsoft/stlsoft.h>

Go to the source code of this file.

Defines

#define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL(msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)
 Unexpected condition contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API(msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)
 Unexpected condition contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER(msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)
 Unexpected condition contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Precondition (state) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Precondition (state) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Precondition (state) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Precondition (parameters) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Precondition (parameters) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Precondition (parameters) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (return-value) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (return-value) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (return-value) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (state) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (state) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (state) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (parameters) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (parameters) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Postcondition (parameters) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Invariant (class) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Invariant (class) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Invariant (class) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Invariant (global) contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Invariant (global) contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Invariant (global) contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Static data state contract enforcement (internal).
#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Static data state contract enforcement (API).
#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Static data state contract enforcement (application layer).
#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF(expr, msg)   STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)
 Static data state contract enforcement (application defined).
#define PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION(expr)   STLSOFT_ASSERT(expr)
 Intermediate assumption contract enforcement.


Define Documentation

#define PANTHEIOS_CONTRACT_ENFORCE_ASSUMPTION ( expr   )     STLSOFT_ASSERT(expr)

Intermediate assumption contract enforcement.

Parameters:
expr The expression that must evaluate to true

#define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Invariant (class) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Invariant (class) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_CLASS_INVARIANT_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Invariant (class) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Invariant (global) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Invariant (global) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_GLOBAL_INVARIANT_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Invariant (global) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (parameters) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (parameters) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (parameters) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (return-value) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (return-value) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_RETURN_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (return-value) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (state) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (state) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_POSTCONDITION_STATE_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Postcondition (state) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Precondition (parameters) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Precondition (parameters) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_PARAMS_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Precondition (parameters) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Precondition (state) contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Precondition (state) contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_PRECONDITION_STATE_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Precondition (state) contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_API ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Static data state contract enforcement (API).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_DEF ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Static data state contract enforcement (application defined).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_APPL_LAYER ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Static data state contract enforcement (application layer).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_STATIC_DATA_INTERNAL ( expr,
msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), expr)

Static data state contract enforcement (internal).

Parameters:
expr The expression that must evaluate to true
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_API ( msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)

Unexpected condition contract enforcement (API).

Parameters:
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_APPL_LAYER ( msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)

Unexpected condition contract enforcement (application layer).

Parameters:
msg The literal string describing the failed condition

#define PANTHEIOS_CONTRACT_ENFORCE_UNEXPECTED_CONDITION_INTERNAL ( msg   )     STLSOFT_MESSAGE_ASSERT(PANTHEIOS_TYPECHECK_MSG_(msg), 0)

Unexpected condition contract enforcement (internal).

Parameters:
msg The literal string describing the failed condition


pantheios Library documentation © Matthew Wilson & Synesis Software, 2006-2011 SourceForge.net Logo