8 #include "uniwvconfgen.h"
17 WvConfigSection::Iter i;
39 void UniWvConfGen::notify(
void *userdata,
WvStringParm section,
52 UniWvConfGen::UniWvConfGen(
WvConf *_cfg):
53 tempkey(NULL), tempvalue(), cfg(_cfg)
55 cfg->add_callback(wv::bind(&UniWvConfGen::notify,
this, _1, _2, _3, _4, _5),
60 UniWvConfGen::~UniWvConfGen()
69 if (tempkey && key == *tempkey)
82 if (value == WvString::null && sect)
83 cfg->delete_section(key);
85 cfg->set(section, keyname, value);
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
The basic interface which is included by all other XPLC interfaces and objects.
void delta(const UniConfKey &key, WvStringParm value)
Call this when a key's value or children have possibly changed.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
virtual void rewind()
Rewinds the iterator.
An abstract data container that backs a UniConf tree.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
int numsegments() const
Returns the number of segments in this path.
An abstract iterator over keys and values in a generator.
UniConfKey last(int n=1) const
Returns the path formed by the n last segments of this path.
WvConf configuration file management class: used to read/write config files that are formatted in the...
virtual WvString value() const
Returns the value of the current key.
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
A UniConf generator for backwards compatibility with WvConf.
UniConfKey first(int n=1) const
Returns the path formed by the n first segments of this path.
A wrapper class for the wvconf iters to provide a UniConfGen iter.
virtual UniConfKey key() const
Returns the current key.
WvString is an implementation of a simple and efficient printable-string class.
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
virtual bool next()
Seeks to the next element in the sequence.
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.