summaryrefslogtreecommitdiff
path: root/src/op.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-08 23:40:42 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-09 02:06:06 -0500
commitc3535d06c89732a0ba4c13274702b0f48198ae79 (patch)
tree5a8153d4c627cc3c7eff687b50a59a1cc9c3d04a /src/op.h
parent523d4243e8c347cb7cbd1f68b03a5098ceb73b70 (diff)
downloadfork-ledger-c3535d06c89732a0ba4c13274702b0f48198ae79.tar.gz
fork-ledger-c3535d06c89732a0ba4c13274702b0f48198ae79.tar.bz2
fork-ledger-c3535d06c89732a0ba4c13274702b0f48198ae79.zip
Redesigned the expr_t, predicate_t, query_t classes
Diffstat (limited to 'src/op.h')
-rw-r--r--src/op.h17
1 files changed, 9 insertions, 8 deletions
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<ptr_op_t, // used by all binary operators
value_t, // used by constant VALUE
string, // used by constant IDENT
- function_t // used by terminal FUNCTION
+ expr_t::func_t // used by terminal FUNCTION
> 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<function_t>(data);
+ return boost::get<expr_t::func_t>(data);
}
- const function_t& as_function() const {
+ const expr_t::func_t& as_function() const {
return const_cast<op_t *>(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<ptr_op_t, value_t, string, function_t> temp_data;
+ variant<ptr_op_t, value_t, string, expr_t::func_t> 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;