{
gzbuf.attach( fd, io_mode );
}
+
+
+sg_ifstream::sg_ifstream(const SGPath& path, ios_openmode io_mode)
+{
+ std::string ps = path.local8BitStr();
+ open(ps.c_str(), io_mode);
+}
+
+
+sg_ofstream::sg_ofstream(const SGPath& path, ios_openmode io_mode)
+{
+ std::string ps = path.local8BitStr();
+ open(ps.c_str(), io_mode);
+}
\ No newline at end of file
#include <simgear/compiler.h>
-# include <istream>
-# include <ostream>
+#include <istream>
+#include <ostream>
+#include <fstream>
#include <string>
void operator= ( const sg_gzofstream& );
};
+class sg_ifstream : public std::ifstream
+{
+public:
+ sg_ifstream(const SGPath& path, ios_openmode io_mode = ios_in | ios_binary);
+};
+
+class sg_ofstream : public std::ofstream
+{
+public:
+ sg_ofstream(const SGPath& path, ios_openmode io_mode = ios_out | ios_binary);
+};
+
#endif /* _SGSTREAM_HXX */