#include <persist_context.hpp>
Classes | |
struct | name_space |
Public Member Functions | |
virtual | ~persist_context () |
virtual bool | clear_var (const std::string &, bool immediate=false)=0 |
virtual config | get_var (const std::string &) const =0 |
virtual bool | set_var (const std::string &, const config &, bool immediate=false)=0 |
virtual bool | start_transaction ()=0 |
virtual bool | end_transaction ()=0 |
virtual bool | cancel_transaction ()=0 |
std::string | get_node () const |
void | set_node (const std::string &) |
bool | valid () const |
bool | dirty () const |
operator bool () const | |
Protected Member Functions | |
persist_context () | |
persist_context (const std::string &name_space) | |
config * | get_node (config &cfg, name_space &ns, bool force=false) |
const config * | get_node (const config &cfg, const name_space &ns) const |
Protected Attributes | |
config | cfg_ |
name_space | namespace_ |
bool | valid_ |
bool | in_transaction_ |
Definition at line 24 of file persist_context.hpp.
|
inlinevirtual |
Definition at line 27 of file persist_context.hpp.
|
inlineprotected |
Definition at line 107 of file persist_context.hpp.
|
inlineprotected |
Definition at line 114 of file persist_context.hpp.
|
pure virtual |
Implemented in persist_file_context.
|
pure virtual |
Implemented in persist_file_context.
Referenced by clear_global_variable().
|
inline |
Definition at line 157 of file persist_context.hpp.
|
pure virtual |
Implemented in persist_file_context.
|
inlineprotected |
Definition at line 121 of file persist_context.hpp.
References config::child(), config::child_or_add(), get_node(), config::has_child(), next, persist_context::name_space::next(), and persist_context::name_space::root_.
Referenced by persist_manager::get_context().
|
inlineprotected |
Definition at line 135 of file persist_context.hpp.
References config::child(), get_node(), config::has_child(), next, persist_context::name_space::next(), and persist_context::name_space::root_.
std::string persist_context::get_node | ( | ) | const |
Definition at line 253 of file persist_context.cpp.
References persist_context::name_space::namespace_, and namespace_.
Referenced by persist_file_context::clear_var(), get_node(), persist_file_context::get_var(), and persist_file_context::set_var().
|
pure virtual |
Implemented in persist_file_context.
Referenced by persist_choice::query_user().
|
inline |
Definition at line 160 of file persist_context.hpp.
References valid_.
void persist_context::set_node | ( | const std::string & | name | ) |
Definition at line 246 of file persist_context.cpp.
References namespace_, and persist_context::name_space::root_.
Referenced by persist_manager::get_context().
|
pure virtual |
Implemented in persist_file_context.
Referenced by set_global_variable().
|
pure virtual |
Implemented in persist_file_context.
|
inline |
Definition at line 156 of file persist_context.hpp.
References valid_.
Referenced by verify_and_clear_global_variable(), verify_and_get_global_variable(), and verify_and_set_global_variable().
|
protected |
Definition at line 102 of file persist_context.hpp.
Referenced by persist_file_context::clear_var(), persist_file_context::get_var(), persist_file_context::load(), persist_file_context::save_context(), and persist_file_context::set_var().
|
protected |
Definition at line 105 of file persist_context.hpp.
Referenced by persist_file_context::cancel_transaction(), persist_file_context::clear_var(), persist_file_context::end_transaction(), persist_file_context::set_var(), and persist_file_context::start_transaction().
|
protected |
Definition at line 103 of file persist_context.hpp.
Referenced by persist_file_context::clear_var(), get_node(), persist_file_context::get_var(), persist_file_context::load(), persist_file_context::save_context(), set_node(), and persist_file_context::set_var().
|
protected |
Definition at line 104 of file persist_context.hpp.
Referenced by operator bool(), and valid().