X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbooleanevaluator.h;h=c3f61f2b543e943878465e3aea564ff87d7cf759;hb=44c71b05ff282b3ce5a2d71c0f14eed97bfefea6;hp=7c2af6f1a0f9cbeb8d99d546c89d50172520e5a4;hpb=c5169863e1ec3060d3bdc3b8c0317710ce8c3ee3;p=builder.git diff --git a/source/booleanevaluator.h b/source/booleanevaluator.h index 7c2af6f..c3f61f2 100644 --- a/source/booleanevaluator.h +++ b/source/booleanevaluator.h @@ -8,10 +8,11 @@ class BooleanEvaluator { public: - using Function = std::function; + using ValueFunction = std::function; + using CompareFunction = std::function; private: - Function func; + CompareFunction func; std::string ops; std::vector var_stack; std::vector value_stack; @@ -19,7 +20,8 @@ private: bool last_was_op; public: - BooleanEvaluator(const Function &, bool = true); + BooleanEvaluator(const ValueFunction &); + BooleanEvaluator(const CompareFunction &); bool evaluate(const std::string &); private: