diff options
author | lloyd <[email protected]> | 2008-03-11 19:10:05 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-03-11 19:10:05 +0000 |
commit | 83de95aacd2b1e82f885b62676622f2723276671 (patch) | |
tree | bb21cd06f9ac458899508f25312a982eb25006bd /include/data_src.h | |
parent | c2469e38aa1c5bbecc5d1164134267d42c1a0dc9 (diff) |
Add a new constructor for DataSource_Stream taking in a std::istream.
Previously the only method allowed was with a pathname, which is pretty
inflexible since it prevents you from using devices like std::cin, etc
Diffstat (limited to 'include/data_src.h')
-rw-r--r-- | include/data_src.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/data_src.h b/include/data_src.h index b7df4857b..87a7b9128 100644 --- a/include/data_src.h +++ b/include/data_src.h @@ -62,10 +62,13 @@ class DataSource_Stream : public DataSource bool end_of_data() const; std::string id() const; + DataSource_Stream(std::istream&, const std::string& id = ""); DataSource_Stream(const std::string&, bool = false); ~DataSource_Stream(); private: - const std::string fsname; + const std::string identifier; + const bool owner; + std::istream* source; u32bit total_read; }; |