#include <utils.h>
Public Member Functions | |
| FileRead (string fn) | |
| Constructor with filename. | |
| string | read () |
| Reads whole file as string. | |
| bool | getLine (string &s) |
| Line read. | |
| bool | getLineAsPair (string &s1, string &s2, const char *sep=NULL) |
| Line read. | |
| void | ignoreLines (const char *start) |
| Set ignore lines flag (for comments, etc. | |
| bool | good () const |
| Tells whether file is good to read. | |
Private Attributes | |
| fstream | f_ |
| string | ignoreStart_ |
| bool FileRead::getLine | ( | string & | s | ) |
Line read.
| bool FileRead::getLineAsPair | ( | string & | s1, | |
| string & | s2, | |||
| const char * | sep = NULL | |||
| ) |
Line read.
Expects line to be a pair of stuff, separated by sep.
| sep | Separator - if not specified implicit ' ' is used. |
| void FileRead::ignoreLines | ( | const char * | start | ) |
Set ignore lines flag (for comments, etc.
)
1.5.7.1