193 int Find(
const char* sToFind)
const;
311 virtual bool IsWord(
const std::string &s)
const = 0;
324 virtual bool check(
const T& value)
const {
return false; };
329 virtual bool check(
const T& value)
const {
return true; };
438 virtual void NextToken(
const char* sFuncName);
441 virtual void Eof(
void);
461 virtual void Close(
void);
473 virtual bool IsKeyWord(
const char* sKeyWord);
477 virtual bool IsArg(
void);
485 virtual bool GetBool(
bool bDefval =
false);
492 template <
class Range>
496 template <
class Range>
499 virtual std::string
GetString(
const std::string& sDefVal);
502 template <
class Range>
553 template <
class Range>
560 if (!range.check(val)) {
567 template <
class Range>
574 if (!range.check(val)) {
580 template <
class Range>
584 const char sFuncName[] =
"HighParser::GetValue()";
587 silent_cerr(
"Parser error in " << sFuncName <<
", arg expected at line "
598 silent_cerr(sFuncName <<
": " << e.
what() <<
" at line "
603 silent_cerr(sFuncName <<
": error return from MathParser at line "
613 if (!range.check(v)) {
range_ge_le(const T &l, const T &u)
bool check(const T &value) const
#define MBDYN_EXCEPT_ARGS
virtual integer GetInt(integer iDefval=0)
ErrIllegalDelimiter(const char *file, int line, const char *func, const std::string r=std::string())
bool IsDescription(void) const
#define MBDYN_EXCEPT_ARGS_PASSTHRU
virtual const char * IsWord(const HighParser::WordSet &ws)
virtual void ExpectArg(void)
virtual bool check(const T &value) const
LowParser(HighParser &hp)
virtual bool GetBool(bool bDefval=false)
const char * what(void) const
bool check(const T &value) const
virtual HighParser::ErrOut GetLineData(void) const
ErrStringExpected(const char *file, int line, const char *func, const std::string r=std::string())
bool check(const T &value) const
#define MBDYN_EXCEPT_ARGS_DECL
HighParser(MathParser &MP, InputStream &streamIn)
ErrKeyWordExpected(const char *file, int line, const char *func, const std::string r=std::string())
virtual ~HighParser(void)
#define MBDYN_EXCEPT_ARGS_NOOPT_PASSTHRU
integer iGetInt(void) const
ErrColonExpected(const char *file, int line, const char *func, const std::string r=std::string())
char sStringBufWithSpaces[iDefaultBufSize]
Token GotDescription(void)
virtual bool GetYesNoOrBool(bool bDefval=false)
bool check(const T &value) const
virtual TypedValue GetValue(const TypedValue &v)
ErrMissingSeparator(const char *file, int line, const char *func, const std::string r=std::string())
bool check(const T &value) const
virtual void ExpectDescription(void)
range_gt_le(const T &l, const T &u)
bool SetDescData(const std::string &s, DescRead *rf)
std::ostream & operator<<(std::ostream &out, const HighParser::ErrOut &err)
bool check(const T &value) const
virtual bool check(const T &value) const
range_gt_lt(const T &l, const T &u)
virtual const KeyTable * PutKeyTable(const KeyTable &KT)
int Find(const char *sToFind) const
Token GetToken(InputStream &In)
LowParser::Token CurrLowToken
virtual bool Read(HighParser &HP)=0
bool ReadDescription(HighParser &HP, const std::string &desc)
virtual const char * GetStringWithDelims(enum Delims Del=DEFAULTDELIM, bool escape=true)
ErrSemicolonExpected(const char *file, int line, const char *func, const std::string r=std::string())
bool check(const T &value) const
const unsigned int iDefaultBufSize
void PackWords(InputStream &In)
ErrInvalidCallToGetDescription(const char *file, int line, const char *func, const std::string r=std::string())
virtual MathParser & GetMathParser(void)
virtual mbsleep_t GetTimeout(const mbsleep_t &DefVal)
virtual HighParser::Token FirstToken(void)
virtual bool IsWord(const std::string &s) const =0
range_ge_lt(const T &l, const T &u)
ErrIntegerExpected(const char *file, int line, const char *func, const std::string r=std::string())
ErrRealExpected(const char *file, int line, const char *func, const std::string r=std::string())
KeyTable(HighParser &hp, const char *const sTable[])
virtual ~ErrValueOutOfRange(void)
virtual std::string GetString(const std::string &sDefVal)
virtual bool GetYesNo(bool &bRet)
virtual int IsKeyWord(void)
doublereal dGetReal(void) const
virtual void NextToken(const char *sFuncName)
virtual bool IsStringWithDelims(enum Delims Del=DEFAULTDELIM)
HighParser::ErrOut mbdyn_get_line_data(void)
virtual int GetWord(void)
int iGetDescription_int(const char *const s)
ErrValueOutOfRange(const char *file, int line, const char *func, T value)
virtual int GetLineNumber(void) const
virtual void SetDelims(enum Delims Del, char &cLdelim, char &cRdelim) const
range_2_base(const T &l, const T &u)
char sStringBuf[iDefaultBufSize]
#define MBDYN_EXCEPT_ARGS_DECL_NOOPT
virtual void PutBackSemicolon(void)
int ParseWord(unsigned flags=HighParser::NONE)
bool check(const T &value) const
std::ostream & mbdyn_print_line_data(std::ostream &out)
virtual doublereal GetReal(const doublereal &dDefval=0.0)