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

IffInputFile Class Reference

#include <iffInputFile.h>

Inheritance diagram for IffInputFile:

TypedObject LwoInputFile List of all members.

Public Member Functions

 IffInputFile ()
virtual ~IffInputFile ()
bool open_read (Filename filename)
void set_input (istream *input, bool owns_istream)
INLINE void set_filename (const Filename &filename)
INLINE const Filenameget_filename () const
INLINE bool is_eof () const
INLINE size_t get_bytes_read () const
INLINE void align ()
PN_int8 get_int8 ()
PN_uint8 get_uint8 ()
PN_int16 get_be_int16 ()
PN_int32 get_be_int32 ()
PN_uint16 get_be_uint16 ()
PN_uint32 get_be_uint32 ()
float get_be_float32 ()
string get_string ()
IffId get_id ()
 PT (IffChunk) get_chunk()
 PT (IffChunk) get_subchunk(IffChunk *context)
bool read_byte (char &byte)
bool read_bytes (Datagram &datagram, int length)
bool skip_bytes (int length)
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual IffChunkmake_new_chunk (IffId id)

Protected Attributes

istream * _input
Filename _filename
bool _owns_istream
bool _eof
bool _unexpected_eof
size_t _bytes_read

Static Private Attributes

TypeHandle _type_handle

Friends

class IffChunk

Constructor & Destructor Documentation

IffInputFile::IffInputFile  ) 
 

Definition at line 33 of file iffInputFile.cxx.

References _bytes_read, _eof, _input, _owns_istream, _unexpected_eof, istream, and NULL.

IffInputFile::~IffInputFile  )  [virtual]
 

Definition at line 47 of file iffInputFile.cxx.

References _input.


Member Function Documentation

INLINE void IffInputFile::align  ) 
 

Referenced by get_string(), and IffGenericChunk::read_iff().

virtual TypeHandle IffInputFile::force_init_type void   )  [inline, virtual]
 

Implements TypedObject.

Reimplemented in LwoInputFile.

Definition at line 87 of file iffInputFile.h.

References get_class_type(), and init_type().

float IffInputFile::get_be_float32  ) 
 

Definition at line 188 of file iffInputFile.cxx.

References DatagramIterator::get_be_float32(), and read_bytes().

Referenced by LwoInputFile::get_vec3(), LwoVertexMap::read_iff(), LwoSurfaceSmoothingAngle::read_iff(), LwoSurfaceParameter::read_iff(), LwoSurfaceBlockRepeat::read_iff(), LwoSurfaceBlockOpacity::read_iff(), and LwoDiscontinuousVertexMap::read_iff().

PN_int16 IffInputFile::get_be_int16  ) 
 

Definition at line 127 of file iffInputFile.cxx.

References DatagramIterator::get_be_int16(), and read_bytes().

Referenced by LwoSurfaceSidedness::read_iff(), LwoPolygonTags::read_iff(), and LwoPolygons::read_iff().

PN_int32 IffInputFile::get_be_int32  ) 
 

Definition at line 142 of file iffInputFile.cxx.

References DatagramIterator::get_be_int32(), and read_bytes().

Referenced by LwoClip::read_iff().

PN_uint16 IffInputFile::get_be_uint16  ) 
 

Definition at line 157 of file iffInputFile.cxx.

References DatagramIterator::get_be_uint16(), and read_bytes().

Referenced by LwoInputFile::get_vx(), LwoVertexMap::read_iff(), LwoSurfaceBlockWrap::read_iff(), LwoSurfaceBlockProjection::read_iff(), LwoSurfaceBlockOpacity::read_iff(), LwoSurfaceBlockEnabled::read_iff(), LwoSurfaceBlockCoordSys::read_iff(), LwoSurfaceBlockAxis::read_iff(), LwoPolygons::read_iff(), LwoLayer::read_iff(), and LwoDiscontinuousVertexMap::read_iff().

PN_uint32 IffInputFile::get_be_uint32  ) 
 

Definition at line 172 of file iffInputFile.cxx.

References DatagramIterator::get_be_uint32(), and read_bytes().

INLINE size_t IffInputFile::get_bytes_read  )  const
 

Referenced by LwoGroupChunk::read_chunks_iff(), LwoVertexMap::read_iff(), LwoTags::read_iff(), LwoPolygonTags::read_iff(), LwoPolygons::read_iff(), LwoPoints::read_iff(), LwoLayer::read_iff(), LwoDiscontinuousVertexMap::read_iff(), IffGenericChunk::read_iff(), and LwoGroupChunk::read_subchunks_iff().

TypeHandle IffInputFile::get_class_type void   )  [inline, static]
 

Reimplemented from TypedObject.

Reimplemented in LwoInputFile.

Definition at line 88 of file iffInputFile.h.

References _type_handle.

Referenced by force_init_type(), get_type(), and LwoInputFile::init_type().

INLINE const Filename& IffInputFile::get_filename  )  const
 

IffId IffInputFile::get_id  ) 
 

Definition at line 223 of file iffInputFile.cxx.

References Datagram::get_data(), id, and read_bytes().

Referenced by LwoVertexMap::read_iff(), LwoSurfaceBlockChannel::read_iff(), LwoPolygonTags::read_iff(), LwoPolygons::read_iff(), LwoHeader::read_iff(), and LwoDiscontinuousVertexMap::read_iff().

