Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Imports::LWFile Class Reference

Parses lightwave types from file. More...

#include <LWFile.h>

List of all members.

Public Methods

 LWFile (const std::string &fname, Uint32 options)
 Constructor. More...

 ~LWFile ()
 Destructor. More...

void open (const std::string &fname)
 Open lightwave file stream. More...

void close ()
 Close stream. More...

void setOptions (Uint32 options)
 Set file options. More...

Uint32 getOptions ()
 Get file options. More...

void setLen (Uint32 len)
Uint32 getLen () const
void setType (ID4 file_type)
ID4 getType () const
void pushDomain (Uint32 len)
 Push domain guardian. More...

U4 popDomain (bool skip_rest=false)
 Pop domain guardian - returns bytes left in parent domain. More...

U4 domainLeft ()
 Check bytes left in domain. More...

U4 bytesRead ()
 Return number of bytes read. More...

ID4 read_ID4 ()
 Read ID4. More...

I1 read_I1 ()
 Read I1. More...

I2 read_I2 ()
 Read I2. More...

I4 read_I4 ()
U1 read_U1 ()
U2 read_U2 ()
 Read U2. More...

U4 read_U4 ()
 Read U4. More...

F4 read_F4 ()
 Read F4. More...

S0 read_S0 ()
 Read S0. More...

VX read_VX ()
 Read VX. More...

COL4 read_COL4 ()
 Read COL4. More...

COL12 read_COL12 ()
 Read COL12. More...

VEC12 read_VEC12 ()
 Read VEC12. More...

FP4 read_FP4 ()
 Read FP4. More...

ANG4 read_ANG4 ()
 Read ANG4. More...

FNAM0 read_FNAM0 ()

Protected Attributes

ID4 file_type
EndianIn * is
Uint32 domain_end
Uint32 bytes_read
Uint32 options
Uint32 file_len
Uint32 d_ends [DOMAIN_STACK_SIZE]
 Domain guardian stack. More...

Uint32 * dsp
 Domain stack pointer. More...


Detailed Description

Parses lightwave types from file.

Parses lightwave types from file stream. Chunks have length guardian so attempting to read past chunk is detected.

Definition at line 61 of file LWFile.h.


Constructor & Destructor Documentation

Teddy::Imports::LWFile::LWFile const std::string &    fname,
Uint32    options
 

Constructor.

Definition at line 86 of file LWFile.cpp.

References dsp, open, and options.

Teddy::Imports::LWFile::~LWFile  
 

Destructor.

Definition at line 94 of file LWFile.cpp.

References close.


Member Function Documentation

U4 Teddy::Imports::LWFile::bytesRead  
 

Return number of bytes read.

Definition at line 164 of file LWFile.cpp.

References bytes_read, and Teddy::Imports::U4.

void Teddy::Imports::LWFile::close  
 

Close stream.

Definition at line 114 of file LWFile.cpp.

References is.

Referenced by ~LWFile.

U4 Teddy::Imports::LWFile::domainLeft  
 

Check bytes left in domain.

Definition at line 158 of file LWFile.cpp.

References bytes_read, dsp, and Teddy::Imports::U4.

Uint32 Teddy::Imports::LWFile::getLen   const
 

Definition at line 80 of file LWFile.cpp.

References file_len.

Uint32 Teddy::Imports::LWFile::getOptions  
 

Get file options.

Definition at line 126 of file LWFile.cpp.

References options.

ID4 Teddy::Imports::LWFile::getType   const
 

Definition at line 70 of file LWFile.cpp.

References file_type, and Teddy::Imports::ID4.

void Teddy::Imports::LWFile::open const std::string &    fname
 

Open lightwave file stream.

Definition at line 100 of file LWFile.cpp.

References bytes_read, d_ends, DOMAIN_STACK_SIZE, dsp, and is.

Referenced by LWFile.

U4 Teddy::Imports::LWFile::popDomain bool    skip_rest = false
 

Pop domain guardian - returns bytes left in parent domain.

Definition at line 143 of file LWFile.cpp.

References bytes_read, Teddy::SysSupport::dmsg, dsp, Teddy::SysSupport::M_LWO, read_U1, and Teddy::Imports::U4.

void Teddy::Imports::LWFile::pushDomain Uint32    len
 

Push domain guardian.

Definition at line 134 of file LWFile.cpp.

References bytes_read, Teddy::SysSupport::dmsg, dsp, and Teddy::SysSupport::M_LWO.

ANG4 Teddy::Imports::LWFile::read_ANG4  
 

Read ANG4.

Definition at line 333 of file LWFile.cpp.

References Teddy::Imports::ANG4, and read_F4.

COL12 Teddy::Imports::LWFile::read_COL12  
 

Read COL12.

Definition at line 309 of file LWFile.cpp.

References Teddy::Imports::COL12, and read_F4.

COL4 Teddy::Imports::LWFile::read_COL4  
 

