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