Class any_t#
Defined in File any.h
Class Documentation#
-
class any_t#
The ‘any’ class implementation.
Unnamed Group
-
any_t(int8_t iVal)#
Assignment constructor.
- Parameters:
iVal – [in] The value to assign.
-
any_t(int16_t iVal)#
Assignment constructor.
- Parameters:
iVal – [in] The value to assign.
-
any_t(int32_t iVal)#
Assignment constructor.
- Parameters:
iVal – [in] The value to assign.
-
any_t(int64_t iVal)#
Assignment constructor.
- Parameters:
iVal – [in] The value to assign.
Unnamed Group
-
any_t(uint8_t uiVal)#
Assignment constructor.
- Parameters:
uiVal – [in] The value to assign.
-
any_t(uint16_t uiVal)#
Assignment constructor.
- Parameters:
uiVal – [in] The value to assign.
-
any_t(uint32_t uiVal)#
Assignment constructor.
- Parameters:
uiVal – [in] The value to assign.
-
any_t(uint64_t uiVal)#
Assignment constructor.
- Parameters:
uiVal – [in] The value to assign.
Unnamed Group
-
any_t(char cVal)#
Assignment constructor.
- Parameters:
cVal – [in] The value to assign.
-
any_t(char16_t cVal)#
Assignment constructor.
- Parameters:
cVal – [in] The value to assign.
-
any_t(char32_t cVal)#
Assignment constructor.
- Parameters:
cVal – [in] The value to assign.
-
any_t(wchar_t cVal)#
Assignment constructor.
- Parameters:
cVal – [in] The value to assign.
Unnamed Group
-
any_t(float fVal)#
Assignment constructor.
- Parameters:
fVal – [in] The value to assign.
-
any_t(double fVal)#
Assignment constructor.
- Parameters:
fVal – [in] The value to assign.
-
any_t(long double fVal)#
Assignment constructor.
- Parameters:
fVal – [in] The value to assign.
Unnamed Group
-
any_t(const string &rssVal)#
SDV string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
-
any_t(const u8string &rssVal)#
SDV string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
-
any_t(const u16string &rssVal)#
SDV string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
Unnamed Group
-
any_t(const char *szVal)#
C-style string constructors.
- Parameters:
szVal – [in] Zero terminated string.
-
any_t(const char16_t *szVal)#
C-style string constructors.
- Parameters:
szVal – [in] Zero terminated string.
-
any_t(const char32_t *szVal)#
C-style string constructors.
- Parameters:
szVal – [in] Zero terminated string.
-
any_t(const wchar_t *szVal)#
C-style string constructors.
- Parameters:
szVal – [in] Zero terminated string.
Unnamed Group
-
any_t(const std::string &rssVal)#
STD string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
-
any_t(const std::u16string &rssVal)#
STD string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
-
any_t(const std::u32string &rssVal)#
STD string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
-
any_t(const std::wstring &rssVal)#
STD string constructors.
- Parameters:
rssVal – [in] Reference to the string object.
Unnamed Group
-
any_t &operator=(int8_t iVal)#
Assignment operator.
- Parameters:
iVal – [in] The value to assign.
- Returns:
Reference to this class.
-
any_t &operator=(int16_t iVal)#
Assignment operator.
- Parameters:
iVal – [in] The value to assign.
- Returns:
Reference to this class.
Unnamed Group
-
any_t &operator=(uint8_t uiVal)#
Assignment operator.
- Parameters:
uiVal – [in] The value to assign.
- Returns:
Reference to this class.
-
any_t &operator=(uint16_t uiVal)#
Assignment operator.
- Parameters:
uiVal – [in] The value to assign.
- Returns:
Reference to this class.
Unnamed Group
-
any_t &operator=(char cVal)#
Assignment operator.
- Parameters:
cVal – [in] The value to assign.
- Returns:
Reference to this class.
-
any_t &operator=(char16_t cVal)#
Assignment operator.
- Parameters:
cVal – [in] The value to assign.
- Returns:
Reference to this class.
Unnamed Group
-
any_t &operator=(float fVal)#
Assignment operator.
- Parameters:
fVal – [in] The value to assign.
- Returns:
Reference to this class.
Unnamed Group
-
any_t &operator=(const string &rssVal)#
SDV string assignment operator.
- Parameters:
rssVal – [in] Reference to the string object.
- Returns:
Reference to this class.
-
any_t &operator=(const u8string &rssVal)#
SDV string assignment operator.
- Parameters:
rssVal – [in] Reference to the string object.
- Returns:
Reference to this class.
-
any_t &operator=(const u16string &rssVal)#
SDV string assignment operator.
- Parameters:
rssVal – [in] Reference to the string object.
- Returns:
Reference to this class.
Unnamed Group
-
any_t &operator=(const char *szVal)#
C-style string assignment operator.
- Parameters:
szVal – [in] Zero terminated string.
- Returns:
Reference to this class.
-
any_t &operator=(const char16_t *szVal)#
C-style string assignment operator.
- Parameters:
szVal – [in] Zero terminated string.
- Returns:
Reference to this class.
Unnamed Group
-
any_t &operator=(const std::string &rssVal)#
STD string assignment operator.
- Parameters:
rssVal – [in] Reference to the string object.
- Returns:
Reference to this class.
-
any_t &operator=(const std::u16string &rssVal)#
STD string assignment operator.
- Parameters:
rssVal – [in] Reference to the string object.
- Returns:
Reference to this class.
Unnamed Group
-
operator bool() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator int8_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator uint8_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator int16_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator uint16_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator int32_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator uint32_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator int64_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator uint64_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator char() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator char16_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator char32_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator wchar_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator float() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator double() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator long double() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator u8string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator u16string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator u32string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator wstring() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator interface_t() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator std::string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator std::u16string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator std::u32string() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator std::wstring() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
-
operator std::filesystem::path() const#
Cast operators (provides conversion if not identical to the original type).
Remark
The operators for ANSI string, interface id and exception id are rerpresented by u8string and uint64_t respectively and cannot be used to cast to automatically.
- Returns:
The value stored.
Unnamed Group
-
void set(int8_t iVal)#
Assignment function.
- Parameters:
iVal – [in] The value to assign.
-
void set(int16_t iVal)#
Assignment function.
- Parameters:
iVal – [in] The value to assign.
-
void set(int32_t iVal)#
Assignment function.
- Parameters:
iVal – [in] The value to assign.
-
void set(int64_t iVal)#
Assignment function.
- Parameters:
iVal – [in] The value to assign.
Unnamed Group
-
void set(uint8_t uiVal)#
Assignment function.
- Parameters:
uiVal – [in] The value to assign.
-
void set(uint16_t uiVal)#
Assignment function.
- Parameters:
uiVal – [in] The value to assign.
-
void set(uint32_t uiVal)#
Assignment function.
- Parameters:
uiVal – [in] The value to assign.
-
void set(uint64_t uiVal)#
Assignment function.
- Parameters:
uiVal – [in] The value to assign.
Unnamed Group
-
void set(char cVal)#
Assignment function.
- Parameters:
cVal – [in] The value to assign.
-
void set(char16_t cVal)#
Assignment function.
- Parameters:
cVal – [in] The value to assign.
-
void set(char32_t cVal)#
Assignment function.
- Parameters:
cVal – [in] The value to assign.
-
void set(wchar_t cVal)#
Assignment function.
- Parameters:
cVal – [in] The value to assign.
Unnamed Group
-
void set(float fVal)#
Assignment function.
- Parameters:
fVal – [in] The value to assign.
-
void set(double fVal)#
Assignment function.
- Parameters:
fVal – [in] The value to assign.
-
void set(long double fVal)#
Assignment function.
- Parameters:
fVal – [in] The value to assign.
Unnamed Group
-
void set(const string &rssVal)#
SDV string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
-
void set(const u8string &rssVal)#
SDV string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
-
void set(const u16string &rssVal)#
SDV string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
Unnamed Group
-
void set(const char *szVal)#
C-style string assignment function.
- Parameters:
szVal – [in] Zero terminated string.
-
void set(const char16_t *szVal)#
C-style string assignment function.
- Parameters:
szVal – [in] Zero terminated string.
-
void set(const char32_t *szVal)#
C-style string assignment function.
- Parameters:
szVal – [in] Zero terminated string.
-
void set(const wchar_t *szVal)#
C-style string assignment function.
- Parameters:
szVal – [in] Zero terminated string.
Unnamed Group
-
void set(const std::string &rssVal)#
STD string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
-
void set(const std::u16string &rssVal)#
STD string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
-
void set(const std::u32string &rssVal)#
STD string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
-
void set(const std::wstring &rssVal)#
STD string assignment function.
- Parameters:
rssVal – [in] Reference to the string object.
Public Types
-
enum class EValType : uint32_t#
Value type enumeration.
Values:
-
enumerator val_type_empty#
Empty value.
-
enumerator val_type_bool#
Boolean value; bVal is used.
-
enumerator val_type_int8#
8-Bit signed value; i8Val is used.
-
enumerator val_type_uint8#
8-Bit unsigned value; ui8Val is used.
-
enumerator val_type_int16#
16-Bit signed value; i16Val is used.
-
enumerator val_type_uint16#
16-Bit unsigned value; ui16Val is used.
-
enumerator val_type_int32#
32-Bit signed value; i32Val is used.
-
enumerator val_type_uint32#
32-Bit unsigned value; ui32Val is used.
-
enumerator val_type_int64#
64-Bit signed value; i64Val is used.
-
enumerator val_type_uint64#
64-Bit unsigned value; ui64Val is used.
-
enumerator val_type_char#
ANSI Character value; cVal is used.
-
enumerator val_type_char16#
UTF-16 Character value; c16Val is used.
-
enumerator val_type_char32#
UTF-32 Character value; c32Val is used.
-
enumerator val_type_wchar#
Wide character value; cwVal is used.
-
enumerator val_type_float#
Singled precision floating point value; fVal is used.
-
enumerator val_type_double#
Double precision floating point value; dVal is used.
-
enumerator val_type_long_double#
Long double precision floating point value; ldVal is used.
-
enumerator val_type_fixed#
Fixed point value; fixValue is used.
-
enumerator val_type_string#
ANSI string value; ssVal is used.
-
enumerator val_type_u8string#
UTF-8 string value; ss8Val is used.
-
enumerator val_type_u16string#
UTF-16 string value; ss16Val is used.
-
enumerator val_type_u32string#
UTF-32 string value; ss32Val is used.
-
enumerator val_type_wstring#
Wide string value; sswVal is used.
-
enumerator val_type_interface#
Interface type value; ifcVal is used.
-
enumerator val_type_interface_id#
Interface id value; idIfcVal is used.
-
enumerator val_type_exception_id#
Exception id value; idExceptVal is used.
-
enumerator val_type_empty#
Public Functions
-
any_t()#
Default constructor; construct an empty any.
-
~any_t()#
destructor
-
any_t(bool bVal)#
Assignment constructor.
- Parameters:
bVal – [in] The value to assign.
-
any_t(const std::filesystem::path &rpathVal)#
STD path constructor (will be stored as u8string).
- Parameters:
rpathVal – [in] Reference to the path object.
-
any_t(interface_t ifcVal)#
Interface constructor.
- Parameters:
ifcVal – [in] Interface pointer.
-
template<typename TEnum, typename TEnable = std::enable_if_t<std::is_enum_v<TEnum>>>
explicit any_t(TEnum eVal)# **
**
Enum constructor.
- Template Parameters:
TEnum – Type of enum.
TEnable – Enable the function if the TType is an enum.
- Parameters:
eVal – The eunm value.
-
template<typename TType>
any_t(TType tVal, EValType eValTypeParam)# Assignment constructor.
- Parameters:
tVal – [in] The value to assign.
eValTypeParam – [in] The target value type.
-
any_t(const any_t &rany)#
Copy constructor.
- Parameters:
rany – [in] Reference to any class to copy from.
-
any_t(any_t &&rany) noexcept#
Move constructor.
- Parameters:
rany – [in] Reference to any class to move from.
-
any_t &operator=(bool bVal)#
Assignment operator.
- Parameters:
bVal – [in] The value to assign.
- Returns:
Reference to this class.
-
any_t &operator=(const std::filesystem::path &rpathVal)#
STD path assignment operator (will be stored as u8string).
- Parameters:
rpathVal – [in] Reference to the path object.
- Returns:
Reference to this class.
-
any_t &operator=(interface_t ifcVal)#
Interface assignment operator.
- Parameters:
ifcVal – [in] Interface pointer.
- Returns:
Reference to this class.
-
template<typename TEnum, typename TEnable = std::enable_if_t<std::is_enum_v<TEnum>>>
any_t &operator=(TEnum eVal)# **
**
Enum assignment operator. tparam TEnum Enum type.
- Template Parameters:
TEnable – Enable the function if the TType is an enum.
- Parameters:
eVal – [in] Enum value.
- Returns:
Reference to this class.
-
any_t &operator=(const any_t &rany)#
Copy assignment operator.
- Parameters:
rany – [in] Reference to any class to copy from.
- Returns:
Reference to this class.
-
any_t &operator=(any_t &&rany) noexcept#
Move operator.
- Parameters:
rany – [in] Reference to any class to move from.
- Returns:
Reference to this class.
-
bool empty() const#
Check for an empty any.
- Returns:
Retrurns whether the any is empty.
-
void clear()#
Empty the any.
-
void set(bool bVal)#
Assignment function.
- Parameters:
bVal – [in] The value to assign.
-
void set(const std::filesystem::path &rpathVal)#
STD path assignment function (will be stored as u8string).
- Parameters:
rpathVal – [in] Reference to the path object.
-
void set(interface_t ifcVal)#
Interface assignment function.
- Parameters:
ifcVal – [in] Interface pointer.
-
template<typename TEnum, typename TEnable = std::enable_if_t<std::is_enum_v<TEnum>>>
void set(TEnum eVal)# **
**
Enum assignment function. tparam TEnum Enum type.
- Template Parameters:
TEnable – Enable the function if the TType is an enum.
- Parameters:
eVal – [in] Enum value.
-
template<typename TType>
void set(TType tVal, EValType eValTypeParam)# Assign the value to the any. The value will be converted to the provided value type.
- Template Parameters:
TType – The type of the value to set.
- Parameters:
tVal – [in] The valiue to set.
eValTypeParam – [in] The value type of the any.
-
template<typename TType>
TType get() const# Get the value converted to the provided type.
- Template Parameters:
TType – The type of the value to get,
- Returns:
The value to get.
-
template<typename TType, ECompareType eType>
bool Compare(const TType &rtVal) const# Compare the provided value with the contained value.
- Template Parameters:
TType – Type of the supplied value.
eType – Type of comparison to do.
- Parameters:
rtVal – [in] Reference to the value to use for comparison.
- Returns:
The result of the comparison.
-
template<ECompareType eType>
bool Compare(const any_t &ranyVal) const# Compare the provided value with the contained value.
- Template Parameters:
eType – Type of comparison to do.
- Parameters:
ranyVal – [in] Reference to the value to use for comparison.
- Returns:
The result of the comparison.
Public Members
-
enum sdv::any_t::EValType eValType = EValType::val_type_empty#
The value type.
-
bool bVal#
Boolean value.
-
int8_t i8Val#
8-Bit signed value
-
uint8_t ui8Val#
8-Bit unsigned value
-
int16_t i16Val#
16-Bit signed value
-
uint16_t ui16Val#
16-Bit unsigned value
-
int32_t i32Val#
32-Bit signed value
-
uint32_t ui32Val#
32-Bit unsigned value
-
int64_t i64Val#
64-Bit signed value
-
uint64_t ui64Val#
64-Bit unsigned value
-
char cVal#
ANSI Character value.
-
char16_t c16Val#
UTF-16 Character value.
-
char32_t c32Val#
UTF-32 Character value.
-
wchar_t cwVal#
Wide character value.
-
float fVal#
Singled precision floating point value.
-
double dVal#
Double precision floating point value.
-
long double ldVal#
Long double precision floating point value.
-
interface_t ifcVal#
Interface type value.
-
interface_id idIfcVal#
Interface id value.
-
exception_id idExceptVal#
Exception id value.
-
any_t(int8_t iVal)#