FileRead Class Reference

Simpler file read. More...

#include <utils.h>

List of all members.

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_


Detailed Description

Simpler file read.

Member Function Documentation

bool FileRead::getLine ( string &  s  ) 

Line read.

Returns:
True if read was successfull, False otherwise.

bool FileRead::getLineAsPair ( string &  s1,
string &  s2,
const char *  sep = NULL 
)

Line read.

Expects line to be a pair of stuff, separated by sep.

Parameters:
sep Separator - if not specified implicit ' ' is used.
Returns:
True if read was successfull, False otherwise.

void FileRead::ignoreLines ( const char *  start  ) 

Set ignore lines flag (for comments, etc.

)


The documentation for this class was generated from the following files:

Generated on Thu Aug 6 23:29:08 2009 for akimot by  doxygen 1.5.7.1