Panda3D
|
00001 // Filename: datagramGenerator.h 00002 // Created by: jason (07Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef DATAGRAMGENERATOR_H 00016 #define DATAGRAMGENERATOR_H 00017 00018 #include "pandabase.h" 00019 00020 #include "datagram.h" 00021 00022 class SubfileInfo; 00023 class FileReference; 00024 class Filename; 00025 class VirtualFile; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : DatagramGenerator 00029 // Description : This class defines the abstract interace to any 00030 // source of datagrams, whether it be from a file or 00031 // from the net. 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_PANDAEXPRESS DatagramGenerator { 00034 PUBLISHED: 00035 INLINE DatagramGenerator(); 00036 virtual ~DatagramGenerator(); 00037 00038 virtual bool get_datagram(Datagram &data) = 0; 00039 virtual bool save_datagram(SubfileInfo &info); 00040 virtual bool is_eof() = 0; 00041 virtual bool is_error() = 0; 00042 00043 virtual const Filename &get_filename(); 00044 virtual const FileReference *get_file(); 00045 virtual VirtualFile *get_vfile(); 00046 virtual streampos get_file_pos(); 00047 }; 00048 00049 #include "datagramGenerator.I" 00050 00051 #endif