enable PotentialFileReader class to change line buffer size

This commit is contained in:
Axel Kohlmeyer
2025-05-13 06:02:10 -04:00
parent fdd91e597e
commit 83fa2cbc93
3 changed files with 14 additions and 1 deletions

View File

@ -86,11 +86,21 @@ PotentialFileReader::~PotentialFileReader()
/** Set comment (= text after '#') handling preference for the file to be read
*
* \param value Comment text is ignored if true, or not if false */
void PotentialFileReader::ignore_comments(bool value)
{
reader->ignore_comments = value;
}
/** Set line buffer size of the internal TextFileReader class instance.
*
* \param bufsize New size of the line buffer */
void PotentialFileReader::set_bufsize(int bufsize)
{
reader->set_bufsize(bufsize);
}
/** Reset file to the beginning */
void PotentialFileReader::rewind()

View File

@ -41,6 +41,7 @@ class PotentialFileReader : protected Pointers {
const int auto_convert = 0);
~PotentialFileReader() override;
void set_bufsize(int bufsize);
void ignore_comments(bool value);
void rewind();

View File

@ -93,7 +93,9 @@ TextFileReader::~TextFileReader()
delete[] line;
}
/** adjust line buffer size */
/** adjust line buffer size
*
* \param newsize New size of the internal line buffer */
void TextFileReader::set_bufsize(int newsize)
{