Panda3D

datagramGenerator.h

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 VirtualFile;
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : DatagramGenerator
00026 // Description : This class defines the abstract interace to any
00027 //               source of datagrams, whether it be from a file or
00028 //               from the net
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDAEXPRESS DatagramGenerator {
00031 PUBLISHED:
00032   INLINE DatagramGenerator();
00033   virtual ~DatagramGenerator();
00034 
00035   virtual bool get_datagram(Datagram &data) = 0;
00036   virtual bool is_eof() = 0;
00037   virtual bool is_error() = 0;
00038 
00039   virtual VirtualFile *get_file();
00040   virtual streampos get_file_pos();
00041 };
00042 
00043 #include "datagramGenerator.I"
00044 
00045 #endif
 All Classes Functions Variables Enumerations