Panda3D
 All Classes Functions Variables Enumerations
datagramGenerator.h
1 // Filename: datagramGenerator.h
2 // Created by: jason (07Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef DATAGRAMGENERATOR_H
16 #define DATAGRAMGENERATOR_H
17 
18 #include "pandabase.h"
19 
20 #include "datagram.h"
21 
22 class SubfileInfo;
23 class FileReference;
24 class Filename;
25 class VirtualFile;
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : DatagramGenerator
29 // Description : This class defines the abstract interace to any
30 // source of datagrams, whether it be from a file or
31 // from the net.
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_PANDAEXPRESS DatagramGenerator {
34 PUBLISHED:
35  INLINE DatagramGenerator();
36  virtual ~DatagramGenerator();
37 
38  virtual bool get_datagram(Datagram &data) = 0;
39  virtual bool save_datagram(SubfileInfo &info);
40  virtual bool is_eof() = 0;
41  virtual bool is_error() = 0;
42 
43  virtual const Filename &get_filename();
44  virtual time_t get_timestamp() const;
45  virtual const FileReference *get_file();
46  virtual VirtualFile *get_vfile();
47  virtual streampos get_file_pos();
48 };
49 
50 #include "datagramGenerator.I"
51 
52 #endif
Keeps a reference-counted pointer to a file on disk.
Definition: fileReference.h:29
The abstract base class for a file or directory within the VirtualFileSystem.
Definition: virtualFile.h:37
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
This class records a particular byte sub-range within an existing file on disk.
Definition: subfileInfo.h:29
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 ...
Definition: datagram.h:43