1#ifndef __JLANG__JEQUATIONPARAMETERS__
2#define __JLANG__JEQUATIONPARAMETERS__
12namespace JPP {
using namespace JLANG; }
37 in >>
static_cast<std::string&
>(object);
53 static_cast<std::string&
>(*this) = buffer;
66 iterator out = this->begin();
68 for (const_iterator p = this->begin(); p != this->end(); ++p, ++out) {
72 if (++p != this->end()) {
75 case 'a': *out =
'\a';
break;
76 case 'b': *out =
'\b';
break;
77 case 'e': *out =
'\e';
break;
78 case 'f': *out =
'\f';
break;
79 case 'n': *out =
'\n';
break;
80 case 'r': *out =
'\r';
break;
81 case 't': *out =
'\t';
break;
82 case 'v': *out =
'\v';
break;
92 this->erase(out, this->end());
108 this->
ws =
" \t\n\v\f\r";
126 const std::string&
eol,
127 const std::string&
div,
128 const std::string&
skip,
129 const char left =
'(',
130 const char right =
')',
131 const std::string&
ws =
" \t\n\v\f\r",
132 const std::string&
comment =
"")
238 else if (index <
eol.size())
518 for (string::const_iterator i = value.
sep.begin(); i != value.
sep.end(); ++i) {
524 for (string::const_iterator i = value.
eol.begin(); i != value.
eol.end(); ++i) {
530 for (string::const_iterator i = value.
div.begin(); i != value.
div.end(); ++i) {
536 for (string::const_iterator i = value.
skip.begin(); i != value.
skip.end(); ++i) {
542 for (string::const_iterator i = value.
ws.begin(); i != value.
ws.end(); ++i) {
560 return sep .find(c) != std::string::npos;
570 inline bool isEndOfLine (
const char c)
const {
return eol .find(c) != std::string::npos; }
581 return div .find(c) != std::string::npos;
593 return skip.find(c) != std::string::npos;
629 return ws .find(c) != std::string::npos;
Simple data structure to support I/O of equations (see class JLANG::JEquation).
char & getRightBracket()
Get right bracket.
std::string & getSeparator()
Get separator characters.
std::string & getDivision()
Get division characters.
const std::string & getSkipLine() const
Get skip line characters.
const char getDefaultSkipLine() const
Get default skip line character.
const JEquationParameters & getEquationParameters() const
Get equation parameters.
JEquationParameters(const std::string &sep, const std::string &eol, const std::string &div, const std::string &skip, const char left='(', const char right=')', const std::string &ws=" \t\n\v\f\r", const std::string &comment="")
Constructor.
bool isSeparator(const char c) const
Test for separator character.
const std::string & getComment() const
Get comment string.
void setBrackets(const char left, const char right)
Set brackets.
string_type & getWhiteSpace()
Get white space characters.
void setEquationParameters(const JEquationParameters &buffer)
Set equation parameters.
bool isDivision(const char c) const
Test for division character.
void setWhiteSpace(const std::string &ws)
Set white space characters.
const char getDefaultSeparator() const
Get default separator character.
const std::string & getSeparator() const
Get separator characters.
JEquationParameters & join(const JEquationParameters &value)
Join equation parameters.
string_type & getEndOfLine()
Get end of line characters.
bool isEndOfLine(const char c) const
Test for end of line character.
void setSeparator(const std::string &sep)
Set separator character(s).
void setDivision(const std::string &div)
Set division characters.
char & getLeftBracket()
Get left bracket.
const char getDefaultEndOfLine() const
Get default end of line character.
char getLeftBracket() const
Get left bracket.
void setComment(const std::string &comment)
Set comment string.
bool isRightBracket(const char c) const
Test for right bracket character.
bool isSkipLine(const char c) const
Test for skip line character.
void setSkipLine(const std::string &skip)
Set skip line characters.
std::string & getComment()
Get comment string.
JEquationParameters()
Default constructor.
bool isLeftBracket(const char c) const
Test for left bracket character.
void setEndOfLine(const std::string &eol)
Set end of line characters.
const string_type & getEndOfLine() const
Get end of line characters.
const char getDefaultWhiteSpace() const
Get default white space character.
char getRightBracket() const
Get right bracket.
const char getPreferredEndOfLine(const unsigned int index) const
Get preferred end of line character.
const std::string & getDivision() const
Get division characters.
const string_type & getWhiteSpace() const
Get white space characters.
bool isWhiteSpace(const char c) const
Test for white space character.
std::string & getSkipLine()
Get skip line characters.
const char getDefaultDivision() const
Get default division character.
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure to handle I/O of escape characters.
friend std::istream & operator>>(std::istream &in, string_type &object)
Read string from imput stream.
void translate()
Translate escape characters.
string_type & operator=(const std::string &buffer)
Assigment operator.