#include <swcdb/core/config/Property.h>
Public Types | |
typedef Value_strings_g * | Ptr |
typedef std::function< void()> | OnChg_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_strings_g (Strings &&v, OnChg_t &&cb, uint8_t flags=0) noexcept | |
Value_strings_g (Value_strings_g *ptr) | |
virtual | ~Value_strings_g () noexcept |
Value::Ptr | make_new (const Strings &values=Strings()) override |
void | set_from (Value::Ptr ptr) override |
void | set_from (const Strings &values) override |
Type SWC_CONST_FUNC | type () const noexcept override |
std::string | to_string () const override |
Strings | get () const |
size_t | size () noexcept |
std::string | get_item (size_t n) |
void | on_change () const |
void | set_cb_on_chg (OnChg_t &&cb) |
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 | |
Core::MutexAtomic | mutex |
Strings | value |
OnChg_t | on_chg_cb |
Public Attributes inherited from SWC::Config::Property::Value | |
Core::Atomic< uint8_t > | flags |
Static Public Attributes | |
static const Type | value_type = TYPE_STRINGS_G |
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 711 of file Property.h.
typedef std::function<void()> SWC::Config::Property::Value_strings_g::OnChg_t |
Definition at line 716 of file Property.h.
Definition at line 715 of file Property.h.
|
noexcept |
Definition at line 1002 of file Property.cc.
Referenced by make_new().
SWC::Config::Property::Value_strings_g::Value_strings_g | ( | Value_strings_g * | ptr | ) |
Definition at line 1008 of file Property.cc.
|
virtualnoexcept |
Definition at line 1013 of file Property.cc.
Strings SWC::Config::Property::Value_strings_g::get | ( | ) | const |
Definition at line 1051 of file Property.cc.
Referenced by SWC::client::Mngr::Groups::on_cfg_update(), and SWC::client::Brokers::on_cfg_update().
std::string SWC::Config::Property::Value_strings_g::get_item | ( | size_t | n | ) |
Definition at line 1061 of file Property.cc.
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 1015 of file Property.cc.
References SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), and Value_strings_g().
void SWC::Config::Property::Value_strings_g::on_change | ( | ) | const |
Definition at line 1066 of file Property.cc.
References on_chg_cb.
Referenced by set_from().
void SWC::Config::Property::Value_strings_g::set_cb_on_chg | ( | Value_strings_g::OnChg_t && | cb | ) |
Definition at line 1071 of file Property.cc.
References mutex, and on_chg_cb.
Referenced by SWC::client::Clients::init(), and SWC::client::Mngr::Groups::init().
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 1037 of file Property.cc.
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 1022 of file Property.cc.
References SWC::Config::Property::Value::flags, SWC::Condition::from(), mutex, on_change(), on_chg_cb, SWC::Core::AtomicBase< T, OrderT >::store(), and value.
|
noexcept |
Definition at line 1056 of file Property.cc.
References mutex, SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), and value.
|
overridevirtual |
Implements SWC::Config::Property::Value.
Definition at line 1046 of file Property.cc.
References SWC::format_list(), mutex, and value.
|
overridevirtualnoexcept |
Implements SWC::Config::Property::Value.
Definition at line 1042 of file Property.cc.
References value_type.
|
mutable |
Definition at line 744 of file Property.h.
Referenced by get(), get_item(), set_cb_on_chg(), set_from(), size(), and to_string().
OnChg_t SWC::Config::Property::Value_strings_g::on_chg_cb |
Definition at line 746 of file Property.h.
Referenced by on_change(), set_cb_on_chg(), and set_from().
Strings SWC::Config::Property::Value_strings_g::value |
Definition at line 745 of file Property.h.
Referenced by get(), get_item(), set_from(), size(), and to_string().
|
static |
Definition at line 713 of file Property.h.
Referenced by type().