#include <cstream.h>
Public Member Functions | |
ConfigStream () | |
constructor | |
void | open (char *FileName) |
ConfigPos | tellg () |
ConfigPos | tellTagBegin () |
ConfigStream & | seekg (ConfigPos &pos) |
moves to the byte offset of the stream and sets the corresponding line position | |
bool | GetTag (char *buf, int len) |
void | FwdToTag (const char *tag) |
ostream & | LineStamp (ostream &oS) |
unsigned int | GetLineNo () |
void ConfigStream::FwdToTag | ( | const char * | tag | ) |
runs forward to meet the text the same as tag
tag | searched text |
bool ConfigStream::GetTag | ( | char * | buf, | |
int | len | |||
) |
����
buf | [out] buffer where the result will returned | |
len | [in] length of the buffer in bytes |
buf | buffer where to return the line from the stream | |
len | length of the buffer caller should reserve buf long enough to read any line of the config file |
void ConfigStream::open | ( | char * | FileName | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
ConfigStream & ConfigStream::seekg | ( | ConfigPos & | pos | ) |
moves to the byte offset of the stream and sets the corresponding line position
skips to the required position with atention to the line of the given byte position is overloaded intentionally to preserve the right line counting
pos | instance of the special class, storing the line numbers also |
ConfigPos ConfigStream::tellg | ( | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
special object, storing the current stream byte offset and the line number
ConfigPos ConfigStream::tellTagBegin | ( | ) |
special object, storing the stream byte offset and the line number before the current tag has been read