libpsynth 0.2.1
Public Member Functions
psynth::base::conf_backend_xml Class Reference

XML configuration backend that stores the config to an XML file. More...

#include <conf_backend_xml.hpp>

Inheritance diagram for psynth::base::conf_backend_xml:
Inheritance graph
[legend]
Collaboration diagram for psynth::base::conf_backend_xml:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 conf_backend_xml (const std::string &file)
 Constructor.
 ~conf_backend_xml ()
 Constructor.
void set_file (const std::string &file)
 Changes the name of the file to use.
const std::string & get_file ()
 Returns the name of the current filename.
void attach (conf_node &node)
 Called when attached to a node.
void datach (conf_node &node)
 Called when dattached from a node.
void save (conf_node &node)
 Permanently stores the configuration in the currently set file.
void load (conf_node &node)
 Loads the conentent of the XML file into a node.
void def_load (conf_node &node)
 Loads the content of the XML file into a node but preserving the node values that are already set.
void handle_conf_change (conf_node &c)
 Invoked on a change event.
void handle_conf_nudge (conf_node &c)
 Invoked on a nudge event.
void handle_conf_add_child (conf_node &c)
 Invoked on a new child event.
void handle_conf_del_child (conf_node &c)
 Invoked on a delete child event.

Detailed Description

XML configuration backend that stores the config to an XML file.

This is not a live backend so it needs explicit calls on save and load on the conf_node.


Constructor & Destructor Documentation

psynth::base::conf_backend_xml::conf_backend_xml ( const std::string &  file) [inline]

Constructor.

Parameters:
fileThe name of the file where to store and load the configuration.
psynth::base::conf_backend_xml::~conf_backend_xml ( ) [inline]

Constructor.


Member Function Documentation

void psynth::base::conf_backend_xml::attach ( conf_node node) [inline, virtual]

Called when attached to a node.

Does nothing.

Implements psynth::base::conf_backend.

void psynth::base::conf_backend_xml::datach ( conf_node node) [inline, virtual]

Called when dattached from a node.

Does nothing.

Implements psynth::base::conf_backend.

void psynth::base::conf_backend_xml::def_load ( conf_node node) [inline, virtual]

Loads the content of the XML file into a node but preserving the node values that are already set.

Implements psynth::base::conf_backend.

const std::string& psynth::base::conf_backend_xml::get_file ( ) [inline]

Returns the name of the current filename.

void psynth::base::conf_backend_xml::handle_conf_add_child ( conf_node c) [inline, virtual]

Invoked on a new child event.

Parameters:
cThe source config.

Implements psynth::base::conf_listener.

void psynth::base::conf_backend_xml::handle_conf_change ( conf_node c) [inline, virtual]

Invoked on a change event.

Parameters:
cThe source config.

Implements psynth::base::conf_listener.

void psynth::base::conf_backend_xml::handle_conf_del_child ( conf_node c) [inline, virtual]

Invoked on a delete child event.

Parameters:
cThe source config.

Implements psynth::base::conf_listener.

void psynth::base::conf_backend_xml::handle_conf_nudge ( conf_node c) [inline, virtual]

Invoked on a nudge event.

Parameters:
cThe source config.

Implements psynth::base::conf_listener.

void psynth::base::conf_backend_xml::load ( conf_node node) [inline, virtual]

Loads the conentent of the XML file into a node.

Parameters:
nodeThe node where to store the config.

Implements psynth::base::conf_backend.

void psynth::base::conf_backend_xml::save ( conf_node node) [virtual]

Permanently stores the configuration in the currently set file.

Parameters:
nodeThe configuration to store.

Implements psynth::base::conf_backend.

void psynth::base::conf_backend_xml::set_file ( const std::string &  file) [inline]

Changes the name of the file to use.

Parameters:
fileThe new file name to use.

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