#include <File.h>
Public Member Functions | |
File () | |
Creates an empty File object. | |
File (std::string filename) | |
void | open (std::string filename) |
char | readChar () |
Reads one character from the file. | |
int | readInt () |
Returns an integer read from the file. | |
real | readDouble () |
Returns a real read from the file. | |
std::string | readWord () |
Returns a "word" (a string with no word separators/delimiters) read from the file. | |
void | close () |
Closes the file. | |
std::string | readLine () |
Returns a complete line. | |
bool | eof () |
When a file is opened, we check that the first non-commented line contains "ANNIE_FILE <ver>" where is the version number. This has been done to allow for future changes to file formats used by ANNIE. All save functions should save in the same format. Current version is 1.0.
Comments in an ANNIE file are given by a '#'. The rest of the line following '#' is ignored. The member functions of this class return values ignoring any and all comments that may have appeared in between.
|
Creates an empty File object.
|
|
|
|
Closes the file.
|
|
|
|
|
|
Reads one character from the file.
|
|
Returns a real read from the file.
|
|
Returns an integer read from the file.
|
|
Returns a complete line.
|
|
Returns a "word" (a string with no word separators/delimiters) read from the file.
|