This class maintains the input file and provides a convenient interface to handle it.
More...
#include <ogdf/fileformats/LineBuffer.h>
This class maintains the input file and provides a convenient interface to handle it.
Definition at line 114 of file LineBuffer.h.
◆ LineBuffer()
| ogdf::LineBuffer::LineBuffer |
( |
istream & |
is | ) |
|
|
explicit |
◆ ~LineBuffer()
| ogdf::LineBuffer::~LineBuffer |
( |
| ) |
|
◆ extractString()
Copies the characters which have been extracted from the line buffer starting from position startPosition (including it) to endPosition (excluding it) to targetString.
- Parameters
-
| startPostion | start position |
| endPosition | end position |
| targetString | string [startPostion .. endPosition] of the LineBuffer |
- Returns
- false if the startPosition is not valid, i.e. the string is too long; targetString will contain the message "String too long!"
◆ getCurrentCharacter()
| char ogdf::LineBuffer::getCurrentCharacter |
( |
| ) |
const |
|
inline |
Returns the character which is currently pointed to.
Definition at line 154 of file LineBuffer.h.
◆ getCurrentPosition()
Returns the current position (as a copy)
Definition at line 149 of file LineBuffer.h.
◆ getInputFileLineCounter()
| int ogdf::LineBuffer::getInputFileLineCounter |
( |
| ) |
const |
|
inline |
Returns line number of the most recently read line of the input file.
Definition at line 163 of file LineBuffer.h.
◆ isValidPosition()
Checks wether the given position is valid.
◆ moveToNextCharacter()
| char ogdf::LineBuffer::moveToNextCharacter |
( |
| ) |
|
Moves to the next position; reading of new lines and handling of eof are done internally.
If end of file is reached the position will stuck to EOF character. The current character after moving is returned
◆ setCurrentPosition()
Sets the current position to new positon.
Takes care if the given newPosition is valid.
- Parameters
-
- Returns
- false if given position is invalid
◆ skipWhitespace()
| void ogdf::LineBuffer::skipWhitespace |
( |
| ) |
|
Moves to the next character until the currentCharacter is no whitespace.
◆ m_currentPosition
The current position in m_linBuf.
Definition at line 128 of file LineBuffer.h.
◆ m_inputFileLineCounter
| int ogdf::LineBuffer::m_inputFileLineCounter |
|
private |
Contains the current line number of the input file;.
Definition at line 138 of file LineBuffer.h.
◆ m_linBuf
◆ m_lineUpdateCountArray
| ArrayBuffer<int> ogdf::LineBuffer::m_lineUpdateCountArray |
|
private |
Contains for each line of the line buffer its update count.
Definition at line 122 of file LineBuffer.h.
◆ m_numberOfMostRecentlyReadLine
| int ogdf::LineBuffer::m_numberOfMostRecentlyReadLine |
|
private |
The line which has been read from the file most recently; this does not have to be equal to m_currentPosition.m_lineNumber because of the lookahead facilities.
Definition at line 135 of file LineBuffer.h.
◆ m_pIs
| istream* ogdf::LineBuffer::m_pIs |
|
private |
The documentation for this class was generated from the following file: