The Battle for Wesnoth  1.15.1+dev
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::persist_file_context ( const std::string &  name_space)

Definition at line 49 of file persist_context.cpp.

References load().

Member Function Documentation

◆ cancel_transaction()

bool persist_file_context::cancel_transaction ( )
inlinevirtual

◆ clear_var()

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

◆ end_transaction()

bool persist_file_context::end_transaction ( )
inlinevirtual

Implements persist_context.

Definition at line 181 of file persist_context.hpp.

References persist_context::in_transaction_.

◆ get_var()

config persist_file_context::get_var ( const std::string &  global) const
virtual

◆ init()

void persist_file_context::init ( )
private

◆ load()

void persist_file_context::load ( )
private

◆ save_context()

bool persist_file_context::save_context ( )
private

◆ set_var()

bool persist_file_context::set_var ( const std::string &  global,
const config val,
bool  immediate = false 
)
virtual

◆ start_transaction()

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: