#ifndef XML_PARSER_H #define XML_PARSER_H #include #include #include #include "FileScanner.h" #define XML_LINE_MAX 1024 // ------------------------------------------------------------------------- struct XMLVariable { std::string name; std::string value; }; // ------------------------------------------------------------------------- class XMLParser { public: // singleton pattern static XMLParser* getInstance(); static void destroyInstance(); bool open(std::string filename); void close(); bool endOfFile(); bool readNextTag(); std::string tagName; std::vector vars; bool closed; bool endTag; FileScanner &getFileScanner() { return fs; } // ezm void ezmParseSemantic(int &count); void ezmReadSemanticEntry(int nr); std::vector ezmAttrs; std::vector ezmTypes; std::vector ezmFloats; std::vector ezmInts; private: XMLParser(); ~XMLParser(); void clearTag(); FileScanner fs; }; #include #define FILE_SCANNER_LINE_MAX 1024 #endif