6#include "utility/interface/itextinput.h"
73 virtual void tagLastInputForSmartUndo(
const QString &label,uint64 maxLevel,
74 const QString &undoCommand)=0;
168 virtual RetCode isName(QString *ps=
nullptr,
IMark *p=
nullptr)
const=0;
187 virtual RetCode isMultiKeyword(
const IString &key,std::vector<uint32> *pPos,
IMark *p=
nullptr)
const=0;
188 virtual RetCode isDVect2(DVect2 *pv=
nullptr,
IMark *p=
nullptr)
const=0;
239 virtual bool toBool(
IMark *p=
nullptr,
bool implicitOn=
false)
const=0;
342 virtual void destroy()=0;
357 inline IParse::RetCode isDVect(
const IParse &par,DVect2 *v=
nullptr,IParse::IMark *m=
nullptr) {
return par.isDVect2(v,m); }
361 inline DVect2
toDVect(
const IParse &par,IParse::IMark *m=
nullptr) {
return par.toDVect2(m); }
363 inline DAVect2
toDAVect(
const IParse &par,IParse::IMark *m=
nullptr) {
return DAVect2(par.toDouble(m)); }
All default base headers if Qt is being used.
A symmetric 2nd order tensor.
Definition symtensor.h:22
Opaque position indicator class. Do not attempt to use directly for anything.
Definition iparse.h:53
virtual void destroy()=0
Destroys this mark.
Interface to the main command processing class.
Definition iparse.h:50
virtual QStringList getSkipList() const =0
Returns the original skip list parsed from the input line.
virtual const QList< InputLine > & getOriginalInput() const =0
Returns the original strings used to generate the set of command tokens.
virtual bool hasHelpToken() const =0
Return a boolean indicating whether or not a help token is in the token list.
virtual IVect2 getTokenExtent(IMark *p=nullptr) const =0
virtual uint32 toUInt(IMark *p=nullptr, uint32 uMin=0, uint32 uMax=limits< uint32 >::max()) const =0
virtual RetCode isInt(int *pi=nullptr, IMark *p=nullptr, int iMin=limits< int >::min(), int iMax=limits< int >::max()) const =0
virtual void addSkipPost(QStringList *skipList, QChar c, IMark *p=nullptr) const =0
Adds a character to the start of the skip string AFTER the current token.
virtual QVariant toVariant(int type, IMark *p=nullptr, uint32 len=0) const =0
virtual IParse * createTemporaryParse(const QString &)=0
A method to return a temporary IParse Object that must be deleted.
virtual bool toBool(IMark *p=nullptr, bool implicitOn=false) const =0
virtual void addHelp(const IString &s) const =0
Adds a QString representing a token type to the help list. Multiple matching Strings are filtered.
virtual void addSkipPre(QStringList *skipList, QChar c, IMark *p=nullptr) const =0
Adds a character to the end of the skip string BEFORE the current token.
virtual ITextOutput * getITextOutput()=0
Returns an ITextIO interface associated with this parser.
virtual ITextInput * getITextInput()=0
Returns an ITextInput interface associated with this parser.
virtual RetCode isVariant(QVariant *pv=nullptr, IMark *p=nullptr) const =0
virtual bool interactiveSource() const =0
Returns TRUE if the input source for the command being processed was interactive.
virtual IString toFilename(const IString &def_ext={}, bool openForRead=false, IMark *p=nullptr) const =0
virtual int isStringCharStart(QChar c) const =0
virtual SymTensor toSymTensor(IMark *p=nullptr) const =0
virtual RetCode isBool(bool *pb=nullptr, IMark *p=nullptr, bool implicitOn=false) const =0
virtual IString getToken(IMark *p=nullptr) const =0
virtual RetCode isFilename(QString *ps=nullptr, const IString &def_ext={}, bool openForRead=false, IMark *p=nullptr) const =0
virtual void increment(IMark *p=nullptr) const =0
Increments the provided or internal mark.
virtual void setMark(IMark *pNew, IMark *p=nullptr) const =0
Sets the internal position indicator to p.
virtual int getLineNumber(IMark *p=nullptr) const =0
virtual DVect toDVect(IMark *p=0) const =0
virtual int isStringCharEnd(QChar c) const =0
virtual const ITextInput * getITextInput() const =0
Returns an ITextInput interface associated with this parser.
virtual bool checkSkipPost(QStringList *skipList, QChar c, IMark *p=nullptr) const =0
virtual RetCode isLong(qint64 *pl=nullptr, IMark *p=nullptr, qint64 lMin=limits< qint64 >::min(), qint64 lMax=limits< qint64 >::max()) const =0
virtual RetCode isDouble(double *pd=nullptr, IMark *p=nullptr, double dMin=limits< double >::lowest(), double dMax=limits< double >::max()) const =0
virtual qint64 toLong(IMark *p=nullptr, qint64 lMin=limits< qint64 >::min(), qint64 lMax=limits< qint64 >::max()) const =0
virtual uint64 toULong(IMark *p=nullptr, uint64 uMin=0, uint64 uMax=limits< uint64 >::max()) const =0
virtual bool findKeyword(const QString &keyword, IMark *pFound, IMark *pStart=nullptr) const =0
virtual RetCode isUInt(uint32 *pu=nullptr, IMark *p=nullptr, uint32 uMin=0, uint32 uMax=limits< uint32 >::max()) const =0
virtual RetCode isDVect(DVect *pv=nullptr, IMark *p=nullptr) const =0
RetCode
Possible return codes for isXXX() functions.
Definition iparse.h:60
@ rcOK
token was interpreted successfully.
Definition iparse.h:61
@ rcRange
the token was interpreted correctly but it's value fell outside of a restricted range given.
Definition iparse.h:64
@ rcExtra
an extra unused token was found at the end of the command line.
Definition iparse.h:65
@ rcMiss
no token was present at that position.
Definition iparse.h:62
@ rcBad
the token could not be interepreted as asked.
Definition iparse.h:63
virtual DVect2 toDVect2(IMark *p=nullptr) const =0
virtual RetCode isSymTensor(SymTensor *pv=nullptr, IMark *p=nullptr) const =0
virtual void stripTokens(IMark *mBegin, IMark *mEnd, IMark *p=nullptr)=0
virtual RetCode isDVect3(DVect3 *pv=nullptr, IMark *p=nullptr) const =0
virtual IMark * createMark(int pos=0) const =0
virtual bool checkSkipPre(QStringList *skipList, QChar c, IMark *p=nullptr) const =0
virtual RetCode isString(QString *ps=nullptr, IMark *p=nullptr, bool encodeBackslash=true) const =0
virtual void checkError(RetCode rc, IMark *p=nullptr) const =0
virtual int getTokenIndex(IMark *p=nullptr) const =0
virtual IString toString(IMark *p=nullptr) const =0
virtual RetCode isKeyword(const IString &key, uint32 *pPos=nullptr, IMark *p=nullptr) const =0
virtual RetCode isVariant(int type, QVariant *pv=nullptr, IMark *p=nullptr, uint32 len=0) const =0
virtual DVect3 toDVect3(IMark *p=nullptr) const =0
virtual IMark * createMarkCopy(IMark *p=nullptr) const =0
virtual int toInt(IMark *p=nullptr, int iMin=limits< int >::min(), int iMax=limits< int >::max()) const =0
virtual uint32 toKeyword(const IString &key, IMark *p=nullptr) const =0
virtual RetCode isULong(uint64 *pu=nullptr, IMark *p=nullptr, uint64 uMin=0, uint64 uMax=limits< uint64 >::max()) const =0
virtual bool isHelp(IMark *p=nullptr) const =0
Returns TRUE if the token matches one of the help_tokens.
virtual QVariant toVariant(IMark *p=nullptr) const =0
virtual ~IParse()
Virtual destructor.
Definition iparse.h:69
virtual bool activateHelp(bool b)=0
Turne help on/off.
virtual double toDouble(IMark *p=nullptr, double dMin=-limits< double >::max(), double dMax=limits< double >::max()) const =0
virtual bool isToken(IMark *p=nullptr) const =0
virtual void decrement(IMark *p=nullptr) const =0
Decrements the provided or internal mark.
Definition itextinput.h:39
Provides a interface for simple writing of text.
Definition itextoutput.h:13
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
DIM - Provides code portability between 2D and 3D codes.
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
namespace Itasca
Definition basememory.cpp:10
IParse::RetCode isDAvect(const IParse &par, DAVect3 *v=nullptr, IParse::IMark *m=nullptr)
Thin wrapper for IParse::isDVect3, designed to make it easier to write code that is the same in 2D an...
Definition iparse.h:349
DAVect3 toDAVect(const IParse &par, IParse::IMark *m=nullptr)
Thin wrapper for IParse::toDVect3, designed to make it easier to write code that is the same in 2D an...
Definition iparse.h:353
DVect3 toDVect(const IParse &par, IParse::IMark *m=nullptr)
Thin wrapper for IParse::toDVect3, designed to make it easier to write code that is the same in 2D an...
Definition iparse.h:351
IParse::RetCode isDVect(const IParse &par, DVect3 *v=nullptr, IParse::IMark *m=nullptr)
Thin wrapper for IParse::isDVect3, designed to make it easier to write code that is the same in 2D an...
Definition iparse.h:347