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);
The basic interface which is included by all other XPLC interfaces and objects.
An abstract data container that backs a UniConf tree.
An abstract iterator over keys and values in a generator.
void delta(const UniConfKey &key, WvStringParm value)
Call this when a key's value or children have possibly changed.
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
int numsegments() const
Returns the number of segments in this path.
UniConfKey first(int n=1) const
Returns the path formed by the n first segments of this path.
UniConfKey last(int n=1) const
Returns the path formed by the n last segments of this path.
A wrapper class for the wvconf iters to provide a UniConfGen iter.
virtual UniConfKey key() const
Returns the current key.
virtual bool next()
Seeks to the next element in the sequence.
virtual void rewind()
Rewinds the iterator.
virtual WvString value() const
Returns the value of the current key.
A UniConf generator for backwards compatibility with WvConf.
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
WvConf configuration file management class: used to read/write config files that are formatted in the...
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
WvString is an implementation of a simple and efficient printable-string class.