22 #pragma warning(disable : 4244 4275)
34 std::stringstream getFromFilteredStream(std::istream& input_stream,
const std::string& fname)
36 boost::iostreams::filtering_streambuf<boost::iostreams::input> input_filtered;
38 input_filtered.push(boost::iostreams::gzip_decompressor());
40 input_filtered.push(boost::iostreams::bzip2_decompressor());
41 input_filtered.push(input_stream);
43 std::stringstream ret;
44 boost::iostreams::copy(input_filtered, ret);
50 OutputDataReader::OutputDataReader(
const std::string& file_name) : m_file_name(file_name) {}
57 "OutputDataReader::getOutputData() -> Error! No read strategy defined");
60 std::ios_base::openmode openmode = std::ios::in;
62 openmode = std::ios::in | std::ios_base::binary;
67 fin.open(m_file_name, openmode);
72 "OutputDataReader::getOutputData() -> Error. Can't open file '" + m_file_name
76 "File is not good, probably it is a directory.");
78 std::stringstream strstream = getFromFilteredStream(fin, m_file_name);
87 m_read_strategy.reset(read_strategy);
Defines namespace FileSystemUtils.
Defines class OutputDataReader.
Defines and implements template class OutputData.
Contains boost streams related headers.
Interface for reading strategy of OutputData from file.
OutputData< double > * getOutputData()
read output data from file (file name was set already from OutputDataIOFactory)
void setStrategy(IOutputDataReadStrategy *read_strategy)
Sets concrete reading strategy.
std::wstring convert_utf8_to_utf16(const std::string &str)
Converts utf8 string represented by std::string to utf16 string represented by std::wstring.