Accessible output stream.
More...
#include <JAccessibleStream.hh>
|
| static void | Throw (const bool option) |
| | Enable/disable throw option.
|
| |
| static int | Throw (const JException_t &error, const int value=-1) |
| | Throw exception or return error.
|
| |
Accessible output stream.
This class is a simple wrapper around the std::ofstream class. It class implements the JAccessible interface.
Definition at line 90 of file JAccessibleStream.hh.
◆ JAccessibleOutputStream() [1/2]
| JLANG::JAccessibleOutputStream::JAccessibleOutputStream |
( |
| ) |
|
|
inline |
◆ JAccessibleOutputStream() [2/2]
| JLANG::JAccessibleOutputStream::JAccessibleOutputStream |
( |
const char * | file_name | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 107 of file JAccessibleStream.hh.
108 {
110 }
virtual void open(const char *file_name)
Open file.
◆ is_open()
| virtual bool JLANG::JAccessibleOutputStream::is_open |
( |
| ) |
const |
|
inlinevirtual |
◆ open()
| virtual void JLANG::JAccessibleOutputStream::open |
( |
const char * | file_name | ) |
|
|
inlinevirtual |
Open file.
- Parameters
-
Implements JLANG::JAccessible.
Reimplemented in JLANG::JAccessibleBinaryOutputStream.
Definition at line 129 of file JAccessibleStream.hh.
130 {
131 std::ofstream::open(file_name);
132
134 Throw(JFileOpenException(std::string(
"Error opening file ") + file_name));
135 }
136 }
virtual bool is_open() const
Check is file is open.
static void Throw(const bool option)
Enable/disable throw option.
◆ close()
| virtual void JLANG::JAccessibleOutputStream::close |
( |
| ) |
|
|
inlinevirtual |
◆ Throw() [1/2]
Enable/disable throw option.
- Parameters
-
| option | true enable; false disable |
Definition at line 37 of file JThrow.hh.
◆ Throw() [2/2]
Throw exception or return error.
- Parameters
-
| error | exception |
| value | return code |
- Returns
- return code
Definition at line 51 of file JThrow.hh.
◆ do_throw
throw option
Set default throw option to true.
Definition at line 28 of file JThrow.hh.
The documentation for this class was generated from the following file: