From Martin Naylor, replace osgDB::fstream with an osgDB::open() call.

This commit is contained in:
Robert Osfield
2013-06-12 12:49:18 +00:00
parent 1a7f2fcb3e
commit b4bfc3a451
4 changed files with 12 additions and 23 deletions

View File

@@ -19,26 +19,17 @@
#include <fstream>
namespace osgDB
{
/**
* Replacements for std::fstream, std::ifstream, and std::ofstream to
* Convenience function for fstream open , std::ifstream, and std::ofstream to
* automatically handle UTF-8 to UTF-16 filename conversion. Always use one
* of these classes in any OpenSceneGraph code instead of the STL equivalent.
*/
class OSGDB_EXPORT fstream : public std::fstream
{
public:
fstream();
explicit fstream(const char* filename,
std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out);
~fstream();
void open(const char* filename,
std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out);
};
void OSGDB_EXPORT open(std::fstream& fs, const char* filename,std::ios_base::openmode mode);
class OSGDB_EXPORT ifstream : public std::ifstream
{