diff --git a/src/Eval.cpp b/src/Eval.cpp index 51ea39298..fa054649c 100644 --- a/src/Eval.cpp +++ b/src/Eval.cpp @@ -224,6 +224,16 @@ void Eval::getOperators (std::vector & all) all.push_back (operators[i].op); } +//////////////////////////////////////////////////////////////////////////////// +// Static. +void Eval::getBinaryOperators (std::vector & all) +{ + all.clear (); + for (unsigned int i = 0; i < NUM_OPERATORS; ++i) + if (operators[i].type == 'b') + all.push_back (operators[i].op); +} + //////////////////////////////////////////////////////////////////////////////// void Eval::evaluatePostfixStack ( const std::vector >& tokens, diff --git a/src/Eval.h b/src/Eval.h index 3541a91b8..a7535891b 100644 --- a/src/Eval.h +++ b/src/Eval.h @@ -50,6 +50,7 @@ public: void debug (bool); static void getOperators (std::vector &); + static void getBinaryOperators (std::vector &); private: void evaluatePostfixStack (const std::vector >&, Variant&) const;