#include <varying.h>
Definition at line 13 of file varying.h.
◆ BoolStorageType
◆ BoolType
◆ FloatStorageType
◆ FloatType
◆ IntegerStorageType
◆ IntegerType
◆ SignedIntegerType
◆ StringType
◆ UnsignedIntegerType
◆ Varying() [1/6]
template<typename T >
chi_data_types::Varying::Varying |
( |
const T & |
value | ) |
|
|
inlineexplicit |
Generalized constructor for bool, integral- and float-types. This constructor has been specialized for std::string and std::vector<std::byte>.
Definition at line 232 of file varying.h.
◆ Varying() [2/6]
chi_data_types::Varying::Varying |
( |
const std::vector< std::byte > & |
value | ) |
|
|
explicit |
Constructor for an arbitrary sequence of bytes value.
Definition at line 184 of file varying.cc.
◆ Varying() [3/6]
chi_data_types::Varying::Varying |
( |
const std::string & |
value | ) |
|
|
explicit |
Constructor for a string value.
Definition at line 193 of file varying.cc.
◆ Varying() [4/6]
chi_data_types::Varying::Varying |
( |
const char * |
value | ) |
|
|
inlineexplicit |
Constructor for a string literal value.
Definition at line 314 of file varying.h.
◆ Varying() [5/6]
chi_data_types::Varying::Varying |
( |
const Varying & |
other | ) |
|
◆ Varying() [6/6]
chi_data_types::Varying::Varying |
( |
Varying && |
other | ) |
|
|
noexcept |
◆ ~Varying()
chi_data_types::Varying::~Varying |
( |
| ) |
|
|
default |
◆ BoolValue()
bool chi_data_types::Varying::BoolValue |
( |
| ) |
const |
Returns the bool value if valid. Otherwise throws std::logic_error.
Definition at line 256 of file varying.cc.
◆ ByteSize()
size_t chi_data_types::Varying::ByteSize |
( |
| ) |
const |
Returns the raw byte size associated with the type.
Definition at line 281 of file varying.cc.
◆ CastValue() [1/3]
◆ CastValue() [2/3]
◆ CastValue() [3/3]
◆ CheckTypeMatch()
Checks if two VaryingDataType values match. Type A is matched against type B.
Definition at line 171 of file varying.cc.
◆ DefaultValue()
template<typename T >
static T chi_data_types::Varying::DefaultValue |
( |
| ) |
|
|
inlinestatic |
Returns a default value for the type required.
Definition at line 394 of file varying.h.
◆ FloatValue()
double chi_data_types::Varying::FloatValue |
( |
| ) |
const |
Returns the float value if valid. Otherwise throws std::logic_error.
Definition at line 272 of file varying.cc.
◆ GetValue() [1/5]
template<typename T >
BoolType< T > chi_data_types::Varying::GetValue |
( |
| ) |
const |
|
inline |
Returns values of type bool if able.
Definition at line 427 of file varying.h.
◆ GetValue() [2/5]
template<typename T >
FloatType< T > chi_data_types::Varying::GetValue |
( |
| ) |
const |
|
inline |
Returns floating point values if able.
Definition at line 436 of file varying.h.
◆ GetValue() [3/5]
template<typename T >
StringType< T > chi_data_types::Varying::GetValue |
( |
| ) |
const |
|
inline |
Returns a string if able.
Definition at line 447 of file varying.h.
◆ GetValue() [4/5]
Returns a signed integer if able.
Definition at line 456 of file varying.h.
◆ GetValue() [5/5]
Returns an unsigned integer if able.
Definition at line 467 of file varying.h.
◆ Helper() [1/3]
static std::unique_ptr< VaryingType > chi_data_types::Varying::Helper |
( |
const bool & |
value | ) |
|
|
inlinestatic |
◆ Helper() [2/3]
static std::unique_ptr< VaryingType > chi_data_types::Varying::Helper |
( |
const double & |
value | ) |
|
|
inlinestatic |
◆ Helper() [3/3]
static std::unique_ptr< VaryingType > chi_data_types::Varying::Helper |
( |
const int64_t & |
value | ) |
|
|
inlinestatic |
◆ IntegerValue()
int64_t chi_data_types::Varying::IntegerValue |
( |
| ) |
const |
Returns the integer value if valid. Otherwise throws std::logic_error.
Definition at line 264 of file varying.cc.
◆ operator!=()
bool chi_data_types::Varying::operator!= |
( |
const Varying & |
that | ) |
const |
|
inline |
Inequality operator
Definition at line 375 of file varying.h.
◆ operator<()
bool chi_data_types::Varying::operator< |
( |
const Varying & |
that | ) |
const |
|
inline |
Relation operators
Definition at line 385 of file varying.h.
◆ operator<=()
bool chi_data_types::Varying::operator<= |
( |
const Varying & |
that | ) |
const |
|
inline |
Relation operators
Definition at line 387 of file varying.h.
◆ operator=() [1/6]
Assigns a string value.
Definition at line 238 of file varying.cc.
◆ operator=() [2/6]
Assigns an arbitrary sequence of bytes value.
Definition at line 229 of file varying.cc.
◆ operator=() [3/6]
template<typename T , std::enable_if_t<
IsBool< T >::value, bool > = true>
Varying & chi_data_types::Varying::operator= |
( |
const T & |
value | ) |
|
|
inline |
Assigns a bool value.
Definition at line 343 of file varying.h.
◆ operator=() [4/6]
template<typename T , std::enable_if_t<
IsInteger< T >::value, bool > = true>
Varying & chi_data_types::Varying::operator= |
( |
const T & |
value | ) |
|
|
inline |
Assigns an integer value.
Definition at line 353 of file varying.h.
◆ operator=() [5/6]
template<typename T , std::enable_if_t<
IsFloat< T >::value, bool > = true>
Varying & chi_data_types::Varying::operator= |
( |
const T & |
value | ) |
|
|
inline |
Assign a floating point value.
Definition at line 363 of file varying.h.
◆ operator=() [6/6]
Assignment operator. i.e., type_A = type_B
Definition at line 215 of file varying.cc.
◆ operator==()
bool chi_data_types::Varying::operator== |
( |
const Varying & |
that | ) |
const |
|
inline |
◆ operator>()
bool chi_data_types::Varying::operator> |
( |
const Varying & |
that | ) |
const |
|
inline |
Relation operators
Definition at line 378 of file varying.h.
◆ operator>=()
bool chi_data_types::Varying::operator>= |
( |
const Varying & |
that | ) |
const |
|
inline |
Relation operators
Definition at line 380 of file varying.h.
◆ PrintStr()
std::string chi_data_types::Varying::PrintStr |
( |
bool |
with_type = true | ) |
const |
Returns a string value for the value.
Definition at line 285 of file varying.cc.
◆ StringValue()
std::string chi_data_types::Varying::StringValue |
( |
| ) |
const |
Returns the string value if valid. Otherwise throws std::logic_error.
Definition at line 248 of file varying.cc.
◆ Type()
Returns the current-type of the variable.
Definition at line 494 of file varying.h.
◆ TypeName()
std::string chi_data_types::Varying::TypeName |
( |
| ) |
const |
|
inline |
Returns the string type name of the type.
Definition at line 496 of file varying.h.
◆ data_
std::unique_ptr<VaryingType> chi_data_types::Varying::data_ = nullptr |
|
private |
◆ type_
Type specification
Definition at line 216 of file varying.h.
The documentation for this class was generated from the following files: