#include <FrontierFile.h>
Public Methods | |
FrontierFile (const char *fname, Uint32 options) | |
FrontierFile constructor. More... | |
void | seek (const char *label_index) |
Seek to spesified label position. More... | |
void | seek (const Sint32 bytes) |
Seek to spesified byte offset file position. More... | |
void | reset () |
Seek to previously set file start. More... | |
void | skip_white () |
Seek to next non-white character. More... | |
int | get_type () |
Determine type of next element. More... | |
Uint8 | get_byte () |
Interprete byte from file, encoded either into string or hex code. More... | |
Uint8 | get_byte_low (bool gt=true) |
Get first character of byte. More... | |
char * | get_label_def () |
Read label definition. More... | |
char * | get_label_ref () |
Read reference to a label. More... | |
char * | get_string () |
Read string which ends at ' or : or , or. More... | |
Sint8 | read_Sint8 () |
Read signed 8-bit integer. More... | |
Sint16 | read_Sint16 () |
Read signed 16-bit integer. More... | |
Sint32 | read_Sint32 () |
Read signed 32-bit integer. More... | |
Uint8 | read_Uint8 () |
Read unsigned 8-bit integer. More... | |
Uint16 | read_Uint16 () |
Read unsigned 16-bit integer. More... | |
Uint32 | read_Uint32 () |
Read unsigned 32-bit integer. More... | |
float | read_float () |
Read 32-bit floating point number. More... | |
char * | read_string () |
Protected Attributes | |
char * | buf |
Buffer. More... | |
char * | pos |
Current pointer. More... |
Definition at line 44 of file FrontierFile.h.
|
FrontierFile constructor.
Definition at line 40 of file FrontierFile.cpp. |
|
Interprete byte from file, encoded either into string or hex code.
Definition at line 155 of file FrontierFile.cpp. References FF_BYTE, FF_STRING, get_byte_low(), get_string(), get_type(), and pos. Referenced by get_label_ref(), read_float(), read_Sint16(), read_Sint32(), read_Sint8(), read_Uint16(), read_Uint32(), and read_Uint8(). |
|
Get first character of byte.
Definition at line 208 of file FrontierFile.cpp. References FF_BYTE, FF_LABEL_DEF, FF_LABEL_REF, FF_STRING, FF_UNKNOWN, get_type(), and pos. Referenced by get_byte(), and get_label_ref(). |
|
Read label definition.
Definition at line 392 of file FrontierFile.cpp. References FF_BYTE, FF_LABEL_DEF, FF_LABEL_REF, FF_STRING, FF_UNKNOWN, get_type(), and pos. |
|
Read reference to a label.
Definition at line 434 of file FrontierFile.cpp. References FF_BYTE, FF_LABEL_DEF, FF_LABEL_REF, FF_STRING, FF_UNKNOWN, get_byte(), get_byte_low(), get_type(), and pos. |
|
Read string which ends at ' or : or , or.
Definition at line 350 of file FrontierFile.cpp. References FF_BYTE, FF_LABEL_DEF, FF_LABEL_REF, FF_STRING, FF_UNKNOWN, get_type(), and pos. Referenced by get_byte(). |
|
Determine type of next element.
Definition at line 86 of file FrontierFile.cpp. References FF_BYTE, FF_LABEL_DEF, FF_LABEL_REF, FF_STRING, pos, and skip_white(). Referenced by get_byte(), get_byte_low(), get_label_def(), get_label_ref(), and get_string(). |
|
Read 32-bit floating point number.
Definition at line 342 of file FrontierFile.cpp. References get_byte(). |
|
Read signed 16-bit integer.
Definition at line 295 of file FrontierFile.cpp. References get_byte(). |
|
Read signed 32-bit integer.
Definition at line 304 of file FrontierFile.cpp. References get_byte(). |
|
Read signed 8-bit integer.
Definition at line 288 of file FrontierFile.cpp. References get_byte(). |
|
|
|
Read unsigned 16-bit integer.
Definition at line 322 of file FrontierFile.cpp. References get_byte(). |
|
Read unsigned 32-bit integer.
Definition at line 331 of file FrontierFile.cpp. References get_byte(). |
|
Read unsigned 8-bit integer.
Definition at line 315 of file FrontierFile.cpp. References get_byte(). |
|
Seek to previously set file start.
Definition at line 72 of file FrontierFile.cpp. |
|
Seek to spesified byte offset file position.
Definition at line 66 of file FrontierFile.cpp. References pos. |
|
Seek to spesified label position.
Definition at line 57 of file FrontierFile.cpp. References pos. |
|
Seek to next non-white character.
Definition at line 78 of file FrontierFile.cpp. References pos. Referenced by get_type(). |
|
Buffer.
Definition at line 68 of file FrontierFile.h. Referenced by FrontierFile(), and reset(). |
|
Current pointer.
Definition at line 69 of file FrontierFile.h. Referenced by FrontierFile(), get_byte(), get_byte_low(), get_label_def(), get_label_ref(), get_string(), get_type(), reset(), seek(), and skip_white(). |