From c3535d06c89732a0ba4c13274702b0f48198ae79 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Nov 2009 23:40:42 -0500 Subject: Redesigned the expr_t, predicate_t, query_t classes --- src/op.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/op.h') diff --git a/src/op.h b/src/op.h index 60c80557..48d167b7 100644 --- a/src/op.h +++ b/src/op.h @@ -61,7 +61,7 @@ private: variant data; public: @@ -171,14 +171,14 @@ public: bool is_function() const { return kind == FUNCTION; } - function_t& as_function_lval() { + expr_t::func_t& as_function_lval() { assert(kind == FUNCTION); - return boost::get(data); + return boost::get(data); } - const function_t& as_function() const { + const expr_t::func_t& as_function() const { return const_cast(this)->as_function_lval(); } - void set_function(const function_t& val) { + void set_function(const expr_t::func_t& val) { data = val; } @@ -280,7 +280,7 @@ public: void dump(std::ostream& out, const int depth) const; static ptr_op_t wrap_value(const value_t& val); - static ptr_op_t wrap_functor(const function_t& fobj); + static ptr_op_t wrap_functor(const expr_t::func_t& fobj); #if defined(HAVE_BOOST_SERIALIZATION) private: @@ -303,7 +303,7 @@ private: (! has_right() || ! right()->is_function()))) { ar & data; } else { - variant temp_data; + variant temp_data; ar & temp_data; } } @@ -325,7 +325,8 @@ inline expr_t::ptr_op_t expr_t::op_t::wrap_value(const value_t& val) { return temp; } -inline expr_t::ptr_op_t expr_t::op_t::wrap_functor(const function_t& fobj) { +inline expr_t::ptr_op_t +expr_t::op_t::wrap_functor(const expr_t::func_t& fobj) { ptr_op_t temp(new op_t(op_t::FUNCTION)); temp->set_function(fobj); return temp; -- cgit v1.2.3