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

UniConfRoot Class Reference

#include <uniconfroot.h>

Inherits UniConf.

Collaboration diagram for UniConfRoot:

[legend]
List of all members.

Detailed Description

Represents the root of a hierarhical registry consisting of pairs of UniConfKeys and associated string values.

*

Any number of data containers may be mounted into the tree at any number of mount points to provide a backing store from which registry keys and values are fetched and into which they are stored. Multiple data containers may be mounted at the same location using standard unix semantics.

Definition at line 73 of file uniconfroot.h.

Public Member Functions

 UniConfRoot ()
 Creates an empty UniConf tree with no mounted stores.

 ~UniConfRoot ()
 Destroys the UniConf tree along with all uncommitted data.

 UniConfRoot (WvStringParm moniker, bool refresh=true)
 Creates a new UniConf tree and mounts the given moniker at the root.

 UniConfRoot (UniConfGen *gen, bool refresh=true)
 Creates a new UniConf tree and mounts the given generator at the root.

void add_callback (void *cookie, const UniConfKey &key, const UniConfCallback &callback, bool recurse=true)
 Requests notification when any of the keys covered by the recursive depth specification change by invoking a callback.

void del_callback (void *cookie, const UniConfKey &key, bool recurse=true)
 Cancels notification requested using add_callback().

void add_setbool (const UniConfKey &key, bool *flag, bool recurse=true)
 Requests notification when any of the keys covered by the recursive depth specification change by setting a flag.

void del_setbool (const UniConfKey &key, bool *flag, bool recurse=true)
 Cancels notification requested using add_setbool().


Static Public Member Functions

void setbool_callback (bool *flag, const UniConf &, const UniConfKey &)
 Internal callback for setbool style notifications.


Protected Attributes

UniMountGen mounts


Constructor & Destructor Documentation

UniConfRoot::UniConfRoot  )  [inline]
 

Creates an empty UniConf tree with no mounted stores.

Definition at line 85 of file uniconfroot.h.

References mounts, UniConfGen::setcallback(), and UniConfGenCallback.

UniConfRoot::~UniConfRoot  )  [inline]
 

Destroys the UniConf tree along with all uncommitted data.

Definition at line 92 of file uniconfroot.h.

References mounts, UniConfGen::setcallback(), and UniConfGenCallback.

UniConfRoot::UniConfRoot WvStringParm  moniker,
bool  refresh = true
[inline]
 

Creates a new UniConf tree and mounts the given moniker at the root.

Since most people only want to mount one generator, this should save a line of code here and there.

Definition at line 100 of file uniconfroot.h.

References UniMountGen::mount(), mounts, UniConfGen::setcallback(), UniConfGenCallback, and WvStringParm.

UniConfRoot::UniConfRoot UniConfGen gen,
bool  refresh = true
[inline]
 

Creates a new UniConf tree and mounts the given generator at the root.

Since most people only want to mount one generator, this should save a line of code here and there.

Definition at line 113 of file uniconfroot.h.

References UniMountGen::mountgen(), mounts, UniConfGen::setcallback(), and UniConfGenCallback.


Member Function Documentation

void UniConfRoot::add_callback void *  cookie,
const UniConfKey key,
const UniConfCallback &  callback,
bool  recurse = true
 

Requests notification when any of the keys covered by the recursive depth specification change by invoking a callback.

Definition at line 13 of file uniconfroot.cc.

References add_callback(), UniConfTree< UniWatchInfoTree >::findchild(), UniConfKey::Iter::next(), UniConfKey::Iter::rewind(), and UniWatchInfoTree::watches.

Referenced by add_callback(), and add_setbool().

void UniConfRoot::add_setbool const UniConfKey key,
bool *  flag,
bool  recurse = true
 

Requests notification when any of the keys covered by the recursive depth specification change by setting a flag.

Definition at line 53 of file uniconfroot.cc.

References add_callback(), add_setbool(), and setbool_callback().

Referenced by add_setbool().

void UniConfRoot::del_callback void *  cookie,
const UniConfKey key,
bool  recurse = true
 

Cancels notification requested using add_callback().

Definition at line 31 of file uniconfroot.cc.

References del_callback(), UniConfTree< UniWatchInfoTree >::find(), and UniWatchInfoTree::watches.

Referenced by del_callback(), and del_setbool().

void UniConfRoot::del_setbool const UniConfKey key,
bool *  flag,
bool  recurse = true
 

Cancels notification requested using add_setbool().

Definition at line 62 of file uniconfroot.cc.

References del_callback(), and del_setbool().

Referenced by del_setbool().

void UniConfRoot::setbool_callback bool *  flag,
const UniConf &  ,
const UniConfKey
[inline, static]
 

Internal callback for setbool style notifications.

Definition at line 172 of file uniconfroot.h.

References setbool_callback().

Referenced by add_setbool(), and setbool_callback().


Member Data Documentation

UniMountGen UniConfRoot::mounts [protected]
 

Definition at line 168 of file uniconfroot.h.

Referenced by UniConfRoot(), and ~UniConfRoot().


The documentation for this class was generated from the following files:
Generated on Tue Oct 5 01:09:33 2004 for WvStreams by doxygen 1.3.7