SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Config::Property::Value_uint16_g Class Referencefinal

#include <swcdb/core/config/Property.h>

+ Inheritance diagram for SWC::Config::Property::Value_uint16_g:
+ Collaboration diagram for SWC::Config::Property::Value_uint16_g:

Public Types

typedef Value_uint16_gPtr
 
typedef std::function< void(uint16_t)> 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 ValuePtr
 

Public Member Functions

 Value_uint16_g (const uint16_t &v, OnChg_t &&cb, uint8_t flags=0)
 
 Value_uint16_g (Value_uint16_g *ptr)
 
virtual ~Value_uint16_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
 
SWC_CAN_INLINE uint16_t get () const noexcept
 
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
 
Valueoperator= (Value &&)=delete
 
Valueoperator= (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::Atomic< uint16_t > 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_UINT16_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 Tget_pointer (Ptr ptr)
 
static void assure_match (Type t1, Type t2)
 

Detailed Description

Definition at line 548 of file Property.h.

Member Typedef Documentation

◆ OnChg_t

typedef std::function<void(uint16_t)> SWC::Config::Property::Value_uint16_g::OnChg_t

Definition at line 553 of file Property.h.

◆ Ptr

Constructor & Destructor Documentation

◆ Value_uint16_g() [1/2]

SWC::Config::Property::Value_uint16_g::Value_uint16_g ( const uint16_t &  v,
Value_uint16_g::OnChg_t &&  cb,
uint8_t  flags = 0 
)

Definition at line 754 of file Property.cc.

Referenced by make_new().

+ Here is the caller graph for this function:

◆ Value_uint16_g() [2/2]

SWC::Config::Property::Value_uint16_g::Value_uint16_g ( Value_uint16_g ptr)

Definition at line 760 of file Property.cc.

◆ ~Value_uint16_g()

SWC::Config::Property::Value_uint16_g::~Value_uint16_g ( )
virtualnoexcept

Definition at line 765 of file Property.cc.

Member Function Documentation

◆ get()

SWC_CAN_INLINE uint16_t SWC::Config::Property::Value_uint16_g::get ( ) const
inlinenoexcept

Definition at line 572 of file Property.h.

Referenced by SWC::Manager::Rangers::column_compact(), SWC::Manager::MngrRole::fill_states(), SWC::Manager::MngrRole::managers_checker(), SWC::Manager::Rangers::next_rgr(), on_change(), SWC::Manager::Rangers::rgr_report(), and SWC::Manager::Rangers::update().

+ Here is the caller graph for this function:

◆ make_new()

Value::Ptr SWC::Config::Property::Value_uint16_g::make_new ( const Strings values = Strings())
overridevirtual

Implements SWC::Config::Property::Value.

Definition at line 767 of file Property.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), and Value_uint16_g().

+ Here is the call graph for this function:

◆ on_change()

void SWC::Config::Property::Value_uint16_g::on_change ( ) const

Definition at line 799 of file Property.cc.

References get(), and on_chg_cb.

Referenced by set_from().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_cb_on_chg()

void SWC::Config::Property::Value_uint16_g::set_cb_on_chg ( Value_uint16_g::OnChg_t &&  cb)

Definition at line 804 of file Property.cc.

References on_chg_cb.

◆ set_from() [1/2]

void SWC::Config::Property::Value_uint16_g::set_from ( const Strings values)
overridevirtual

Implements SWC::Config::Property::Value.

Definition at line 785 of file Property.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::back(), SWC::Config::Property::from_string(), SWC::Core::AtomicBase< T, OrderT >::store(), and value.

+ Here is the call graph for this function:

◆ set_from() [2/2]

void SWC::Config::Property::Value_uint16_g::set_from ( Value::Ptr  ptr)
overridevirtual

Implements SWC::Config::Property::Value.

Definition at line 774 of file Property.cc.

References SWC::Config::Property::Value::flags, SWC::Condition::from(), on_change(), on_chg_cb, SWC::Core::AtomicBase< T, OrderT >::store(), and value.

+ Here is the call graph for this function:

◆ to_string()

std::string SWC::Config::Property::Value_uint16_g::to_string ( ) const
overridevirtual

Implements SWC::Config::Property::Value.

Definition at line 795 of file Property.cc.

References SWC::Core::to_string(), and value.

+ Here is the call graph for this function:

◆ type()

Value::Type SWC::Config::Property::Value_uint16_g::type ( ) const
overridevirtualnoexcept

Implements SWC::Config::Property::Value.

Definition at line 791 of file Property.cc.

References value_type.

Member Data Documentation

◆ on_chg_cb

OnChg_t SWC::Config::Property::Value_uint16_g::on_chg_cb

Definition at line 581 of file Property.h.

Referenced by on_change(), set_cb_on_chg(), and set_from().

◆ value

Core::Atomic<uint16_t> SWC::Config::Property::Value_uint16_g::value

Definition at line 580 of file Property.h.

Referenced by set_from(), and to_string().

◆ value_type

const Type SWC::Config::Property::Value_uint16_g::value_type = TYPE_UINT16_G
static

Definition at line 550 of file Property.h.

Referenced by type().


The documentation for this class was generated from the following files: