Mark methods nothrow - Q_DECL_NOEXCEPT.

--HG--
branch : develop
This commit is contained in:
dismine 2014-05-07 11:33:56 +03:00
parent b906b0dc68
commit 1c96269f90
9 changed files with 139 additions and 139 deletions

View File

@ -74,7 +74,7 @@ namespace qmu
static qreal Sign(qreal);
// Prefix operators
// !!! Unary Minus is a MUST if you want to use negative signs !!!
static qreal UnaryMinus(qreal v);
static qreal UnaryMinus(qreal v) Q_DECL_NOEXCEPT;
// Functions with variable number of arguments
static qreal Sum(const qreal*, int); // sum
static qreal Avg(const qreal*, int); // mean value
@ -88,7 +88,7 @@ namespace qmu
* @param v The value to negate
* @return -v
*/
inline qreal QmuParser::UnaryMinus(qreal v)
inline qreal QmuParser::UnaryMinus(qreal v) Q_DECL_NOEXCEPT
{
return -v;
}

View File

@ -65,7 +65,7 @@ public:
qreal Eval() const;
qreal* Eval(int &nStackSize) const;
void Eval(qreal *results, int nBulkSize) const;
int GetNumResults() const;
int GetNumResults() const Q_DECL_NOEXCEPT;
void SetExpr(const QString &a_sExpr);
void SetVarFactory(facfun_type a_pFactory, void *pUserData = nullptr);
void SetDecSep(char_type cDecSep);
@ -92,15 +92,15 @@ public:
void ClearOprt() Q_DECL_NOEXCEPT;
void RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT;
const varmap_type& GetUsedVar() const;
const varmap_type& GetVar() const;
const valmap_type& GetConst() const;
const varmap_type& GetVar() const Q_DECL_NOEXCEPT;
const valmap_type& GetConst() const Q_DECL_NOEXCEPT;
const QString& GetExpr() const;
const funmap_type& GetFunDef() const Q_DECL_NOEXCEPT;
static QString GetVersion(EParserVersionInfo eInfo = pviFULL);
static const QStringList& GetOprtDef();
void DefineNameChars(const QString &a_szCharset);
void DefineOprtChars(const QString &a_szCharset);
void DefineInfixOprtChars(const QString &a_szCharset);
static const QStringList& GetOprtDef() Q_DECL_NOEXCEPT;
void DefineNameChars(const QString &a_szCharset) Q_DECL_NOEXCEPT;
void DefineOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT;
void DefineInfixOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT;
const QString& ValidNameChars() const;
const QString& ValidOprtChars() const;
const QString& ValidInfixOprtChars() const;
@ -234,7 +234,7 @@ private:
mutable int m_nFinalResultIdx;
void Assign(const QmuParserBase &a_Parser);
void InitTokenReader() Q_DECL_NOEXCEPT;
void InitTokenReader();
void ReInit() const Q_DECL_NOEXCEPT;
void AddCallback(const QString &a_strName, const QmuParserCallback &a_Callback,
funmap_type &a_Storage, const QString &a_szCharSet );
@ -262,9 +262,8 @@ private:
* Create new token reader object and submit pointers to function, operator, constant and variable definitions.
*
* @post m_pTokenReader.get()!=0
* @throw nothrow
*/
inline void QmuParserBase::InitTokenReader() Q_DECL_NOEXCEPT
inline void QmuParserBase::InitTokenReader()
{
m_pTokenReader.reset(new token_reader_type(this));
}
@ -298,7 +297,7 @@ inline void QmuParserBase::SetVarFactory(facfun_type a_pFactory, void *pUserData
* @brief Get the default symbols used for the built in operators.
* @sa c_DefaultOprt
*/
inline const QStringList &QmuParserBase::GetOprtDef()
inline const QStringList &QmuParserBase::GetOprtDef() Q_DECL_NOEXCEPT
{
return c_DefaultOprt;
}
@ -307,7 +306,7 @@ inline const QStringList &QmuParserBase::GetOprtDef()
/**
* @brief Define the set of valid characters to be used in names of functions, variables, constants.
*/
inline void QmuParserBase::DefineNameChars(const QString &a_szCharset)
inline void QmuParserBase::DefineNameChars(const QString &a_szCharset) Q_DECL_NOEXCEPT
{
m_sNameChars = a_szCharset;
}
@ -316,7 +315,7 @@ inline void QmuParserBase::DefineNameChars(const QString &a_szCharset)
/**
* @brief Define the set of valid characters to be used in names of binary operators and postfix operators.
*/
inline void QmuParserBase::DefineOprtChars(const QString &a_szCharset)
inline void QmuParserBase::DefineOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT
{
m_sOprtChars = a_szCharset;
}
@ -325,7 +324,7 @@ inline void QmuParserBase::DefineOprtChars(const QString &a_szCharset)
/**
* @brief Define the set of valid characters to be used in names of infix operators.
*/
inline void QmuParserBase::DefineInfixOprtChars(const QString &a_szCharset)
inline void QmuParserBase::DefineInfixOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT
{
m_sInfixOprtChars = a_szCharset;
}
@ -334,7 +333,7 @@ inline void QmuParserBase::DefineInfixOprtChars(const QString &a_szCharset)
/**
* @brief Return a map containing the used variables only.
*/
inline const varmap_type &QmuParserBase::GetVar() const
inline const varmap_type &QmuParserBase::GetVar() const Q_DECL_NOEXCEPT
{
return m_VarDef;
}
@ -343,7 +342,7 @@ inline const varmap_type &QmuParserBase::GetVar() const
/**
* @brief Return a map containing all parser constants.
*/
inline const valmap_type &QmuParserBase::GetConst() const
inline const valmap_type &QmuParserBase::GetConst() const Q_DECL_NOEXCEPT
{
return m_ConstDef;
}
@ -392,7 +391,7 @@ inline bool QmuParserBase::HasBuiltInOprt() const Q_DECL_NOEXCEPT
* value. This function returns the number of available results.
*/
// cppcheck-suppress unusedFunction
inline int QmuParserBase::GetNumResults() const
inline int QmuParserBase::GetNumResults() const Q_DECL_NOEXCEPT
{
return m_nFinalResultIdx;
}

View File

@ -40,7 +40,7 @@ namespace qmu
* @brief Bytecode default constructor.
*/
// cppcheck-suppress uninitMemberVar
QmuParserByteCode::QmuParserByteCode()
QmuParserByteCode::QmuParserByteCode() Q_DECL_NOEXCEPT
:m_iStackPos(0), m_iMaxStackSize(0), m_vRPN(), m_bEnableOptimizer(true)
{
m_vRPN.reserve(50);
@ -53,7 +53,7 @@ QmuParserByteCode::QmuParserByteCode()
* Implemented in Terms of Assign(const QParserByteCode &a_ByteCode)
*/
// cppcheck-suppress uninitMemberVar
QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode)
QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT
:m_iStackPos(a_ByteCode.m_iStackPos), m_iMaxStackSize(a_ByteCode.m_iMaxStackSize), m_vRPN(a_ByteCode.m_vRPN),
m_bEnableOptimizer(true)
{
@ -67,7 +67,7 @@ QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode)
* Implemented in Terms of Assign(const QParserByteCode &a_ByteCode)
*/
// cppcheck-suppress operatorEqVarError
QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode)
QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT
{
Assign(a_ByteCode);
return *this;
@ -79,7 +79,7 @@ QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteC
*
* @throw nowthrow
*/
void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode)
void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT
{
if (this==&a_ByteCode)
{
@ -472,7 +472,7 @@ void QmuParserByteCode::AddOp(ECmdCode a_Oprt)
}
//---------------------------------------------------------------------------------------------------------------------
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt)
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt) Q_DECL_NOEXCEPT
{
SToken tok;
tok.Cmd = a_Oprt;
@ -491,7 +491,7 @@ void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt)
*
* @sa ParserToken::ECmdCode
*/
void QmuParserByteCode::AddAssignOp(qreal *a_pVar)
void QmuParserByteCode::AddAssignOp(qreal *a_pVar) Q_DECL_NOEXCEPT
{
--m_iStackPos;
@ -508,7 +508,7 @@ void QmuParserByteCode::AddAssignOp(qreal *a_pVar)
* @param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
* @param a_pFun Pointer to function callback.
*/
void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT
{
if (a_iArgc>=0)
{
@ -535,7 +535,7 @@ void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
* @param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
* @param a_pFun Pointer to function callback.
*/
void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT
{
m_iStackPos = m_iStackPos - a_iArgc + 1;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos));

View File

@ -81,23 +81,23 @@ struct SToken
class QmuParserByteCode
{
public:
QmuParserByteCode();
QmuParserByteCode(const QmuParserByteCode &a_ByteCode);
QmuParserByteCode& operator=(const QmuParserByteCode &a_ByteCode);
void Assign(const QmuParserByteCode &a_ByteCode);
QmuParserByteCode() Q_DECL_NOEXCEPT;
QmuParserByteCode(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT;
QmuParserByteCode& operator=(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT;
void Assign(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT;
void AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT;
void AddVal(qreal a_fVal) Q_DECL_NOEXCEPT;
void AddOp(ECmdCode a_Oprt);
void AddIfElse(ECmdCode a_Oprt);
void AddAssignOp(qreal *a_pVar);
void AddFun(generic_fun_type a_pFun, int a_iArgc);
void AddBulkFun(generic_fun_type a_pFun, int a_iArgc);
void AddIfElse(ECmdCode a_Oprt) Q_DECL_NOEXCEPT;
void AddAssignOp(qreal *a_pVar) Q_DECL_NOEXCEPT;
void AddFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT;
void AddBulkFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT;
void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx) Q_DECL_NOEXCEPT;
void EnableOptimizer(bool bStat);
void EnableOptimizer(bool bStat) Q_DECL_NOEXCEPT;
void Finalize() Q_DECL_NOEXCEPT;
void clear() Q_DECL_NOEXCEPT;
std::size_t GetMaxStackSize() const;
std::size_t GetSize() const;
std::size_t GetMaxStackSize() const Q_DECL_NOEXCEPT;
std::size_t GetSize() const Q_DECL_NOEXCEPT;
const SToken* GetBase() const;
void AsciiDump();
private:
@ -122,13 +122,13 @@ private:
};
//---------------------------------------------------------------------------------------------------------------------
inline void QmuParserByteCode::EnableOptimizer(bool bStat)
inline void QmuParserByteCode::EnableOptimizer(bool bStat) Q_DECL_NOEXCEPT
{
m_bEnableOptimizer = bStat;
}
//---------------------------------------------------------------------------------------------------------------------
inline std::size_t QmuParserByteCode::GetMaxStackSize() const
inline std::size_t QmuParserByteCode::GetMaxStackSize() const Q_DECL_NOEXCEPT
{
return m_iMaxStackSize+1;
}
@ -138,7 +138,7 @@ inline std::size_t QmuParserByteCode::GetMaxStackSize() const
* @brief Returns the number of entries in the bytecode.
*/
// cppcheck-suppress unusedFunction
inline std::size_t QmuParserByteCode::GetSize() const
inline std::size_t QmuParserByteCode::GetSize() const Q_DECL_NOEXCEPT
{
return m_vRPN.size();
}

View File

@ -34,7 +34,7 @@ namespace qmu
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type0 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type0 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -44,11 +44,11 @@ QmuParserCallback::QmuParserCallback ( fun_type0 a_pFun, bool a_bAllowOpti )
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode )
Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 1 ), m_iPri ( a_iPrec ), m_eOprtAsct ( oaNONE ),
m_iCode ( a_iCode ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Constructor for constructing funcstion callbacks taking two arguments.
@ -57,7 +57,7 @@ QmuParserCallback::QmuParserCallback ( fun_type1 a_pFun, bool a_bAllowOpti, int
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -75,7 +75,7 @@ QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti )
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec,
EOprtAssociativity a_eOprtAsct )
EOprtAssociativity a_eOprtAsct ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( a_iPrec ), m_eOprtAsct ( a_eOprtAsct ),
m_iCode ( cmOPRT_BIN ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -84,7 +84,7 @@ QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti, int
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type3 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type3 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 3 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -94,7 +94,7 @@ QmuParserCallback::QmuParserCallback ( fun_type3 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type4 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type4 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 4 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -104,7 +104,7 @@ QmuParserCallback::QmuParserCallback ( fun_type4 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type5 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type5 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 5 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -113,7 +113,7 @@ QmuParserCallback::QmuParserCallback ( fun_type5 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type6 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type6 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 6 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -122,7 +122,7 @@ QmuParserCallback::QmuParserCallback ( fun_type6 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type7 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type7 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 7 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -131,7 +131,7 @@ QmuParserCallback::QmuParserCallback ( fun_type7 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type8 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type8 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 8 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -140,7 +140,7 @@ QmuParserCallback::QmuParserCallback ( fun_type8 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type9 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type9 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 9 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -149,7 +149,7 @@ QmuParserCallback::QmuParserCallback ( fun_type9 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type10 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( fun_type10 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 10 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -158,7 +158,7 @@ QmuParserCallback::QmuParserCallback ( fun_type10 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type0 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type0 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -167,7 +167,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type0 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type1 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type1 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 1 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -180,7 +180,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type1 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type2 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type2 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -189,7 +189,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type2 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type3 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type3 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 3 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -198,7 +198,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type3 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type4 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type4 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 4 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -207,7 +207,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type4 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type5 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type5 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 5 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -216,7 +216,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type5 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type6 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type6 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 6 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -225,7 +225,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type6 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type7 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type7 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 7 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -234,7 +234,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type7 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type8 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type8 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 8 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -243,7 +243,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type8 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type9 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type9 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 9 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -252,7 +252,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type9 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type10 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( bulkfun_type10 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 10 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -261,7 +261,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type10 a_pFun, bool a_bAllowOpti
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( multfun_type a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( multfun_type a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( -1 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -270,7 +270,7 @@ QmuParserCallback::QmuParserCallback ( multfun_type a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( strfun_type1 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( strfun_type1 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_STR ), m_iType ( tpSTR ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -279,7 +279,7 @@ QmuParserCallback::QmuParserCallback ( strfun_type1 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( strfun_type2 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( strfun_type2 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 1 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_STR ), m_iType ( tpSTR ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -288,7 +288,7 @@ QmuParserCallback::QmuParserCallback ( strfun_type2 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( strfun_type3 a_pFun, bool a_bAllowOpti )
QmuParserCallback::QmuParserCallback ( strfun_type3 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_STR ), m_iType ( tpSTR ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -298,7 +298,7 @@ QmuParserCallback::QmuParserCallback ( strfun_type3 a_pFun, bool a_bAllowOpti )
* @brief Default constructor.
* @throw nothrow
*/
QmuParserCallback::QmuParserCallback()
QmuParserCallback::QmuParserCallback() Q_DECL_NOEXCEPT
: m_pFun ( 0 ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ), m_iCode ( cmUNKNOWN ), m_iType ( tpVOID ),
m_bAllowOpti ( 0 )
{}
@ -308,7 +308,7 @@ QmuParserCallback::QmuParserCallback()
* @brief Copy constructor.
* @throw nothrow
*/
QmuParserCallback::QmuParserCallback ( const QmuParserCallback &ref )
QmuParserCallback::QmuParserCallback ( const QmuParserCallback &ref ) Q_DECL_NOEXCEPT
: m_pFun ( ref.m_pFun ), m_iArgc ( ref.m_iArgc ), m_iPri ( ref.m_iPri ), m_eOprtAsct ( ref.m_eOprtAsct ),
m_iCode ( ref.m_iCode ), m_iType ( ref.m_iType ), m_bAllowOpti ( ref.m_bAllowOpti )
{

View File

@ -46,46 +46,47 @@ namespace qmu
class QmuParserCallback
{
public:
QmuParserCallback(fun_type0 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);
QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity);
QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type3 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type4 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type5 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type6 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type7 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type8 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type9 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type10 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type0 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity)
Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type3 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type4 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type5 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type6 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type7 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type8 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type9 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(fun_type10 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
QmuParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
QmuParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
QmuParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
QmuParserCallback();
QmuParserCallback(const QmuParserCallback &a_Fun);
QmuParserCallback(multfun_type a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT;
QmuParserCallback() Q_DECL_NOEXCEPT;
QmuParserCallback(const QmuParserCallback &a_Fun) Q_DECL_NOEXCEPT;
QmuParserCallback* Clone() const;
bool IsOptimizable() const Q_DECL_NOEXCEPT;
void* GetAddr() const Q_DECL_NOEXCEPT;
ECmdCode GetCode() const;
ETypeCode GetType() const;
ECmdCode GetCode() const Q_DECL_NOEXCEPT;
ETypeCode GetType() const Q_DECL_NOEXCEPT;
int GetPri() const Q_DECL_NOEXCEPT;
EOprtAssociativity GetAssociativity() const Q_DECL_NOEXCEPT;
int GetArgc() const;
int GetArgc() const Q_DECL_NOEXCEPT;
private:
void *m_pFun; ///< Pointer to the callback function, casted to void
@ -149,13 +150,13 @@ inline void* QmuParserCallback::GetAddr() const Q_DECL_NOEXCEPT
/**
* @brief Return the callback code.
*/
inline ECmdCode QmuParserCallback::GetCode() const
inline ECmdCode QmuParserCallback::GetCode() const Q_DECL_NOEXCEPT
{
return m_iCode;
}
//---------------------------------------------------------------------------------------------------------------------
inline ETypeCode QmuParserCallback::GetType() const
inline ETypeCode QmuParserCallback::GetType() const Q_DECL_NOEXCEPT
{
return m_iType;
}
@ -188,7 +189,7 @@ inline EOprtAssociativity QmuParserCallback::GetAssociativity() const Q_DECL_NOE
/**
* @brief Returns the number of function Arguments.
*/
inline int QmuParserCallback::GetArgc() const
inline int QmuParserCallback::GetArgc() const Q_DECL_NOEXCEPT
{
return m_iArgc;
}

View File

@ -100,7 +100,7 @@ public:
QmuParserErrorMsg();
~QmuParserErrorMsg();
static const QmuParserErrorMsg& Instance();
static const QmuParserErrorMsg& Instance() Q_DECL_NOEXCEPT;
QString operator[] ( unsigned a_iIdx ) const;
private:
@ -111,7 +111,7 @@ private:
//---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
inline const QmuParserErrorMsg& QmuParserErrorMsg::Instance()
inline const QmuParserErrorMsg& QmuParserErrorMsg::Instance() Q_DECL_NOEXCEPT
{
return m_Instance;
}
@ -141,12 +141,12 @@ public:
QmuParserError& operator= ( const QmuParserError &a_Obj );
virtual ~QmuParserError() noexcept (true){}
void SetFormula ( const QString &a_strFormula );
const QString& GetExpr() const;
const QString& GetMsg() const;
int GetPos() const;
const QString& GetToken() const;
EErrorCodes GetCode() const;
void SetFormula ( const QString &a_strFormula ) Q_DECL_NOEXCEPT;
const QString& GetExpr() const Q_DECL_NOEXCEPT;
const QString& GetMsg() const Q_DECL_NOEXCEPT;
int GetPos() const Q_DECL_NOEXCEPT;
const QString& GetToken() const Q_DECL_NOEXCEPT;
EErrorCodes GetCode() const Q_DECL_NOEXCEPT;
virtual void raise() const;
virtual QmuParserError *clone() const;
private:
@ -186,7 +186,7 @@ inline QmuParserError *QmuParserError::clone() const
/**
* @brief Set the expression related to this error.
*/
inline void QmuParserError::SetFormula ( const QString &a_strFormula )
inline void QmuParserError::SetFormula ( const QString &a_strFormula ) Q_DECL_NOEXCEPT
{
m_sExpr = a_strFormula;
}
@ -195,7 +195,7 @@ inline void QmuParserError::SetFormula ( const QString &a_strFormula )
/**
* @brief gets the expression related tp this error.
*/
inline const QString& QmuParserError::GetExpr() const
inline const QString& QmuParserError::GetExpr() const Q_DECL_NOEXCEPT
{
return m_sExpr;
}
@ -204,7 +204,7 @@ inline const QString& QmuParserError::GetExpr() const
/**
* @brief Returns the message string for this error.
*/
inline const QString& QmuParserError::GetMsg() const
inline const QString& QmuParserError::GetMsg() const Q_DECL_NOEXCEPT
{
return m_sMsg;
}
@ -215,7 +215,7 @@ inline const QString& QmuParserError::GetMsg() const
*
* If the error is not related to a distinct position this will return -1
*/
inline int QmuParserError::GetPos() const
inline int QmuParserError::GetPos() const Q_DECL_NOEXCEPT
{
return m_iPos;
}
@ -224,7 +224,7 @@ inline int QmuParserError::GetPos() const
/**
* @brief Return string related with this token (if available).
*/
inline const QString& QmuParserError::GetToken() const
inline const QString& QmuParserError::GetToken() const Q_DECL_NOEXCEPT
{
return m_sTok;
}
@ -233,7 +233,7 @@ inline const QString& QmuParserError::GetToken() const
/**
* @brief Return the error code.
*/
inline EErrorCodes QmuParserError::GetCode() const
inline EErrorCodes QmuParserError::GetCode() const Q_DECL_NOEXCEPT
{
return m_iErrc;
}

View File

@ -43,7 +43,7 @@ class QmuParserBase;
* @sa Assign
* @throw nothrow
*/
QmuParserTokenReader::QmuParserTokenReader ( const QmuParserTokenReader &a_Reader )
QmuParserTokenReader::QmuParserTokenReader ( const QmuParserTokenReader &a_Reader ) Q_DECL_NOEXCEPT
:m_pParser( a_Reader.m_pParser ), m_strFormula( a_Reader.m_strFormula ), m_iPos( a_Reader.m_iPos ),
m_iSynFlags( a_Reader.m_iSynFlags ), m_bIgnoreUndefVar( a_Reader.m_bIgnoreUndefVar ),
m_pFunDef( a_Reader.m_pFunDef ), m_pPostOprtDef( a_Reader.m_pPostOprtDef ),
@ -116,7 +116,7 @@ void QmuParserTokenReader::Assign ( const QmuParserTokenReader &a_Reader ) Q_DEC
* @post #m_pParser==a_pParser
* @param a_pParent Parent parser object of the token reader.
*/
QmuParserTokenReader::QmuParserTokenReader ( QmuParserBase *a_pParent )
QmuParserTokenReader::QmuParserTokenReader ( QmuParserBase *a_pParent ) Q_DECL_NOEXCEPT
: m_pParser ( a_pParent ), m_strFormula(), m_iPos ( 0 ), m_iSynFlags ( 0 ), m_bIgnoreUndefVar ( false ),
m_pFunDef ( nullptr ), m_pPostOprtDef ( nullptr ), m_pInfixOprtDef ( nullptr ), m_pOprtDef ( nullptr ),
m_pConstDef ( nullptr ), m_pStrVarDef ( nullptr ), m_pVarDef ( nullptr ), m_pFactory ( nullptr ),
@ -144,7 +144,7 @@ QmuParserTokenReader* QmuParserTokenReader::Clone ( QmuParserBase *a_pParent ) c
}
//---------------------------------------------------------------------------------------------------------------------
QmuParserTokenReader::token_type& QmuParserTokenReader::SaveBeforeReturn ( const token_type &tok )
QmuParserTokenReader::token_type& QmuParserTokenReader::SaveBeforeReturn ( const token_type &tok ) Q_DECL_NOEXCEPT
{
m_lastTok = tok;
return m_lastTok;
@ -163,7 +163,7 @@ void QmuParserTokenReader::AddValIdent ( identfun_type a_pCallback )
}
//---------------------------------------------------------------------------------------------------------------------
void QmuParserTokenReader::SetVarCreator ( facfun_type a_pFactory, void *pUserData )
void QmuParserTokenReader::SetVarCreator ( facfun_type a_pFactory, void *pUserData ) Q_DECL_NOEXCEPT
{
m_pFactory = a_pFactory;
m_pFactoryData = pUserData;
@ -176,7 +176,7 @@ void QmuParserTokenReader::SetVarCreator ( facfun_type a_pFactory, void *pUserDa
* Sets the formula position index to zero and set Syntax flags to default for initial formula parsing.
* @pre [assert] triggered if a_szFormula==0
*/
void QmuParserTokenReader::SetFormula ( const QString &a_strFormula )
void QmuParserTokenReader::SetFormula ( const QString &a_strFormula ) Q_DECL_NOEXCEPT
{
m_strFormula = a_strFormula;
ReInit();
@ -289,7 +289,7 @@ QmuParserTokenReader::token_type QmuParserTokenReader::ReadNextToken()
}
//---------------------------------------------------------------------------------------------------------------------
void QmuParserTokenReader::SetParent ( QmuParserBase *a_pParent )
void QmuParserTokenReader::SetParent ( QmuParserBase *a_pParent ) Q_DECL_NOEXCEPT
{
m_pParser = a_pParent;
m_pFunDef = &a_pParent->m_FunDef;

View File

@ -45,18 +45,18 @@ class QmuParserTokenReader
private:
typedef QmuParserToken<qreal, QString> token_type;
public:
QmuParserTokenReader(QmuParserBase *a_pParent);
QmuParserTokenReader(QmuParserBase *a_pParent) Q_DECL_NOEXCEPT;
QmuParserTokenReader* Clone(QmuParserBase *a_pParent) const Q_DECL_NOEXCEPT;
void AddValIdent(identfun_type a_pCallback);
void SetVarCreator(facfun_type a_pFactory, void *pUserData);
void SetFormula(const QString &a_strFormula);
void SetArgSep(char_type cArgSep);
void SetVarCreator(facfun_type a_pFactory, void *pUserData) Q_DECL_NOEXCEPT;
void SetFormula(const QString &a_strFormula) Q_DECL_NOEXCEPT;
void SetArgSep(char_type cArgSep) Q_DECL_NOEXCEPT;
int GetPos() const Q_DECL_NOEXCEPT;
const QString& GetExpr() const Q_DECL_NOEXCEPT;
varmap_type& GetUsedVar();
QChar GetArgSep() const;
void IgnoreUndefVar(bool bIgnore);
varmap_type& GetUsedVar() Q_DECL_NOEXCEPT;
QChar GetArgSep() const Q_DECL_NOEXCEPT;
void IgnoreUndefVar(bool bIgnore) Q_DECL_NOEXCEPT;
void ReInit() Q_DECL_NOEXCEPT;
token_type ReadNextToken();
private:
@ -88,11 +88,11 @@ private:
noANY = ~0 ///< All of he above flags set
};
QmuParserTokenReader(const QmuParserTokenReader &a_Reader);
QmuParserTokenReader(const QmuParserTokenReader &a_Reader) Q_DECL_NOEXCEPT;
QmuParserTokenReader& operator=(const QmuParserTokenReader &a_Reader) Q_DECL_NOEXCEPT;
void Assign(const QmuParserTokenReader &a_Reader) Q_DECL_NOEXCEPT;
void SetParent(QmuParserBase *a_pParent);
void SetParent(QmuParserBase *a_pParent) Q_DECL_NOEXCEPT;
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;
@ -110,7 +110,7 @@ private:
bool IsString(token_type &a_Tok);
void Q_NORETURN Error(EErrorCodes a_iErrc, int a_iPos = -1, const QString &a_sTok = QString() ) const;
token_type& SaveBeforeReturn(const token_type &tok);
token_type& SaveBeforeReturn(const token_type &tok) Q_DECL_NOEXCEPT;
QmuParserBase *m_pParser;
QString m_strFormula;
@ -163,7 +163,7 @@ inline const QString& QmuParserTokenReader::GetExpr() const Q_DECL_NOEXCEPT
/**
* @brief Return a map containing the used variables only.
*/
inline varmap_type& QmuParserTokenReader::GetUsedVar()
inline varmap_type& QmuParserTokenReader::GetUsedVar() Q_DECL_NOEXCEPT
{
return m_UsedVar;
}
@ -177,19 +177,19 @@ inline varmap_type& QmuParserTokenReader::GetUsedVar()
* Those function should return a complete list of variables including
* those the are not defined by the time of it's call.
*/
inline void QmuParserTokenReader::IgnoreUndefVar ( bool bIgnore )
inline void QmuParserTokenReader::IgnoreUndefVar ( bool bIgnore ) Q_DECL_NOEXCEPT
{
m_bIgnoreUndefVar = bIgnore;
}
//---------------------------------------------------------------------------------------------------------------------
inline void QmuParserTokenReader::SetArgSep ( char_type cArgSep )
inline void QmuParserTokenReader::SetArgSep ( char_type cArgSep ) Q_DECL_NOEXCEPT
{
m_cArgSep = cArgSep;
}
//---------------------------------------------------------------------------------------------------------------------
inline QChar QmuParserTokenReader::GetArgSep() const
inline QChar QmuParserTokenReader::GetArgSep() const Q_DECL_NOEXCEPT
{
return m_cArgSep;
}