#include <swcdb/core/config/Property.h>
Public Types | |
typedef std::function< int(const std::string &)> | FromString_t |
typedef std::function< std::string(int)> | Repr_t |
Public Types inherited from SWC::Config::Property::Value | |
enum | Type : uint8_t { TYPE_BOOL, TYPE_UINT8, TYPE_UINT16, TYPE_INT32, TYPE_INT64, TYPE_DOUBLE, TYPE_STRING, TYPE_ENUM, TYPE_STRINGS, TYPE_INT64S, TYPE_DOUBLES, TYPE_BOOL_G, TYPE_UINT8_G, TYPE_UINT16_G, TYPE_INT32_G, TYPE_UINT64_G, TYPE_ENUM_G, TYPE_STRINGS_G } |
typedef Value * | Ptr |
Public Member Functions | |
Value_enum (const int32_t &v, FromString_t &&from_string, Repr_t &&repr, uint8_t flags=0) | |
Value_enum (Value_enum *ptr) | |
virtual | ~Value_enum () noexcept |
Ptr | make_new (const Strings &values=Strings()) override |
void | set_from (Ptr ptr) override |
void | set_from (const Strings &values) override |
Type SWC_CONST_FUNC | type () const noexcept override |
std::string | to_string () const override |
SWC_CAN_INLINE int32_t | get () const noexcept |
Public Member Functions inherited from SWC::Config::Property::Value | |
Value (uint8_t flags=0) noexcept | |
Value (Ptr ptr) noexcept | |
Value (Value &&)=delete | |
Value (const Value &)=delete | |
Value & | operator= (Value &&)=delete |
Value & | operator= (const Value &)=delete |
virtual | ~Value () noexcept |
std::ostream & | operator<< (std::ostream &ostream) |
bool | is_skippable () const noexcept |
bool | is_guarded () const noexcept |
Ptr | default_value (bool defaulted) noexcept |
bool | is_default () const noexcept |
Ptr | zero_token () noexcept |
bool | is_zero_token () const noexcept |
Public Attributes | |
int32_t | value |
FromString_t | call_from_string = nullptr |
Repr_t | call_repr = nullptr |
Public Attributes inherited from SWC::Config::Property::Value | |
Core::Atomic< uint8_t > | flags |
Static Public Attributes | |
static const Type | value_type = TYPE_ENUM |
Static Public Attributes inherited from SWC::Config::Property::Value | |
static const uint8_t | SKIPPABLE = 0x01 |
static const uint8_t | GUARDED = 0x02 |
static const uint8_t | DEFAULT = 0x04 |
static const uint8_t | NO_TOKEN = 0x08 |
Additional Inherited Members | |
Static Public Member Functions inherited from SWC::Config::Property::Value | |
static const char *SWC_CONST_FUNC | to_string (Type type) noexcept |
template<typename T > | |
static SWC_CAN_INLINE T * | get_pointer (Ptr ptr) |
static void | assure_match (Type t1, Type t2) |
Definition at line 346 of file Property.h.
typedef std::function<int(const std::string&)> SWC::Config::Property::Value_enum::FromString_t |
Definition at line 350 of file Property.h.
typedef std::function<std::string(int)> SWC::Config::Property::Value_enum::Repr_t |
Definition at line 351 of file Property.h.
SWC::Config::Property::Value_enum::Value_enum | ( | const int32_t & | v, |
FromString_t && | from_string, | ||
Repr_t && | repr, | ||
uint8_t | flags = 0 |
||
) |
Definition at line 462 of file Property.cc.
Referenced by make_new().
SWC::Config::Property::Value_enum::Value_enum | ( | Value_enum * | ptr | ) |
Definition at line 471 of file Property.cc.
|
virtualnoexcept |
Definition at line 477 of file Property.cc.
|
inlinenoexcept |
Definition at line 373 of file Property.h.
Referenced by to_string().
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 479 of file Property.cc.
References SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), and Value_enum().
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 496 of file Property.cc.
References SWC::Core::Vector< T, SizeT, GROW_SZ >::back(), call_from_string, SWC::Error::CONFIG_GET_ERROR, SWC_THROWF, and value.
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 486 of file Property.cc.
References call_from_string, call_repr, SWC::Config::Property::Value::flags, SWC::Condition::from(), SWC::Core::AtomicBase< T, OrderT >::store(), and value.
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 512 of file Property.cc.
References call_repr, SWC::format(), and get().
|
overridevirtualnoexcept |
Implements SWC::Config::Property::Value.
Definition at line 508 of file Property.cc.
References value_type.
FromString_t SWC::Config::Property::Value_enum::call_from_string = nullptr |
Definition at line 378 of file Property.h.
Referenced by set_from().
Repr_t SWC::Config::Property::Value_enum::call_repr = nullptr |
Definition at line 379 of file Property.h.
Referenced by set_from(), and to_string().
int32_t SWC::Config::Property::Value_enum::value |
Definition at line 377 of file Property.h.
Referenced by set_from().
Definition at line 348 of file Property.h.
Referenced by type().