summaryrefslogtreecommitdiff
path: root/server/src/transactionparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/transactionparser.h')
-rw-r--r--server/src/transactionparser.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/server/src/transactionparser.h b/server/src/transactionparser.h
index 5a3beb3..385e1a5 100644
--- a/server/src/transactionparser.h
+++ b/server/src/transactionparser.h
@@ -31,13 +31,32 @@
#include "tcpsocket.h"
#include "transaction.h"
+/**
+ * Transaction parser class.
+ * It parses all transactions amde to the server, and generates a Transaction
+ * structure from it.
+ * To activate the parser, the parser(char *buf, size_t size) buffer parser
+ * method in the SAXParser parent class is used.
+ * @see class SAXParser
+ */
class TransactionParser : public SAXParser {
public:
+ /**
+ * Constructor.
+ * It does nothing but set the internal transaction variable really.
+ * @param transaction The Transaction to be filled with the parsed data.
+ */
TransactionParser(Transaction *transaction);
- ~TransactionParser();
-
+
+ /**
+ * Start tag callback method.
+ */
void startTag(std::string name, std::map< std::string, std::string> attributes);
+ /**
+ * Parser error callback method. Unlike its parent class, this method throws
+ * an exception.
+ */
void parseError(char *buf, size_t len, std::string error, int lineno);
private: