Created by Scott Robert Ladd at Coyote Gulch Productions.
| void libevocosm::validate_equals | ( | const Type & | object, | |
| const Type & | constraint, | |||
| const string & | message = string() | |||
| ) |
If value is not equal to constraint, as defined by the appropriate == operator, this function throws a validation_error.
| object | Object to be tested against constraint | |
| constraint | Expected value of object | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_not | ( | const Type & | object, | |
| const Type & | constraint, | |||
| const string & | message = string() | |||
| ) |
If value equals the constraint, as defined by the appropriate == operator, this function throws a validation_error.
| object | Object to be tested against constraint | |
| constraint | Value that object should not equal | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_less | ( | const Type & | object, | |
| const Type & | constraint, | |||
| const string & | message = string() | |||
| ) |
If value is greater than or equal to constraint (using the >= operator), this function throws a validation_error.
| object | Object to be tested | |
| constraint | Object must be < than this value | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_less_eq | ( | const Type & | object, | |
| const Type & | constraint, | |||
| const string & | message = string() | |||
| ) |
If value is greater than or equal to constraint (using the >= operator), this function throws a validation_error.
| object | Object to be tested | |
| constraint | Object must be < than this value | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_greater | ( | const Type & | object, | |
| const Type & | constraint, | |||
| const string & | message = string() | |||
| ) |
If value is less than or equal to constraint (using the <= operator), this function throws a validation_error.
| object | Object to be tested | |
| constraint | Object must be > than this value | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_greater_eq | ( | const Type & | object, | |
| const Type & | constraint, | |||
| const string & | message = string() | |||
| ) |
If value is less than or equal to constraint (using the <= operator), this function throws a validation_error.
| object | Object to be tested | |
| constraint | Object must be > than this value | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_range | ( | const Type & | object, | |
| const Type & | low_bound, | |||
| const Type & | high_bound, | |||
| const string & | message = string() | |||
| ) |
If value is less than low_bound (using the < operator) or greater than high_bound (using the > operator), this function throws a validation_error. The function does not verify that low_bound is less than high_bound.
| object | Object to be tested | |
| low_bound | Low boundary (inclusive) on value of object | |
| high_bound | High boundary (inclusive) on value of object | |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_with | ( | const Type & | object, | |
| const Predicate & | constraint, | |||
| const string & | message = string() | |||
| ) |
If predicate(object) is false -- indicating an invalid object in the context defined by predicate -- this function throws a validation_error.
| object | Object to be tested against the predicate | |
| constraint | A function or functor returning true for valid objects and false for an invalid object | |
| message | Additional text to be included in a validation_error |
| void libevocosm::enforce_lower_limit | ( | Type & | object, | |
| const Type & | low_value | |||
| ) |
If object's value is less than low_value, as per the < operator, object will be set equal to low_value.
| object | Object to undergo enforcement | |
| low_value | Lower limit on the value of object |
| void libevocosm::enforce_upper_limit | ( | Type & | object, | |
| const Type & | high_value | |||
| ) |
If object's value is greater than high_value, as per the > operator, object will be set equal to high_value.
| object | Object to undergo enforcement | |
| high_value | Upper limit on the value of object |
| void libevocosm::enforce_range | ( | Type & | object, | |
| const Type & | low_value, | |||
| const Type & | high_value | |||
| ) |
If object's value is less than low_value, as per the < operator, object will be set equal to low_value. If object's value is greater than high_value, as per the > operator, object will be set equal to high_value.
| object | Object to undergo enforcement | |
| low_value | Lower limit on the value of object | |
| high_value | Upper limit on the value of object |
| string libevocosm::build_location_string | ( | const char * | filename, | |
| long | line_no | |||
| ) | [inline] |
This function formats a string from a given file name and line number. If C++ incorporates parts of C99, this function could be extended to support the __func__ macro that names the current function.
| filename | The name of a file, usually the Standard C __FILE__ macro | |
| line_no | A line number in the file, usually the Standard C __LINE__ macro |
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.