The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
persist_context Class Referenceabstract

#include <persist_context.hpp>

Inheritance diagram for persist_context:
Inheritance graph

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)
 
configget_node (config &cfg, name_space &ns, bool force=false)
 
const configget_node (const config &cfg, const name_space &ns) const
 

Protected Attributes

config cfg_
 
name_space namespace_
 
bool valid_
 
bool in_transaction_
 

Detailed Description

Definition at line 24 of file persist_context.hpp.

Constructor & Destructor Documentation

virtual persist_context::~persist_context ( )
inlinevirtual

Definition at line 27 of file persist_context.hpp.

persist_context::persist_context ( )
inlineprotected

Definition at line 107 of file persist_context.hpp.

persist_context::persist_context ( const std::string name_space)
inlineprotected

Definition at line 114 of file persist_context.hpp.

Member Function Documentation

virtual bool persist_context::cancel_transaction ( )
pure virtual

Implemented in persist_file_context.

virtual bool persist_context::clear_var ( const std::string ,
bool  immediate = false 
)
pure virtual

Implemented in persist_file_context.

Referenced by clear_global_variable().

bool persist_context::dirty ( ) const
inline

Definition at line 157 of file persist_context.hpp.

virtual bool persist_context::end_transaction ( )
pure virtual

Implemented in persist_file_context.

config* persist_context::get_node ( config cfg,
name_space ns,
bool  force = false 
)
inlineprotected
const config* persist_context::get_node ( const config cfg,
const name_space ns 
) const
inlineprotected
std::string persist_context::get_node ( ) const
virtual config persist_context::get_var ( const std::string ) const
pure virtual

Implemented in persist_file_context.

Referenced by persist_choice::query_user().

persist_context::operator bool ( ) const
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().

virtual bool persist_context::set_var ( const std::string ,
const config ,
bool  immediate = false 
)
pure virtual

Implemented in persist_file_context.

Referenced by set_global_variable().

virtual bool persist_context::start_transaction ( )
pure virtual

Implemented in persist_file_context.

bool persist_context::valid ( ) const
inline

Member Data Documentation

config persist_context::cfg_
protected
bool persist_context::in_transaction_
protected
name_space persist_context::namespace_
protected
bool persist_context::valid_
protected

Definition at line 104 of file persist_context.hpp.

Referenced by operator bool(), and valid().


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