#include <safe_any.hpp>
|
template<typename T > |
using | EnableArithmetic = typename std::enable_if< std::is_arithmetic< T >::value >::type * |
|
template<typename T > |
using | EnableEnum = typename std::enable_if< std::is_enum< T >::value >::type * |
|
template<typename T > |
using | EnableIntegral = typename std::enable_if< std::is_integral< T >::value||std::is_enum< T >::value >::type * |
|
template<typename T > |
using | EnableNonIntegral = typename std::enable_if<!std::is_integral< T >::value &&!std::is_enum< T >::value >::type * |
|
template<typename T > |
using | EnableString = typename std::enable_if< std::is_same< T, std::string >::value >::type * |
|
template<typename T > |
using | EnableUnknownType = typename std::enable_if<!std::is_arithmetic< T >::value &&!std::is_enum< T >::value &&!std::is_same< T, std::string >::value >::type * |
|
|
template<typename DST > |
nonstd::expected< DST, std::string > | convert (EnableArithmetic< DST >=nullptr) const |
|
template<typename DST > |
nonstd::expected< DST, std::string > | convert (EnableEnum< DST >=0) const |
|
template<typename DST > |
nonstd::expected< DST, std::string > | convert (EnableString< DST >=0) const |
|
template<typename DST > |
nonstd::expected< DST, std::string > | convert (EnableUnknownType< DST >=0) const |
|
template<typename T > |
std::string | errorMsg () const |
|
template<typename T > |
nonstd::expected< T, std::string > | stringToNumber () const |
|
Definition at line 36 of file safe_any.hpp.
◆ EnableArithmetic
◆ EnableEnum
◆ EnableIntegral
◆ EnableNonIntegral
◆ EnableString
◆ EnableUnknownType
template<typename T >
using BT::Any::EnableUnknownType = typename std::enable_if<!std::is_arithmetic<T>::value && !std::is_enum<T>::value && !std::is_same<T, std::string>::value>::type* |
|
private |
◆ Any() [1/13]
◆ ~Any()
◆ Any() [2/13]
BT::Any::Any |
( |
const Any & |
other | ) |
|
|
inline |
◆ Any() [3/13]
BT::Any::Any |
( |
Any && |
other | ) |
|
|
inline |
◆ Any() [4/13]
BT::Any::Any |
( |
const double & |
value | ) |
|
|
inlineexplicit |
◆ Any() [5/13]
BT::Any::Any |
( |
const uint64_t & |
value | ) |
|
|
inlineexplicit |
◆ Any() [6/13]
BT::Any::Any |
( |
const float & |
value | ) |
|
|
inlineexplicit |
◆ Any() [7/13]
BT::Any::Any |
( |
const std::string & |
str | ) |
|
|
inlineexplicit |
◆ Any() [8/13]
BT::Any::Any |
( |
const char * |
str | ) |
|
|
inlineexplicit |
◆ Any() [9/13]
◆ Any() [10/13]
BT::Any::Any |
( |
const std::string_view & |
str | ) |
|
|
inlineexplicit |
◆ Any() [11/13]
◆ Any() [12/13]
BT::Any::Any |
( |
const std::type_index & |
type | ) |
|
|
inline |
◆ Any() [13/13]
◆ cast()
template<typename T >
T BT::Any::cast |
( |
| ) |
const |
|
inline |
◆ castedType()
const std::type_info& BT::Any::castedType |
( |
| ) |
const |
|
inlinenoexcept |
◆ castPtr()
◆ convert() [1/4]
template<typename DST >
nonstd::expected< DST, std::string > BT::Any::convert |
( |
EnableArithmetic< DST > |
= nullptr | ) |
const |
|
inlineprivate |
◆ convert() [2/4]
template<typename DST >
nonstd::expected< DST, std::string > BT::Any::convert |
( |
EnableEnum< DST > |
= 0 | ) |
const |
|
inlineprivate |
◆ convert() [3/4]
template<typename DST >
nonstd::expected< DST, std::string > BT::Any::convert |
( |
EnableString< DST > |
= 0 | ) |
const |
|
inlineprivate |
◆ convert() [4/4]
template<typename DST >
nonstd::expected<DST, std::string> BT::Any::convert |
( |
EnableUnknownType< DST > |
= 0 | ) |
const |
|
inlineprivate |
◆ copyInto()
void BT::Any::copyInto |
( |
Any & |
dst | ) |
|
|
inline |
◆ empty()
bool BT::Any::empty |
( |
| ) |
const |
|
inlinenoexcept |
◆ errorMsg()
template<typename T >
std::string BT::Any::errorMsg |
( |
| ) |
const |
|
inlineprivate |
◆ isIntegral()
bool BT::Any::isIntegral |
( |
| ) |
const |
|
inline |
◆ isNumber()
bool BT::Any::isNumber |
( |
| ) |
const |
|
inline |
◆ isString()
bool BT::Any::isString |
( |
| ) |
const |
|
inline |
◆ isType()
template<typename T >
bool BT::Any::isType |
( |
| ) |
const |
|
inline |
◆ operator=()
Any & BT::Any::operator= |
( |
const Any & |
other | ) |
|
|
inline |
◆ stringToNumber()
template<typename T >
nonstd::expected< T, std::string > BT::Any::stringToNumber |
|
inlineprivate |
◆ tryCast()
template<typename T >
nonstd::expected< T, std::string > BT::Any::tryCast |
|
inline |
◆ type()
const std::type_index& BT::Any::type |
( |
| ) |
const |
|
inlinenoexcept |
◆ _any
◆ _original_type
std::type_index BT::Any::_original_type |
|
private |
The documentation for this class was generated from the following file: