Object reading from gzipped file.
More...
#include <JGZFileWriter.hh>
|
| | JGZFileWriter () |
| | Default constructor.
|
| |
| | JGZFileWriter (const char *file_name) |
| | Constructor.
|
| |
| | JGZFileWriter (const char *file_name, const std::string &sep) |
| | Constructor.
|
| |
| virtual bool | is_open () const override |
| | Check is file is open.
|
| |
| virtual void | open (const char *file_name) override |
| | Open file.
|
| |
| virtual void | close () override |
| | Close file.
|
| |
| void | open (const char *name, int open_mode=std::ios::out) |
| |
| gzstreambuf * | rdbuf () |
| |
| virtual bool | put (const T &object) override |
| | Object output.
|
| |
| const std::string & | getSeparator () const |
| | Get token separator.
|
| |
| void | setSeparator (const std::string &sep) |
| | Set token separator.
|
| |
|
| 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.
|
| |
template<class T>
class JLANG::JGZFileWriter< T >
Object reading from gzipped file.
This class implements the JAccessibleObjectIterator interface.
Definition at line 28 of file JGZFileWriter.hh.
◆ JGZFileWriter() [1/3]
Default constructor.
Definition at line 37 of file JGZFileWriter.hh.
37 :
39 JStreamObjectOutput<T>(static_cast<std::ostream&>(*this), "")
40 {}
◆ JGZFileWriter() [2/3]
Constructor.
- Parameters
-
Definition at line 48 of file JGZFileWriter.hh.
48 :
51 JStreamObjectOutput<T>(static_cast<std::ostream&>(*this), "")
52 {}
JAccessible()
Default constructor.
◆ JGZFileWriter() [3/3]
Constructor.
- Parameters
-
| file_name | file name |
| sep | token separator |
Definition at line 61 of file JGZFileWriter.hh.
62 :
65 JStreamObjectOutput<T>(static_cast<std::ostream&>(*this), sep)
66 {}
◆ is_open()
◆ open() [1/2]
Open file.
- Parameters
-
Implements JLANG::JAccessible.
Definition at line 85 of file JGZFileWriter.hh.
86 {
88
90 this->
Throw(JFileOpenException(std::string(
"Error opening file ") + file_name));
91 }
92 }
virtual bool is_open() const override
Check is file is open.
static void Throw(const bool option)
Enable/disable throw option.
void open(const char *name, int open_mode=std::ios::out)
◆ close()
◆ open() [2/2]
| void ogzstream::open |
( |
const char * | name, |
|
|
int | open_mode = std::ios::out ) |
|
inlineinherited |
Definition at line 218 of file gzstream.h.
218 {
220 }
void open(const char *name, int open_mode)
◆ rdbuf()
◆ put()
template<class T >
|
|
inlineoverridevirtualinherited |
◆ getSeparator()
◆ setSeparator()
◆ 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.
◆ buf
◆ __out
◆ __sep
◆ 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: