For nothrow methods set Q_DECL_NOEXCEPT.

--HG--
branch : feature
This commit is contained in:
dismine 2014-05-02 11:43:02 +03:00
parent 79ef0e914e
commit 9ca9455c80
9 changed files with 68 additions and 68 deletions

View file

@ -95,7 +95,7 @@ QmuParserBase::~QmuParserBase()
* @return *this * @return *this
* @throw nothrow * @throw nothrow
*/ */
QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser) QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser) Q_DECL_NOEXCEPT
{ {
Assign(a_Parser); Assign(a_Parser);
return *this; return *this;
@ -198,7 +198,7 @@ void QmuParserBase::ResetLocale()
* @post m_pTokenReader.get()!=0 * @post m_pTokenReader.get()!=0
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::InitTokenReader() void QmuParserBase::InitTokenReader() Q_DECL_NOEXCEPT
{ {
m_pTokenReader.reset(new token_reader_type(this)); m_pTokenReader.reset(new token_reader_type(this));
} }
@ -210,7 +210,7 @@ void QmuParserBase::InitTokenReader()
* Clear bytecode, reset the token reader. * Clear bytecode, reset the token reader.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::ReInit() const void QmuParserBase::ReInit() const Q_DECL_NOEXCEPT
{ {
m_pParseFormula = &QmuParserBase::ParseString; m_pParseFormula = &QmuParserBase::ParseString;
m_vStringBuf.clear(); m_vStringBuf.clear();
@ -977,7 +977,7 @@ const valmap_type& QmuParserBase::GetConst() const
* parser functions. String functions are not part of this map. The Prototype definition is encapsulated in objects * parser functions. String functions are not part of this map. The Prototype definition is encapsulated in objects
* of the class FunProt one per parser function each associated with function names via a map construct. * of the class FunProt one per parser function each associated with function names via a map construct.
*/ */
const funmap_type& QmuParserBase::GetFunDef() const const funmap_type& QmuParserBase::GetFunDef() const Q_DECL_NOEXCEPT
{ {
return m_FunDef; return m_FunDef;
} }
@ -2082,7 +2082,7 @@ void Q_NORETURN QmuParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const QStr
* Resets the parser to string parsing mode by calling #ReInit. * Resets the parser to string parsing mode by calling #ReInit.
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearVar() void QmuParserBase::ClearVar() Q_DECL_NOEXCEPT
{ {
m_VarDef.clear(); m_VarDef.clear();
ReInit(); ReInit();
@ -2095,7 +2095,7 @@ void QmuParserBase::ClearVar()
* *
* Removes a variable if it exists. If the Variable does not exist nothing will be done. * Removes a variable if it exists. If the Variable does not exist nothing will be done.
*/ */
void QmuParserBase::RemoveVar(const QString &a_strVarName) void QmuParserBase::RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT
{ {
varmap_type::iterator item = m_VarDef.find(a_strVarName); varmap_type::iterator item = m_VarDef.find(a_strVarName);
if (item!=m_VarDef.end()) if (item!=m_VarDef.end())
@ -2112,7 +2112,7 @@ void QmuParserBase::RemoveVar(const QString &a_strVarName)
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearFun() void QmuParserBase::ClearFun() Q_DECL_NOEXCEPT
{ {
m_FunDef.clear(); m_FunDef.clear();
ReInit(); ReInit();
@ -2126,7 +2126,7 @@ void QmuParserBase::ClearFun()
* @post Resets the parser to string parsing mode. * @post Resets the parser to string parsing mode.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::ClearConst() void QmuParserBase::ClearConst() Q_DECL_NOEXCEPT
{ {
m_ConstDef.clear(); m_ConstDef.clear();
m_StrVarDef.clear(); m_StrVarDef.clear();
@ -2139,7 +2139,7 @@ void QmuParserBase::ClearConst()
* @post Resets the parser to string parsing mode. * @post Resets the parser to string parsing mode.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::ClearPostfixOprt() void QmuParserBase::ClearPostfixOprt() Q_DECL_NOEXCEPT
{ {
m_PostOprtDef.clear(); m_PostOprtDef.clear();
ReInit(); ReInit();
@ -2152,7 +2152,7 @@ void QmuParserBase::ClearPostfixOprt()
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearOprt() void QmuParserBase::ClearOprt() Q_DECL_NOEXCEPT
{ {
m_OprtDef.clear(); m_OprtDef.clear();
ReInit(); ReInit();
@ -2165,7 +2165,7 @@ void QmuParserBase::ClearOprt()
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearInfixOprt() void QmuParserBase::ClearInfixOprt() Q_DECL_NOEXCEPT
{ {
m_InfixOprtDef.clear(); m_InfixOprtDef.clear();
ReInit(); ReInit();
@ -2177,7 +2177,7 @@ void QmuParserBase::ClearInfixOprt()
* @post Resets the parser to string parser mode. * @post Resets the parser to string parser mode.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::EnableOptimizer(bool a_bIsOn) void QmuParserBase::EnableOptimizer(bool a_bIsOn) Q_DECL_NOEXCEPT
{ {
m_vRPN.EnableOptimizer(a_bIsOn); m_vRPN.EnableOptimizer(a_bIsOn);
ReInit(); ReInit();
@ -2208,7 +2208,7 @@ void QmuParserBase::EnableDebugDump(bool bDumpCmd, bool bDumpStack)
* manually one by one. It is not possible to disable built in operators selectively. This function will Reinitialize * manually one by one. It is not possible to disable built in operators selectively. This function will Reinitialize
* the parser by calling ReInit(). * the parser by calling ReInit().
*/ */
void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn) void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn) Q_DECL_NOEXCEPT
{ {
m_bBuiltInOp = a_bIsOn; m_bBuiltInOp = a_bIsOn;
ReInit(); ReInit();
@ -2220,7 +2220,7 @@ void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn)
* @return #m_bBuiltInOp; true if built in operators are enabled. * @return #m_bBuiltInOp; true if built in operators are enabled.
* @throw nothrow * @throw nothrow
*/ */
bool QmuParserBase::HasBuiltInOprt() const bool QmuParserBase::HasBuiltInOprt() const Q_DECL_NOEXCEPT
{ {
return m_bBuiltInOp; return m_bBuiltInOp;
} }

View file

@ -64,7 +64,7 @@ public:
QmuParserBase(); QmuParserBase();
QmuParserBase(const QmuParserBase &a_Parser); QmuParserBase(const QmuParserBase &a_Parser);
QmuParserBase& operator=(const QmuParserBase &a_Parser); QmuParserBase& operator=(const QmuParserBase &a_Parser) Q_DECL_NOEXCEPT;
virtual ~QmuParserBase(); virtual ~QmuParserBase();
static void EnableDebugDump(bool bDumpCmd, bool bDumpStack); static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
@ -77,9 +77,9 @@ public:
void SetDecSep(char_type cDecSep); void SetDecSep(char_type cDecSep);
void SetThousandsSep(char_type cThousandsSep = 0); void SetThousandsSep(char_type cThousandsSep = 0);
void ResetLocale(); void ResetLocale();
void EnableOptimizer(bool a_bIsOn=true); void EnableOptimizer(bool a_bIsOn=true) Q_DECL_NOEXCEPT;
void EnableBuiltInOprt(bool a_bIsOn=true); void EnableBuiltInOprt(bool a_bIsOn=true) Q_DECL_NOEXCEPT;
bool HasBuiltInOprt() const; bool HasBuiltInOprt() const Q_DECL_NOEXCEPT;
void AddValIdent(identfun_type a_pCallback); void AddValIdent(identfun_type a_pCallback);
void DefineOprt(const QString &a_strName, fun_type2 a_pFun, unsigned a_iPri=0, void DefineOprt(const QString &a_strName, fun_type2 a_pFun, unsigned a_iPri=0,
EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false); EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false);
@ -90,18 +90,18 @@ public:
void DefineInfixOprt(const QString &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX, void DefineInfixOprt(const QString &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX,
bool a_bAllowOpt=true); bool a_bAllowOpt=true);
// Clear user defined variables, constants or functions // Clear user defined variables, constants or functions
void ClearVar(); void ClearVar() Q_DECL_NOEXCEPT;
void ClearFun(); void ClearFun() Q_DECL_NOEXCEPT;
void ClearConst(); void ClearConst() Q_DECL_NOEXCEPT;
void ClearInfixOprt(); void ClearInfixOprt() Q_DECL_NOEXCEPT;
void ClearPostfixOprt(); void ClearPostfixOprt() Q_DECL_NOEXCEPT;
void ClearOprt(); void ClearOprt() Q_DECL_NOEXCEPT;
void RemoveVar(const QString &a_strVarName); void RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT;
const varmap_type& GetUsedVar() const; const varmap_type& GetUsedVar() const;
const varmap_type& GetVar() const; const varmap_type& GetVar() const;
const valmap_type& GetConst() const; const valmap_type& GetConst() const;
const QString& GetExpr() const; const QString& GetExpr() const;
const funmap_type& GetFunDef() const; const funmap_type& GetFunDef() const Q_DECL_NOEXCEPT;
static QString GetVersion(EParserVersionInfo eInfo = pviFULL); static QString GetVersion(EParserVersionInfo eInfo = pviFULL);
static const QStringList& GetOprtDef(); static const QStringList& GetOprtDef();
void DefineNameChars(const QString &a_szCharset); void DefineNameChars(const QString &a_szCharset);
@ -235,8 +235,8 @@ private:
mutable int m_nFinalResultIdx; mutable int m_nFinalResultIdx;
void Assign(const QmuParserBase &a_Parser); void Assign(const QmuParserBase &a_Parser);
void InitTokenReader(); void InitTokenReader() Q_DECL_NOEXCEPT;
void ReInit() const; void ReInit() const Q_DECL_NOEXCEPT;
void AddCallback(const QString &a_strName, const QmuParserCallback &a_Callback, void AddCallback(const QString &a_strName, const QmuParserCallback &a_Callback,
funmap_type &a_Storage, const QString &a_szCharSet ); funmap_type &a_Storage, const QString &a_szCharSet );
void ApplyRemainingOprt(QStack<token_type> &a_stOpt, QStack<token_type> &a_stVal) const; void ApplyRemainingOprt(QStack<token_type> &a_stOpt, QStack<token_type> &a_stVal) const;

View file

@ -104,7 +104,7 @@ void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode)
* @param a_pVar Pointer to be added. * @param a_pVar Pointer to be added.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserByteCode::AddVar(qreal *a_pVar) void QmuParserByteCode::AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT
{ {
++m_iStackPos; ++m_iStackPos;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos)); m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos));
@ -132,7 +132,7 @@ void QmuParserByteCode::AddVar(qreal *a_pVar)
* @param a_pVal Value to be added. * @param a_pVal Value to be added.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserByteCode::AddVal(qreal a_fVal) void QmuParserByteCode::AddVal(qreal a_fVal) Q_DECL_NOEXCEPT
{ {
++m_iStackPos; ++m_iStackPos;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos)); m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos));
@ -623,7 +623,7 @@ void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
* A string function entry consists of the stack position of the return value, followed by a cmSTRFUNC code, the * A string function entry consists of the stack position of the return value, followed by a cmSTRFUNC code, the
* function pointer and an index into the string buffer maintained by the parser. * function pointer and an index into the string buffer maintained by the parser.
*/ */
void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx) void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx) Q_DECL_NOEXCEPT
{ {
m_iStackPos = m_iStackPos - a_iArgc + 1; m_iStackPos = m_iStackPos - a_iArgc + 1;
@ -643,7 +643,7 @@ void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iI
* *
* @throw nothrow * @throw nothrow
*/ */
void QmuParserByteCode::Finalize() void QmuParserByteCode::Finalize() Q_DECL_NOEXCEPT
{ {
SToken tok; SToken tok;
tok.Cmd = cmEND; tok.Cmd = cmEND;
@ -812,7 +812,7 @@ std::size_t QmuParserByteCode::GetSize() const
* The name of this function is a violation of my own coding guidelines but this way it's more in line with the STL * The name of this function is a violation of my own coding guidelines but this way it's more in line with the STL
* functions thus more intuitive. * functions thus more intuitive.
*/ */
void QmuParserByteCode::clear() void QmuParserByteCode::clear() Q_DECL_NOEXCEPT
{ {
m_vRPN.clear(); m_vRPN.clear();
m_iStackPos = 0; m_iStackPos = 0;

View file

@ -85,17 +85,17 @@ public:
QmuParserByteCode(const QmuParserByteCode &a_ByteCode); QmuParserByteCode(const QmuParserByteCode &a_ByteCode);
QmuParserByteCode& operator=(const QmuParserByteCode &a_ByteCode); QmuParserByteCode& operator=(const QmuParserByteCode &a_ByteCode);
void Assign(const QmuParserByteCode &a_ByteCode); void Assign(const QmuParserByteCode &a_ByteCode);
void AddVar(qreal *a_pVar); void AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT;
void AddVal(qreal a_fVal); void AddVal(qreal a_fVal) Q_DECL_NOEXCEPT;
void AddOp(ECmdCode a_Oprt); void AddOp(ECmdCode a_Oprt);
void AddIfElse(ECmdCode a_Oprt); void AddIfElse(ECmdCode a_Oprt);
void AddAssignOp(qreal *a_pVar); void AddAssignOp(qreal *a_pVar);
void AddFun(generic_fun_type a_pFun, int a_iArgc); void AddFun(generic_fun_type a_pFun, int a_iArgc);
void AddBulkFun(generic_fun_type a_pFun, int a_iArgc); void AddBulkFun(generic_fun_type a_pFun, int a_iArgc);
void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx); void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx) Q_DECL_NOEXCEPT;
void EnableOptimizer(bool bStat); void EnableOptimizer(bool bStat);
void Finalize(); void Finalize() Q_DECL_NOEXCEPT;
void clear(); void clear() Q_DECL_NOEXCEPT;
std::size_t GetMaxStackSize() const; std::size_t GetMaxStackSize() const;
std::size_t GetSize() const; std::size_t GetSize() const;
const SToken* GetBase() const; const SToken* GetBase() const;

View file

@ -338,7 +338,7 @@ QmuParserCallback* QmuParserCallback::Clone() const
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
bool QmuParserCallback::IsOptimizable() const bool QmuParserCallback::IsOptimizable() const Q_DECL_NOEXCEPT
{ {
return m_bAllowOpti; return m_bAllowOpti;
} }
@ -352,7 +352,7 @@ bool QmuParserCallback::IsOptimizable() const
* @throw nothrow * @throw nothrow
* @return #pFun * @return #pFun
*/ */
void* QmuParserCallback::GetAddr() const void* QmuParserCallback::GetAddr() const Q_DECL_NOEXCEPT
{ {
return m_pFun; return m_pFun;
} }
@ -379,7 +379,7 @@ ETypeCode QmuParserCallback::GetType() const
* *
* Only valid if the callback token is an operator token (binary or infix). * Only valid if the callback token is an operator token (binary or infix).
*/ */
int QmuParserCallback::GetPri() const int QmuParserCallback::GetPri() const Q_DECL_NOEXCEPT
{ {
return m_iPri; return m_iPri;
} }
@ -391,7 +391,7 @@ int QmuParserCallback::GetPri() const
* *
* Only valid if the callback token is a binary operator token. * Only valid if the callback token is a binary operator token.
*/ */
EOprtAssociativity QmuParserCallback::GetAssociativity() const EOprtAssociativity QmuParserCallback::GetAssociativity() const Q_DECL_NOEXCEPT
{ {
return m_eOprtAsct; return m_eOprtAsct;
} }

View file

@ -79,12 +79,12 @@ public:
QmuParserCallback(const QmuParserCallback &a_Fun); QmuParserCallback(const QmuParserCallback &a_Fun);
QmuParserCallback* Clone() const; QmuParserCallback* Clone() const;
bool IsOptimizable() const; bool IsOptimizable() const Q_DECL_NOEXCEPT;
void* GetAddr() const; void* GetAddr() const Q_DECL_NOEXCEPT;
ECmdCode GetCode() const; ECmdCode GetCode() const;
ETypeCode GetType() const; ETypeCode GetType() const;
int GetPri() const; int GetPri() const Q_DECL_NOEXCEPT;
EOprtAssociativity GetAssociativity() const; EOprtAssociativity GetAssociativity() const Q_DECL_NOEXCEPT;
int GetArgc() const; int GetArgc() const;
private: private:
void *m_pFun; ///< Pointer to the callback function, casted to void void *m_pFun; ///< Pointer to the callback function, casted to void

View file

@ -270,7 +270,7 @@ public:
* @return #m_iType * @return #m_iType
* @throw nothrow * @throw nothrow
*/ */
ECmdCode GetCode() const ECmdCode GetCode() const Q_DECL_NOEXCEPT
{ {
if ( m_pCallback.get() ) if ( m_pCallback.get() )
{ {
@ -510,7 +510,7 @@ public:
* @throw nothrow * @throw nothrow
* @sa m_strTok * @sa m_strTok
*/ */
const TString& GetAsString() const const TString& GetAsString() const Q_DECL_NOEXCEPT
{ {
return m_strTok; return m_strTok;
} }

View file

@ -63,7 +63,7 @@ QmuParserTokenReader::QmuParserTokenReader ( const QmuParserTokenReader &a_Reade
* @param a_Reader Object to copy to this token reader. * @param a_Reader Object to copy to this token reader.
* @throw nothrow * @throw nothrow
*/ */
QmuParserTokenReader& QmuParserTokenReader::operator= ( const QmuParserTokenReader &a_Reader ) QmuParserTokenReader& QmuParserTokenReader::operator= ( const QmuParserTokenReader &a_Reader ) Q_DECL_NOEXCEPT
{ {
if ( &a_Reader != this ) if ( &a_Reader != this )
{ {
@ -80,7 +80,7 @@ QmuParserTokenReader& QmuParserTokenReader::operator= ( const QmuParserTokenRead
* @param a_Reader Object from which the state should be copied. * @param a_Reader Object from which the state should be copied.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserTokenReader::Assign ( const QmuParserTokenReader &a_Reader ) void QmuParserTokenReader::Assign ( const QmuParserTokenReader &a_Reader ) Q_DECL_NOEXCEPT
{ {
m_pParser = a_Reader.m_pParser; m_pParser = a_Reader.m_pParser;
m_strFormula = a_Reader.m_strFormula; m_strFormula = a_Reader.m_strFormula;
@ -135,7 +135,7 @@ QmuParserTokenReader::QmuParserTokenReader ( QmuParserBase *a_pParent )
* @return A new QParserTokenReader object. * @return A new QParserTokenReader object.
* @throw nothrow * @throw nothrow
*/ */
QmuParserTokenReader* QmuParserTokenReader::Clone ( QmuParserBase *a_pParent ) const QmuParserTokenReader* QmuParserTokenReader::Clone ( QmuParserBase *a_pParent ) const Q_DECL_NOEXCEPT
{ {
std::unique_ptr<QmuParserTokenReader> ptr ( new QmuParserTokenReader ( *this ) ); std::unique_ptr<QmuParserTokenReader> ptr ( new QmuParserTokenReader ( *this ) );
ptr->SetParent ( a_pParent ); ptr->SetParent ( a_pParent );
@ -175,7 +175,7 @@ void QmuParserTokenReader::SetVarCreator ( facfun_type a_pFactory, void *pUserDa
* @return #m_iPos * @return #m_iPos
* @throw nothrow * @throw nothrow
*/ */
int QmuParserTokenReader::GetPos() const int QmuParserTokenReader::GetPos() const Q_DECL_NOEXCEPT
{ {
return m_iPos; return m_iPos;
} }
@ -187,7 +187,7 @@ int QmuParserTokenReader::GetPos() const
* @return #m_strFormula * @return #m_strFormula
* @throw nothrow * @throw nothrow
*/ */
const QString& QmuParserTokenReader::GetExpr() const const QString& QmuParserTokenReader::GetExpr() const Q_DECL_NOEXCEPT
{ {
return m_strFormula; return m_strFormula;
} }
@ -237,7 +237,7 @@ void QmuParserTokenReader::IgnoreUndefVar ( bool bIgnore )
* @throw nothrow * @throw nothrow
* @sa ESynCodes * @sa ESynCodes
*/ */
void QmuParserTokenReader::ReInit() void QmuParserTokenReader::ReInit() Q_DECL_NOEXCEPT
{ {
m_iPos = 0; m_iPos = 0;
m_iSynFlags = sfSTART_OF_LINE; m_iSynFlags = sfSTART_OF_LINE;
@ -362,7 +362,7 @@ void QmuParserTokenReader::SetParent ( QmuParserBase *a_pParent )
* @return The Position of the first character not listed in a_szCharSet. * @return The Position of the first character not listed in a_szCharSet.
* @throw nothrow * @throw nothrow
*/ */
int QmuParserTokenReader::ExtractToken ( const QString &a_szCharSet, QString &a_sTok, int a_iPos ) const int QmuParserTokenReader::ExtractToken ( const QString &a_szCharSet, QString &a_sTok, int a_iPos ) const Q_DECL_NOEXCEPT
{ {
#if defined(_UNICODE) #if defined(_UNICODE)
const std::wstring m_strFormulaStd = m_strFormula.toStdWString(); const std::wstring m_strFormulaStd = m_strFormula.toStdWString();
@ -599,7 +599,7 @@ bool QmuParserTokenReader::IsArgSep ( token_type &a_Tok )
* @throw nothrow * @throw nothrow
* @sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsString, IsInfixOpTok, IsPostOpTok * @sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsString, IsInfixOpTok, IsPostOpTok
*/ */
bool QmuParserTokenReader::IsEOF ( token_type &a_Tok ) bool QmuParserTokenReader::IsEOF ( token_type &a_Tok ) Q_DECL_NOEXCEPT
{ {
#if defined(_UNICODE) #if defined(_UNICODE)
const char_type* szFormula = m_strFormula.toStdWString().c_str(); const char_type* szFormula = m_strFormula.toStdWString().c_str();
@ -996,7 +996,7 @@ bool QmuParserTokenReader::IsStrVarTok ( token_type &a_Tok )
* @return true if a variable token has been found. * @return true if a variable token has been found.
* @throw nothrow * @throw nothrow
*/ */
bool QmuParserTokenReader::IsUndefVarTok ( token_type &a_Tok ) bool QmuParserTokenReader::IsUndefVarTok ( token_type &a_Tok ) Q_DECL_NOEXCEPT
{ {
QString strTok; QString strTok;
int iEnd ( ExtractToken ( m_pParser->ValidNameChars(), strTok, m_iPos ) ); int iEnd ( ExtractToken ( m_pParser->ValidNameChars(), strTok, m_iPos ) );
@ -1051,7 +1051,7 @@ bool QmuParserTokenReader::IsUndefVarTok ( token_type &a_Tok )
* @sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsEOF, IsInfixOpTok, IsPostOpTok * @sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsEOF, IsInfixOpTok, IsPostOpTok
* @throw nothrow * @throw nothrow
*/ */
bool QmuParserTokenReader::IsString ( token_type &a_Tok ) bool QmuParserTokenReader::IsString ( token_type &a_Tok ) Q_DECL_NOEXCEPT
{ {
if ( m_strFormula[m_iPos] != '"' ) if ( m_strFormula[m_iPos] != '"' )
{ {

View file

@ -57,20 +57,20 @@ namespace qmu
public: public:
QmuParserTokenReader(QmuParserBase *a_pParent); QmuParserTokenReader(QmuParserBase *a_pParent);
QmuParserTokenReader* Clone(QmuParserBase *a_pParent) const; QmuParserTokenReader* Clone(QmuParserBase *a_pParent) const Q_DECL_NOEXCEPT;
void AddValIdent(identfun_type a_pCallback); void AddValIdent(identfun_type a_pCallback);
void SetVarCreator(facfun_type a_pFactory, void *pUserData); void SetVarCreator(facfun_type a_pFactory, void *pUserData);
void SetFormula(const QString &a_strFormula); void SetFormula(const QString &a_strFormula);
void SetArgSep(char_type cArgSep); void SetArgSep(char_type cArgSep);
int GetPos() const; int GetPos() const Q_DECL_NOEXCEPT;
const QString &GetExpr() const; const QString &GetExpr() const Q_DECL_NOEXCEPT;
varmap_type& GetUsedVar(); varmap_type& GetUsedVar();
QChar GetArgSep() const; QChar GetArgSep() const;
void IgnoreUndefVar(bool bIgnore); void IgnoreUndefVar(bool bIgnore);
void ReInit(); void ReInit() Q_DECL_NOEXCEPT;
token_type ReadNextToken(); token_type ReadNextToken();
private: private:
@ -102,16 +102,16 @@ namespace qmu
}; };
QmuParserTokenReader(const QmuParserTokenReader &a_Reader); QmuParserTokenReader(const QmuParserTokenReader &a_Reader);
QmuParserTokenReader& operator=(const QmuParserTokenReader &a_Reader); QmuParserTokenReader& operator=(const QmuParserTokenReader &a_Reader) Q_DECL_NOEXCEPT;
void Assign(const QmuParserTokenReader &a_Reader); void Assign(const QmuParserTokenReader &a_Reader) Q_DECL_NOEXCEPT;
void SetParent(QmuParserBase *a_pParent); void SetParent(QmuParserBase *a_pParent);
int ExtractToken(const QString &a_szCharSet, QString &a_strTok, int a_iPos) const; int ExtractToken(const QString &a_szCharSet, QString &a_strTok, int a_iPos) const Q_DECL_NOEXCEPT;
int ExtractOperatorToken(QString &a_sTok, int a_iPos) const; int ExtractOperatorToken(QString &a_sTok, int a_iPos) const;
bool IsBuiltIn(token_type &a_Tok); bool IsBuiltIn(token_type &a_Tok);
bool IsArgSep(token_type &a_Tok); bool IsArgSep(token_type &a_Tok);
bool IsEOF(token_type &a_Tok); bool IsEOF(token_type &a_Tok) Q_DECL_NOEXCEPT;
bool IsInfixOpTok(token_type &a_Tok); bool IsInfixOpTok(token_type &a_Tok);
bool IsFunTok(token_type &a_Tok); bool IsFunTok(token_type &a_Tok);
bool IsPostOpTok(token_type &a_Tok); bool IsPostOpTok(token_type &a_Tok);
@ -119,8 +119,8 @@ namespace qmu
bool IsValTok(token_type &a_Tok); bool IsValTok(token_type &a_Tok);
bool IsVarTok(token_type &a_Tok); bool IsVarTok(token_type &a_Tok);
bool IsStrVarTok(token_type &a_Tok); bool IsStrVarTok(token_type &a_Tok);
bool IsUndefVarTok(token_type &a_Tok); bool IsUndefVarTok(token_type &a_Tok) Q_DECL_NOEXCEPT;
bool IsString(token_type &a_Tok); bool IsString(token_type &a_Tok) Q_DECL_NOEXCEPT;
void Error(EErrorCodes a_iErrc, void Error(EErrorCodes a_iErrc,
int a_iPos = -1, int a_iPos = -1,
const QString &a_sTok = QString() ) const; const QString &a_sTok = QString() ) const;