#include <datagramInputFile.h>
Inheritance diagram for DatagramInputFile:
Public Member Functions | |
DatagramInputFile () | |
bool | open (Filename filename) |
Opens the indicated filename for reading. | |
bool | read_header (string &header, size_t num_bytes) |
Reads a sequence of bytes from the beginning of the datagram file. | |
virtual bool | get_datagram (Datagram &data) |
Reads the next datagram from the file. | |
virtual bool | is_eof () |
Returns true if the file has reached the end-of-file. | |
virtual bool | is_error () |
Returns true if the file has reached an error condition. | |
void | close () |
Closes the file. | |
Private Attributes | |
bool | _read_first_datagram |
bool | _error |
ifstream | _in_file |
istream * | _in |
bool | _owns_in |
Definition at line 41 of file datagramInputFile.h.
|
Definition at line 31 of file datagramInputFile.I. |
|
Closes the file. This is also implicitly done when the DatagramInputFile destructs. Definition at line 49 of file datagramInputFile.I. |
|
Reads the next datagram from the file. Returns true on success, false if there is an error or end of file. Implements DatagramGenerator. Definition at line 117 of file datagramInputFile.cxx. |
|
Returns true if the file has reached the end-of-file. This test may only be made after a call to read_header() or get_datagram() has failed. Implements DatagramGenerator. Definition at line 173 of file datagramInputFile.cxx. |
|
Returns true if the file has reached an error condition.
Implements DatagramGenerator. Definition at line 188 of file datagramInputFile.cxx. |
|
Opens the indicated filename for reading. Returns true if successful, false on failure. Definition at line 48 of file datagramInputFile.cxx. References NULL. |
|
Reads a sequence of bytes from 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 read. It may not be called once the first datagram has been read. Definition at line 89 of file datagramInputFile.cxx. References _in, _read_first_datagram, and PN_uint32. |
|
Definition at line 56 of file datagramInputFile.h. Referenced by get_datagram(). |
|
Definition at line 58 of file datagramInputFile.h. Referenced by get_datagram(), and read_header(). |
|
Definition at line 57 of file datagramInputFile.h. |
|
Definition at line 59 of file datagramInputFile.h. |
|
Definition at line 55 of file datagramInputFile.h. Referenced by read_header(). |