10 #include "uniconfpair.h" 11 #include "wvcallbacklist.h" 30 typedef wv::function<void(const UniConfKey&, WvStringParm)>
48 const UniConfGenCallback &callback) = 0;
60 virtual bool isok() = 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);
333 virtual void rewind() = 0;
340 virtual bool next() = 0;
363 virtual bool next() {
return false; }
369 #endif // __UNICONFGEN_H 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.
An iterator that iterates through a constant list of keys.
An abstract data container that backs a UniConf tree.
virtual void flush_buffers()=0
Flushes any commitment/notification buffers .
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...
An abstract iterator over keys and values in a generator.
virtual bool exists(const UniConfKey &key)=0
Without fetching its value, returns true if a key exists.
#define IMPLEMENT_IOBJECT(component)
Helper macro to implement the IObject methods automatically.
virtual bool next()
Seeks to the next element in the sequence.
virtual bool refresh()
Refreshes information about a key recursively.
virtual bool haschildren(const UniConfKey &key)=0
Returns true if a key has children.
::UniListIter ListIter
An iterator over a constant list of keys (see below)
virtual ~Iter()
Destroys the iterator.
virtual void prefetch(const UniConfKey &key, bool recursive)
Indicate that we will eventually be interested in doing get(), haschildren(), or other "get-like" ope...
virtual void commit()=0
Commits any changes.
An iterator that's always empty.
virtual void rewind()
Rewinds the iterator.
#define DEFINE_IID(iface, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11)
Used to define the IID of an interface.
virtual bool refresh()=0
Refreshes information about a key recursively.
virtual bool isok()=0
Determines if the generator is usable and working properly.
virtual void add_callback(void *cookie, const UniConfGenCallback &callback)=0
Adds a callback for change notification.
virtual UniConfKey key() const
Returns the current key.
virtual int str2int(WvStringParm s, int defvalue) const =0
Converts a string to an integer.
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 WvString value() const
Returns the value of the current key.
WvString is an implementation of a simple and efficient printable-string class.
A default implementation of IUniConfGen, providing various handy features that save trouble when impl...
virtual Iter * iterator(const UniConfKey &key)=0
Returns an iterator over the children of the specified key.
virtual void commit()
Commits any changes.
virtual void setv(const UniConfPairList &pairs)=0
Stores multiple key-value pairs into the registry.