Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::DictionaryBase Class Reference#include <plistCollections.h>
Inheritance diagram for plist::DictionaryBase:
![]() Detailed DescriptionMaintains a set of (key,value) pairs, see DictionaryOf, and the Dictionary typedef.You can add or set entries by a quite a few variations on addEntry(), setEntry(), or addValue(). Basically these boil down to either:
Definition at line 177 of file plistCollections.h.
Member Typedef Documentation
shorthand for the type of the storage
Reimplemented in plist::DictionaryOf< PO, Alloc >, and plist::DictionaryOf< ObjectBase >. Definition at line 181 of file plistCollections.h.
shorthand for iterators to be returned
Reimplemented in InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >. Definition at line 183 of file plistCollections.h.
shorthand for iterators to be returned
Reimplemented in InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >. Definition at line 185 of file plistCollections.h.
Constructor & Destructor Documentation
Member Function Documentation
remove the entry with key name, returns true if something was actually removed (if false, wasn't there to begin with)
Definition at line 110 of file plistCollections.cc. Referenced by plist::DictionaryOf< PO, Alloc >::addEntry(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::destroy(), loadXML(), plist::DictionaryOf< PO, Alloc >::loadXMLNode(), plist::DictionaryOf< PO, Alloc >::operator=(), plist::DictionaryOf< PO, Alloc >::set(), and plist::DictionaryOf< PO, Alloc >::setEntry().
change the key for an entry from oldname to newname, returns false if oldname didn't exist (thus no change was made) If the collection owns the reference to the object, you have to use this function instead of a pair of calls to removeEntry/addEntry, otherwise you will wind up with an invalid pointer! Definition at line 122 of file plistCollections.cc. Referenced by swapEntry().
exchange the values for a pair of keys -- if either key doesn't exist, forwards call to renameEntry() returns true if the swap was successful, only returns false if both keys are invalid Definition at line 158 of file plistCollections.cc.
returns a reference to the entry with the specified name, creating it if it doesn't exist
Implemented in OutputConfig< T >, plist::DictionaryOf< PO, Alloc >, OutputConfig< plist::Primitive< float > >, and plist::DictionaryOf< ObjectBase >.
returns a reference to the entry with the specified name, creating it if it doesn't exist
Implemented in plist::DictionaryOf< PO, Alloc >, and plist::DictionaryOf< ObjectBase >.
returns a pointer to entry with the specified 'path', which may recurse through sub-collections
Implements plist::Collection. Definition at line 193 of file plistCollections.cc. Referenced by Config::parseLine(), Controller::setConfig(), and Config::setValue().
returns an iterator to an entry in the current dictionary
Reimplemented in plist::DictionaryOf< PO, Alloc >, and plist::DictionaryOf< ObjectBase >. Definition at line 303 of file plistCollections.h. Referenced by saveOverXMLNode().
remove all entries in one fell swoop
Implements plist::Collection. Definition at line 393 of file plistCollections.cc. Referenced by plist::ArrayBase::~ArrayBase(), and ~DictionaryBase().
return an STL const_iterator to the first entry
Reimplemented in plist::DictionaryOf< PO, Alloc >, and plist::DictionaryOf< ObjectBase >. Definition at line 308 of file plistCollections.h. Referenced by getLongestKeyLen(), loadXML(), and plist::DictionaryOf< PO, Alloc >::set().
return the one-past-end const_iterator
Reimplemented in plist::DictionaryOf< PO, Alloc >, and plist::DictionaryOf< ObjectBase >. Definition at line 310 of file plistCollections.h. Referenced by getLongestKeyLen(), loadXML(), and plist::DictionaryOf< PO, Alloc >::set().
return the size of the dictionary
Implements plist::Collection. Definition at line 312 of file plistCollections.h. Referenced by plist::ArrayOf< plist::Primitive< std::string > >::addEntry(), ConfigurationEditor::getObjectTemplates(), loadXML(), plist::DictionaryOf< PO, Alloc >::operator=(), saveXML(), OutputConfig< T >::saveXML(), and plist::DictionaryOf< PO, Alloc >::set().
replaces previous comment for name, or adds it if it doesn't already exist (can preceed actual entry!)
Definition at line 212 of file plistCollections.cc. Referenced by plist::ArrayOf< plist::Primitive< std::string > >::addEntry(), plist::DictionaryOf< PO, Alloc >::loadXMLNode(), plist::DictionaryOf< PO, Alloc >::operator=(), and plist::DictionaryOf< PO, Alloc >::set().
returns comment retrieved from loaded file, or any subsequent call to setComment
Definition at line 219 of file plistCollections.cc. Referenced by plist::DictionaryOf< PO, Alloc >::operator=(), and plist::DictionaryOf< PO, Alloc >::set().
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. Reimplemented in InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >. Definition at line 228 of file plistCollections.cc. Referenced by InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::loadXML(), and ConfigDictionary::loadXMLNode().
subclasses are expected to provide a working implementation
Implements plist::ObjectBase. Definition at line 320 of file plistCollections.h. Referenced by ConfigDictionary::saveOverXMLNode(), OutputConfig< T >::saveXML(), and Config::saveXML().
saves the dictionary into the specified node
Reimplemented in OutputConfig< T >, Config, and OutputConfig< plist::Primitive< float > >. Definition at line 271 of file plistCollections.cc.
return current value as a string
Implements plist::ObjectBase. Definition at line 346 of file plistCollections.cc.
returns the length of the longest key, subject to an optional regular expression and max depth
Implements plist::Collection. Definition at line 352 of file plistCollections.cc.
returns true if the specified object will be deallocated when removed from the dictionary
Definition at line 335 of file plistCollections.h. Referenced by plist::DictionaryOf< PO, Alloc >::set().
assignment (don't assign listeners)
Definition at line 343 of file plistCollections.h. Referenced by plist::DictionaryOf< PO, Alloc >::operator=(), and plist::DictionaryOf< PO, Alloc >::set().
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 406 of file plistCollections.cc. Referenced by plist::ArrayOf< plist::Primitive< std::string > >::addEntry(), plist::DictionaryOf< PO, Alloc >::addEntry(), and plist::DictionaryOf< PO, Alloc >::setEntry().
run through collectionListeners, calling CollectionListener::plistCollectionEntryRemoved(*this,val)
Reimplemented from plist::Collection. Definition at line 410 of file plistCollections.cc. Referenced by removeEntry(), and renameEntry().
returns an entry matching just the prefix
Definition at line 368 of file plistCollections.cc. Referenced by resolveEntry().
returns an entry matching just the prefix
Definition at line 380 of file plistCollections.cc.
called after an assignment or copy to clone the objects in myRef to perform a deep copy
Definition at line 419 of file plistCollections.cc. Referenced by plist::ArrayBase::ArrayBase(), and DictionaryBase().
called with each node being loaded so subclass can handle appropriately
Implemented in ConfigDictionary, OutputConfig< T >, plist::DictionaryOf< PO, Alloc >, OutputConfig< plist::Primitive< float > >, and plist::DictionaryOf< ObjectBase >. Referenced by loadXML().
called with each node being saved so subclass can handle appropriately, return true if successful and reset key if changed
Reimplemented in ConfigDictionary. Definition at line 450 of file plistCollections.cc. Referenced by ConfigDictionary::saveOverXMLNode(), and saveXML().
called with each node being saved so subclass can handle appropriately, return true if successful and set key
Definition at line 502 of file plistCollections.cc. Referenced by saveXML(), and OutputConfig< T >::saveXML().
Friends And Related Function Documentation
Member Data Documentation
storage of entries -- mapping from keys to value pointers
Definition at line 377 of file plistCollections.h. Referenced by plist::DictionaryOf< PO, Alloc >::addEntry(), plist::DictionaryOf< ObjectBase >::begin(), begin(), clear(), cloneMyRef(), plist::DictionaryOf< ObjectBase >::end(), end(), plist::DictionaryOf< ObjectBase >::findEntry(), findEntry(), getComment(), plist::DictionaryOf< ObjectBase >::getEntry(), getSubEntry(), plist::DictionaryOf< PO, Alloc >::loadXMLNode(), plist::DictionaryOf< PO, Alloc >::operator=(), removeEntry(), renameEntry(), resolveEntry(), saveOverXMLNode(), saveXML(), OutputConfig< T >::saveXML(), plist::DictionaryOf< PO, Alloc >::set(), plist::DictionaryOf< PO, Alloc >::setEntry(), size(), and swapEntry().
objects which have been handed over to the collection for eventual de-allocation
Definition at line 380 of file plistCollections.h. Referenced by plist::DictionaryOf< PO, Alloc >::addEntry(), plist::ArrayOf< plist::Primitive< std::string > >::ArrayOf(), clear(), cloneMyRef(), fireEntryRemoved(), plist::DictionaryOf< PO, Alloc >::operator=(), plist::ArrayBase::ownsReference(), ownsReference(), plist::DictionaryOf< PO, Alloc >::set(), plist::DictionaryOf< PO, Alloc >::setEntry(), and takeObject().
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 386 of file plistCollections.h. Referenced by plist::DictionaryOf< PO, Alloc >::addEntry(), clear(), getComment(), removeEntry(), renameEntry(), saveOverXMLNode(), saveXMLNode(), setComment(), and swapEntry().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:54 2007 by Doxygen 1.5.4 |