PhoenixFileParser  1.5.1
Set of tools to ease file parsing
Loading...
Searching...
No Matches
configCheckValue.h File Reference
#include "PPath.h"
#include "configCheckValue_impl.h"
+ Include dependency graph for configCheckValue.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T>
bool configCheckValue (T value, T minValue, bool isMinInclusive, T maxValue, bool isMaxInclusive)
 Check if the given value is in the given boundaries.
 

Function Documentation

◆ configCheckValue()

template<typename T>
bool configCheckValue ( T value,
T minValue,
bool isMinInclusive,
T maxValue,
bool isMaxInclusive )

Check if the given value is in the given boundaries.

Parameters
value: 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 configCheckValue_impl.h.

21 {
22 bool b(true);
23 if(isMinInclusive){
24 b &= minValue <= value;
25 }else{
26 b &= minValue < value;
27 }
28 if(isMaxInclusive){
29 b &= maxValue >= value;
30 }else{
31 b &= maxValue > value;
32 }
33 return b;
34}

Referenced by ConfigCheckValue< T >::isOk().

+ Here is the caller graph for this function: