8 #include "unicachegen.h"
10 #include "wvlinkerhack.h"
19 return new UniCacheGen(wvcreate<IUniConfGen>(s, _obj));
28 : log(
"UniCache",
WvLog::Debug1), inner(_inner)
33 refreshed_once =
false;
37 UniCacheGen::~UniCacheGen()
56 refreshed_once =
true;
70 void UniCacheGen::loadtree(
const UniConfKey &key)
91 void UniCacheGen::deltacallback(
const UniConfKey &key, WvStringParm value)
98 inner->
set(key, value);
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
virtual void set(const UniConfKey &key, WvStringParm value)=0
Stores a string value for a key into the registry.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual WvString value() const =0
Returns the value of the current key.
virtual void commit()
Commits any changes.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
A UniConf generator that adds a cache layer on top of another generator.
virtual void flush_buffers()=0
Flushes any commitment/notification buffers .
virtual UniConfKey key() const =0
Returns the current key.
virtual bool refresh()
Refreshes information about a key recursively.
WvString is an implementation of a simple and efficient printable-string class.
An abstract data container that backs a UniConf tree.
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
IUniConfGen * inner() const
Returns the inner generator.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual void commit()=0
Commits any changes.
virtual void rewind()=0
Rewinds the iterator.
virtual void del_callback(void *cookie)=0
Removes a callback for change notification.
virtual bool isok()=0
Determines if the generator is usable and working properly.
virtual bool refresh()=0
Refreshes information about a key recursively.
virtual bool next()=0
Seeks to the next element in the sequence.
virtual void add_callback(void *cookie, const UniConfGenCallback &callback)=0
Adds 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 bool isok()
Determines if the generator is usable and working properly.
An abstract iterator over keys and values in a generator.