|
Jpp 21.0.0-rc.3
the software that should make you happy
|
Object writing to file. More...
#include <JFileRecorder.hh>
Public Types | |
| typedef std::shared_ptr< JAccessibleObjectOutput< T > > | helper_type |
Public Member Functions | |
| JFileRecorder () | |
| Default constructor. | |
| JFileRecorder (const char *file_name) | |
| Constructor. | |
| const std::string & | getFilename () const |
| Get file name. | |
| const void | setFilename (const std::string &file_name) |
| Set file name. | |
| virtual void | open (const char *file_name) override |
| Open file. | |
| void | open () |
| Open file. | |
| virtual JAccessibleObjectOutput< T > * | getHelper () const override |
| Get helper. | |
| virtual bool | put (const T &object) override |
| Object output. | |
| virtual bool | is_open () const override |
| Check is device is open. | |
| virtual void | close () override |
| Close device. | |
Static Public Member Functions | |
| 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. | |
Protected Attributes | |
| std::string | fileName |
Static Protected Attributes | |
| static bool | do_throw |
| throw option | |
Friends | |
| std::istream & | operator>> (std::istream &in, JFileRecorder &recorder) |
| Read file recorder from input. | |
| std::ostream & | operator<< (std::ostream &out, const JFileRecorder &recorder) |
| Write file recorder to output. | |
Object writing to file.
This class implements the method open of the JLANG::JAccessible interface. The file format is derived from the file name extension. The method open can be called to open a file after reading the file name.
Definition at line 42 of file JFileRecorder.hh.
|
inherited |
Definition at line 65 of file JObjectWriter.hh.
|
inline |
Default constructor.
Definition at line 49 of file JFileRecorder.hh.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Open file.
| file_name | file name |
Implements JLANG::JAccessible.
Definition at line 93 of file JFileRecorder.hh.
|
inline |
Open file.
Definition at line 104 of file JFileRecorder.hh.
|
inlineoverridevirtualinherited |
Get helper.
Implements JLANG::JAbstractAccessibleObjectWriter< T >.
Definition at line 79 of file JObjectWriter.hh.
|
inlineoverridevirtualinherited |
Object output.
| object | object |
Implements JLANG::JObjectOutput< T >.
Definition at line 43 of file JAbstractObjectWriter.hh.
|
inlineoverridevirtualinherited |
Check is device is open.
Implements JLANG::JAccessible.
Definition at line 102 of file JAbstractObjectWriter.hh.
|
inlineoverridevirtualinherited |
Close device.
Implements JLANG::JAccessible.
Definition at line 127 of file JAbstractObjectWriter.hh.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
friend |
Read file recorder from input.
| in | input stream |
| recorder | JFileRecorder |
Definition at line 152 of file JFileRecorder.hh.
|
friend |
Write file recorder to output.
| out | output stream |
| recorder | JFileRecorder |
Definition at line 167 of file JFileRecorder.hh.
|
protected |
Definition at line 175 of file JFileRecorder.hh.
|
staticprotectedinherited |