Subversion Repositories tpanel

Rev

Rev 21 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 44
Line 25... Line 25...
25
#include "mxml.h"
25
#include "mxml.h"
26
 
26
 
27
class TReadXML
27
class TReadXML
28
{
28
{
29
    public:
29
    public:
30
        TReadXML(const std::string& fname);
30
        TReadXML(const std::string& fname, bool trim=false);
31
        ~TReadXML();
31
        ~TReadXML();
32
 
32
 
33
        std::string& findElement(const std::string& name);
33
        std::string& findElement(const std::string& name);
34
        std::string& findElement(const std::string& name, const std::string& attr);
34
        std::string& findElement(const std::string& name, const std::string& attr);
35
        std::string& findElement(mxml_node_t *node, const std::string& name);
35
        std::string& findElement(mxml_node_t *node, const std::string& name);
Line 64... Line 64...
64
        mxml_node_t *getRoot() { return mTree; }
64
        mxml_node_t *getRoot() { return mTree; }
65
        mxml_node_t *getNode() { return mNode; }
65
        mxml_node_t *getNode() { return mNode; }
66
        mxml_node_t *getLastNode() { return mLastNode; }
66
        mxml_node_t *getLastNode() { return mLastNode; }
67
 
67
 
68
	protected:
68
	protected:
69
        bool openFile();
69
        bool openFile(bool trim=false);
70
        void extractValue(mxml_node_t *n);
70
        void extractValue(mxml_node_t *n);
71
 
71
 
72
	private:
72
	private:
73
        TReadXML() {}
73
        TReadXML() {}
74
        std::string _typeName(mxml_type_t t);   // For internal debugging only!
74
        std::string _typeName(mxml_type_t t);   // For internal debugging only!