#include <Files.hxx>
Inheritance diagram for Talos::ExtStream:
Public Member Functions | |
ExtStream () | |
Default constructor. | |
ExtStream (string file_name, string comments="#%", string delimiters=" \t:=|\n,;\r\x0D\x0A") | |
Main constructor. | |
virtual | ~ExtStream () |
Destructor. | |
bool | Discard (string line) const |
Checks whether a line should be discarded. | |
ExtStream & | SkipDiscarded () |
Skips discarded lines. | |
void | SetDelimiters (string delimiters) |
Sets the characters considered as delimiters. | |
void | SetComments (string comments) |
Sets the characters that denote a comment line. | |
string | GetDelimiters () const |
Returns the characters considered as delimiters.. | |
string | GetComments () const |
Returns the characters that denote a comment line. | |
string | GetFileName () const |
Returns the name of the file that was opened. | |
ExtStream & | SkipDelimiters () |
Skips delimiters. | |
string | RemoveDelimiters (const string &str) const |
Removes delimiters at both ends of a string. | |
ExtStream & | Skip () |
Skips discarded lines and delimiters. | |
void | Open (string file_name, openmode mode=in) |
Opens a file. | |
void | Close () |
Closes the current file. | |
bool | IsEmpty () |
Checks whether the stream is empty. | |
ExtStream & | Rewind () |
Rewinds the stream. | |
string | GetFullLine () |
Returns the next line. | |
bool | GetFullLine (string &line) |
Returns the next line. | |
string | PeekFullLine () |
Returns the next line without extracting it from the stream. | |
string | PeekFullLine (streampos &position) |
Returns the next line without extracting it from the stream. | |
bool | PeekFullLine (string &line) |
Returns the next line without extracting it from the stream. | |
void | SkipFullLines (int nb) |
Skips full lines. | |
virtual string | GetLine () |
Returns the next valid line. | |
virtual bool | GetLine (string &line) |
Returns the next valid line. | |
virtual string | PeekLine () |
Returns the next valid line without extracting it from the stream. | |
virtual string | PeekLine (streampos &position) |
Returns the next valid line without extracting it from the stream. | |
virtual bool | PeekLine (string &line) |
Returns the next valid line without extracting it from the stream. | |
void | SkipLines (int nb) |
Skips valid lines. | |
bool | Find (string element) |
Sets the position of the get pointer after a given element. | |
bool | FindFromBeginning (string element) |
Sets the position of the get pointer after a given element. | |
virtual string | GetElement () |
Returns the next valid element. | |
template<class T> | |
bool | GetElement (T &element) |
Gets the next valid element. | |
template<class T> | |
bool | GetRawElement (T &element) |
Gets the next valid element. | |
string | PeekElement () |
Returns the next valid element without extracting it from the stream. | |
template<class T> | |
bool | PeekElement (T &element) |
Gets the next valid element without extracting it from the stream. | |
void | SkipElements (int nb) |
Skips valid elements. | |
double | GetNumber () |
Returns the next valid number. | |
template<class T> | |
bool | GetNumber (T &number) |
Gets the next valid number. | |
double | PeekNumber () |
Returns the next valid number without extracting it from the stream. | |
template<class T> | |
bool | PeekNumber (T &number) |
Gets the next valid number without extracting it from the stream. | |
void | SkipNumbers (int nb) |
Skips numbers. | |
string | GetValue (string name) |
Gets the value of a given variable. | |
string | PeekValue (string name) |
Gets the value of a given variable without extracting from the stream. | |
template<class T> | |
bool | GetValue (string name, T &value) |
Gets the value of a given variable. | |
template<class T> | |
bool | PeekValue (string name, T &value) |
Gets the value of a given variable without extracting them from the stream. | |
bool | GetValue (string name, string &value) |
Gets the value of a given variable. | |
bool | PeekValue (string name, string &value) |
Gets the value of a given variable without extracting them from the stream. | |
bool | GetValue (string name, bool &value) |
Gets the value of a given variable. | |
bool | PeekValue (string name, bool &value) |
Gets the value of a given variable without extracting from the stream. | |
Protected Attributes | |
string | file_name_ |
File name associated with the stream. | |
string | comments_ |
Characters that denote a comment line. | |
string | delimiters_ |
Characters considered as delimiters. | |
string | searching_ |
Field currently searched. |
|
Default constructor. Nothing is performed. |
|
Main constructor. Opens a file.
|
|
Destructor. Closes the stream. |
|
Closes the current file.
|
|
Checks whether a line should be discarded.
|
|
Sets the position of the get pointer after a given element. Sets the position of the get pointer exactly after a given element.
Reimplemented in Talos::ConfigStream. |
|
Sets the position of the get pointer after a given element. Sets the position of the get pointer exactly after a given element.
Reimplemented in Talos::ConfigStream. |
|
Returns the characters that denote a comment line.
|
|
Returns the characters considered as delimiters..
|
|
Gets the next valid element. Gets the next valid element, i.e. the next element that is not in a line to be discarded.
|
|
Returns the next valid element. Returns the next valid element, i.e. the next element that is not in a line to be discarded.
Reimplemented in Talos::ConfigStream. |
|
Returns the name of the file that was opened.
|
|
Returns the next line.
|
|
Returns the next line.
|
|
Returns the next valid line. Returns the next valid line, i.e. the next line that is not a line to be discarded and from which comments have been extracted.
Reimplemented in Talos::ConfigStream. |
|
Returns the next valid line. Returns the next valid line, i.e. the next line that is not a line to be discarded and from which comments have been extracted.
Reimplemented in Talos::ConfigStream. |
|
Gets the next valid number. Gets the next valid number, i.e. the next number that is not in a line to be discarded.
|
|
Returns the next valid number. Returns the next valid number, i.e. the next number that is not in a line to be discarded.
|
|
Gets the next valid element. Gets the next valid element, i.e. the next element that is not in a line to be discarded.
|
|
Gets the value of a given variable. Gets the value of a given variable, i.e. the next valid (not in a discarded line) number or element following the variable name.
|
|
Gets the value of a given variable. Gets the value of a given variable, i.e. the next valid (not in a discarded line) number or element following the variable name.
|
|
Gets the value of a given variable. Gets the (numerical) value of a given variable, i.e. the next valid (not in a discarded line) number or element following the variable name.
|
|
Gets the value of a given variable. Gets the value of a given variable, i.e. the next valid (not in a discarded line) element following the variable name.
|
|
Checks whether the stream is empty. Checks whether the stream has still valid elements to be read.
Reimplemented in Talos::ConfigStream. |
|
Opens a file.
|
|
Gets the next valid element without extracting it from the stream. Gets the next valid element, i.e. the next element that is not in a line to be discarded.
|
|
Returns the next valid element without extracting it from the stream. Returns the next valid element, i.e. the next element that is not in a line to be discarded.
|
|
Returns the next line without extracting it from the stream.
|
|
Returns the next line without extracting it from the stream.
|
|
Returns the next line without extracting it from the stream.
|
|
Returns the next valid line without extracting it from the stream. Returns the next valid line, i.e. the next line that is not a line to be discarded and from which comments have been extracted. Nothing is extracted from the stream.
|
|
Returns the next valid line without extracting it from the stream. Returns the next valid line, i.e. the next line that is not a line to be discarded and from which comments have been extracted. Nothing is extracted from the stream.
|
|
Returns the next valid line without extracting it from the stream. Returns the next valid line, i.e. the next line that is not a line to be discarded and from which comments have been extracted. Nothing is extracted from the stream.
|
|
Gets the next valid number without extracting it from the stream. Gets the next valid number, i.e. the next number that is not in a line to be discarded.
|
|
Returns the next valid number without extracting it from the stream. Returns the next valid number, i.e. the next number that is not in a line to be discarded.
|
|
Gets the value of a given variable without extracting from the stream. Gets the value of a given variable, i.e. the next valid (not in a discarded line) number or element following the variable name. Nothing is extracted from the stream.
|
|
Gets the value of a given variable without extracting them from the stream. Gets the value of a given variable, i.e. the next valid (not in a discarded line) number or element following the variable name. Nothing is extracted from the stream.
|
|
Gets the value of a given variable without extracting them from the stream. Gets the (numerical) value of a given variable, i.e. the next valid (not in a discarded line) number or element following the variable name. Nothing is extracted from the stream.
|
|
Gets the value of a given variable without extracting from the stream. Gets the value of a given variable, i.e. the next valid (not in a discarded line) element following the variable name. Nothing is extracted from the stream.
|
|
Removes delimiters at both ends of a string. Removes delimiters at the beginning and at the end of a string.
|
|
Rewinds the stream. Goes back to the beginning of the stream and clears the control state.
|
|
Sets the characters that denote a comment line.
|
|
Sets the characters considered as delimiters.
|
|
Skips discarded lines and delimiters. Extracts discarded lines and delimiters.
|
|
Skips delimiters. Extracts following delimiters from the string, until another character is found.
|
|
Skips discarded lines. Extracts discarded lines.
|
|
Skips valid elements.
|
|
Skips full lines.
|
|
Skips valid lines.
|
|
Skips numbers.
|