15 #ifndef DATAGRAMOUTPUTFILE_H
16 #define DATAGRAMOUTPUTFILE_H
18 #include "pandabase.h"
20 #include "datagramSink.h"
22 #include "fileReference.h"
23 #include "virtualFile.h"
24 #include "virtualFileSystem.h"
25 #include "config_util.h"
36 INLINE ~DatagramOutputFile();
39 INLINE
bool open(
const Filename &filename);
41 INLINE ostream &get_stream();
45 bool write_header(
const string &header);
46 virtual bool put_datagram(
const Datagram &data);
49 virtual bool is_error();
57 bool _wrote_first_datagram;
66 #include "datagramOutputFile.I"
Keeps a reference-counted pointer to a file on disk.
The abstract base class for a file or directory within the VirtualFileSystem.
This class defines the abstract interface to sending datagrams to any target, whether it be into a fi...
The name of a file, such as a texture file or an Egg file.
virtual bool copy_datagram(SubfileInfo &result, const Filename &filename)
Copies the file data from the entire indicated file (via the vfs) as the next datagram.
virtual const Filename & get_filename()
Returns the filename that provides the target for these datagrams, if any, or empty string if the dat...
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...
This class can be used to write a binary file that consists of an arbitrary header followed by a numb...
This class records a particular byte sub-range within an existing file on disk.
virtual const FileReference * get_file()
Returns the FileReference that provides the target for these datagrams, if any, or NULL if the datagr...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...