file_streams.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ECL_STREAMS_FILE_STREAM_HPP_
13 #define ECL_STREAMS_FILE_STREAM_HPP_
14 
15 /*****************************************************************************
16 ** Includes
17 *****************************************************************************/
18 
19 #include <string>
20 #include <ecl/config/macros.hpp>
21 #include <ecl/devices/ofile.hpp>
23 #include "text_stream.hpp"
24 
25 /*****************************************************************************
26 ** Namespaces
27 *****************************************************************************/
28 
29 namespace ecl {
30 
31 /*****************************************************************************
32 ** Interfaces [OFileStream]
33 *****************************************************************************/
42 class ecl_streams_PUBLIC OFileStream : public TextStream<OFile> {
43 public:
50  OFileStream() {};
51 
63  OFileStream(const std::string &file_name, const WriteMode &mode = New) {
65  if( !this->device().open(file_name, mode) ) {
66  error = this->device().error();
67  }
70  }
71  }
72 
73  virtual ~OFileStream() {};
74 };
75 
76 } // namespace ecl
77 
78 #endif /* ECL_STREAMS_FILE_STREAM_HPP_ */
WriteMode
WriteMode
ecl_try
#define ecl_try
ecl::New
New
ecl_streams_PUBLIC
#define ecl_streams_PUBLIC
Definition: macros.hpp:37
ecl::StandardException
ofile.hpp
standard_exception.hpp
ecl_catch
#define ecl_catch(exception)
ecl_throw
#define ecl_throw(exception)
text_stream.hpp
Convenience header for various text streams.
macros.hpp
ecl


ecl_streams
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:48