Dev Essential
Loading...
Searching...
No Matches
a_util::strings::IsNumericConvertible Struct Reference

#include <strings_numeric_traits_decl.h>

Static Public Member Functions

static bool check (const char *from, const bool &)
 
static bool check (const char *from, const std::int8_t &)
 
static bool check (const char *from, const std::int16_t &)
 
static bool check (const char *from, const std::int32_t &)
 
static bool check (const char *from, const std::int64_t &)
 
static bool check (const char *from, const std::uint8_t &)
 
static bool check (const char *from, const std::uint16_t &)
 
static bool check (const char *from, const std::uint32_t &)
 
static bool check (const char *from, const std::uint64_t &)
 
static bool check (const char *from, const float &)
 
static bool check (const char *from, const double &)
 

Detailed Description

Convenience methods to validate string-to-numeric conversion for generic programming

Member Function Documentation

◆ check() [1/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const bool &  )
static

Check whether a conversion of string from to a boolean type is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [2/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const double &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [3/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const float &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [4/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::int16_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [5/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::int32_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [6/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::int64_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [7/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::int8_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [8/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::uint16_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [9/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::uint32_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [10/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::uint64_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

◆ check() [11/11]

static bool a_util::strings::IsNumericConvertible::check ( const char * from,
const std::uint8_t &  )
static

Check whether a conversion of string from to the type of the second parameter is possible

Note
The second parameter is only for automatic overloading resolution, its value is ignored.If the potentially convertible numeric value is not in range of the second parameters numeric limits, the check fails.
Parameters
[in]fromString to validate the conversion on.
Returns
true if conversion is possible, false otherwise.

The documentation for this struct was generated from the following file: