Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

WvHConf Class Reference

#include <wvhconf.h>

List of all members.

Public Methods

 WvHConf ()
 WvHConf (WvHConf *_parent, const WvString &_name)
 ~WvHConf ()
void init ()
WvHConf * top ()
WvHConfKey full_key () const
WvHConf * gen_top ()
WvHConfKey gen_full_key () const
WvHConf * find (const WvHConfKey &key)
WvHConf * find_make (const WvHConfKey &key)
WvHConf & operator[] (const WvHConfKey &key)
WvHConf * find_default (WvHConfKey *_k=NULL) const
WvHConf & get (const WvHConfKey &key)
void set (const WvHConfKey &key, const WvString &v)
void set_without_notify (const WvString &s)
void set (const WvString &s)
void do_notify ()
const WvHConf & operator= (const WvString &s)
const WvHConf & operator= (const WvHConf &s)
const WvStringprintable () const
 operator const WvString & () const
bool operator! () const
int num () const
void load ()
void save ()
void dump (WvStream &s)

Public Attributes

WvHConf * parent
WvString name
WvHConfDict * children
WvHConf * defaults
WvHConfGengenerator
bool child_dirty:1
bool dirty:1
bool child_notify:1
bool notify:1
bool child_obsolete:1
bool obsolete:1

Private Attributes

WvString value


Detailed Description

WvHConf objects are the root, branches, and leaves of the configuration tree. Each one has a parent, name=value, and children, all of which are optional (although the name is usually useful).

The nice thing about this is you can write classes that use a WvHConf configuration tree, and then instead hand them a subtree if you want.

Definition at line 72 of file wvhconf.h.


Constructor & Destructor Documentation

WvHConf::WvHConf  
 

Definition at line 15 of file wvhconf.cc.

References init(), and parent.

WvHConf::WvHConf WvHConf *    _parent,
const WvString   _name
 

Definition at line 23 of file wvhconf.cc.

References init(), and parent.

WvHConf::~WvHConf  
 

Definition at line 44 of file wvhconf.cc.

References children, and generator.


Member Function Documentation

void WvHConf::do_notify  
 

Definition at line 229 of file wvhconf.cc.

References child_dirty, child_notify, dirty, notify, and parent.

void WvHConf::dump WvStream   s
 

Definition at line 289 of file wvhconf.cc.

References child_dirty, child_notify, child_obsolete, children, dirty, full_key(), notify, obsolete, WvStream::print(), and value.

WvHConf * WvHConf::find const WvHConfKey   key
 

Definition at line 115 of file wvhconf.cc.

References children, WvList< WvString >::first(), WvListBase::isempty(), and WvHConfKey::skip().

Referenced by find_default().

WvHConf * WvHConf::find_default WvHConfKey   _k = NULL const
 

Definition at line 157 of file wvhconf.cc.

References defaults, find(), name, parent, WvList< WvString >::prepend(), and WvList< WvString >::unlink_first().

Referenced by printable().

WvHConf * WvHConf::find_make const WvHConfKey   key
 

Definition at line 131 of file wvhconf.cc.

References WvList< WvString >::first(), gen_top(), generator, WvListBase::isempty(), WvHConfGen::make_tree(), and WvHConfKey::skip().

Referenced by get(), and operator[]().

WvHConfKey WvHConf::full_key   const
 

Definition at line 67 of file wvhconf.cc.

References name, parent, and WvList< WvString >::prepend().

Referenced by dump().

WvHConfKey WvHConf::gen_full_key   const
 

Definition at line 99 of file wvhconf.cc.

References generator, name, parent, and WvList< WvString >::prepend().

WvHConf * WvHConf::gen_top  
 

Definition at line 84 of file wvhconf.cc.

References generator, and parent.

Referenced by find_make().

WvHConf& WvHConf::get const WvHConfKey   key [inline]
 

Definition at line 121 of file wvhconf.h.

References find_make().

Referenced by set().

void WvHConf::init  
 

Definition at line 31 of file wvhconf.cc.

References child_dirty, child_notify, child_obsolete, children, defaults, dirty, generator, notify, and obsolete.

Referenced by WvHConf().

void WvHConf::load  
 

Definition at line 260 of file wvhconf.cc.

References children, generator, and WvHConfGen::load().

int WvHConf::num   const [inline]
 

Definition at line 141 of file wvhconf.h.

References WvString::num(), and printable().

WvHConf::operator const WvString &   const [inline]
 

Definition at line 139 of file wvhconf.h.

References printable().

bool WvHConf::operator!   const [inline]
 

Definition at line 140 of file wvhconf.h.

References printable().

const WvHConf& WvHConf::operator= const WvHConf &    s [inline]
 

Definition at line 134 of file wvhconf.h.

References set().

const WvHConf& WvHConf::operator= const WvString   s [inline]
 

Definition at line 133 of file wvhconf.h.

References set().

WvHConf& WvHConf::operator[] const WvHConfKey   key [inline]
 

Definition at line 115 of file wvhconf.h.

References find_make().

const WvString & WvHConf::printable   const
 

Definition at line 244 of file wvhconf.cc.

References find_default(), and value.

Referenced by num(), operator const WvString &(), and operator!().

void WvHConf::save  
 

Definition at line 273 of file wvhconf.cc.

References child_dirty, children, dirty, generator, and WvHConfGen::save().

void WvHConf::set const WvString   s
 

Definition at line 203 of file wvhconf.cc.

References child_dirty, child_notify, dirty, notify, parent, set_without_notify(), and value.

void WvHConf::set const WvHConfKey   key,
const WvString   v
[inline]
 

Definition at line 126 of file wvhconf.h.

References get().

Referenced by operator=().

void WvHConf::set_without_notify const WvString   s
 

Definition at line 196 of file wvhconf.cc.

References WvString::unique(), and value.

Referenced by set().

WvHConf * WvHConf::top  
 

Definition at line 56 of file wvhconf.cc.

References parent.


Member Data Documentation

bool WvHConf::child_dirty
 

Definition at line 88 of file wvhconf.h.

Referenced by do_notify(), dump(), init(), save(), and set().

bool WvHConf::child_notify
 

Definition at line 88 of file wvhconf.h.

Referenced by do_notify(), dump(), init(), and set().

bool WvHConf::child_obsolete
 

Definition at line 88 of file wvhconf.h.

Referenced by dump(), and init().

WvHConfDict* WvHConf::children
 

Definition at line 80 of file wvhconf.h.

Referenced by dump(), find(), init(), load(), WvHConfGen::make_obj(), WvHConfGen::make_tree(), save(), and ~WvHConf().

WvHConf* WvHConf::defaults
 

Definition at line 81 of file wvhconf.h.

Referenced by find_default(), and init().

bool WvHConf::dirty
 

Definition at line 88 of file wvhconf.h.

Referenced by do_notify(), dump(), init(), save(), set(), and WvHConfGen::update().

WvHConfGen* WvHConf::generator
 

Definition at line 82 of file wvhconf.h.

Referenced by find_make(), gen_full_key(), gen_top(), init(), load(), save(), and ~WvHConf().

WvString WvHConf::name
 

Definition at line 76 of file wvhconf.h.

Referenced by find_default(), full_key(), and gen_full_key().

bool WvHConf::notify
 

Definition at line 88 of file wvhconf.h.

Referenced by do_notify(), dump(), init(), and set().

bool WvHConf::obsolete
 

Definition at line 88 of file wvhconf.h.

Referenced by dump(), and init().

WvHConf* WvHConf::parent
 

Definition at line 75 of file wvhconf.h.

Referenced by do_notify(), find_default(), full_key(), gen_full_key(), gen_top(), set(), top(), and WvHConf().

WvString WvHConf::value [private]
 

Definition at line 78 of file wvhconf.h.

Referenced by dump(), printable(), set(), and set_without_notify().


The documentation for this class was generated from the following files:
Generated on Sat Aug 24 21:09:40 2002 for WvStreams by doxygen1.2.15