summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParserFactory.h')
-rw-r--r--Swiften/Parser/PayloadParserFactory.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/Swiften/Parser/PayloadParserFactory.h b/Swiften/Parser/PayloadParserFactory.h
index d97595b..3d647c6 100644
--- a/Swiften/Parser/PayloadParserFactory.h
+++ b/Swiften/Parser/PayloadParserFactory.h
@@ -4,8 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_PAYLOADPARSERFACTORY_H
-#define SWIFTEN_PAYLOADPARSERFACTORY_H
+#pragma once
#include "Swiften/Parser/AttributeMap.h"
@@ -13,13 +12,21 @@ namespace Swift {
class String;
class PayloadParser;
+ /**
+ * A factory for PayloadParsers.
+ */
class PayloadParserFactory {
public:
virtual ~PayloadParserFactory();
+ /**
+ * Checks whether this factory can parse the given top-level element in the given namespace (with the given attributes).
+ */
virtual bool canParse(const String& element, const String& ns, const AttributeMap& attributes) const = 0;
+
+ /**
+ * Creates a new payload parser.
+ */
virtual PayloadParser* createPayloadParser() = 0;
};
}
-
-#endif