Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pnmimage/pnmReader.h

Go to the documentation of this file.
00001 // Filename: pnmReader.h
00002 // Created by:  drose (14Jun00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef PNMREADER_H
00020 #define PNMREADER_H
00021 
00022 #include <pandabase.h>
00023 
00024 #include "pnmImageHeader.h"
00025 
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : PNMReader
00029 // Description : This is an abstract base class that defines the
00030 //               interface for reading image files of various types.
00031 //               Any particular image file type that can be read must
00032 //               define a class that inherits from PNMReader to read
00033 //               it.
00034 ////////////////////////////////////////////////////////////////////
00035 class EXPCL_PANDA PNMReader : public PNMImageHeader {
00036 protected:
00037   INLINE PNMReader(PNMFileType *type, istream *file, bool owns_file);
00038 
00039 public:
00040   virtual ~PNMReader();
00041 
00042   INLINE PNMFileType *get_type() const;
00043 
00044   virtual int read_data(xel *array, xelval *alpha);
00045   virtual bool supports_read_row() const;
00046   virtual bool read_row(xel *array, xelval *alpha);
00047 
00048   virtual bool supports_stream_read() const;
00049 
00050   INLINE bool is_valid() const;
00051 
00052 protected:
00053   PNMFileType *_type;
00054   bool _owns_file;
00055   istream *_file;
00056   bool _is_valid;
00057 };
00058 
00059 #include "pnmReader.I"
00060 
00061 #endif

Generated on Fri May 2 00:43:10 2003 for Panda by doxygen1.3