summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/acceltree/qacceltreebuilder_p.h')
-rw-r--r--src/xmlpatterns/acceltree/qacceltreebuilder_p.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/xmlpatterns/acceltree/qacceltreebuilder_p.h b/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
index 653eb85..91e8d68 100644
--- a/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
+++ b/src/xmlpatterns/acceltree/qacceltreebuilder_p.h
@@ -90,15 +90,27 @@ namespace QPatternist
typedef QExplicitlySharedDataPointer<AccelTreeBuilder> Ptr;
/**
+ * Describes the memory relevant features the builder shall support.
+ */
+ enum Feature
+ {
+ NoneFeature, ///< No special features are enabled.
+ SourceLocationsFeature = 1 ///< The accel tree builder will store source locations for each start element.
+ };
+ Q_DECLARE_FLAGS(Features, Feature)
+
+ /**
* @param context may be @c null.
*/
AccelTreeBuilder(const QUrl &docURI,
const QUrl &baseURI,
const NamePool::Ptr &np,
- ReportContext *const context);
+ ReportContext *const context,
+ Features features = NoneFeature);
virtual void startDocument();
virtual void endDocument();
virtual void startElement(const QXmlName &name);
+ void startElement(const QXmlName &name, qint64 line, qint64 column);
virtual void endElement();
virtual void attribute(const QXmlName &name, const QStringRef &value);
virtual void characters(const QStringRef &ch);
@@ -175,8 +187,13 @@ namespace QPatternist
* a member.
*/
ReportContext *const m_context;
+
+ Features m_features;
};
+ Q_DECLARE_OPERATORS_FOR_FLAGS(AccelTreeBuilder<true>::Features)
+ Q_DECLARE_OPERATORS_FOR_FLAGS(AccelTreeBuilder<false>::Features)
+
#include "qacceltreebuilder.cpp"
}