Class tree_storage proviedes an interface for classes providing tree based storage. Mehr ...
#include <treestorage.h>
Öffentliche Methoden | |
tree_storage () | |
default constructor. | |
virtual | ~tree_storage () |
virtual destructor | |
virtual long | Read (const mutStringRef key, long defval)=0 |
Reads a long integer value. | |
virtual double | Read (const mutStringRef key, double defval)=0 |
Reads a double value. | |
virtual int | Read (const mutStringRef key, int defval)=0 |
Reads an integer value. | |
virtual bool | Read (const mutStringRef key, bool defval)=0 |
Reads a boolean value. | |
virtual mutString | Read (const mutStringRef key, const mutStringRef defval)=0 |
Reads a string value. | |
mutString | Read (const mutStringRef key, const mutChar *defval) |
mutString | Read (const mutStringRef key, mutChar *defval) |
virtual void | Write (const mutStringRef key, long value)=0 |
Writes a long integer value. | |
virtual void | Write (const mutStringRef key, double value)=0 |
Writes a double value. | |
virtual void | Write (const mutStringRef key, int value)=0 |
Writes an integer value. | |
virtual void | Write (const mutStringRef key, bool value)=0 |
Writes a boolean value. | |
virtual void | Write (const mutStringRef key, const mutStringRef value)=0 |
Writes a string value. | |
virtual bool | HasGroup (const mutStringRef) const =0 |
Checks if the tree has a branch with the given name. | |
virtual void | toLeaf (const mutStringRef subdir)=0 |
Changes the current node downwards. | |
virtual void | toLeaf (const mutStringRef name, int id)=0 |
Changes the current node downwards. | |
virtual int | toFirstLeaf (const mutStringRef name)=0 |
Changes the current node downdwards to the first leaf of given type. | |
virtual int | toFirstLeaf (const mutStringRef name, mutStringRef id)=0 |
Changes the current node downdwards to the first leaf of given type. | |
virtual int | toNextLeaf (const mutStringRef name)=0 |
Changes the current node downdwards to the next leaf of given type. | |
virtual int | toNextLeaf (const mutStringRef name, mutStringRef id)=0 |
Changes the current node downdwards to the next leaf of given type. | |
virtual void | toParent (unsigned int count=1)=0 |
This function jumps up in the tree (i.e. towards the root). | |
virtual mutString | GetPath ()=0 |
Return a string representation of the position in the current tree. | |
virtual void | SetPath (const mutStringRef path)=0 |
Set the current pointer in the tree. | |
virtual void | DeleteEntry (const mutStringRef path)=0 |
Delete an entry. | |
virtual void | DeleteGroup (const mutStringRef path)=0 |
Delete an entire group with all childs. |
Class tree_storage proviedes an interface for classes providing tree based storage.
This class is an abstract class. subclass it to provide some storage technology, which can be used for routing and other options.
Definiert in Zeile 46 der Datei treestorage.h.
tree_storage::tree_storage | ( | ) | [inline] |
virtual tree_storage::~tree_storage | ( | ) | [inline, virtual] |
virtual void tree_storage::DeleteEntry | ( | const mutStringRef | path | ) | [pure virtual] |
virtual void tree_storage::DeleteGroup | ( | const mutStringRef | path | ) | [pure virtual] |
Delete an entire group with all childs.
group path to the entry that shall be deleted
Implementiert in configtree.
Wird benutzt von SaveRoutes().
virtual mutString tree_storage::GetPath | ( | ) | [pure virtual] |
Return a string representation of the position in the current tree.
This function can be used to store the current position in the tree.
mutString | String representation of the current path. The concrete representation is implementation dependent and can vary for different tree types. |
Implementiert in configtree.
virtual bool tree_storage::HasGroup | ( | const mutStringRef | ) | const [pure virtual] |
Checks if the tree has a branch with the given name.
subdir (mutStringRef) subdirectory to check for.
Implementiert in configtree.
virtual bool tree_storage::Read | ( | const mutStringRef | key, |
bool | defval | ||
) | [pure virtual] |
Reads a boolean value.
key (mutStringRef) Name of the desired leaf in the tree defval (bool) default value, if the leaf is not availlable
data | read or defval, if the leaf does not exist. |
Implementiert in configtree.
virtual mutString tree_storage::Read | ( | const mutStringRef | key, |
const mutStringRef | defval | ||
) | [pure virtual] |
Reads a string value.
key (mutStringRef) Name of the desired leaf in the tree defval (mutStringRef) default value, if the leaf is not availlable
data | read or defval, if the leaf does not exist. |
Implementiert in configtree.
virtual double tree_storage::Read | ( | const mutStringRef | key, |
double | defval | ||
) | [pure virtual] |
Reads a double value.
key (mutStringRef) Name of the desired leaf in the tree defval (double) default value, if the leaf is not availlable
data | read or defval, if the leaf does not exist. |
Implementiert in configtree.
virtual long tree_storage::Read | ( | const mutStringRef | key, |
long | defval | ||
) | [pure virtual] |
Reads a long integer value.
key (mutStringRef) Name of the desired leaf in the tree defval (long) default value, if the leaf is not availlable
data | read or defval, if the leaf does not exist. |
Implementiert in configtree.
Wird benutzt von Route::Load(), InMidiPort::Load(), OutMidiPort::Load(), InMidiFile::Load(), OutMidiFile::Load(), InGis::Load(), OutGis::Load(), InDevice::LoadDevices(), OutDevice::LoadDevices(), Route::LoadRoutes() und Read().
virtual int tree_storage::Read | ( | const mutStringRef | key, |
int | defval | ||
) | [pure virtual] |
Reads an integer value.
key (mutStringRef) Name of the desired leaf in the tree defval (int) default value, if the leaf is not availlable
data | read or defval, if the leaf does not exist. |
Implementiert in configtree.
mutString tree_storage::Read | ( | const mutStringRef | key, |
const mutChar * | defval | ||
) | [inline] |
mutString tree_storage::Read | ( | const mutStringRef | key, |
mutChar * | defval | ||
) | [inline] |
virtual void tree_storage::SetPath | ( | const mutStringRef | path | ) | [pure virtual] |
Set the current pointer in the tree.
This function can be used to store the current position in the tree. path (mutString) String representation of the new path as returned by GetPath(). The concrete representation is implementation dependent and can vary for different tree types.
Implementiert in configtree.
virtual int tree_storage::toFirstLeaf | ( | const mutStringRef | name | ) | [pure virtual] |
Changes the current node downdwards to the first leaf of given type.
this function can be used to navigate towards the leaves in the tree. The argument can be considered as Items with a unique id. subdir (mutStringRef) name of the entity to be read from.
Implementiert in configtree.
Wird benutzt von InDevice::LoadDevices(), OutDevice::LoadDevices() und Route::LoadRoutes().
virtual int tree_storage::toFirstLeaf | ( | const mutStringRef | name, |
mutStringRef | id | ||
) | [pure virtual] |
Changes the current node downdwards to the first leaf of given type.
this function can be used to navigate towards the leaves in the tree. The argument can be considered as Items with a unique id. subdir (mutStringRef) name of the entity to be read from. id (mutStringRef) reference to a String where the id of the leaf will be stored
Implementiert in configtree.
virtual void tree_storage::toLeaf | ( | const mutStringRef | name, |
int | id | ||
) | [pure virtual] |
Changes the current node downwards.
this function can be used to navigate towards the leaves in the tree. The argument can be considered as Items with a unique id. if the id is negative, it will create a new item. subdir (mutStringRef) name of the entity to be written to. id (int) id of the current object
Implementiert in configtree.
virtual void tree_storage::toLeaf | ( | const mutStringRef | subdir | ) | [pure virtual] |
Changes the current node downwards.
this function can be used to navigate towards the leaves in the tree. The argument can be considered like a subdirectory in a file system. subdir (mutStringRef) subdirectory to be written to.
Implementiert in configtree.
Wird benutzt von InDevice::LoadDevices(), OutDevice::LoadDevices(), LoadRoutes(), Route::LoadRoutes(), InDevice::SaveDevices(), OutDevice::SaveDevices(), SaveRoutes() und Route::SaveRoutes().
virtual int tree_storage::toNextLeaf | ( | const mutStringRef | name | ) | [pure virtual] |
Changes the current node downdwards to the next leaf of given type.
this function can be used to navigate towards the leaves in the tree. The argument can be considered as Items with a unique id. subdir (mutStringRef) name of the entity to be read from.
Implementiert in configtree.
Wird benutzt von InDevice::LoadDevices(), OutDevice::LoadDevices() und Route::LoadRoutes().
virtual int tree_storage::toNextLeaf | ( | const mutStringRef | name, |
mutStringRef | id | ||
) | [pure virtual] |
Changes the current node downdwards to the next leaf of given type.
this function can be used to navigate towards the leaves in the tree. The argument can be considered as Items with a unique id. subdir (mutStringRef) name of the entity to be read from. id (mutStringRef) reference to a String where the id of the leaf will be stored
Implementiert in configtree.
virtual void tree_storage::toParent | ( | unsigned int | count = 1 | ) | [pure virtual] |
This function jumps up in the tree (i.e. towards the root).
count (int) number of nodes to go upward. Default: 1.
Implementiert in configtree.
Wird benutzt von InDevice::LoadDevices(), OutDevice::LoadDevices(), LoadRoutes(), Route::LoadRoutes(), InDevice::SaveDevices(), OutDevice::SaveDevices(), SaveRoutes() und Route::SaveRoutes().
virtual void tree_storage::Write | ( | const mutStringRef | key, |
bool | value | ||
) | [pure virtual] |
Writes a boolean value.
key (mutStringRef) Name of the desired leaf in the tree value (bool) value, to be written
Implementiert in configtree.
virtual void tree_storage::Write | ( | const mutStringRef | key, |
double | value | ||
) | [pure virtual] |
Writes a double value.
key (mutStringRef) Name of the desired leaf in the tree value (double) value, to be written
Implementiert in configtree.
virtual void tree_storage::Write | ( | const mutStringRef | key, |
const mutStringRef | value | ||
) | [pure virtual] |
Writes a string value.
key (mutStringRef) Name of the desired leaf in the tree value (mutStringRef) value, to be written
Implementiert in configtree.
virtual void tree_storage::Write | ( | const mutStringRef | key, |
int | value | ||
) | [pure virtual] |
Writes an integer value.
key (mutStringRef) Name of the desired leaf in the tree value (int) value, to be written
Implementiert in configtree.
virtual void tree_storage::Write | ( | const mutStringRef | key, |
long | value | ||
) | [pure virtual] |
Writes a long integer value.
key (mutStringRef) Name of the desired leaf in the tree value (long) value, to be written
Implementiert in configtree.
Wird benutzt von Route::Save(), InMidiPort::Save(), OutMidiPort::Save(), InMidiFile::Save(), OutMidiFile::Save(), InGis::Save(), OutGis::Save(), InDevice::SaveDevices(), OutDevice::SaveDevices() und Route::SaveRoutes().