| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::Dictionary Class Reference#include <plistCollections.h>
Inheritance diagram for plist::Dictionary: ![]() Detailed DescriptionMaintains a set of (key,value) pairs, where a value can be any subclass of ObjectBase.This class supports callbacks upon modification through the use of the CollectionListener interface. Note that we only store a pointer to the listener list, which is typically unallocated when no listeners are active. This should ensure minimal memory usage per object, as well as support safe storage of plist objects in inter-process shared memory regions. If you are using these in a shared memory region, just be sure that only the process with listeners does any and all modifications, and that it unsubscribes before detaching from the region (or else destroys the region itself) There isn't a callback if entries themselves are modified, only when new entries are added, or old ones removed. If you want to know any time any aspect of any entry is modified, listen for the add and remove callbacks, and then add yourself as a listener to each entry individually.
Definition at line 115 of file plistCollections.h.
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
insert a new entry to the dictionary, with key name and value val (replaces any previous entry by same name, but can give a warning)
Definition at line 164 of file plistCollections.cc.
insert a new entry to the dictionary, with key name and value val, control of deallocation given to collection
Implements plist::Collection. Definition at line 156 of file plistCollections.h.
insert a new entry to the dictionary, with key name and value val (replaces any previous entry by same name, but can give a warning)
Definition at line 107 of file plistCollections.cc.
insert a new entry to the dictionary, with key name and value val (replaces any previous entry by same name, but can give a warning)
Implements plist::Collection. Definition at line 152 of file plistCollections.h. Referenced by addValue(), and loadXMLNode().
template<>
specialization of Dictionary::addValue() for char* strings
Definition at line 407 of file plistCollections.h.
template<>
specialization of Dictionary::addValue() for char* strings
Definition at line 401 of file plistCollections.h.
template<>
specialization of Dictionary::addValue() for ObjectBase subclasses
Definition at line 395 of file plistCollections.h.
"specialization" (actually just another override) for handling character arrays as strings
Definition at line 147 of file plistCollections.h.
"specialization" (actually just another override) for handling character arrays as strings
Definition at line 145 of file plistCollections.h.
template<typename T>
insert a new entry to the map, and corresponding comment; expects val to be either a primitive type, like int, float, etc., or one of the variable-sized Collection's, like Vector
Definition at line 141 of file plistCollections.h.
return an STL const_iterator to the first entry
Definition at line 168 of file plistCollections.h. Referenced by getLongestKeyLen(), and loadXML().
remove all entries in one fell swoop
Implements plist::Collection. Definition at line 913 of file plistCollections.cc.
implements the clone function for Dictionaries
Implements plist::ObjectBase. Definition at line 450 of file plistCollections.cc.
called after an assignment or copy to clone the objects in myRef to perform a deep copy
Definition at line 934 of file plistCollections.cc.
return the one-past-end const_iterator
Definition at line 170 of file plistCollections.h. Referenced by getLongestKeyLen(), and loadXML().
run through collectionListeners, calling CollectionListener::plistCollectionEntryRemoved(*this,val)
Reimplemented from plist::Collection. Definition at line 925 of file plistCollections.cc. Referenced by removeEntry().
returns comment retrieved from loaded file, or any subsequent call to setComment
Implements plist::Collection. Definition at line 257 of file plistCollections.cc.
return the value of the key name, or NULL if it doesn't exist
Implements plist::Collection. Definition at line 219 of file plistCollections.cc.
return the length of the longest key for formatting purposes
Implements plist::Collection. Definition at line 452 of file plistCollections.cc.
returns an entry matching just the prefix
Definition at line 476 of file plistCollections.cc.
returns an entry matching just the prefix
Definition at line 464 of file plistCollections.cc. Referenced by addEntry(), getComment(), getEntry(), removeEntry(), setComment(), and setEntry().
From the name of node, will instantiate a new ObjectBase subclass to load it. The mapping from node names to actual instantiated types is:
If successful, returns a pointer to a newly allocated region, which the caller is responsible for freeing. If an error occurs, NULL is returned. Reimplemented from plist::ObjectBase. Definition at line 276 of file plistCollections.cc.
called with each node being loaded so subclass can handle appropriately
Definition at line 1017 of file plistCollections.cc. Referenced by loadXML().
assignment (don't assign listeners); subclass should call fireEntriesChanged after calling this (and updating its own storage)
Definition at line 132 of file plistCollections.h.
remove the entry with key name
Implements plist::Collection. Definition at line 200 of file plistCollections.cc. Referenced by addEntry(), loadXML(), loadXMLNode(), and setEntry().
subclasses are expected to provide a working implementation
Implements plist::ObjectBase. Definition at line 317 of file plistCollections.cc.
replaces previous comment for name, or adds it if it doesn't already exist (can preceed actual entry!)
Implements plist::Collection. Definition at line 238 of file plistCollections.cc. Referenced by loadXMLNode().
insert a new entry to the dictionary, with key name and value val, control of deallocation given to collection
Implements plist::Collection. Definition at line 136 of file plistCollections.cc.
insert a new entry to the dictionary, with key name and value val (replaces any previous entry by same name, but can give a warning)
Implements plist::Collection. Definition at line 80 of file plistCollections.cc. Referenced by setValue().
template<>
specialization of Dictionary::setValue() for char* strings
Definition at line 404 of file plistCollections.h.
template<>
specialization of Dictionary::setValue() for char* strings
Definition at line 398 of file plistCollections.h.
template<>
specialization of Dictionary::setValue() for ObjectBase subclasses
Definition at line 392 of file plistCollections.h.
"specialization" (actually just another override) for handling character arrays as strings
Definition at line 143 of file plistCollections.h.
template<typename T>
insert a new entry to the map; expects val to be either a primitive type, like int, float, etc., or one of the variable-sized Collection's, like Vector
Definition at line 138 of file plistCollections.h.
return the size of the dictionary
Definition at line 172 of file plistCollections.h. Referenced by loadXML().
indicates that the storage implementation should mark this as an externally supplied heap reference, which needs to be deleted on removal/destruction
Definition at line 921 of file plistCollections.cc. Referenced by addEntry(), and setEntry().
return current value as a string
Implements plist::ObjectBase. Definition at line 443 of file plistCollections.cc.
Friends And Related Function Documentation
Member Data Documentation
storage of entry comments -- mapping from keys to help text comments for manual editing or user feedback not every key necessarily has a comment! Definition at line 222 of file plistCollections.h. Referenced by addEntry(), getComment(), operator=(), saveXML(), and setComment().
storage of entries -- mapping from keys to value pointers
Definition at line 213 of file plistCollections.h. Referenced by addEntry(), clear(), cloneMyRef(), getComment(), getEntry(), getSubEntry(), loadXMLNode(), operator=(), removeEntry(), saveXML(), setComment(), and setEntry().
objects which have been handed over to the collection for eventual de-allocation
Definition at line 216 of file plistCollections.h. Referenced by clear(), cloneMyRef(), fireEntryRemoved(), operator=(), and takeObject().
The documentation for this class was generated from the following files: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tekkotsu v3.0 |
Generated Wed Oct 4 00:05:23 2006 by Doxygen 1.4.7 |