1 #ifndef ERROR_HANDLER_MA_BOOLEAN_COND_H
2 #define ERROR_HANDLER_MA_BOOLEAN_COND_H
4 #include "ErrorHandler/MessageAnalyzer/ma_types.h"
5 #include "ErrorHandler/MessageAnalyzer/ma_condition.h"
6 #include "ErrorHandler/MessageAnalyzer/ma_function.h"
8 #include <boost/shared_ptr.hpp>
9 #include <boost/any.hpp>
14 namespace errorhandler {
17 class ma_boolean_expr;
35 , cond_arg ( cond_arg_t(cond_idx_t(NULL, 0), NONE) )
48 bool evaluate( ma_domain & value
50 , ma_domain
const & domain )
const;
56 void insert_cond( cond_idx_t ci )
57 { cond_arg.first = ci; cond_arg.second = NONE; }
59 void insert_ext_func( cond_idx_t ci
61 , std::vector<boost::any>
const & func_args
62 , std::string
const &
function );
64 void insert_compare_op_bool ( compare_op_t cop,
bool v )
65 { op = cop; rhv_b = v; cond_type = FUNCTION_BOOL; }
67 void insert_compare_op_double( compare_op_t cop,
double v )
68 { op = cop; rhv_d = v; cond_type = FUNCTION_DOUBLE; }
70 void insert_compare_op_string( compare_op_t cop, std::string
const & v )
71 { op = cop; rhv_s = v; cond_type = FUNCTION_STRING; }
77 cond_type_t cond_type;
93 boost::shared_ptr<ma_function> ext_func;
98 boost::shared_ptr<ma_boolean_expr> expr;
102 typedef std::list<ma_boolean_cond> boolean_conds_t;