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

#include <persist_context.hpp>

Inheritance diagram for persist_file_context:
Inheritance graph

Public Member Functions

 persist_file_context (const std::string &name_space)
 
bool clear_var (const std::string &, bool immediate=false)
 
config get_var (const std::string &) const
 
bool set_var (const std::string &, const config &, bool immediate=false)
 
bool start_transaction ()
 
bool end_transaction ()
 
bool cancel_transaction ()
 
- Public Member Functions inherited from persist_context
virtual ~persist_context ()
 
std::string get_node () const
 
void set_node (const std::string &)
 
bool valid () const
 
bool dirty () const
 
 operator bool () const
 

Private Member Functions

void load ()
 
void init ()
 
bool save_context ()
 

Additional Inherited Members

- Protected Member Functions inherited from persist_context
 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 inherited from persist_context
config cfg_
 
name_space namespace_
 
bool valid_
 
bool in_transaction_
 

Detailed Description

Definition at line 163 of file persist_context.hpp.

Constructor & Destructor Documentation

persist_file_context::persist_file_context ( const std::string name_space)

Definition at line 51 of file persist_context.cpp.

References load().

Member Function Documentation

bool persist_file_context::cancel_transaction ( )
inlinevirtual

Implements persist_context.

Definition at line 188 of file persist_context.hpp.

References persist_context::in_transaction_, and load().

bool persist_file_context::clear_var ( const std::string global,
bool  immediate = false 
)
virtual
bool persist_file_context::end_transaction ( )
inlinevirtual

Implements persist_context.

Definition at line 181 of file persist_context.hpp.

References persist_context::in_transaction_, and save_context().

config persist_file_context::get_var ( const std::string global) const
virtual
void persist_file_context::init ( )
private
void persist_file_context::load ( )
private
bool persist_file_context::save_context ( )
private
bool persist_file_context::set_var ( const std::string global,
const config val,
bool  immediate = false 
)
virtual
bool persist_file_context::start_transaction ( )
inlinevirtual

Implements persist_context.

Definition at line 175 of file persist_context.hpp.

References persist_context::in_transaction_.


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