7 #include "unitempgen.h"
10 #include "wvstringcache.h"
11 #include "unilistiter.h"
12 #include "wvlinkerhack.h"
26 UniTempGen::UniTempGen()
32 UniTempGen::~UniTempGen()
44 return WvString::null;
49 return WvString::null;
64 bool trailing_slash =
false;
71 trailing_slash =
true;
86 node->
visit(wv::bind(&UniTempGen::notify_deleted,
this,
97 else if (!trailing_slash)
107 bool more = it.next();
114 more ? WvString::empty : value);
131 if (value != node->
value())
176 for (i.rewind(); i.next(); )
177 it->
add(i->key(), i->value());
The basic interface which is included by all other XPLC interfaces and objects.
An abstract data container that backs a UniConf tree.
::UniListIter ListIter
An iterator over a constant list of keys (see below)
An abstract iterator over keys and values in a generator.
void hold_delta()
Pauses notifications until matched with a call to unhold_delta().
void unhold_delta()
Resumes notifications when each hold_delta() has been matched.
void delta(const UniConfKey &key, WvStringParm value)
Call this when a key's value or children have possibly changed.
virtual void commit()
Commits any changes.
virtual bool refresh()
Refreshes information about a key recursively.
An iterator over the segments of a key.
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
UniConfKey pop(int n=1)
Returns the path formed by the first n segments of this path and removes them from the key.
int numsegments() const
Returns the number of segments in this path.
bool isempty() const
Returns true if this path has zero segments (also known as root).
UniConfKey last(int n=1) const
Returns the path formed by the n last segments of this path.
UniConfKey fullkey(const Sub *ancestor=NULL) const
Returns full path of this node relative to an ancestor.
Sub * findchild(const UniConfKey &key) const
Finds the direct child node with the specified key.
void visit(const Visitor &visitor, void *userdata, bool preorder=true, bool postorder=false) const
Performs a traversal on this tree using the specified visitor function and traversal type(s).
Sub * find(const UniConfKey &key) const
Finds the sub-node with the specified key.
A plain UniConfTree that holds keys and values.
const WvString & value() const
Returns the value field.
void setvalue(WvStringParm value)
Sets the value field.
bool haschildren() const
Returns true if the node has children.
An iterator that iterates through a constant list of keys.
void add(const UniConfKey &k, WvStringParm v=WvString::null)
Add a key/value pair to the list that gets returned by this iterator.
A UniConf generator that stores keys in memory.
virtual bool refresh()
Refreshes information about a key recursively.
virtual void commit()
Commits any changes.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
bool isnull() const
returns true if this string is null
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
WvString get(WvStringParm s)
Get a shared string corresponding to 's'.
WvString is an implementation of a simple and efficient printable-string class.