summaryrefslogtreecommitdiff
path: root/server/src/queryparser.h
diff options
context:
space:
mode:
authordeva <deva>2009-07-24 16:05:18 +0000
committerdeva <deva>2009-07-24 16:05:18 +0000
commit680c646011ec55dd4c639a5b61d8c42a10272ae2 (patch)
tree171aea7bbd680a1dc7cf80bc5cdabc55c82a7618 /server/src/queryparser.h
parent408c7c5b36e1058a76741a22876593ee8c042dd4 (diff)
More extensive testing, and documentation in the header files.
Diffstat (limited to 'server/src/queryparser.h')
-rw-r--r--server/src/queryparser.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/server/src/queryparser.h b/server/src/queryparser.h
index 947767c..3a73aa2 100644
--- a/server/src/queryparser.h
+++ b/server/src/queryparser.h
@@ -27,27 +27,47 @@
#ifndef __PRACRO_QUERYPARSER_H__
#define __PRACRO_QUERYPARSER_H__
-#include <time.h>
-
-#include "queryresult.h"
#include "saxparser.h"
+#include <time.h>
#include <vector>
+#include "queryresult.h"
#include "utf8.h"
+#include "exception.h"
/**
- * This class parses xml entyties into a QueryResult structure.
+ * This class parses xml entities into a QueryResult structure.
+ * Call the parent (SAXParser) method parse in order to actually parse something.
+ * If the parser fails (syntax error) it will throw an Exception.
+ * @see QueryResult result, in order to get the parsed data.
*/
class QueryParser : public SAXParser {
public:
+ /**
+ * Constructor.
+ */
QueryParser();
+ /**
+ * The object will contain the result when the parsing is done.
+ */
+ QueryResult result;
+
+ /**
+ * Private parser callback.
+ */
void startTag(std::string name, std::map< std::string, std::string> attributes);
+
+ /**
+ * Private parser callback.
+ */
void endTag(std::string name);
- void parseError(char *buf, size_t len, std::string error, int lineno);
- QueryResult result;
+ /**
+ * Private parser callback.
+ */
+ void parseError(char *buf, size_t len, std::string error, int lineno);
private:
// For read