PN_int8 IffInputFile::get_int8  ) 
 

Definition at line 97 of file iffInputFile.cxx.

References DatagramIterator::get_int8(), and read_bytes().

string IffInputFile::get_string  ) 
 

Definition at line 203 of file iffInputFile.cxx.

References align(), and read_byte().

Referenced by LwoInputFile::get_filename(), LwoVertexMap::read_iff(), LwoTags::read_iff(), LwoSurfaceBlockVMapName::read_iff(), LwoSurfaceBlockRefObj::read_iff(), LwoSurfaceBlockHeader::read_iff(), LwoSurface::read_iff(), LwoLayer::read_iff(), and LwoDiscontinuousVertexMap::read_iff().

virtual TypeHandle IffInputFile::get_type void   )  const [inline, virtual]
 

Implements TypedObject.

Reimplemented in LwoInputFile.

Definition at line 84 of file iffInputFile.h.

References get_class_type().

PN_uint8 IffInputFile::get_uint8  ) 
 

Definition at line 112 of file iffInputFile.cxx.

References DatagramIterator::get_int8(), and read_bytes().

void IffInputFile::init_type void   )  [inline, static]
 

Reimplemented from TypedObject.

Reimplemented in LwoInputFile.

Definition at line 91 of file iffInputFile.h.

References _type_handle, TypedObject::get_class_type(), TypedObject::init_type(), and register_type().

Referenced by force_init_type(), init_liblwo(), and LwoInputFile::init_type().

INLINE bool IffInputFile::is_eof  )  const
 

Referenced by main(), read_byte(), read_bytes(), LwoGroupChunk::read_chunks_iff(), LwoVertexMap::read_iff(), LwoTags::read_iff(), LwoPolygonTags::read_iff(), LwoPolygons::read_iff(), LwoPoints::read_iff(), LwoDiscontinuousVertexMap::read_iff(), LwoGroupChunk::read_subchunks_iff(), and skip_bytes().

IffChunk * IffInputFile::make_new_chunk IffId  id  )  [protected, virtual]
 

Reimplemented in LwoInputFile.

Definition at line 411 of file iffInputFile.cxx.

Referenced by LwoInputFile::make_new_chunk(), and IffChunk::make_new_chunk().

bool IffInputFile::open_read Filename  filename  ) 
 

Definition at line 60 of file iffInputFile.cxx.

References Filename::open_read(), Filename::set_binary(), set_filename(), and set_input().

Referenced by LwoToEggConverter::convert_file(), main(), and LwoScan::run().

IffInputFile::PT IffChunk   ) 
 

IffInputFile::PT IffChunk   ) 
 

bool IffInputFile::read_byte char &  byte  ) 
 

Definition at line 346 of file iffInputFile.cxx.

References _bytes_read, _eof, _input, and is_eof().

Referenced by get_string(), and skip_bytes().

bool IffInputFile::read_bytes Datagram datagram,
int  length
 

Definition at line 365 of file iffInputFile.cxx.

References _bytes_read, _eof, _input, buffer, is_eof(), and length.

Referenced by get_be_float32(), get_be_int16(), get_be_int32(), get_be_uint16(), get_be_uint32(), get_id(), get_int8(), get_uint8(), and IffGenericChunk::read_iff().

INLINE void IffInputFile::set_filename const Filename filename  ) 
 

Referenced by open_read().

void IffInputFile::set_input istream *  input,
bool  owns_istream
 

Definition at line 80 of file iffInputFile.cxx.

References _bytes_read, _eof, _input, _owns_istream, _unexpected_eof, and input.

Referenced by open_read().

bool IffInputFile::skip_bytes int  length  ) 
 

Definition at line 390 of file iffInputFile.cxx.

References is_eof(), length, and read_byte().


Friends And Related Function Documentation

friend class IffChunk [friend]
 

Definition at line 100 of file iffInputFile.h.


Member Data Documentation

size_t IffInputFile::_bytes_read [protected]
 

Definition at line 81 of file iffInputFile.h.

Referenced by IffInputFile(), read_byte(), read_bytes(), and set_input().

bool IffInputFile::_eof [protected]
 

Definition at line 79 of file iffInputFile.h.

Referenced by IffInputFile(), read_byte(), read_bytes(), and set_input().

Filename IffInputFile::_filename [protected]
 

Definition at line 77 of file iffInputFile.h.

istream* IffInputFile::_input [protected]
 

Definition at line 76 of file iffInputFile.h.

Referenced by IffInputFile(), read_byte(), read_bytes(), set_input(), and ~IffInputFile().

bool IffInputFile::_owns_istream [protected]
 

Definition at line 78 of file iffInputFile.h.

Referenced by IffInputFile(), and set_input().

TypeHandle IffInputFile::_type_handle [static, private]
 

Reimplemented from TypedObject.

Reimplemented in LwoInputFile.

Definition at line 25 of file iffInputFile.cxx.

Referenced by get_class_type(), and init_type().

bool IffInputFile::_unexpected_eof [protected]
 

Definition at line 80 of file iffInputFile.h.

Referenced by IffInputFile(), and set_input().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:01:09 2003 for Panda-Tool by doxygen1.3