Panda3D
|
This class defines the abstract interace to any source of datagrams, whether it be from a file or from the net. More...
#include "datagramGenerator.h"
Public Member Functions | |
DatagramGenerator () | |
Does nothing since this is class is just the definition of an interface. | |
virtual | ~DatagramGenerator () |
Does nothing since this is class is just the definition of an interface. | |
virtual bool | get_datagram (Datagram &data)=0 |
virtual VirtualFile * | get_file () |
Returns the VirtualFile that provides the source for these datagrams, if any, or NULL if the datagrams do not originate from a VirtualFile. | |
virtual streampos | get_file_pos () |
Returns the current file position within the data stream, if any, or 0 if the file position is not meaningful or cannot be determined. | |
virtual bool | is_eof ()=0 |
virtual bool | is_error ()=0 |
This class defines the abstract interace to any source of datagrams, whether it be from a file or from the net.
Definition at line 30 of file datagramGenerator.h.
DatagramGenerator::DatagramGenerator | ( | ) | [inline] |
Does nothing since this is class is just the definition of an interface.
Definition at line 23 of file datagramGenerator.I.
DatagramGenerator::~DatagramGenerator | ( | ) | [virtual] |
Does nothing since this is class is just the definition of an interface.
Definition at line 27 of file datagramGenerator.cxx.
VirtualFile * DatagramGenerator::get_file | ( | ) | [virtual] |
Returns the VirtualFile that provides the source for these datagrams, if any, or NULL if the datagrams do not originate from a VirtualFile.
Reimplemented in DatagramInputFile.
Definition at line 38 of file datagramGenerator.cxx.
Referenced by BamReader::get_file().
streampos DatagramGenerator::get_file_pos | ( | ) | [virtual] |
Returns the current file position within the data stream, if any, or 0 if the file position is not meaningful or cannot be determined.
For DatagramGenerators that return a meaningful file position, this will be pointing to the first byte following the datagram returned after a call to get_datagram().
Reimplemented in DatagramInputFile.
Definition at line 55 of file datagramGenerator.cxx.
Referenced by BamReader::get_file_pos().