Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

s11nlite::simple_config Class Reference

simple_config provides very basic config file features. More...

#include <simple_config.hpp>

List of all members.

Public Types

typedef ::s11nlite::node_type node_type
typedef ::s11nlite::node_traits node_traits

Public Member Functions

 simple_config (const std::string &basename) throw (std::runtime_error)
 Constructs a config object associated with the file $HOME/.basename.s11n.
 ~simple_config () throw ()
 Attempts to save this object's node() to this->abs_path().
std::string abs_path () const
 Absolute path to this object's file.
std::string basename () const
 Base filename passed to the ctor.
node_typenode ()
 This object's data node, which can be used to store any s11nlite-serializable data.


Detailed Description

simple_config provides very basic config file features.

Definition at line 17 of file simple_config.hpp.


Member Typedef Documentation

typedef ::s11nlite::node_traits s11nlite::simple_config::node_traits
 

Definition at line 21 of file simple_config.hpp.

typedef ::s11nlite::node_type s11nlite::simple_config::node_type
 

Definition at line 20 of file simple_config.hpp.


Constructor & Destructor Documentation

s11nlite::simple_config::simple_config const std::string &  basename  )  throw (std::runtime_error) [inline]
 

Constructs a config object associated with the file $HOME/.basename.s11n.

If the file does not exist we assume we can create it. If $HOME cannot be resolved or basename has a '/' character in it an exception is thrown. basename should be a filename friendly string, such as "myapp", "My_App", or "My_App-1.0.3".

Definition at line 76 of file simple_config.hpp.

s11nlite::simple_config::~simple_config  )  throw () [inline]
 

Attempts to save this object's node() to this->abs_path().

Definition at line 86 of file simple_config.hpp.

References CERR, and s11nlite::save().


Member Function Documentation

std::string s11nlite::simple_config::abs_path  )  const [inline]
 

Absolute path to this object's file.

Definition at line 106 of file simple_config.hpp.

std::string s11nlite::simple_config::basename  )  const [inline]
 

Base filename passed to the ctor.

Definition at line 114 of file simple_config.hpp.

node_type& s11nlite::simple_config::node  )  [inline]
 

This object's data node, which can be used to store any s11nlite-serializable data.

Definition at line 123 of file simple_config.hpp.


The documentation for this class was generated from the following file:
Generated on Sat Dec 10 13:43:25 2005 for libs11n-1.2.1 by  doxygen 1.4.4