DatagramGenerator
from panda3d.core import DatagramGenerator
- class DatagramGenerator
Bases:
DTOOL_SUPER_BASE
This class defines the abstract interace to any source of datagrams, whether it be from a file or from the net.
Inheritance diagram
- __init__(*args, **kwargs)
- getDatagram()
C++ Interface: get_datagram(const DatagramGenerator self, Datagram data)
- getFile()
C++ Interface: get_file(const DatagramGenerator self)
- /**
Returns the FileReference that provides the source for these datagrams, if
any, or NULL if the datagrams do not originate from a file on disk.
*/
- getFilePos()
C++ Interface: get_file_pos(const DatagramGenerator self)
- /**
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().
*/
- getFilename()
C++ Interface: get_filename(const DatagramGenerator self)
- /**
Returns the filename that provides the source for these datagrams, if any,
or empty string if the datagrams do not originate from a file on disk.
*/
- getTimestamp()
C++ Interface: get_timestamp(DatagramGenerator self)
- /**
Returns the on-disk timestamp of the file that was read, at the time it was
opened, if that is available, or 0 if it is not.
*/
- getVfile()
C++ Interface: get_vfile(const DatagramGenerator self)
- /**
Returns the VirtualFile that provides the source for these datagrams, if
any, or NULL if the datagrams do not originate from a VirtualFile.
*/
- get_datagram()
C++ Interface: get_datagram(const DatagramGenerator self, Datagram data)
- get_file()
C++ Interface: get_file(const DatagramGenerator self)
- /**
Returns the FileReference that provides the source for these datagrams, if
any, or NULL if the datagrams do not originate from a file on disk.
*/
- get_file_pos()
C++ Interface: get_file_pos(const DatagramGenerator self)
- /**
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().
*/
- get_filename()
C++ Interface: get_filename(const DatagramGenerator self)
- /**
Returns the filename that provides the source for these datagrams, if any,
or empty string if the datagrams do not originate from a file on disk.
*/
- get_timestamp()
C++ Interface: get_timestamp(DatagramGenerator self)
- /**
Returns the on-disk timestamp of the file that was read, at the time it was
opened, if that is available, or 0 if it is not.
*/
- get_vfile()
C++ Interface: get_vfile(const DatagramGenerator self)
- /**
Returns the VirtualFile that provides the source for these datagrams, if
any, or NULL if the datagrams do not originate from a VirtualFile.
*/
- isEof()
C++ Interface: is_eof(const DatagramGenerator self)
- isError()
C++ Interface: is_error(const DatagramGenerator self)
- is_eof()
C++ Interface: is_eof(const DatagramGenerator self)
- is_error()
C++ Interface: is_error(const DatagramGenerator self)
- saveDatagram()
C++ Interface: save_datagram(const DatagramGenerator self, SubfileInfo info)
- /**
Skips over the next datagram without extracting it, but saves the relevant
file information in the SubfileInfo object so that its data may be read
later. For non-file-based datagram generators, this may mean creating a
temporary file and copying the contents of the datagram to disk.
Returns true on success, false on failure or if this method is
unimplemented.
*/
- save_datagram()
C++ Interface: save_datagram(const DatagramGenerator self, SubfileInfo info)
- /**
Skips over the next datagram without extracting it, but saves the relevant
file information in the SubfileInfo object so that its data may be read
later. For non-file-based datagram generators, this may mean creating a
temporary file and copying the contents of the datagram to disk.
Returns true on success, false on failure or if this method is
unimplemented.
*/