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());
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
bool isempty() const
Returns true if this path has zero segments (also known as root).
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.
void delta(const UniConfKey &key, WvStringParm value)
Call this when a key's value or children have possibly changed.
A UniConf generator that stores keys in memory.
const WvString & value() const
Returns the value field.
An iterator that iterates through a constant list of keys.
An abstract data container that backs a UniConf tree.
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
An abstract iterator over keys and values in a generator.
UniConfKey last(int n=1) const
Returns the path formed by the n last segments of this path.
A plain UniConfTree that holds keys and values.
void add(const UniConfKey &k, WvStringParm v=WvString::null)
Add a key/value pair to the list that gets returned by this iterator.
virtual void commit()
Commits any changes.
virtual bool refresh()
Refreshes information about a key recursively.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
Sub * findchild(const UniConfKey &key) const
Finds the direct child node with the specified key.
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
::UniListIter ListIter
An iterator over a constant list of keys (see below)
int numsegments() const
Returns the number of segments in this path.
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)...
UniConfKey pop(int n=1)
Returns the path formed by the first n segments of this path and removes them from the key...
void hold_delta()
Pauses notifications until matched with a call to unhold_delta().
void setvalue(WvStringParm value)
Sets the value field.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
Sub * find(const UniConfKey &key) const
Finds the sub-node with the specified key.
void unhold_delta()
Resumes notifications when each hold_delta() has been matched.
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
WvString is an implementation of a simple and efficient printable-string class.
UniConfKey fullkey(const Sub *ancestor=NULL) const
Returns full path of this node relative to an ancestor.
An iterator over the segments of a key.
virtual void commit()
Commits any changes.
virtual bool refresh()
Refreshes information about a key recursively.
bool haschildren() const
Returns true if the node has children.