Commit 5654a073 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[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.
parent fadf2a8a
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <dns/master_lexer.h> #include <dns/master_lexer.h>
#include <dns/master_lexer_inputsource.h>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
...@@ -26,30 +27,8 @@ ...@@ -26,30 +27,8 @@
namespace isc { namespace isc {
namespace dns { namespace dns {
namespace master_lexer_internal { namespace {
std::string typedef boost::shared_ptr<master_lexer_internal::InputSource> InputSourcePtr;
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;
} }
using namespace master_lexer_internal; using namespace master_lexer_internal;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment