[libxml++] DomParser, SaxParser: Make some methods non-virtual
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml++] DomParser, SaxParser: Make some methods non-virtual
- Date: Wed, 23 Sep 2015 14:37:07 +0000 (UTC)
commit 21b3fe88fe6c354548b5808dbefd4d0bc13fb250
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Wed Sep 23 16:34:31 2015 +0200
DomParser, SaxParser: Make some methods non-virtual
* libxml++/parsers/domparser.h: Make parse_context() non-virtual.
* libxml++/parsers/saxparser.h: Make parse_chunk(), finish_chunk_parsing()
and parse() non-virtual. Bug #754673.
libxml++/parsers/domparser.h | 3 +--
libxml++/parsers/saxparser.h | 17 +++++++----------
2 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/libxml++/parsers/domparser.h b/libxml++/parsers/domparser.h
index cc5bc91..3977e58 100644
--- a/libxml++/parsers/domparser.h
+++ b/libxml++/parsers/domparser.h
@@ -90,8 +90,7 @@ public:
const Document* get_document() const;
protected:
- //TODO: Remove the virtual when we can break ABI?
- virtual void parse_context();
+ void parse_context();
void release_underlying() override;
diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h
index 846c959..60a18aa 100644
--- a/libxml++/parsers/saxparser.h
+++ b/libxml++/parsers/saxparser.h
@@ -113,14 +113,13 @@ public:
*/
void parse_stream(std::istream& in) override;
- //TODO: Remove virtual when we can break ABI?
/** Parse a chunk of data.
*
* This lets you pass a document in small chunks, e.g. from a network
* connection. The on_* virtual functions are called each time the chunks
* provide enough information to advance the parser.
*
- * The first call to parse_chunk will setup the parser. When the last chunk
+ * The first call to parse_chunk() will setup the parser. When the last chunk
* has been parsed, call finish_chunk_parsing() to finish the parse.
*
* @param chunk The next piece of the XML document.
@@ -128,7 +127,7 @@ public:
* @throws xmlpp::parse_error
* @throws xmlpp::validity_error
*/
- virtual void parse_chunk(const Glib::ustring& chunk);
+ void parse_chunk(const Glib::ustring& chunk);
/** Parse a chunk of data.
*
@@ -138,7 +137,7 @@ public:
* connection. The on_* virtual functions are called each time the chunks
* provide enough information to advance the parser.
*
- * The first call to parse_chunk will setup the parser. When the last chunk
+ * The first call to parse_chunk_raw() will setup the parser. When the last chunk
* has been parsed, call finish_chunk_parsing() to finish the parse.
*
* @param contents The next piece of the XML document as an array of bytes.
@@ -149,16 +148,15 @@ public:
*/
void parse_chunk_raw(const unsigned char* contents, size_type bytes_count);
- //TODO: Remove virtual when we can break ABI?
/** Finish a chunk-wise parse.
*
- * Call this after the last call to parse_chunk(). Don't use this function with
- * the other parsing methods.
+ * Call this after the last call to parse_chunk() or parse_chunk_raw().
+ * Don't use this function with the other parsing methods.
* @throws xmlpp::internal_error
* @throws xmlpp::parse_error
* @throws xmlpp::validity_error
*/
- virtual void finish_chunk_parsing();
+ void finish_chunk_parsing();
protected:
@@ -213,8 +211,7 @@ protected:
void release_underlying() override;
private:
- //TODO: Remove the virtual when we can break ABI?
- virtual void parse();
+ void parse();
std::unique_ptr<_xmlSAXHandler> sax_handler_;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]