Browse Source

[2371] use the real InputSource class instead of the temporary fake version.

note: right now build fails due to the duplicate definition of
InputSource::END_OF_STREAM.  It will be fixed in the next commit.
JINMEI Tatuya 12 years ago
parent
commit
5654a07319
1 changed files with 3 additions and 24 deletions
  1. 3 24
      src/lib/dns/master_lexer.cc

+ 3 - 24
src/lib/dns/master_lexer.cc

@@ -15,6 +15,7 @@
 #include <exceptions/exceptions.h>
 
 #include <dns/master_lexer.h>
+#include <dns/master_lexer_inputsource.h>
 
 #include <boost/shared_ptr.hpp>
 
@@ -26,30 +27,8 @@
 namespace isc {
 namespace dns {
 
-namespace master_lexer_internal {
-std::string
-createStreamName(std::istream& input_stream) {
-    std::stringstream ss;
-    ss << "stream-" << &input_stream;
-    return (ss.str());
-}
-
-// A fake version of InputSource until #2369 is ready.  This class only
-// provides some interfaces and doesn't manipulate the input source further.
-class InputSource {
-public:
-    InputSource(std::istream& input_stream) :
-        name_(createStreamName(input_stream))
-    {}
-    InputSource(const char* filename) : name_(filename) {}
-    const std::string& getName() const { return (name_); }
-    size_t getCurrentLine() const { return (1); }
-
-private:
-    const std::string name_;
-};
-
-typedef boost::shared_ptr<InputSource> InputSourcePtr;
+namespace {
+typedef boost::shared_ptr<master_lexer_internal::InputSource> InputSourcePtr;
 }
 using namespace master_lexer_internal;