enable PotentialFileReader class to change line buffer size
This commit is contained in:
@ -86,11 +86,21 @@ PotentialFileReader::~PotentialFileReader()
|
|||||||
/** Set comment (= text after '#') handling preference for the file to be read
|
/** Set comment (= text after '#') handling preference for the file to be read
|
||||||
*
|
*
|
||||||
* \param value Comment text is ignored if true, or not if false */
|
* \param value Comment text is ignored if true, or not if false */
|
||||||
|
|
||||||
void PotentialFileReader::ignore_comments(bool value)
|
void PotentialFileReader::ignore_comments(bool value)
|
||||||
{
|
{
|
||||||
reader->ignore_comments = 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 */
|
/** Reset file to the beginning */
|
||||||
|
|
||||||
void PotentialFileReader::rewind()
|
void PotentialFileReader::rewind()
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class PotentialFileReader : protected Pointers {
|
|||||||
const int auto_convert = 0);
|
const int auto_convert = 0);
|
||||||
~PotentialFileReader() override;
|
~PotentialFileReader() override;
|
||||||
|
|
||||||
|
void set_bufsize(int bufsize);
|
||||||
void ignore_comments(bool value);
|
void ignore_comments(bool value);
|
||||||
|
|
||||||
void rewind();
|
void rewind();
|
||||||
|
|||||||
@ -93,7 +93,9 @@ TextFileReader::~TextFileReader()
|
|||||||
delete[] line;
|
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)
|
void TextFileReader::set_bufsize(int newsize)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user