#include <stream_wrapper.hh>
Static Public Member Functions | |
| bool | by_extension (T &output, const std::string &name, const std::string &ext) |
| Open file as a stream, take extension and call the "real" reader. If the extension is not known, reiterate with a stream_id - 1. | |
| bool | by_data (T &output, const std::string &name) |
Open file as a stream, take extension and call the "real" reader. If the extension is not known, reiterate with a stream_id - 1.
| |
| W | The type of stream |
| Reader | The real reader of this stream. |
Definition at line 135 of file stream_wrapper.hh.
|
||||||||||||||||
|
Open file as a stream, take extension and call the "real" reader. If the extension is not known, reiterate with a stream_id - 1.
Definition at line 171 of file stream_wrapper.hh.
00172 {
00173 std::string wrapped_name = name;
00174 if (std::istream* in = stream_wrapper<W>::wrap_in(wrapped_name))
00175 {
00176 std::string wrapped_ext = utils::extension(wrapped_name);
00177 bool result = Reader::doit(output, *in, wrapped_ext);
00178 delete in;
00179 if (result)
00180 return true;
00181 }
00182 return try_stream_wrappers_in<stream_id(unsigned(W)-1), T, Reader>
00183 ::by_data(output, name);
00184 }
|
1.3.6-20040222