#include <datagramOutputFile.h>
Inheritance diagram for DatagramOutputFile:
Public Member Functions | |
DatagramOutputFile () | |
bool | open (Filename filename) |
Opens the indicated filename for reading. | |
bool | write_header (const string &header) |
Writes a sequence of bytes to the beginning of the datagram file. | |
virtual bool | put_datagram (const Datagram &data) |
Writes the given datagram to the file. | |
virtual bool | is_error () |
Returns true if the file has reached an error condition. | |
void | close () |
Closes the file. | |
Private Attributes | |
bool | _wrote_first_datagram |
bool | _error |
ofstream | _out |
Definition at line 41 of file datagramOutputFile.h.
|
Definition at line 31 of file datagramOutputFile.I. References _error, _out, _wrote_first_datagram, INLINE, Filename::open_write(), and Filename::set_binary(). |
|
Closes the file. This is also implicitly done when the DatagramOutputFile destructs. Definition at line 66 of file datagramOutputFile.I. |
|
Returns true if the file has reached an error condition.
Implements DatagramSink. Definition at line 85 of file datagramOutputFile.cxx. |
|
Opens the indicated filename for reading. Returns true if successful, false on failure. Definition at line 47 of file datagramOutputFile.I. Referenced by BamFile::is_eof(). |
|
Writes the given datagram to the file. Returns true on success, false if there is an error. Implements DatagramSink. Definition at line 59 of file datagramOutputFile.cxx. |
|
Writes a sequence of bytes to the beginning of the datagram file. This may be called any number of times after the file has been opened and before the first datagram is written. It may not be called once the first datagram is written. Definition at line 41 of file datagramOutputFile.cxx. References _out, _wrote_first_datagram, Datagram::add_uint32(), Datagram::get_data(), and Datagram::get_length(). Referenced by BamFile::is_eof(). |
|
Definition at line 55 of file datagramOutputFile.h. Referenced by DatagramOutputFile(), and put_datagram(). |
|
Definition at line 56 of file datagramOutputFile.h. Referenced by DatagramOutputFile(), open(), put_datagram(), and write_header(). |
|
Definition at line 54 of file datagramOutputFile.h. Referenced by DatagramOutputFile(), and write_header(). |