aboutsummaryrefslogtreecommitdiffstats
path: root/include/data_src.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-03-11 19:10:05 +0000
committerlloyd <[email protected]>2008-03-11 19:10:05 +0000
commit83de95aacd2b1e82f885b62676622f2723276671 (patch)
treebb21cd06f9ac458899508f25312a982eb25006bd /include/data_src.h
parentc2469e38aa1c5bbecc5d1164134267d42c1a0dc9 (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.h5
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;
};