PhoenixFileParser  1.5.1
Set of tools to ease file parsing
Loading...
Searching...
No Matches
configCheckValue_impl.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __CONFIGCHECKVALUE_IMPL_H__
8#define __CONFIGCHECKVALUE_IMPL_H__
9
10#include "configCheckValue.h"
11
13
20template<typename T>
21bool configCheckValue(T value, T minValue, bool isMinInclusive, T maxValue, bool isMaxInclusive){
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}
35
36
37#endif
bool configCheckValue(T value, T minValue, bool isMinInclusive, T maxValue, bool isMaxInclusive)
Check if the given value is in the given boundaries.