Parameter conversion class with range checks.
More...
#include <parameterconvert.h>
|
| ParameterConvert (const std::string &sParameter) |
|
| ~ParameterConvert () |
|
std::int64_t | toINT64 (std::int64_t i64Min=std::numeric_limits< std::int64_t >::min(), std::int64_t i64Max=std::numeric_limits< std::int64_t >::max()) const |
|
std::uint64_t | toUINT64 (std::uint64_t u64Min=std::numeric_limits< std::uint64_t >::min(), std::uint64_t u64Max=std::numeric_limits< std::uint64_t >::max()) const |
|
std::int32_t | toINT32 (std::int32_t i32Min=std::numeric_limits< std::int32_t >::min(), std::int32_t i32Max=std::numeric_limits< std::int32_t >::max()) const |
|
std::uint32_t | toUINT32 (std::uint32_t u32Min=std::numeric_limits< std::uint32_t >::min(), std::uint32_t u32Max=std::numeric_limits< std::uint32_t >::max()) const |
|
std::int16_t | toINT16 (std::int16_t i16Min=std::numeric_limits< std::int16_t >::min(), std::int16_t i16Max=std::numeric_limits< std::int16_t >::max()) const |
|
std::uint16_t | toUINT16 (std::uint16_t u16Min=std::numeric_limits< std::uint16_t >::min(), std::uint16_t u16Max=std::numeric_limits< std::uint16_t >::max()) const |
|
std::int8_t | toINT8 (std::int8_t i8Min=std::numeric_limits< std::int8_t >::min(), std::int8_t i8Max=std::numeric_limits< std::int8_t >::max()) const |
|
std::uint8_t | toUINT8 (std::uint8_t u8Min=std::numeric_limits< std::uint8_t >::min(), std::uint8_t u8Max=std::numeric_limits< std::uint8_t >::max()) const |
|
float | toFloat (float fMin=std::numeric_limits< float >::lowest(), float fMax=std::numeric_limits< float >::max()) const |
|
double | toDouble (double dMin=std::numeric_limits< double >::lowest(), double dMax=std::numeric_limits< double >::max()) const |
|
INETAddr | toINETAddr () const |
|
bool | toBool () const |
|
Parameter conversion class with range checks.
Definition at line 53 of file parameterconvert.h.
◆ ParameterConvert()
EMANE::Utils::ParameterConvert::ParameterConvert |
( |
const std::string & |
sParameter | ) |
|
|
inline |
◆ ~ParameterConvert()
EMANE::Utils::ParameterConvert::~ParameterConvert |
( |
| ) |
|
|
inline |
◆ toBool()
bool EMANE::Utils::ParameterConvert::toBool |
( |
| ) |
const |
|
inline |
Convert parameter string to an bool
- Returns
- bool value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 247 of file parameterconvert.inl.
◆ toDouble()
double EMANE::Utils::ParameterConvert::toDouble |
( |
double |
dMin = std::numeric_limits<double>::lowest() , |
|
|
double |
dMax = std::numeric_limits<double>::max() |
|
) |
| const |
|
inline |
Convert parameter string to a double
- Parameters
-
dMin | Minimum value in range |
dMax | Maximum value in range |
- Returns
- double value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 291 of file parameterconvert.inl.
◆ toFloat()
float EMANE::Utils::ParameterConvert::toFloat |
( |
float |
fMin = std::numeric_limits<float>::lowest() , |
|
|
float |
fMax = std::numeric_limits<float>::max() |
|
) |
| const |
|
inline |
Convert parameter string to a float
- Parameters
-
fMin | Minimum value in range |
fMax | Maximum value in range |
- Returns
- float value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 331 of file parameterconvert.inl.
◆ toINETAddr()
◆ toINT16()
std::int16_t EMANE::Utils::ParameterConvert::toINT16 |
( |
std::int16_t |
i16Min = std::numeric_limits<std::int16_t>::min() , |
|
|
std::int16_t |
i16Max = std::numeric_limits<std::int16_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::int16_t
- Parameters
-
i16Min | Minimum value in range |
i16Max | Maximum value in range |
- Returns
- std::int16_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 223 of file parameterconvert.inl.
◆ toINT32()
std::int32_t EMANE::Utils::ParameterConvert::toINT32 |
( |
std::int32_t |
i32Min = std::numeric_limits<std::int32_t>::min() , |
|
|
std::int32_t |
i32Max = std::numeric_limits<std::int32_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::int32_t
- Parameters
-
i32Min | Minimum value in range |
i32Max | Maximum value in range |
- Returns
- std::int32_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 211 of file parameterconvert.inl.
◆ toINT64()
std::int64_t EMANE::Utils::ParameterConvert::toINT64 |
( |
std::int64_t |
i64Min = std::numeric_limits<std::int64_t>::min() , |
|
|
std::int64_t |
i64Max = std::numeric_limits<std::int64_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::int64_t
- Parameters
-
i64Min | Minimum value in range |
i64Max | Maximum value in range |
- Returns
- std::int64_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 131 of file parameterconvert.inl.
◆ toINT8()
std::int8_t EMANE::Utils::ParameterConvert::toINT8 |
( |
std::int8_t |
i8Min = std::numeric_limits<std::int8_t>::min() , |
|
|
std::int8_t |
i8Max = std::numeric_limits<std::int8_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::int8_t
- Parameters
-
i8Min | Minimum value in range |
i8Max | Maximum value in range |
- Returns
- std::int8_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 235 of file parameterconvert.inl.
◆ toUINT16()
std::uint16_t EMANE::Utils::ParameterConvert::toUINT16 |
( |
std::uint16_t |
u16Min = std::numeric_limits<std::uint16_t>::min() , |
|
|
std::uint16_t |
u16Max = std::numeric_limits<std::uint16_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::uint16_t
- Parameters
-
u16Min | Minimum value in range |
u16Max | Maximum value in range |
- Returns
- std::uint16_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 229 of file parameterconvert.inl.
◆ toUINT32()
std::uint32_t EMANE::Utils::ParameterConvert::toUINT32 |
( |
std::uint32_t |
u32Min = std::numeric_limits<std::uint32_t>::min() , |
|
|
std::uint32_t |
u32Max = std::numeric_limits<std::uint32_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::uint32_t
- Parameters
-
u32Min | Minimum value in range |
u32Max | Maximum value in range |
- Returns
- std::uint32_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 217 of file parameterconvert.inl.
◆ toUINT64()
std::uint64_t EMANE::Utils::ParameterConvert::toUINT64 |
( |
std::uint64_t |
u64Min = std::numeric_limits<std::uint64_t>::min() , |
|
|
std::uint64_t |
u64Max = std::numeric_limits<std::uint64_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::uint64_t
- Parameters
-
u64Min | Minimum value in range |
u64Max | Maximum value in range |
- Returns
- std::uint64_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 171 of file parameterconvert.inl.
◆ toUINT8()
std::uint8_t EMANE::Utils::ParameterConvert::toUINT8 |
( |
std::uint8_t |
u8Min = std::numeric_limits<std::uint8_t>::min() , |
|
|
std::uint8_t |
u8Max = std::numeric_limits<std::uint8_t>::max() |
|
) |
| const |
|
inline |
Convert parameter string to an std::uint8_t
- Parameters
-
u8Min | Minimum value in range |
u8Max | Maximum value in range |
- Returns
- std::uint8_t value
- Exceptions
-
ConversionException | Thrown when an error is encountered during conversion either to input format or out of range value. |
Definition at line 241 of file parameterconvert.inl.
The documentation for this class was generated from the following files: