aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-05-08 15:57:10 -0700
committerBoris Kolpackov <boris@codesynthesis.com>2014-05-08 15:57:10 -0700
commit8234b273aea9a662b8675190d3e73c90ce159f1a (patch)
tree6db7389efe51b549c1ebf8700bc259af888ba398
parentf37430cb52ff43c664d2eca08fa5ab51b0413925 (diff)
Disable copying and copy-assignment in parser and serializer
-rw-r--r--xml/parser.hxx9
-rw-r--r--xml/serializer.hxx10
2 files changed, 13 insertions, 6 deletions
diff --git a/xml/parser.hxx b/xml/parser.hxx
index 2c42d4a..51d589e 100644
--- a/xml/parser.hxx
+++ b/xml/parser.hxx
@@ -95,8 +95,6 @@ namespace xml
receive_characters |
receive_attributes_map;
- ~parser ();
-
// Parse std::istream. Input name is used in diagnostics to identify
// the document being parsed. std::ios_base::failure exception is
// used to report io errors (badbit and failbit).
@@ -113,10 +111,15 @@ namespace xml
const std::string& input_name,
feature_type = receive_default);
-
const std::string&
input_name () const {return iname_;}
+ ~parser ();
+
+ private:
+ parser (const parser&);
+ parser& operator= (const parser&);
+
// Parsing events.
//
public:
diff --git a/xml/serializer.hxx b/xml/serializer.hxx
index 59dcdec..e0041f9 100644
--- a/xml/serializer.hxx
+++ b/xml/serializer.hxx
@@ -56,8 +56,6 @@ namespace xml
public:
typedef xml::qname qname_type;
- ~serializer ();
-
// Serialize to std::ostream. Output name is used in diagnostics to
// identify the document being serialized. std::ios_base::failure
// exception is used to report io errors (badbit and failbit). The
@@ -72,9 +70,15 @@ namespace xml
const std::string&
output_name () const {return oname_;}
+ ~serializer ();
+
+ private:
+ serializer (const serializer&);
+ serializer& operator= (const serializer&);
+
// Serialization functions.
//
- public:
+ public:
// Elements.
//