Main Page   Class Hierarchy   Compound List   Compound Members  

Record Class Reference

Record style file model. More...

Inheritance diagram for Record:

Paired List of all members.

Public Methods

 Record (int n)
bool open (const string &filename)
bool readline (string &line)
void put_ith (int i, const string &v)
string get_ith (int i)
string get_filename ()
 get file name

int get_size ()
 return Size of the record.

void clear_record_buf ()
 clear the read buffer

bool good ()
bool eof ()

Detailed Description

Record style file model.


Constructor & Destructor Documentation

Record::Record int    n [inline]
 

Parameters:
n  Size of record (= # fields).


Member Function Documentation

bool Record::eof   [inline]
 

Returns:
True if the file hit the end, false otherwise.

string Record::get_ith int    i
 

Parameters:
i  Index of the target field.
Returns:
i-th field of the record.

bool Record::good   [inline]
 

Returns:
True if the input stream is good, false otherwise.

bool Record::open const string &    filename
 

Returns:
True if open succeeds, false otherwise.

Reimplemented in Paired.

void Record::put_ith int    i,
const string &    v
 

Parameters:
i  Index of the target field.
v  Value to put on the i-th field of the record.

bool Record::readline string &    line
 

Parameters:
line  Input will be copied into this variable.
Returns:
True if reading line succeeds, false if reading fails or reads an EOF.