10#include "uniconfpair.h"
11#include "wvcallbacklist.h"
48 const UniConfGenCallback &callback) = 0;
139 virtual void setv(
const UniConfPairList &pairs) = 0;
192 {0xb0, 0x56, 0x8b, 0x9d, 0xde, 0x9a, 0xbe, 0x9f}});
208 UniConfPairList deltas;
225 const UniConfGenCallback &callback);
289 virtual void setv(
const UniConfPairList &pairs) = 0;
302 void setv_naive(
const UniConfPairList &pairs);
363 virtual bool next() {
return false; }
The basic interface which is included by all other XPLC interfaces and objects.
An abstract data container that backs a UniConf tree.
virtual void setv(const UniConfPairList &pairs)=0
Stores multiple key-value pairs into the registry.
virtual bool exists(const UniConfKey &key)=0
Without fetching its value, returns true if a key exists.
virtual void flush_buffers()=0
Flushes any commitment/notification buffers .
virtual bool isok()=0
Determines if the generator is usable and working properly.
virtual bool haschildren(const UniConfKey &key)=0
Returns true if a key has children.
virtual bool refresh()=0
Refreshes information about a key recursively.
virtual Iter * iterator(const UniConfKey &key)=0
Returns an iterator over the children of the specified key.
virtual void prefetch(const UniConfKey &key, bool recursive)=0
Indicate that we will eventually be interested in doing get(), haschildren(), or other "get-like" ope...
virtual int str2int(WvStringParm s, int defvalue) const =0
Converts a string to an integer.
virtual WvString get(const UniConfKey &key)=0
Fetches a string value for a key from the registry.
::UniListIter ListIter
An iterator over a constant list of keys (see below)
virtual void add_callback(void *cookie, const UniConfGenCallback &callback)=0
Adds a callback for change notification.
virtual void commit()=0
Commits any changes.
virtual void del_callback(void *cookie)=0
Removes a callback for change notification.
virtual Iter * recursiveiterator(const UniConfKey &key)=0
Like iterator(), but the returned iterator is recursive, that is, it will return children of the imme...
virtual void set(const UniConfKey &key, WvStringParm value)=0
Stores a string value for a key into the registry.
An abstract iterator over keys and values in a generator.
virtual bool next()=0
Seeks to the next element in the sequence.
virtual ~Iter()
Destroys the iterator.
virtual WvString value() const =0
Returns the value of the current key.
virtual void rewind()=0
Rewinds the iterator.
virtual UniConfKey key() const =0
Returns the current key.
An iterator that's always empty.
virtual bool next()
Seeks to the next element in the sequence.
virtual UniConfKey key() const
Returns the current key.
virtual WvString value() const
Returns the value of the current key.
virtual void rewind()
Rewinds the iterator.
A default implementation of IUniConfGen, providing various handy features that save trouble when impl...
virtual void flush_buffers()=0
Flushes any commitment/notification buffers .
void dispatch_delta(const UniConfKey &key, WvStringParm value)
Immediately sends notification that a key has possibly changed.
virtual ~UniConfGen()
Destroys the UniConfGen and may discard uncommitted data.
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
void hold_delta()
Pauses notifications until matched with a call to unhold_delta().
virtual void setv(const UniConfPairList &pairs)=0
Stores multiple key-value pairs into the registry.
virtual int str2int(WvStringParm s, int defvalue) const
Converts a string to an integer.
virtual void add_callback(void *cookie, const UniConfGenCallback &callback)
Adds a callback for change notification.
void unhold_delta()
Resumes notifications when each hold_delta() has been matched.
virtual void set(const UniConfKey &key, WvStringParm value)=0
Stores a string value for a key into the registry.
virtual Iter * recursiveiterator(const UniConfKey &key)
Like iterator(), but the returned iterator is recursive, that is, it will return children of the imme...
virtual void del_callback(void *cookie)
Removes a callback for change notification.
void delta(const UniConfKey &key, WvStringParm value)
Call this when a key's value or children have possibly changed.
virtual bool exists(const UniConfKey &key)
Without fetching its value, returns true if a key exists.
virtual WvString get(const UniConfKey &key)=0
Fetches a string value for a key from the registry.
void flush_delta()
Flushes the list of pending notifications by sending them.
virtual Iter * iterator(const UniConfKey &key)=0
Returns an iterator over the children of the specified key.
void clear_delta()
Clears the list of pending notifications without sending them.
virtual void commit()
Commits any changes.
virtual void prefetch(const UniConfKey &key, bool recursive)
Indicate that we will eventually be interested in doing get(), haschildren(), or other "get-like" ope...
UniConfGen()
Creates a UniConfGen object.
virtual bool refresh()
Refreshes information about a key recursively.
virtual bool isok()
Determines if the generator is usable and working properly.
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
An iterator that iterates through a constant list of keys.
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
WvString is an implementation of a simple and efficient printable-string class.
#define IMPLEMENT_IOBJECT(component)
Helper macro to implement the IObject methods automatically.
#define DEFINE_IID(iface, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11)
Used to define the IID of an interface.