add "rewind()" member function to Text and Potential file reader classes
This commit is contained in:
@ -92,6 +92,13 @@ void PotentialFileReader::ignore_comments(bool value)
|
||||
reader->ignore_comments = value;
|
||||
}
|
||||
|
||||
/** Reset file to the beginning */
|
||||
|
||||
void PotentialFileReader::rewind()
|
||||
{
|
||||
reader->rewind();
|
||||
}
|
||||
|
||||
/** Read a line but ignore its content */
|
||||
|
||||
void PotentialFileReader::skip_line()
|
||||
|
||||
@ -43,6 +43,7 @@ class PotentialFileReader : protected Pointers {
|
||||
|
||||
void ignore_comments(bool value);
|
||||
|
||||
void rewind();
|
||||
void skip_line();
|
||||
char *next_line(int nparams = 0);
|
||||
void next_dvector(double *list, int n);
|
||||
|
||||
@ -82,6 +82,13 @@ TextFileReader::~TextFileReader()
|
||||
if (closefp) fclose(fp);
|
||||
}
|
||||
|
||||
/** Reset file to the beginning */
|
||||
|
||||
void TextFileReader::rewind()
|
||||
{
|
||||
::rewind(fp);
|
||||
}
|
||||
|
||||
/** Read the next line and ignore it */
|
||||
|
||||
void TextFileReader::skip_line()
|
||||
|
||||
@ -38,6 +38,7 @@ class TextFileReader {
|
||||
|
||||
~TextFileReader();
|
||||
|
||||
void rewind();
|
||||
void skip_line();
|
||||
char *next_line(int nparams = 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user