15 #ifndef DATAGRAMINPUTFILE_H
16 #define DATAGRAMINPUTFILE_H
18 #include "pandabase.h"
20 #include "datagramGenerator.h"
22 #include "fileReference.h"
23 #include "virtualFile.h"
34 INLINE ~DatagramInputFile();
37 INLINE
bool open(
const Filename &filename);
39 INLINE istream &get_stream();
43 bool read_header(
string &header,
size_t num_bytes);
44 virtual bool get_datagram(
Datagram &data);
46 virtual bool is_eof();
47 virtual bool is_error();
56 bool _read_first_datagram;
66 #include "datagramInputFile.I"
Keeps a reference-counted pointer to a file on disk.
The abstract base class for a file or directory within the VirtualFileSystem.
virtual streampos get_file_pos()
Returns the current file position within the data stream, if any, or 0 if the file position is not me...
The name of a file, such as a texture file or an Egg file.
virtual bool save_datagram(SubfileInfo &info)
Skips over the next datagram without extracting it, but saves the relevant file information in the Su...
virtual const FileReference * get_file()
Returns the FileReference that provides the source for these datagrams, if any, or NULL if the datagr...
virtual VirtualFile * get_vfile()
Returns the VirtualFile that provides the source for these datagrams, if any, or NULL if the datagram...
This class records a particular byte sub-range within an existing file on disk.
virtual time_t get_timestamp() const
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.
This class defines the abstract interace to any source of datagrams, whether it be from a file or fro...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual const Filename & get_filename()
Returns the filename that provides the source for these datagrams, if any, or empty string if the dat...