Definition at line 21 of file RooStreamParser.h.
Public Member Functions | |
RooStreamParser (std::istream &is) | |
Construct parser on given input stream. | |
RooStreamParser (std::istream &is, const TString &errPrefix) | |
Construct parser on given input stream. | |
virtual | ~RooStreamParser () |
Destructor. | |
Bool_t | atEOF () |
Bool_t | atEOL () |
If true, parser is at end of line in stream. | |
Bool_t | convertToDouble (const TString &token, Double_t &value) |
Convert given string to a double. Return true if the conversion fails. | |
Bool_t | convertToInteger (const TString &token, Int_t &value) |
Convert given string to an Int_t. | |
Bool_t | convertToString (const TString &token, TString &string) |
Convert given token to a string (i.e. remove eventual quotation marks) | |
Bool_t | expectToken (const TString &expected, Bool_t zapOnError=kFALSE) |
Read the next token and return kTRUE if it is identical to the given 'expected' token. | |
TString | getPunctuation () const |
Bool_t | isPunctChar (char c) const |
Check if given char is considered punctuation. | |
Bool_t | readDouble (Double_t &value, Bool_t zapOnError=kFALSE) |
Read the next token and convert it to a Double_t. | |
Bool_t | readInteger (Int_t &value, Bool_t zapOnError=kFALSE) |
Read a token and convert it to an Int_t. | |
TString | readLine () |
Read an entire line from the stream and return as TString This method recognizes the use of '\' in the istream as line continuation token. | |
Bool_t | readString (TString &value, Bool_t zapOnError=kFALSE) |
Read a string token. | |
TString | readToken () |
Read one token separated by any of the know punctuation characters This function recognizes and handles comment lines in the istream (those starting with '#', quoted strings ("") the content of which is not tokenized and '+-. | |
void | setPunctuation (const TString &punct) |
Change list of characters interpreted as punctuation. | |
void | zapToEnd (Bool_t inclContLines=kFALSE) |
Eat all characters up to and including then end of the current line. | |
Protected Attributes | |
Bool_t | _atEOF |
Bool_t | _atEOL |
std::istream * | _is |
TString | _prefix |
TString | _punct |
#include <RooStreamParser.h>
RooStreamParser::RooStreamParser | ( | std::istream & | is | ) |
Construct parser on given input stream.
Definition at line 59 of file RooStreamParser.cxx.
RooStreamParser::RooStreamParser | ( | std::istream & | is, |
const TString & | errorPrefix | ||
) |
Construct parser on given input stream.
Use given errorPrefix to prefix any parsing error messages
Definition at line 69 of file RooStreamParser.cxx.
|
virtual |
Destructor.
Definition at line 79 of file RooStreamParser.cxx.
|
inline |
Definition at line 44 of file RooStreamParser.h.
Bool_t RooStreamParser::atEOL | ( | ) |
If true, parser is at end of line in stream.
Definition at line 88 of file RooStreamParser.cxx.
Convert given string to a double. Return true if the conversion fails.
Definition at line 429 of file RooStreamParser.cxx.
Convert given string to an Int_t.
Returns true if an error occurred in conversion
Definition at line 469 of file RooStreamParser.cxx.
Convert given token to a string (i.e. remove eventual quotation marks)
Definition at line 502 of file RooStreamParser.cxx.
Read the next token and return kTRUE if it is identical to the given 'expected' token.
Definition at line 397 of file RooStreamParser.cxx.
|
inline |
Definition at line 32 of file RooStreamParser.h.
Bool_t RooStreamParser::isPunctChar | ( | char | c | ) | const |
Check if given char is considered punctuation.
Definition at line 109 of file RooStreamParser.cxx.
Read the next token and convert it to a Double_t.
Returns true if an error occurred in reading or conversion
Definition at line 416 of file RooStreamParser.cxx.
Read a token and convert it to an Int_t.
Returns true if an error occurred in reading or conversion
Definition at line 456 of file RooStreamParser.cxx.
TString RooStreamParser::readLine | ( | ) |
Read an entire line from the stream and return as TString This method recognizes the use of '\' in the istream as line continuation token.
Definition at line 309 of file RooStreamParser.cxx.
Read a string token.
Returns true if an error occurred in reading or conversion. If a the read token is enclosed in quotation marks those are stripped in the returned value
Definition at line 490 of file RooStreamParser.cxx.
TString RooStreamParser::readToken | ( | ) |
Read one token separated by any of the know punctuation characters This function recognizes and handles comment lines in the istream (those starting with '#', quoted strings ("") the content of which is not tokenized and '+-.
' characters that are part of a floating point numbers and are exempt from being interpreted as a token separator in case '+-.' are defined as token separators.
Definition at line 129 of file RooStreamParser.cxx.
Change list of characters interpreted as punctuation.
Definition at line 99 of file RooStreamParser.cxx.
Eat all characters up to and including then end of the current line.
If inclContLines is kTRUE, all continuation lines marked by the '\' token are zapped as well
Definition at line 361 of file RooStreamParser.cxx.
|
protected |
Definition at line 53 of file RooStreamParser.h.
|
protected |
Definition at line 52 of file RooStreamParser.h.
|
protected |
Definition at line 51 of file RooStreamParser.h.
|
protected |
Definition at line 54 of file RooStreamParser.h.
|
protected |
Definition at line 55 of file RooStreamParser.h.