PhoenixFileParser  1.5.1
Set of tools to ease file parsing
Loading...
Searching...
No Matches
ConfigCheckValue< T > Class Template Reference

Generic class for a configuration check. More...

#include <ConfigCheck.h>

+ Inheritance diagram for ConfigCheckValue< T >:
+ Collaboration diagram for ConfigCheckValue< T >:

Public Member Functions

 ConfigCheckValue (const T *data, const T &minValue, bool isMinInclusive, const T &maxValue, bool isMaxInclusive)
 Default constructor of the ConfigCheckValue.
 
virtual bool isOk (std::ostream &out) const
 Say if the check is OK or not.
 
virtual ~ConfigCheckValue ()
 Destructor of the ConfigCheckValue.
 

Private Attributes

const T * p_data
 value to be checked
 
bool p_isMaxInclusive
 true if the maximum boundary is inclusive
 
bool p_isMinInclusive
 true if the minimum boundary is inclusive
 
p_maxValue
 maximum value boundary
 
p_minValue
 minimum value boundary
 

Detailed Description

template<typename T>
class ConfigCheckValue< T >

Generic class for a configuration check.

Definition at line 15 of file ConfigCheck.h.

Constructor & Destructor Documentation

◆ ConfigCheckValue()

template<typename T>
ConfigCheckValue< T >::ConfigCheckValue ( const T * data,
const T & minValue,
bool isMinInclusive,
const T & maxValue,
bool isMaxInclusive )

Default constructor of the ConfigCheckValue.

Parameters
data: pointer to the value to be checked
minValue: minimum value boundary
isMinInclusive: true if the minimum boundary is inclusive
maxValue: maximum value boundary
isMaxInclusive: true if the maximum boundary is inclusive
Returns
true if the value is in the boundaries, false otherwise

Definition at line 21 of file ConfigCheck_impl.h.

23{}
Generic class for a configuration check.
Definition ConfigCheck.h:15
bool p_isMinInclusive
true if the minimum boundary is inclusive
Definition ConfigCheck.h:28
const T * p_data
value to be checked
Definition ConfigCheck.h:24
T p_maxValue
maximum value boundary
Definition ConfigCheck.h:30
T p_minValue
minimum value boundary
Definition ConfigCheck.h:26
bool p_isMaxInclusive
true if the maximum boundary is inclusive
Definition ConfigCheck.h:32

References p_data, p_isMaxInclusive, p_isMinInclusive, p_maxValue, and p_minValue.

◆ ~ConfigCheckValue()

template<typename T>
ConfigCheckValue< T >::~ConfigCheckValue ( )
virtual

Destructor of the ConfigCheckValue.

Definition at line 27 of file ConfigCheck_impl.h.

27{}

Member Function Documentation

◆ isOk()

template<typename T>
bool ConfigCheckValue< T >::isOk ( std::ostream & out) const
virtual

Say if the check is OK or not.

Parameters
out: std::ostream to get the error message
Returns
true if the check is OK, false otherwise

Implements GenericConfigCheck.

Definition at line 34 of file ConfigCheck_impl.h.

34 {
35 if(p_data != NULL){
37 return true;
38 }else{
40 out << "ConfigCheckValue<T>::isOk : value ("<<*p_data<<") not in "<<vecMinBoundary[p_isMinInclusive]<<p_minValue<<", "<<p_maxValue<<vecMaxBoundary[p_isMaxInclusive]<<" in ConfigNode" << std::endl;
41 }
42 }
43 return false;
44}
bool configCheckValue(T value, T minValue, bool isMinInclusive, T maxValue, bool isMaxInclusive)
Check if the given value is in the given boundaries.

References configCheckValue(), p_data, p_isMaxInclusive, p_isMinInclusive, p_maxValue, and p_minValue.

+ Here is the call graph for this function:

Member Data Documentation

◆ p_data

template<typename T>
const T* ConfigCheckValue< T >::p_data
private

value to be checked

Definition at line 24 of file ConfigCheck.h.

Referenced by ConfigCheckValue(), and isOk().

◆ p_isMaxInclusive

template<typename T>
bool ConfigCheckValue< T >::p_isMaxInclusive
private

true if the maximum boundary is inclusive

Definition at line 32 of file ConfigCheck.h.

Referenced by ConfigCheckValue(), and isOk().

◆ p_isMinInclusive

template<typename T>
bool ConfigCheckValue< T >::p_isMinInclusive
private

true if the minimum boundary is inclusive

Definition at line 28 of file ConfigCheck.h.

Referenced by ConfigCheckValue(), and isOk().

◆ p_maxValue

template<typename T>
T ConfigCheckValue< T >::p_maxValue
private

maximum value boundary

Definition at line 30 of file ConfigCheck.h.

Referenced by ConfigCheckValue(), and isOk().

◆ p_minValue

template<typename T>
T ConfigCheckValue< T >::p_minValue
private

minimum value boundary

Definition at line 26 of file ConfigCheck.h.

Referenced by ConfigCheckValue(), and isOk().


The documentation for this class was generated from the following files: