#include <File.h>
Public Methods | |
| File () | |
| Creates an empty File object. More... | |
| File (std::string filename) | |
| Opens a given filename in the File object. More... | |
| void | open (std::string filename) |
| Explicitly opens a given filename in the File object. More... | |
| char | readChar () |
| Reads one character from the file. More... | |
| int | readInt () |
| Returns an integer read from the file. More... | |
| real | readDouble () |
| Returns a real read from the file. More... | |
| std::string | readWord () |
| Returns a "word" (a string with no word separators/delimiters) read from the file. More... | |
| void | close () |
| Closes the file. More... | |
| std::string | readLine () |
| Returns a complete line. More... | |
| bool | eof () |
| checks if the file has reached the end. More... | |
Private Methods | |
| void | _next () |
Private Attributes | |
| std::string | _filename |
| std::ifstream | _file |
| bool | _isOpen |
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.
|
|
|
Opens a given filename in the File object.
|
|
|
|
|
|
Closes the file.
|
|
|
checks if the file has reached the end.
|
|
|
Explicitly opens a given filename in the File object.
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002