Public Member Functions | |
~PG_File () | |
int | read (void *buffer, unsigned int bytestoread) |
read bytes from the stream | |
int | write (void *buffer, unsigned int bytestowrite) |
write bytes to the stream | |
int | write (std::string &buffer) |
write bytes to the stream | |
int | write (const char *buffer) |
write bytes to the stream | |
int | read (void *buffer, unsigned int objSize, unsigned int objCount) |
read records from the stream | |
int | write (void *buffer, unsigned int objSize, unsigned int objCount) |
write records to the stream | |
bool | eof () |
check for the end of the file. | |
int | tell () |
get the current position in the file stream | |
bool | seek (int pos) |
set the file pointer to a given position | |
int | fileLength () |
return the length of the file (in bytes) | |
char | getc () |
get a single character from the file | |
std::string | getline () |
read a line from the file. | |
void | putline (const std::string &line) |
write a line to the file | |
Protected Member Functions | |
PG_File (void *f) | |
The constructor can only be called from PG_FileArchive or any subclass. |
|
The constructor can only be called from PG_FileArchive or any subclass. PG_File object are create by PG_FileArchive::OpenFile(...)
|
|
|
|
check for the end of the file.
|
|
return the length of the file (in bytes)
|
|
get a single character from the file
|
|
read a line from the file. This function reads a CR/LF terminated line of text from the file. Any trailing carriage return and linefeed characters will be skipped. |
|
write a line to the file
|
|
read records from the stream
|
|
read bytes from the stream
|
|
set the file pointer to a given position
|
|
get the current position in the file stream
|
|
write records to the stream
|
|
write bytes to the stream
|
|
write bytes to the stream
|
|
write bytes to the stream
|