Read COL4.

Definition at line 300 of file LWFile.cpp.

References Teddy::Imports::COL4, and read_I1.

F4 Teddy::Imports::LWFile::read_F4  
 

Read F4.

Definition at line 253 of file LWFile.cpp.

References bytes_read, Teddy::Imports::F4, and is.

Referenced by read_ANG4, read_COL12, read_FP4, and read_VEC12.

FNAM0 Teddy::Imports::LWFile::read_FNAM0  
 

Definition at line 338 of file LWFile.cpp.

References Teddy::Imports::FNAM0, and read_S0.

FP4 Teddy::Imports::LWFile::read_FP4  
 

Read FP4.

Definition at line 327 of file LWFile.cpp.

References Teddy::Imports::FP4, and read_F4.

I1 Teddy::Imports::LWFile::read_I1  
 

Read I1.

Definition at line 182 of file LWFile.cpp.

References bytes_read, Teddy::Imports::I1, and is.

Referenced by read_COL4.

I2 Teddy::Imports::LWFile::read_I2  
 

Read I2.

Definition at line 194 of file LWFile.cpp.

References bytes_read, Teddy::Imports::I2, and is.

I4 Teddy::Imports::LWFile::read_I4  
 

Definition at line 205 of file LWFile.cpp.

References bytes_read, Teddy::Imports::I4, and is.

ID4 Teddy::Imports::LWFile::read_ID4  
 

Read ID4.

Definition at line 170 of file LWFile.cpp.

References bytes_read, Teddy::Imports::ID4, and is.

S0 Teddy::Imports::LWFile::read_S0  
 

Read S0.

Definition at line 265 of file LWFile.cpp.

References bytes_read, read_U1, and Teddy::Imports::S0.

Referenced by read_FNAM0.

U1 Teddy::Imports::LWFile::read_U1  
 

Definition at line 217 of file LWFile.cpp.

References bytes_read, is, and Teddy::Imports::U1.

Referenced by popDomain, and read_S0.

U2 Teddy::Imports::LWFile::read_U2  
 

Read U2.

Definition at line 229 of file LWFile.cpp.

References bytes_read, is, and Teddy::Imports::U2.

Referenced by read_VX.

U4 Teddy::Imports::LWFile::read_U4  
 

Read U4.

Definition at line 241 of file LWFile.cpp.

References bytes_read, is, and Teddy::Imports::U4.

VEC12 Teddy::Imports::LWFile::read_VEC12  
 

Read VEC12.

Definition at line 318 of file LWFile.cpp.

References read_F4, Teddy::Imports::VEC12, and Vector.

VX Teddy::Imports::LWFile::read_VX  
 

Read VX.

Definition at line 287 of file LWFile.cpp.

References read_U2, Teddy::Imports::U2, and Teddy::Imports::VX.

void Teddy::Imports::LWFile::setLen Uint32    len
 

Definition at line 75 of file LWFile.cpp.

References file_len.

void Teddy::Imports::LWFile::setOptions Uint32    options
 

Set file options.

Definition at line 120 of file LWFile.cpp.

References options.

void Teddy::Imports::LWFile::setType ID4    file_type
 

Definition at line 65 of file LWFile.cpp.

References file_type, and Teddy::Imports::ID4.


Member Data Documentation

Uint32 Teddy::Imports::LWFile::bytes_read [protected]
 

Definition at line 101 of file LWFile.h.

Referenced by bytesRead, domainLeft, open, popDomain, pushDomain, read_F4, read_I1, read_I2, read_I4, read_ID4, read_S0, read_U1, read_U2, and read_U4.

Uint32 Teddy::Imports::LWFile::d_ends[DOMAIN_STACK_SIZE] [protected]
 

Domain guardian stack.

Definition at line 105 of file LWFile.h.

Referenced by open.

Uint32 Teddy::Imports::LWFile::domain_end [protected]
 

Definition at line 100 of file LWFile.h.

Uint32* Teddy::Imports::LWFile::dsp [protected]
 

Domain stack pointer.

Definition at line 106 of file LWFile.h.

Referenced by domainLeft, LWFile, open, popDomain, and pushDomain.

Uint32 Teddy::Imports::LWFile::file_len [protected]
 

Definition at line 103 of file LWFile.h.

Referenced by getLen, and setLen.

ID4 Teddy::Imports::LWFile::file_type [protected]
 

Definition at line 98 of file LWFile.h.

Referenced by getType, and setType.

EndianIn* Teddy::Imports::LWFile::is [protected]
 

Definition at line 99 of file LWFile.h.

Referenced by close, open, read_F4, read_I1, read_I2, read_I4, read_ID4, read_U1, read_U2, and read_U4.

Uint32 Teddy::Imports::LWFile::options [protected]
 

Definition at line 102 of file LWFile.h.

Referenced by getOptions, LWFile, and setOptions.


The documentation for this class was generated from the following files: