Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ABItype Class Reference

Reads files in ABI format. More...

#include <ABItype.h>

List of all members.

Public Member Functions

 ABItype ()
 Constructor.
 ~ABItype ()
 Destructor, deletes flags and their associated data.
int getRecord (wxString id, int num)
 Finds a specific record in the parsed data.
int getRecordValue (wxString id, int num)
 Returns the (integer) value of a specific record in the parsed data.
wxString getRecordPascalString (wxString id, int num)
 Returns the string value of a specific record in the parsed data.
wxString getSequence (int num=2)
 Finds a specific sequence record.
int getMacOffset (unsigned char *t)
 Deterimnes the position of the "ABIF" key.
void parse (wxString filename)
 Parses an ABI format file.
TFLAG getFlag (unsigned char *t, int &from)
 Sets a TFLAG structure from the data.
wxString getStr (unsigned char *t, int from, int len)
wxString getText (unsigned char *t, int &from)
 Reads a Pascal-like string.
int getInt1 (unsigned char *t, int &from)
 Reads a 1-byte number.
int getInt2 (unsigned char *t, int &from)
 Reads a 2-byte number.
int getInt4 (unsigned char *t, int &from)
 Reads a 4-byte number.
int getInt10 (unsigned char *t, int &from)
 Jumps ahead 10 bytes, ignores contents.
int getCMBF (unsigned char *t, int l)
 Reads a Pascal-like string with known length.

Public Attributes

vector< TFLAGvf
 All the flags.


Detailed Description

Reads files in ABI format.


Constructor & Destructor Documentation

ABItype::ABItype  ) 
 

Constructor.

ABItype::~ABItype  ) 
 

Destructor, deletes flags and their associated data.


Member Function Documentation

int ABItype::getCMBF unsigned char *  t,
int  l
 

Reads a Pascal-like string with known length.

Parameters:
t Pointer to the data to parse
l Length of the data

TFLAG ABItype::getFlag unsigned char *  t,
int &  from
 

Sets a TFLAG structure from the data.

Parameters:
t Pointer to the raw data
from Offset; is changed after the structure is read

int ABItype::getInt1 unsigned char *  t,
int &  from
 

Reads a 1-byte number.

int ABItype::getInt10 unsigned char *  t,
int &  from
 

Jumps ahead 10 bytes, ignores contents.

int ABItype::getInt2 unsigned char *  t,
int &  from
 

Reads a 2-byte number.

int ABItype::getInt4 unsigned char *  t,
int &  from
 

Reads a 4-byte number.

int ABItype::getMacOffset unsigned char *  t  ) 
 

Deterimnes the position of the "ABIF" key.

Parameters:
t Pointer to the raw data
This returns
  • 0 for a valid Windows file
  • 128 for a valid Mac file
  • -1 if the file is invalid

int ABItype::getRecord wxString  id,
int  num
 

Finds a specific record in the parsed data.

Parameters:
id The flag (type) of the record
num The number of the record

wxString ABItype::getRecordPascalString wxString  id,
int  num
 

Returns the string value of a specific record in the parsed data.

Parameters:
id The flag (type) of the record
num The number of the record

int ABItype::getRecordValue wxString  id,
int  num
 

Returns the (integer) value of a specific record in the parsed data.

Parameters:
id The flag (type) of the record
num The number of the record

wxString ABItype::getSequence int  num = 2  ) 
 

Finds a specific sequence record.

Parameters:
num The number of the sequence record

wxString ABItype::getStr unsigned char *  t,
int  from,
int  len
 

wxString ABItype::getText unsigned char *  t,
int &  from
 

Reads a Pascal-like string.

void ABItype::parse wxString  filename  ) 
 

Parses an ABI format file.

Parameters:
filename The filename. Surprise!
The "parsing" works by
  • detecting and ignoring the Mac file header, if any
  • finding the offset for the first CMBF structure
  • iterating through the CMBF structures


Member Data Documentation

vector<TFLAG> ABItype::vf
 

All the flags.


The documentation for this class was generated from the following files:
Generated on Fri Aug 11 16:19:44 2006 for GENtle by  doxygen 1.4.1