#include <BALL/FORMAT/resourceFile.h>
Resource entry class
typedef ConstForwardIterator<ResourceEntry, ResourceEntry, ResourceEntry*, IteratorTraits_> BALL::ResourceEntry::ConstIterator |
typedef ForwardIterator<ResourceEntry, ResourceEntry, ResourceEntry*, IteratorTraits_> BALL::ResourceEntry::Iterator |
BALL::ResourceEntry::ResourceEntry | ( | ) |
Default constructor
BALL::ResourceEntry::ResourceEntry | ( | const ResourceEntry & | entry, | |
bool | deep = true | |||
) |
Copy constructor. Creates a new resource entry from another.
entry | the ResourceEntry object to be copied | |
deep | create a deep (true) or shallow (false) copy |
BALL::ResourceEntry::ResourceEntry | ( | const String & | key, | |
const String & | value, | |||
ResourceEntry * | parent = 0 | |||
) |
Create a new resource entry. An entry with key
and value
is created. If parent
is given, the new entries parent pointer is set to this value. Take care: the parents child array is not updated - so use this option only if you really know what you are doing. To keep this data consistent, use insertChild .
key | the key of the new entry | |
value | the value of the new entry | |
parent | the content of the new entry's parent pointer |
virtual BALL::ResourceEntry::~ResourceEntry | ( | ) | [virtual] |
bool BALL::ResourceEntry::apply | ( | UnaryProcessor< ResourceEntry > & | processor | ) |
bool BALL::ResourceEntry::applyChildren | ( | UnaryProcessor< ResourceEntry > & | processor | ) |
bool BALL::ResourceEntry::applyNostart_ | ( | UnaryProcessor< ResourceEntry > & | processor | ) | [protected] |
ConstIterator BALL::ResourceEntry::begin | ( | ) | const [inline] |
Iterator BALL::ResourceEntry::begin | ( | ) | [inline] |
void BALL::ResourceEntry::clear | ( | ) |
ResourceEntry* BALL::ResourceEntry::clone_ | ( | ResourceEntry * | parent | ) | const [private] |
Size BALL::ResourceEntry::countChildren | ( | ) | const |
Return the number of child entries.
Size BALL::ResourceEntry::countDescendants | ( | ) | const |
Return the number of children which are not leaves.
virtual void BALL::ResourceEntry::deleteEntry | ( | ResourceEntry * | entry | ) | const [protected, virtual] |
virtual void BALL::ResourceEntry::deleteEntryArray | ( | ResourceEntry ** | entry_array | ) | const [protected, virtual] |
void BALL::ResourceEntry::destroy | ( | ) |
void BALL::ResourceEntry::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const |
ConstIterator BALL::ResourceEntry::end | ( | ) | const [inline] |
Iterator BALL::ResourceEntry::end | ( | ) | [inline] |
const ResourceEntry* BALL::ResourceEntry::findChild | ( | const String & | key | ) | const |
ResourceEntry* BALL::ResourceEntry::findChild | ( | const String & | key | ) |
const ResourceEntry* BALL::ResourceEntry::findDescendant | ( | const String & | key | ) | const |
ResourceEntry* BALL::ResourceEntry::findDescendant | ( | const String & | key | ) |
const ResourceEntry* BALL::ResourceEntry::findEntry | ( | const String & | key | ) | const |
ResourceEntry* BALL::ResourceEntry::findEntry | ( | const String & | key | ) |
void BALL::ResourceEntry::get | ( | ResourceEntry & | entry, | |
bool | deep = true | |||
) | const |
Assign the contents of a resource enytry to another one.
entry | the ResourceEntry object to be copied | |
deep | create a deep (true) or shallow (false) copy |
const ResourceEntry* BALL::ResourceEntry::getChild | ( | Position | index | ) | const |
Return a const pointer to a child node.
index
does not exist ResourceEntry* BALL::ResourceEntry::getChild | ( | Position | index | ) |
Return a pointer to a child node.
index
does not exist Size BALL::ResourceEntry::getDepth | ( | ) | const |
Compute the depth of this entry within the tree.
const ResourceEntry* BALL::ResourceEntry::getEntry | ( | const String & | key_path | ) | const |
Return a const pointer to an entry Searches for an entry via its path.
ResourceEntry* BALL::ResourceEntry::getEntry | ( | const String & | key_path | ) |
Return a pointer to an entry. Searches for an entry via its path.
const String& BALL::ResourceEntry::getKey | ( | ) | const |
Return the key of this ResourceEntry.
const ResourceEntry* BALL::ResourceEntry::getParent | ( | ) | const |
ResourceEntry* BALL::ResourceEntry::getParent | ( | ) |
String BALL::ResourceEntry::getPath | ( | ) | const |
Return the path of an entry.
const ResourceEntry& BALL::ResourceEntry::getRoot | ( | ) | const |
ResourceEntry& BALL::ResourceEntry::getRoot | ( | ) |
Size BALL::ResourceEntry::getSize | ( | ) | const |
????? What is the size of an entry? Why not use size()?
const String& BALL::ResourceEntry::getValue | ( | ) | const |
Get a constant reference to the value of this ResourceEntry.
String& BALL::ResourceEntry::getValue | ( | ) |
Get a mutable reference to the value of this ResourceEntry.
void BALL::ResourceEntry::host | ( | Visitor< ResourceEntry > & | visitor | ) |
ResourceEntry* BALL::ResourceEntry::insert | ( | const String & | key_path, | |
const String & | name | |||
) |
Insert a resource entry at the appropriate place in the tree.
ResourceEntry* BALL::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* BALL::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* BALL::ResourceEntry::insertSibling | ( | const String & | key, | |
const String & | value, | |||
bool | replace_value = true | |||
) |
Insert a child into the tree below the parent entry.
bool BALL::ResourceEntry::isAncestorOf | ( | const ResourceEntry & | entry | ) | const |
bool BALL::ResourceEntry::isChildOf | ( | const ResourceEntry & | entry | ) | const |
bool BALL::ResourceEntry::isDescendantOf | ( | const ResourceEntry & | entry | ) | const |
bool BALL::ResourceEntry::isEmpty | ( | ) | const |
bool BALL::ResourceEntry::isParentOf | ( | const ResourceEntry & | entry | ) | const |
bool BALL::ResourceEntry::isRelatedWith | ( | const ResourceEntry & | entry | ) | const |
bool BALL::ResourceEntry::isRoot | ( | ) | const |
bool BALL::ResourceEntry::isValid | ( | ) | const |
bool BALL::ResourceEntry::mergeChildrenOf | ( | ResourceEntry & | entry, | |
bool | replace_value = true | |||
) |
Merge the children of a resource entry.
virtual ResourceEntry* BALL::ResourceEntry::newEntry | ( | const String & | key, | |
const String & | value, | |||
ResourceEntry * | parent = 0 | |||
) | const [protected, virtual] |
virtual ResourceEntry** BALL::ResourceEntry::newEntryArray | ( | Size | size | ) | const [protected, virtual] |
bool BALL::ResourceEntry::operator!= | ( | const ResourceEntry & | entry | ) | const |
Inequality operator
const ResourceEntry& BALL::ResourceEntry::operator= | ( | const ResourceEntry & | entry | ) |
Assignment operator.
entry | the ResourceEntry object to be copied |
bool BALL::ResourceEntry::operator== | ( | const ResourceEntry & | entry | ) | const |
Equality operator
bool BALL::ResourceEntry::removeChild | ( | const String & | key, | |
ResourceEntry ** | removed = 0 | |||
) |
Remove a child of a resource entry.
void BALL::ResourceEntry::set | ( | const ResourceEntry & | entry, | |
bool | deep = true | |||
) |
Assign a resource entry from another.
entry | the ResourceEntry object to be copied | |
deep | create a deep (true) or shallow (false) copy |
void BALL::ResourceEntry::setValue | ( | const String & | value | ) |
Set the value of this ResourceEntry.
friend class IteratorTraits_ [friend] |
ResourceEntry** BALL::ResourceEntry::child_ [private] |
String BALL::ResourceEntry::key_ [private] |
Size BALL::ResourceEntry::number_children_ [private] |
ResourceEntry* BALL::ResourceEntry::parent_ [private] |
String BALL::ResourceEntry::value_ [private] |