2#ifndef OKSCONFLIBS_OKSCONFLIBSOBJECT_H_
3#define OKSCONFLIBS_OKSCONFLIBSOBJECT_H_
14namespace oksconflibs {
16class ConfigurationImpl;
34 virtual
void get(const
std::
string& name,
bool& value);
35 virtual
void get(const
std::
string& name, uint8_t& value);
36 virtual
void get(const
std::
string& name, int8_t& value);
37 virtual
void get(const
std::
string& name, uint16_t& value);
38 virtual
void get(const
std::
string& name, int16_t& value);
39 virtual
void get(const
std::
string& name, uint32_t& value);
40 virtual
void get(const
std::
string& name, int32_t& value);
41 virtual
void get(const
std::
string& name, uint64_t& value);
42 virtual
void get(const
std::
string& name, int64_t& value);
43 virtual
void get(const
std::
string& name,
float& value);
44 virtual
void get(const
std::
string& name,
double& value);
45 virtual
void get(const
std::
string& name,
std::
string& value);
48 virtual
void get(const
std::
string& name,
std::vector<
bool>& value);
49 virtual
void get(const
std::
string& name,
std::vector<uint8_t>& value);
50 virtual
void get(const
std::
string& name,
std::vector<int8_t>& value);
51 virtual
void get(const
std::
string& name,
std::vector<uint16_t>& value);
52 virtual
void get(const
std::
string& name,
std::vector<int16_t>& value);
53 virtual
void get(const
std::
string& name,
std::vector<uint32_t>& value);
54 virtual
void get(const
std::
string& name,
std::vector<int32_t>& value);
55 virtual
void get(const
std::
string& name,
std::vector<uint64_t>& value);
56 virtual
void get(const
std::
string& name,
std::vector<int64_t>& value);
57 virtual
void get(const
std::
string& name,
std::vector<
float>& value);
58 virtual
void get(const
std::
string& name,
std::vector<
double>& value);
59 virtual
void get(const
std::
string& name,
std::vector<
std::
string>& value);
66 virtual
void set(const
std::
string& name,
bool value);
67 virtual
void set(const
std::
string& name, uint8_t value);
68 virtual
void set(const
std::
string& name, int8_t value);
69 virtual
void set(const
std::
string& name, uint16_t value);
70 virtual
void set(const
std::
string& name, int16_t value);
71 virtual
void set(const
std::
string& name, uint32_t value);
72 virtual
void set(const
std::
string& name, int32_t value);
73 virtual
void set(const
std::
string& name, uint64_t value);
74 virtual
void set(const
std::
string& name, int64_t value);
75 virtual
void set(const
std::
string& name,
float value);
76 virtual
void set(const
std::
string& name,
double value);
77 virtual
void set(const
std::
string& name, const
std::
string& value);
79 virtual
void set_enum(const
std::
string& attribute, const
std::
string& value);
80 virtual
void set_date(const
std::
string& attribute, const
std::
string& value);
81 virtual
void set_time(const
std::
string& attribute, const
std::
string& value);
83 virtual
void set_class(const
std::
string& attribute, const
std::
string& value);
85 virtual
void set(const
std::
string& name, const
std::vector<
bool>& value);
86 virtual
void set(const
std::
string& name, const
std::vector<uint8_t>& value);
87 virtual
void set(const
std::
string& name, const
std::vector<int8_t>& value);
88 virtual
void set(const
std::
string& name, const
std::vector<uint16_t>& value);
89 virtual
void set(const
std::
string& name, const
std::vector<int16_t>& value);
90 virtual
void set(const
std::
string& name, const
std::vector<uint32_t>& value);
91 virtual
void set(const
std::
string& name, const
std::vector<int32_t>& value);
92 virtual
void set(const
std::
string& name, const
std::vector<uint64_t>& value);
93 virtual
void set(const
std::
string& name, const
std::vector<int64_t>& value);
94 virtual
void set(const
std::
string& name, const
std::vector<
float>& value);
95 virtual
void set(const
std::
string& name, const
std::vector<
double>& value);
96 virtual
void set(const
std::
string& name, const
std::vector<
std::
string>& value);
98 virtual
void set_enum(const
std::
string& attribute, const
std::vector<
std::
string>& value);
99 virtual
void set_date(const
std::
string& attribute, const
std::vector<
std::
string>& value);
100 virtual
void set_time(const
std::
string& attribute, const
std::vector<
std::
string>& value);
102 virtual
void set_class(const
std::
string& attribute, const
std::vector<
std::
string>& value);
107 virtual
void move(const
std::
string& at);
108 virtual
void rename(const
std::
string& new_id);
110 virtual
void reset();
125 template<class T>
void get_value(const
std::
string& name, T& value);
126 template<class T>
void get_vector(const
std::
string& name,
std::vector<T>& value);
132 void set_rel_value(const
std::
string& name,
oks::OksData& value,
bool skip_non_null_check);
134 template<class T>
void set_value(const
std::
string& name, const T& value);
135 template<class T>
void set_vector(const
std::
string& name, const
std::vector<T>& value);
Implements database objects.
friend class ConfigObject
Provides pure virtual interface used by the Configuration class.
OksObject describes instance of OksClass.
void set_vector(const std::string &name, const std::vector< T > &value)
virtual const std::string contained_in() const
Virtual method to get object's database file name.
virtual void set_date(const std::string &attribute, const std::string &value)
Virtual method to set date attribute value.
void set_value(const std::string &name, const T &value)
virtual void set_enum(const std::string &attribute, const std::string &value)
Virtual method to set enumeration attribute value.
virtual void move(const std::string &at)
Virtual method to move object to a file.
virtual ~OksConfigObject() noexcept
void set_attr_value(const std::string &name, oks::OksData &value)
virtual void set_class(const std::string &attribute, const std::string &value)
Virtual method to set enumeration attribute value.
friend class ConfigurationImpl
void set_rel_value(const std::string &name, oks::OksData &value, bool skip_non_null_check)
void get_value(const std::string &name, T &value)
void get_vector(const std::string &name, std::vector< T > &value)
virtual void set_time(const std::string &attribute, const std::string &value)
Virtual method to set time attribute value.
virtual void referenced_by(std::vector< conffwk::ConfigObject > &value, const std::string &association, bool check_composite_only, unsigned long rlevel, const std::vector< std::string > *rclasses) const
oks::OksData::Type get_type(const std::string &attribute) const
virtual void get(const std::string &name, bool &value)
Virtual method to read boolean attribute value.
virtual void rename(const std::string &new_id)
Virtual method to change object ID.
virtual bool rel(const std::string &name, std::vector< conffwk::ConfigObject > &value)
OksConfigObject(oks::OksObject *obj, conffwk::ConfigurationImpl *impl) noexcept
virtual void reset()
Virtual method to reset the implementation object from unknown state.
Monitoring thread not set