#include <resourceFile.h>
Inheritance diagram for ResourceEntry:

Public Types | |
| typedef ResourceEntry * | IteratorPosition |
|
typedef ForwardIterator< ResourceEntry, ResourceEntry, ResourceEntry *, IteratorTraits_ > | Iterator |
|
typedef ConstForwardIterator< ResourceEntry, ResourceEntry, ResourceEntry *, IteratorTraits_ > | ConstIterator |
Public Member Functions | |
| Iterator | begin () |
| Iterator | end () |
| ConstIterator | begin () const |
| ConstIterator | end () const |
Constructors and Destructors | |
| ResourceEntry () | |
| Default constructor. | |
| ResourceEntry (const ResourceEntry &entry, bool deep=true) | |
| Copy constructor. | |
| ResourceEntry (const String &key, const String &value, ResourceEntry *parent=0) | |
| Create a new resource entry. | |
| void | clear () |
| void | destroy () |
Assignment | |
| void | set (const ResourceEntry &entry, bool deep=true) |
| Assign a resource entry from another. | |
| const ResourceEntry & | operator= (const ResourceEntry &entry) |
| Assignment operator. | |
| void | get (ResourceEntry &entry, bool deep=true) const |
| Assign the contents of a resource enytry to another one. | |
Miscellaneous | |
| bool | operator== (const ResourceEntry &entry) const |
| Equality operator. | |
| bool | operator!= (const ResourceEntry &entry) const |
| Inequality operator. | |
| ResourceEntry & | getRoot () |
| const ResourceEntry & | getRoot () const |
| ResourceEntry * | getParent () |
| const ResourceEntry * | getParent () const |
| ResourceEntry * | getChild (Position index) |
| Return a pointer to a child node. | |
| const ResourceEntry * | getChild (Position index) const |
| Return a const pointer to a child node. | |
| ResourceEntry * | getEntry (const String &key_path) |
| Return a pointer to an entry. | |
| const ResourceEntry * | getEntry (const String &key_path) const |
| Return a const pointer to an entry Searches for an entry via its path. | |
| const String & | getKey () const |
| Return the key of this ResourceEntry. | |
| void | setValue (const String &value) |
| Set the value of this ResourceEntry. | |
| String & | getValue () |
| Get a mutable reference to the value of this ResourceEntry. | |
| const String & | getValue () const |
| Get a constant reference to the value of this ResourceEntry. | |
| String | getPath () const |
| Return the path of an entry. | |
| Size | countChildren () const |
| Return the number of child entries. | |
| Size | countDescendants () const |
| Return the number of children which are not leaves. | |
| Size | getSize () const |
| ????? What is the size of an entry? Why not use size()? | |
| Size | getDepth () const |
| Compute the depth of this entry within the tree. | |
| ResourceEntry * | insertChild (const String &key, const String &value, bool replace_value=true) |
| Insert a child into the tree below this entry, if the key has not been used yet. | |
| ResourceEntry * | insertSibling (const String &key, const String &value, bool replace_value=true) |
| Insert a child into the tree below the parent entry. | |
| ResourceEntry * | insertChild (ResourceEntry &entry, bool replace_value=true) |
| Insert a child into the tree below this entry, if the key has not been used yet. | |
| ResourceEntry * | insert (const String &key_path, const String &name) |
| Insert a resource entry at the appropriate place in the tree. | |
| bool | mergeChildrenOf (ResourceEntry &entry, bool replace_value=true) |
| Merge the children of a resource entry. | |
| bool | removeChild (const String &key, ResourceEntry **removed=0) |
| Remove a child of a resource entry. | |
| bool | removeKey (const String &key_path) |
| ResourceEntry * | findChild (const String &key) |
| const ResourceEntry * | findChild (const String &key) const |
| ResourceEntry * | findDescendant (const String &key) |
| const ResourceEntry * | findDescendant (const String &key) const |
| ResourceEntry * | findEntry (const String &key) |
| const ResourceEntry * | findEntry (const String &key) const |
Attributes | |
| bool | hasChild (const String &key) const |
| bool | isEmpty () const |
| bool | isParentOf (const ResourceEntry &entry) const |
| bool | isChildOf (const ResourceEntry &entry) const |
| bool | isAncestorOf (const ResourceEntry &entry) const |
| bool | isDescendantOf (const ResourceEntry &entry) const |
| bool | isRelatedWith (const ResourceEntry &entry) const |
| bool | isRoot () const |
Debugging and Diagnostics | |
| bool | isValid () const |
| void | dump (std::ostream &s=std::cout, Size depth=0) const |
Processor and Visitor related methods | |
| void | host (Visitor< ResourceEntry > &visitor) |
| bool | apply (UnaryProcessor< ResourceEntry > &processor) |
| bool | applyChildren (UnaryProcessor< ResourceEntry > &processor) |
Protected Member Functions | |
| virtual ResourceEntry * | newEntry (const String &key, const String &value, ResourceEntry *parent=0) const |
| virtual ResourceEntry ** | newEntryArray (Size size) const |
| virtual void | deleteEntry (ResourceEntry *entry) const |
| virtual void | deleteEntryArray (ResourceEntry **entry_array) const |
| bool | applyNostart_ (UnaryProcessor< ResourceEntry > &processor) |
Friends | |
| class | IteratorTraits_ |
|
||||||||||||
|
Copy constructor. Creates a new resource entry from another.
|
|
||||||||||||||||
|
Create a new resource entry.
An entry with
|
|
|
Return the number of child entries.
|
|
|
Return the number of children which are not leaves.
|
|
||||||||||||
|
Assign the contents of a resource enytry to another one.
|
|
|
Return a const pointer to a child node.
|
|
|
Return a pointer to a child node.
|
|
|
Compute the depth of this entry within the tree.
|
|
|
Return a const pointer to an entry Searches for an entry via its path.
|
|
|
Return a pointer to an entry. Searches for an entry via its path.
|
|
|
Return the key of this ResourceEntry.
|
|
|
Return the path of an entry.
|
|
|
Get a constant reference to the value of this ResourceEntry.
|
|
|
Get a mutable reference to the value of this ResourceEntry.
|
|
||||||||||||
|
Insert a resource entry at the appropriate place in the tree.
|
|
||||||||||||
|
Insert a child into the tree below this entry, if the key has not been used yet.
|
|
||||||||||||||||
|
Insert a child into the tree below this entry, if the key has not been used yet.
|
|
||||||||||||||||
|
Insert a child into the tree below the parent entry.
|
|
||||||||||||
|
Merge the children of a resource entry.
|
|
|
Assignment operator.
|
|
||||||||||||
|
Remove a child of a resource entry.
|
|
||||||||||||
|
Assign a resource entry from another.
|
|
|
Set the value of this ResourceEntry.
|