Browse Source

[2369] Make InputSource non-copyable

Mukund Sivaraman 12 years ago
parent
commit
24862b62d9
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/lib/dns/master_lexer_inputsource.h

+ 5 - 2
src/lib/dns/master_lexer_inputsource.h

@@ -17,6 +17,8 @@
 
 
 #include <exceptions/exceptions.h>
 #include <exceptions/exceptions.h>
 
 
+#include <boost/noncopyable.hpp>
+
 #include <iostream>
 #include <iostream>
 #include <fstream>
 #include <fstream>
 #include <string>
 #include <string>
@@ -34,8 +36,9 @@ namespace master_lexer_internal {
 /// can have multiple InputSources if $INCLUDE is used. The source can
 /// can have multiple InputSources if $INCLUDE is used. The source can
 /// also be generic input stream (std::istream).
 /// also be generic input stream (std::istream).
 ///
 ///
-/// This class is not meant for public use.
-class InputSource {
+/// This class is not meant for public use. We also enforce that
+/// instances are non-copyable.
+class InputSource : boost::noncopyable {
 public:
 public:
     /// \brief Returned by getChar() when end of stream is reached.
     /// \brief Returned by getChar() when end of stream is reached.
     static const int END_OF_STREAM;
     static const int END_OF_STREAM;