# DatagramGenerator

from pandac.PandaModules import DatagramGenerator

Class : DatagramGenerator
Description : This class defines the abstract interace to any source of datagrams, whether it be from a file or from the net

## Inheritance:

DatagramGenerator:

## Methods of DatagramGenerator:

getDatagram
getFile
getFilePos
isEof
isError

getDatagram virtual bool DatagramGenerator::get_datagram(Datagram &data) = 0; Undocumented function.

getFile virtual VirtualFile *DatagramGenerator::get_file(void); Description: Returns the VirtualFile that provides the source for these datagrams, if any, or NULL if the datagrams do not originate from a VirtualFile.

getFilePos virtual int DatagramGenerator::get_file_pos(void); Description: 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().

isEof virtual bool DatagramGenerator::is_eof(void) = 0; Undocumented function.

isError virtual bool DatagramGenerator::is_error(void) = 0; Undocumented function.