Klassen | Öffentliche Methoden | Private Attribute
configtree Klassenreferenz

#include <configtree.h>

Klassendiagramm für configtree:
Inheritance graph
[Legende]
Zusammengehörigkeiten von configtree:
Collaboration graph
[Legende]

Aufstellung aller Elemente

Klassen

struct  state
 structure describing the current state Mehr ...

Öffentliche Methoden

 configtree (wxConfigBase *conf, bool ownconfig=false)
virtual ~configtree ()
virtual long Read (const mutStringRef key, long defval)
 Reads a long integer value.
virtual double Read (const mutStringRef key, double defval)
 Reads a double value.
virtual int Read (const mutStringRef key, int defval)
 Reads an integer value.
virtual bool Read (const mutStringRef key, bool defval)
 Reads a boolean value.
virtual mutString Read (const mutStringRef key, const mutStringRef defval)
 Reads a string value.
virtual void Write (const mutStringRef key, long value)
 Writes a long integer value.
virtual void Write (const mutStringRef key, double value)
 Writes a double value.
virtual void Write (const mutStringRef key, int value)
 Writes an integer value.
virtual void Write (const mutStringRef key, bool value)
 Writes a boolean value.
virtual void Write (const mutStringRef key, const mutStringRef value)
 Writes a string value.
virtual bool HasGroup (const mutStringRef subdir) const
 Checks if the tree has a branch with the given name.
virtual void toLeaf (const mutStringRef subdir)
 Changes the current node downwards.
virtual void toLeaf (const mutStringRef name, int id)
 Changes the current node downwards.
virtual int toFirstLeaf (const mutStringRef name)
 Changes the current node downdwards to the first leaf of given type.
virtual int toFirstLeaf (const mutStringRef name, mutStringRef id)
 Changes the current node downdwards to the first leaf of given type.
virtual int toNextLeaf (const mutStringRef name)
 Changes the current node downdwards to the next leaf of given type.
virtual int toNextLeaf (const mutStringRef name, mutStringRef id)
 Changes the current node downdwards to the next leaf of given type.
virtual void toParent (unsigned int count=1)
 This function jumps up in the tree (i.e. towards the root).
virtual mutString GetPath ()
 Return a string representation of the position in the current tree.
virtual void SetPath (const mutStringRef path)
 Set the current pointer in the tree.
virtual void DeleteEntry (const mutStringRef path)
 Delete an entry.
virtual void DeleteGroup (const mutStringRef path)
 Delete an entire group with all childs.

Private Attribute

wxConfigBase * config
 configuration object
bool deleteconfig
 true if the config is private and must be deleted on deletion
std::stack< statestates

Ausführliche Beschreibung

Definiert in Zeile 48 der Datei configtree.h.


Beschreibung der Konstruktoren und Destruktoren

configtree::configtree ( wxConfigBase *  conf,
bool  ownconfig = false 
) [inline]

Definiert in Zeile 68 der Datei configtree.h.

                                                               :config(conf),deleteconfig(ownconfig),states()
        {
        }
virtual configtree::~configtree ( ) [inline, virtual]

Definiert in Zeile 72 der Datei configtree.h.

Benutzt config und deleteconfig.

        {
                if (deleteconfig) delete config;
        }

Dokumentation der Elementfunktionen

virtual void configtree::DeleteEntry ( const mutStringRef  path) [inline, virtual]

Delete an entry.

entry path to the entry that shall be deleted

Implementiert tree_storage.

Definiert in Zeile 121 der Datei configtree.h.

Benutzt config.

        {
                config->DeleteEntry(path);
        }
virtual void configtree::DeleteGroup ( const mutStringRef  path) [inline, virtual]

Delete an entire group with all childs.

group path to the entry that shall be deleted

Implementiert tree_storage.

Definiert in Zeile 130 der Datei configtree.h.

Benutzt config.

        {
                config->DeleteGroup(path);
        }
virtual int configtree::toFirstLeaf ( const mutStringRef  name) [inline, 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.

Rückgabe:
(int) id of the selected item
Siehe auch:
toNextLeaf

Implementiert tree_storage.

Definiert in Zeile 92 der Datei configtree.h.

Benutzt mutString.

        {
                mutString id;
                if (toFirstLeaf(name,id) == wxNOT_FOUND) 
                        return wxNOT_FOUND;
                long i;
                if (id.ToLong(&i)) return (int)i; 
                else return wxNOT_FOUND;
        }
virtual int configtree::toNextLeaf ( const mutStringRef  name) [inline, 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.

Rückgabe:
(int) id of the selected item
Siehe auch:
toFirstLeaf

Implementiert tree_storage.

Definiert in Zeile 102 der Datei configtree.h.

Benutzt mutString.

        {
                mutString id;
                if (toNextLeaf(name,id) == wxNOT_FOUND)
                        return wxNOT_FOUND;
                long i;
                if (id.ToLong(&i)) return (int)i; 
                else return wxNOT_FOUND;                
        }

Dokumentation der Datenelemente

wxConfigBase* configtree::config [private]

configuration object

Definiert in Zeile 50 der Datei configtree.h.

Wird benutzt von DeleteEntry(), DeleteGroup(), GetPath(), HasGroup(), Read(), SetPath(), toFirstLeaf(), toLeaf(), toNextLeaf(), toParent(), Write() und ~configtree().

bool configtree::deleteconfig [private]

true if the config is private and must be deleted on deletion

Definiert in Zeile 51 der Datei configtree.h.

Wird benutzt von ~configtree().

std::stack<state> configtree::states [private]

Definiert in Zeile 66 der Datei configtree.h.

Wird benutzt von toFirstLeaf(), toLeaf(), toNextLeaf() und toParent().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien:

Erzeugt am Sun Aug 21 2011 10:52:06 für Mutabor von doxygen 1.7.4