OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fstream.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGDB_FSTREAM
15 #define OSGDB_FSTREAM 1
16 
17 #include <osgDB/Export>
18 #include <osg/Export>
19 
20 #include <fstream>
21 
22 
23 namespace osgDB
24 {
25 
32 void OSGDB_EXPORT open(std::fstream& fs, const char* filename,std::ios_base::openmode mode);
33 
34 class OSGDB_EXPORT ifstream : public std::ifstream
35 {
36 public:
37  ifstream();
38  explicit ifstream(const char* filename,
39  std::ios_base::openmode mode = std::ios_base::in);
40  ~ifstream();
41 
42  void open(const char* filename,
43  std::ios_base::openmode mode = std::ios_base::in);
44 };
45 
46 class OSGDB_EXPORT ofstream : public std::ofstream
47 {
48 public:
49  ofstream();
50  explicit ofstream(const char* filename,
51  std::ios_base::openmode mode = std::ios_base::out);
52  ~ofstream();
53 
54  void open(const char* filename,
55  std::ios_base::openmode mode = std::ios_base::out);
56 };
57 
58 }
59 
60 #endif
void OSGDB_EXPORT open(std::fstream &fs, const char *filename, std::ios_base::openmode mode)
Definition: Archive.h:24
#define OSGDB_EXPORT
Definition: Export.h:39