SWC-DB  v0.5.11 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Property.h
Go to the documentation of this file.
1 /*
2  * SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3  * License details at <https://github.com/kashirin-alex/swc-db/#license>
4  */
5 
6 
7 #ifndef swcdb_core_config_Property_h
8 #define swcdb_core_config_Property_h
9 
10 
11 #include "swcdb/core/Compat.h"
12 #include "swcdb/core/MutexAtomic.h"
13 
14 
15 namespace SWC { namespace Config {
16 
20 
21 const uint64_t K = 1000;
22 const uint64_t KiB = 1024;
23 const uint64_t M = K * 1000;
24 const uint64_t MiB = KiB * 1024;
25 const uint64_t G = M * 1000;
26 const uint64_t GiB = MiB * 1024;
27 const uint64_t T = G * 1000;
28 const uint64_t TiB = GiB * 1024;
29 
30 
32 namespace Property {
33 
34 
35 class Value {
36  public:
37 
38  enum Type : uint8_t {
45 
48 
52 
60  };
61  static const char* SWC_CONST_FUNC to_string(Type type) noexcept;
62 
63  static const uint8_t SKIPPABLE = 0x01;
64  static const uint8_t GUARDED = 0x02;
65  static const uint8_t DEFAULT = 0x04;
66  static const uint8_t NO_TOKEN = 0x08;
67 
68  typedef Value* Ptr;
69 
70  template <typename T>
72  static T* get_pointer(Ptr ptr) {
73  assure_match(ptr->type(), T::value_type);
74  return static_cast<T*>(ptr);
75  }
76 
77  static void assure_match(Type t1, Type t2);
78 
79  Value(uint8_t flags=0) noexcept;
80 
81  Value(Ptr ptr) noexcept;
82 
83  virtual ~Value() noexcept;
84 
85  virtual Ptr make_new(const Strings& values = Strings()) = 0;
86 
87  virtual Type type() const noexcept = 0;
88 
89  virtual void set_from(Ptr ptr) = 0;
90 
91  virtual void set_from(const Strings& values) = 0;
92 
93  virtual std::string to_string() const = 0;
94 
95  std::ostream& operator<<(std::ostream& ostream);
96 
97  bool is_skippable() const noexcept;
98 
99  bool is_guarded() const noexcept;
100 
101  Ptr default_value(bool defaulted) noexcept;
102 
103  bool is_default() const noexcept;
104 
105  Ptr zero_token() noexcept;
106 
107  bool is_zero_token() const noexcept;
108 
109  Core::Atomic<uint8_t> flags;
110 
111 };
112 
113 
118 void from_string(const char* s, double* value);
119 
120 void from_string(const char* s, int64_t* value);
121 
122 void from_string(const char* s, uint64_t* value);
123 
124 void from_string(const char* s, uint8_t* value);
125 
126 void from_string(const char* s, uint16_t* value);
127 
128 void from_string(const char* s, int32_t* value);
129 
130 template<typename T>
132 void from_string(const std::string& s, T value) {
133  from_string(s.c_str(), value);
134 }
135 
136 
137 
138 class Value_bool final : public Value {
139  public:
140  static const Type value_type = TYPE_BOOL;
141 
142  Value_bool(const bool& v, uint8_t flags=0) noexcept;
143 
144  Value_bool(Value_bool* ptr) noexcept;
145 
146  virtual ~Value_bool() noexcept;
147 
148  Ptr make_new(const Strings& values = Strings()) override;
149 
150  void set_from(Ptr ptr) override;
151 
152  void set_from(const Strings& values) override;
153 
154  Type SWC_CONST_FUNC type() const noexcept override;
155 
156  std::string to_string() const override;
157 
159  bool get() const noexcept {
160  return value;
161  }
162 
163  bool value;
164 };
165 
166 
167 class Value_uint8 final : public Value {
168  public:
169  static const Type value_type = TYPE_UINT8;
170 
171  Value_uint8(const uint8_t& v, uint8_t flags=0) noexcept;
172 
173  Value_uint8(Value_uint8* ptr) noexcept;
174 
175  virtual ~Value_uint8() noexcept;
176 
177  Ptr make_new(const Strings& values = Strings()) override;
178 
179  void set_from(Ptr ptr) override;
180 
181  void set_from(const Strings& values) override;
182 
183  Type SWC_CONST_FUNC type() const noexcept override;
184 
185  std::string to_string() const override;
186 
188  uint8_t get() const noexcept {
189  return value;
190  }
191 
192  uint8_t value;
193 };
194 
195 
196 class Value_uint16 final : public Value {
197  public:
198  static const Type value_type = TYPE_UINT16;
199 
200  Value_uint16(const uint16_t& v, uint8_t flags=0) noexcept;
201 
202  Value_uint16(Value_uint16* ptr) noexcept;
203 
204  virtual ~Value_uint16() noexcept;
205 
206  Ptr make_new(const Strings& values = Strings()) override;
207 
208  void set_from(Ptr ptr) override;
209 
210  void set_from(const Strings& values) override;
211 
212  Type SWC_CONST_FUNC type() const noexcept override;
213 
214  std::string to_string() const override;
215 
217  uint16_t get() const noexcept {
218  return value;
219  }
220 
221  uint16_t value;
222 };
223 
224 
225 class Value_int32 final : public Value {
226  public:
227  static const Type value_type = TYPE_INT32;
228 
229  Value_int32(const int32_t& v, uint8_t flags=0) noexcept;
230 
231  Value_int32(Value_int32* ptr) noexcept;
232 
233  virtual ~Value_int32() noexcept;
234 
235  Ptr make_new(const Strings& values = Strings()) override;
236 
237  void set_from(Ptr ptr) override;
238 
239  void set_from(const Strings& values) override;
240 
241  Type SWC_CONST_FUNC type() const noexcept override;
242 
243  std::string to_string() const override;
244 
246  int32_t get() const noexcept {
247  return value;
248  }
249 
250  int32_t value;
251 };
252 
253 
254 class Value_int64 final : public Value {
255  public:
256  static const Type value_type = TYPE_INT64;
257 
258  Value_int64(const int64_t& v, uint8_t flags=0) noexcept;
259 
260  Value_int64(Value_int64* ptr) noexcept;
261 
262  virtual ~Value_int64() noexcept;
263 
264  Ptr make_new(const Strings& values = Strings()) override;
265 
266  void set_from(Ptr ptr) override;
267 
268  void set_from(const Strings& values) override;
269 
270  Type SWC_CONST_FUNC type() const noexcept override;
271 
272  std::string to_string() const override;
273 
275  int64_t get() const noexcept {
276  return value;
277  }
278 
279  int64_t value;
280 };
281 
282 
283 class Value_double final : public Value {
284  public:
285  static const Type value_type = TYPE_DOUBLE;
286 
287  Value_double(const double& v, uint8_t flags=0) noexcept;
288 
289  Value_double(Value_double* ptr) noexcept;
290 
291  virtual ~Value_double() noexcept;
292 
293  Ptr make_new(const Strings& values = Strings()) override;
294 
295  void set_from(Ptr ptr) override;
296 
297  void set_from(const Strings& values) override;
298 
299  Type SWC_CONST_FUNC type() const noexcept override;
300 
301  std::string to_string() const override;
302 
304  double get() const noexcept {
305  return value;
306  }
307 
308  double value;
309 };
310 
311 
312 class Value_string final : public Value {
313  public:
314  static const Type value_type = TYPE_STRING;
315 
316  Value_string(std::string&& v, uint8_t flags=0) noexcept;
317 
319 
320  virtual ~Value_string() noexcept;
321 
322  Ptr make_new(const Strings& values = Strings()) override;
323 
324  void set_from(Ptr ptr) override;
325 
326  void set_from(const Strings& values) override;
327 
328  Type SWC_CONST_FUNC type() const noexcept override;
329 
330  std::string to_string() const override;
331 
333  std::string get() const {
334  return value;
335  }
336 
337  std::string value;
338 };
339 
340 
341 class Value_enum final : public Value {
342  public:
343  static const Type value_type = TYPE_ENUM;
344 
345  typedef std::function<int(const std::string&)> FromString_t;
346  typedef std::function<std::string(int)> Repr_t;
347 
348  Value_enum(const int32_t& v,
350  Repr_t&& repr,
351  uint8_t flags=0);
352 
353  Value_enum(Value_enum* ptr);
354 
355  virtual ~Value_enum() noexcept;
356 
357  Ptr make_new(const Strings& values = Strings()) override;
358 
359  void set_from(Ptr ptr) override;
360 
361  void set_from(const Strings& values) override;
362 
363  Type SWC_CONST_FUNC type() const noexcept override;
364 
365  std::string to_string() const override;
366 
368  int32_t get() const noexcept {
369  return value;
370  }
371 
372  int32_t value;
373  FromString_t call_from_string = nullptr;
374  Repr_t call_repr = nullptr;
375 };
376 
377 // lists
378 class Value_strings final : public Value {
379  public:
380  static const Type value_type = TYPE_STRINGS;
381 
382  Value_strings(Strings&& v, uint8_t flags=0) noexcept;
383 
385 
386  virtual ~Value_strings() noexcept;
387 
388  Ptr make_new(const Strings& values = Strings()) override;
389 
390  void set_from(Ptr ptr) override;
391 
392  void set_from(const Strings& values) override;
393 
394  Type SWC_CONST_FUNC type() const noexcept override;
395 
396  std::string to_string() const override;
397 
399  Strings get() const {
400  return value;
401  }
402 
404 };
405 
406 
407 class Value_int64s final : public Value {
408  public:
409  static const Type value_type = TYPE_INT64S;
410 
411  Value_int64s(Int64s&& v, uint8_t flags=0) noexcept;
412 
414 
415  virtual ~Value_int64s() noexcept;
416 
417  Ptr make_new(const Strings& values = Strings()) override;
418 
419  void set_from(Ptr ptr) override;
420 
421  void set_from(const Strings& values) override;
422 
423  Type SWC_CONST_FUNC type() const noexcept override;
424 
425  std::string to_string() const override;
426 
428  Int64s get() const {
429  return value;
430  }
431 
433 };
434 
435 
436 class Value_doubles final : public Value {
437  public:
438  static const Type value_type = TYPE_DOUBLES;
439 
440  Value_doubles(Doubles&& v, uint8_t flags=0) noexcept;
441 
443 
444  virtual ~Value_doubles() noexcept;
445 
446  Ptr make_new(const Strings& values = Strings()) override;
447 
448  void set_from(Ptr ptr) override;
449 
450  void set_from(const Strings& values) override;
451 
452  Type SWC_CONST_FUNC type() const noexcept override;
453 
454  std::string to_string() const override;
455 
457  Doubles get() const {
458  return value;
459  }
460 
462 };
463 
464 
465 
466 // Guarded Atomic
467 class Value_bool_g final : public Value {
468  public:
469  static const Type value_type = TYPE_BOOL_G;
470 
471  typedef Value_bool_g* Ptr;
472  typedef std::function<void(bool)> OnChg_t;
473 
474  Value_bool_g(const bool& v, OnChg_t&& cb, uint8_t flags=0);
475 
477 
478  virtual ~Value_bool_g() noexcept;
479 
480  Value::Ptr make_new(const Strings& values = Strings()) override;
481 
482  void set_from(Value::Ptr ptr) override;
483 
484  void set_from(const Strings& values) override;
485 
486  Type SWC_CONST_FUNC type() const noexcept override;
487 
488  std::string to_string() const override;
489 
491  bool get() const noexcept {
492  return value;
493  }
494 
495  void set(bool v) noexcept;
496 
497  void on_change() const;
498 
499  void set_cb_on_chg(OnChg_t&& cb);
500 
503 };
504 
505 
506 class Value_uint8_g final : public Value {
507  public:
508  static const Type value_type = TYPE_UINT8_G;
509 
510  typedef Value_uint8_g* Ptr;
511  typedef std::function<void(uint8_t)> OnChg_t;
512 
513  Value_uint8_g(const uint8_t& v, OnChg_t&& cb, uint8_t flags=0);
514 
516 
517  virtual ~Value_uint8_g() noexcept;
518 
519  Value::Ptr make_new(const Strings& values = Strings()) override;
520 
521  void set_from(Value::Ptr ptr) override;
522 
523  void set_from(const Strings& values) override;
524 
525  Type SWC_CONST_FUNC type() const noexcept override;
526 
527  std::string to_string() const override;
528 
530  uint8_t get() const noexcept {
531  return value;
532  }
533 
534  void on_change() const;
535 
536  void set_cb_on_chg(OnChg_t&& cb);
537 
540 };
541 
542 
543 class Value_uint16_g final : public Value {
544  public:
545  static const Type value_type = TYPE_UINT16_G;
546 
547  typedef Value_uint16_g* Ptr;
548  typedef std::function<void(uint16_t)> OnChg_t;
549 
550  Value_uint16_g(const uint16_t& v, OnChg_t&& cb, uint8_t flags=0);
551 
553 
554  virtual ~Value_uint16_g() noexcept;
555 
556  Value::Ptr make_new(const Strings& values = Strings()) override;
557 
558  void set_from(Value::Ptr ptr) override;
559 
560  void set_from(const Strings& values) override;
561 
562  Type SWC_CONST_FUNC type() const noexcept override;
563 
564  std::string to_string() const override;
565 
567  uint16_t get() const noexcept {
568  return value;
569  }
570 
571  void on_change() const;
572 
573  void set_cb_on_chg(OnChg_t&& cb);
574 
577 
578 };
579 
580 
581 class Value_int32_g final : public Value {
582  public:
583  static const Type value_type = TYPE_INT32_G;
584 
585  typedef Value_int32_g* Ptr;
586  typedef std::function<void(int32_t)> OnChg_t;
587 
588  Value_int32_g(const int32_t& v, OnChg_t&& cb, uint8_t flags=0);
589 
591 
592  virtual ~Value_int32_g() noexcept;
593 
594  Value::Ptr make_new(const Strings& values = Strings()) override;
595 
596  void set_from(Value::Ptr ptr) override;
597 
598  void set_from(const Strings& values) override;
599 
600  Type SWC_CONST_FUNC type() const noexcept override;
601 
602  std::string to_string() const override;
603 
605  int32_t get() const noexcept {
606  return value;
607  }
608 
609  void on_change() const;
610 
611  void set_cb_on_chg(OnChg_t&& cb);
612 
615 
616 };
617 
618 
619 class Value_uint64_g final : public Value {
620  public:
621  static const Type value_type = TYPE_UINT64_G;
622 
623  typedef Value_uint64_g* Ptr;
624  typedef std::function<void(uint64_t)> OnChg_t;
625 
626  Value_uint64_g(const uint64_t& v, OnChg_t&& cb, uint8_t flags=0);
627 
629 
630  virtual ~Value_uint64_g() noexcept;
631 
632  Value::Ptr make_new(const Strings& values = Strings()) override;
633 
634  void set_from(Value::Ptr ptr) override;
635 
636  void set_from(const Strings& values) override;
637 
638  Type SWC_CONST_FUNC type() const noexcept override;
639 
640  std::string to_string() const override;
641 
643  uint64_t get() const noexcept {
644  return value;
645  }
646 
647  void on_change() const;
648 
649  void set_cb_on_chg(OnChg_t&& cb);
650 
653 
654 };
655 
656 
657 class Value_enum_g final : public Value {
658  public:
659  static const Type value_type = TYPE_ENUM_G;
660 
661  typedef Value_enum_g* Ptr;
662  typedef std::function<void(int32_t)> OnChg_t;
665 
666  Value_enum_g(const int32_t& v,
667  OnChg_t&& cb,
669  Repr_t&& repr,
670  uint8_t flags=0);
671 
673 
674  virtual ~Value_enum_g() noexcept;
675 
676  Value::Ptr make_new(const Strings& values = Strings()) override;
677 
678  void set_from(Value::Ptr ptr) override;
679 
680  void set_from(const Strings& values) override;
681 
682  Type SWC_CONST_FUNC type() const noexcept override;
683 
684  std::string to_string() const override;
685 
687  int32_t get() const noexcept {
688  return value;
689  }
690 
691  void set(int32_t nv);
692 
693  void on_change() const;
694 
695  void set_cb_on_chg(OnChg_t&& cb);
696 
699  FromString_t call_from_string = nullptr;
700  Repr_t call_repr = nullptr;
701 };
702 
703 
704 
705 // Guarded Mutex
706 class Value_strings_g final : public Value {
707  public:
708  static const Type value_type = TYPE_STRINGS_G;
709 
711  typedef std::function<void()> OnChg_t;
712 
713  Value_strings_g(Strings&& v, OnChg_t&& cb, uint8_t flags=0) noexcept;
714 
716 
717  virtual ~Value_strings_g() noexcept;
718 
719  Value::Ptr make_new(const Strings& values = Strings()) override;
720 
721  void set_from(Value::Ptr ptr) override;
722 
723  void set_from(const Strings& values) override;
724 
725  Type SWC_CONST_FUNC type() const noexcept override;
726 
727  std::string to_string() const override;
728 
729  Strings get() const;
730 
731  size_t size() noexcept;
732 
733  std::string get_item(size_t n);
734 
735  void on_change() const;
736 
737  void set_cb_on_chg(OnChg_t&& cb);
738 
739  mutable Core::MutexAtomic mutex;
740  Strings value;
741  OnChg_t on_chg_cb;
742 
743 };
744 
745 
746 
747 
748 
749 }}} // namespace SWC::Config::Property
750 
751 
752 #ifdef SWC_IMPL_SOURCE
754 #endif
755 
756 #endif // swcdb_core_config_Property_h
SWC::Config::Property::Value_string::value
std::string value
Definition: Property.h:337
SWC::Config::Property::Value::type
virtual Type type() const noexcept=0
SWC::Config::Property::Value::is_skippable
bool is_skippable() const noexcept
Definition: Property.cc:75
SWC::Config::Property::Value_uint8_g::Ptr
Value_uint8_g * Ptr
Definition: Property.h:510
SWC::Config::Property::Value_uint64_g
Definition: Property.h:619
SWC::Config::Property::Value::TYPE_DOUBLES
@ TYPE_DOUBLES
Definition: Property.h:51
SWC::Config::Property::Value::default_value
Ptr default_value(bool defaulted) noexcept
Definition: Property.cc:83
SWC::Config::Property::Value::TYPE_ENUM_G
@ TYPE_ENUM_G
Definition: Property.h:58
SWC::Config::Property::Value_int64::value
int64_t value
Definition: Property.h:279
SWC::Config::GiB
const uint64_t GiB
Definition: Property.h:26
SWC::Core::AtomicBase< bool >
SWC::Config::Property::Value_uint16::value
uint16_t value
Definition: Property.h:221
SWC::Config::Property::Value_bool_g::on_chg_cb
OnChg_t on_chg_cb
Definition: Property.h:502
SWC::Config::Property::Value::is_guarded
bool is_guarded() const noexcept
Definition: Property.cc:79
SWC::Config::Doubles
Core::Vector< double > Doubles
Definition: Property.h:19
SWC::Config::Property::Value::get_pointer
static SWC_CAN_INLINE T * get_pointer(Ptr ptr)
Definition: Property.h:72
SWC::Config::MiB
const uint64_t MiB
Definition: Property.h:24
SWC::Config::Property::Value_strings_g::OnChg_t
std::function< void()> OnChg_t
Definition: Property.h:711
SWC::Config::Property::Value::TYPE_UINT64_G
@ TYPE_UINT64_G
Definition: Property.h:57
SWC::Config::Property::Value_int64s::value
Int64s value
Definition: Property.h:432
Property.cc
SWC::Config::Property::Value::to_string
virtual std::string to_string() const =0
SWC::Core::Atomic< uint8_t >
SWC::Config::Strings
Core::Vector< std::string > Strings
Definition: Property.h:17
SWC::Config::Property::Value_uint8_g::OnChg_t
std::function< void(uint8_t)> OnChg_t
Definition: Property.h:511
SWC::Config::Property::Value::SKIPPABLE
static const uint8_t SKIPPABLE
Definition: Property.h:63
SWC::Config::Property::Value_uint16_g::Ptr
Value_uint16_g * Ptr
Definition: Property.h:547
SWC::Config::Property::Value::is_default
bool is_default() const noexcept
Definition: Property.cc:90
SWC::Config::Property::Value::TYPE_DOUBLE
@ TYPE_DOUBLE
Definition: Property.h:44
SWC::Config::Property::Value_enum_g::value
Core::Atomic< int32_t > value
Definition: Property.h:697
SWC::Config::Property::Value_strings
Definition: Property.h:378
SWC::Config::Property::Value_uint64_g::OnChg_t
std::function< void(uint64_t)> OnChg_t
Definition: Property.h:624
SWC::Config::Property::Value_uint8_g::value
Core::Atomic< uint8_t > value
Definition: Property.h:538
SWC::Config::Property::Value_uint16
Definition: Property.h:196
SWC::Config::Property::Value::TYPE_UINT8_G
@ TYPE_UINT8_G
Definition: Property.h:54
SWC::Config::Property::Value_bool
Definition: Property.h:138
SWC::Config::Property::Value_int32_g::value
Core::Atomic< int32_t > value
Definition: Property.h:613
SWC::Config::Property::Value::Value
Value(uint8_t flags=0) noexcept
Definition: Property.cc:65
SWC::Config::Property::Value::Ptr
Value * Ptr
Definition: Property.h:68
SWC::Config::Property::Value::TYPE_STRINGS_G
@ TYPE_STRINGS_G
Definition: Property.h:59
SWC::Config::Property::Value_enum::FromString_t
std::function< int(const std::string &)> FromString_t
Definition: Property.h:345
SWC::Config::Property::Value_int32
Definition: Property.h:225
SWC::Config::Property::Value::TYPE_STRING
@ TYPE_STRING
Definition: Property.h:46
SWC::Config::Property::Value_doubles
Definition: Property.h:436
SWC::Config::Property::Value_int32_g::on_chg_cb
OnChg_t on_chg_cb
Definition: Property.h:614
SWC::Config::Property::Value_uint64_g::Ptr
Value_uint64_g * Ptr
Definition: Property.h:623
SWC::Config::Property::Value_strings_g
Definition: Property.h:706
SWC::Config::Property::Value_uint16_g::on_chg_cb
OnChg_t on_chg_cb
Definition: Property.h:576
SWC::Config::Property::Value::TYPE_BOOL_G
@ TYPE_BOOL_G
Definition: Property.h:53
SWC_CONST_FUNC
#define SWC_CONST_FUNC
Definition: Compat.h:107
SWC::Config::Property::Value::DEFAULT
static const uint8_t DEFAULT
Definition: Property.h:65
SWC::Config::Property::Value_int64
Definition: Property.h:254
SWC_CAN_INLINE
#define SWC_CAN_INLINE
Definition: Compat.h:102
SWC::Config::Property::Value::TYPE_INT32
@ TYPE_INT32
Definition: Property.h:42
SWC::Config::Property::Value_uint64_g::value
Core::Atomic< uint64_t > value
Definition: Property.h:651
SWC::Config::Property::Value_int32::value
int32_t value
Definition: Property.h:250
SWC::Config::Property::Value::TYPE_UINT16_G
@ TYPE_UINT16_G
Definition: Property.h:55
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::Config::Property::Value::TYPE_STRINGS
@ TYPE_STRINGS
Definition: Property.h:49
SWC::Config::Property::Value::make_new
virtual Ptr make_new(const Strings &values=Strings())=0
SWC::Config::Property::Value_strings_g::Ptr
Value_strings_g * Ptr
Definition: Property.h:710
size
uint32_t size
Buffer size.
Definition: HeaderBufferInfo.h:47
Compat.h
SWC::Config::Property::Value_uint8::value
uint8_t value
Definition: Property.h:192
SWC::Config::Property::Value_enum::value
int32_t value
Definition: Property.h:372
SWC::Config::Property::Value::GUARDED
static const uint8_t GUARDED
Definition: Property.h:64
SWC::Config::K
const uint64_t K
Definition: Property.h:21
SWC::Config::Property::Value::TYPE_ENUM
@ TYPE_ENUM
Definition: Property.h:47
SWC::Config::Property::from_string
void from_string(const char *s, double *value)
Definition: Property.cc:109
SWC::Config::G
const uint64_t G
Definition: Property.h:25
SWC::Config::Property::Value::Type
Type
Definition: Property.h:38
SWC::Config::Property::Value_bool_g::Ptr
Value_bool_g * Ptr
Definition: Property.h:471
MutexAtomic.h
SWC::Config::Property::Value_bool_g::OnChg_t
std::function< void(bool)> OnChg_t
Definition: Property.h:472
SWC::Config::TiB
const uint64_t TiB
Definition: Property.h:28
SWC::Config::Property::Value_strings::value
Strings value
Definition: Property.h:403
SWC::Config::Property::Value::NO_TOKEN
static const uint8_t NO_TOKEN
Definition: Property.h:66
SWC::Config::Property::Value_uint8_g
Definition: Property.h:506
SWC::Config::Property::Value_string
Definition: Property.h:312
SWC::Config::Property::Value
Definition: Property.h:35
SWC::Config::Property::Value::flags
Core::Atomic< uint8_t > flags
Definition: Property.h:109
SWC::Config::Int64s
Core::Vector< int64_t > Int64s
Definition: Property.h:18
SWC::Config::Property::Value_enum_g
Definition: Property.h:657
set
void set(uint64_t cmd=0, uint32_t timeout=0) noexcept
Definition: Header.h:31
SWC::Config::Property::Value_uint16_g::value
Core::Atomic< uint16_t > value
Definition: Property.h:575
SWC::Core::Vector< std::string >
SWC::Config::Property::Value_enum::Repr_t
std::function< std::string(int)> Repr_t
Definition: Property.h:346
SWC::Config::Property::Value_uint16_g::OnChg_t
std::function< void(uint16_t)> OnChg_t
Definition: Property.h:548
SWC::Config::Property::Value_enum_g::Repr_t
Value_enum::Repr_t Repr_t
Definition: Property.h:664
SWC::Config::Property::Value::zero_token
Ptr zero_token() noexcept
Definition: Property.cc:94
SWC::Config::Property::Value_uint8
Definition: Property.h:167
SWC::Config::Property::Value_bool::value
bool value
Definition: Property.h:163
SWC::Config::T
const uint64_t T
Definition: Property.h:27
SWC::Config::Property::Value::TYPE_INT64
@ TYPE_INT64
Definition: Property.h:43
SWC::Config::Property::Value::TYPE_INT32_G
@ TYPE_INT32_G
Definition: Property.h:56
SWC::Config::Property::Value::set_from
virtual void set_from(Ptr ptr)=0
SWC::Config::Property::Value::TYPE_UINT16
@ TYPE_UINT16
Definition: Property.h:41
SWC::Config::Property::Value_int64s
Definition: Property.h:407
SWC::Config::Property::Value_uint16_g
Definition: Property.h:543
SWC::Config::Property::Value_enum_g::OnChg_t
std::function< void(int32_t)> OnChg_t
Definition: Property.h:662
SWC::Config::Property::Value_enum_g::on_chg_cb
OnChg_t on_chg_cb
Definition: Property.h:698
SWC::Config::Property::Value_double::value
double value
Definition: Property.h:308
SWC::Config::Property::Value_doubles::value
Doubles value
Definition: Property.h:461
SWC::Config::Property::Value_double
Definition: Property.h:283
SWC::Config::Property::Value_int32_g::Ptr
Value_int32_g * Ptr
Definition: Property.h:585
SWC::Config::Property::Value::is_zero_token
bool is_zero_token() const noexcept
Definition: Property.cc:99
SWC::Config::Property::Value_bool_g
Definition: Property.h:467
SWC::Config::Property::Value_int32_g::OnChg_t
std::function< void(int32_t)> OnChg_t
Definition: Property.h:586
SWC::Config::Property::Value_enum_g::FromString_t
Value_enum::FromString_t FromString_t
Definition: Property.h:663
SWC::Config::Property::Value_enum
Definition: Property.h:341
SWC::Config::Property::Value_bool_g::value
Core::AtomicBool value
Definition: Property.h:501
SWC::Config::Property::Value_enum_g::Ptr
Value_enum_g * Ptr
Definition: Property.h:661
SWC::Config::KiB
const uint64_t KiB
Definition: Property.h:22
SWC::Config::M
const uint64_t M
Definition: Property.h:23
SWC::Config::Property::Value::TYPE_BOOL
@ TYPE_BOOL
Definition: Property.h:39
SWC::Config::Property::Value::TYPE_INT64S
@ TYPE_INT64S
Definition: Property.h:50
SWC::Config::Property::Value_int32_g
Definition: Property.h:581
SWC::Config::Property::Value::assure_match
static void assure_match(Type t1, Type t2)
Definition: Property.cc:57
SWC::Config::Property::Value::TYPE_UINT8
@ TYPE_UINT8
Definition: Property.h:40
SWC::Config::Property::Value_uint64_g::on_chg_cb
OnChg_t on_chg_cb
Definition: Property.h:652
SWC::Config::Property::Value_uint8_g::on_chg_cb
OnChg_t on_chg_cb
Definition: Property.h:539