#include <LWFile.h>
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... |
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.
Definition at line 86 of file LWFile.cpp. |
|
Destructor.
Definition at line 94 of file LWFile.cpp. References close. |
|
Return number of bytes read.
Definition at line 164 of file LWFile.cpp. References bytes_read, and Teddy::Imports::U4. |
|
Close stream.
Definition at line 114 of file LWFile.cpp. References is. Referenced by ~LWFile. |
|
Check bytes left in domain.
Definition at line 158 of file LWFile.cpp. References bytes_read, dsp, and Teddy::Imports::U4. |
|
Definition at line 80 of file LWFile.cpp. References file_len. |
|
Get file options.
Definition at line 126 of file LWFile.cpp. References options. |
|
Definition at line 70 of file LWFile.cpp. References file_type, and Teddy::Imports::ID4. |
|
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. |
|
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. |
|
Push domain guardian.
Definition at line 134 of file LWFile.cpp. References bytes_read, Teddy::SysSupport::dmsg, dsp, and Teddy::SysSupport::M_LWO. |
|
Read ANG4.
Definition at line 333 of file LWFile.cpp. References Teddy::Imports::ANG4, and read_F4. |
|
Read COL12.
Definition at line 309 of file LWFile.cpp. References Teddy::Imports::COL12, and read_F4. |
|
Read COL4.
Definition at line 300 of file LWFile.cpp. References Teddy::Imports::COL4, and read_I1. |
|
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. |
|
Definition at line 338 of file LWFile.cpp. References Teddy::Imports::FNAM0, and read_S0. |
|
Read FP4.
Definition at line 327 of file LWFile.cpp. References Teddy::Imports::FP4, and read_F4. |
|
Read I1.
Definition at line 182 of file LWFile.cpp. References bytes_read, Teddy::Imports::I1, and is. Referenced by read_COL4. |
|
Read I2.
Definition at line 194 of file LWFile.cpp. References bytes_read, Teddy::Imports::I2, and is. |
|
Definition at line 205 of file LWFile.cpp. References bytes_read, Teddy::Imports::I4, and is. |
|
Read ID4.
Definition at line 170 of file LWFile.cpp. References bytes_read, Teddy::Imports::ID4, and is. |
|
Read S0.
Definition at line 265 of file LWFile.cpp. References bytes_read, read_U1, and Teddy::Imports::S0. Referenced by read_FNAM0. |
|
Definition at line 217 of file LWFile.cpp. References bytes_read, is, and Teddy::Imports::U1. |
|
Read U2.
Definition at line 229 of file LWFile.cpp. References bytes_read, is, and Teddy::Imports::U2. Referenced by read_VX. |
|
Read U4.
Definition at line 241 of file LWFile.cpp. References bytes_read, is, and Teddy::Imports::U4. |
|
Read VEC12.
Definition at line 318 of file LWFile.cpp. References read_F4, Teddy::Imports::VEC12, and Vector. |
|
Read VX.
Definition at line 287 of file LWFile.cpp. References read_U2, Teddy::Imports::U2, and Teddy::Imports::VX. |
|
Definition at line 75 of file LWFile.cpp. References file_len. |
|
Set file options.
Definition at line 120 of file LWFile.cpp. References options. |
|
Definition at line 65 of file LWFile.cpp. References file_type, and Teddy::Imports::ID4. |
|
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. |
|
Domain guardian stack.
Definition at line 105 of file LWFile.h. Referenced by open. |
|
|
|
Domain stack pointer.
Definition at line 106 of file LWFile.h. Referenced by domainLeft, LWFile, open, popDomain, and pushDomain. |
|
|
|
|
|
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. |
|
Definition at line 102 of file LWFile.h. Referenced by getOptions, LWFile, and setOptions. |