boost::probabilities::validator_archetype< Value, Base > Class Template Reference

Validator Concept archetype. More...

#include <probabilities.hpp>

List of all members.

Public Types

typedef Value value_type
 Type of value to validate.

Static Public Member Functions

template<typename Domain>
static void is_valid (value_type v, Domain d)
 Is the value_type valid for this Domain?


Detailed Description

template<typename Value, typename Base = null_archetype<>>
class boost::probabilities::validator_archetype< Value, Base >

Validator Concept archetype.

This class is the archetypical model of the ValidatorConcept. Its primary purpose is to verify that the ValidatorConcept class fully covers the requirements of the Validator Concept.

The following example, which is available in example5.cpp, illustrates a test of the validator_archetype class with respect to coverage of the Validator Concept.

First, create a class that imposes the concept requirement.

Second, create a validator type to simplify the test expression.
Finally, instantiate the class that imposes the concept requirement.
Similar code may be used to verify that another class, range_validator in this case, covers the Validator Concept.


Member Function Documentation

template<typename Value, typename Base = null_archetype<>>
template<typename Domain>
static void boost::probabilities::validator_archetype< Value, Base >::is_valid value_type  v,
Domain  d
[inline, static]
 

Is the value_type valid for this Domain?

Parameters:
v Value to validate
d Domain within which v must be valid
These static functions must ascertain, by some criterion, whether or not the value of v is valid for domain d. Upon return, these function must guarrantee that v is valid for domain d. Note that the value of v may be modified to ensure that this is the case. If this guarrentee cannot be made, an exception must be thrown.


The documentation for this class was generated from the following file:
Generated on Thu Oct 18 11:10:28 2007 for Boost.Probability: C++ Probability and Likelihood Library by  doxygen 1.4.5