From 05f893bbe7e8a839c26cc951fafb166c25d0a6ee Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 11 Aug 2013 09:58:22 +0800 Subject: `apply` and `or` support --- model.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'model.cpp') diff --git a/model.cpp b/model.cpp index 7434690..cf38b13 100644 --- a/model.cpp +++ b/model.cpp @@ -258,6 +258,26 @@ StrObj *StrObj::from_string(string repr) { return NULL; } +bool StrObj::lt(StrObj *r) { + return str < r->str; +} + +bool StrObj::gt(StrObj *r) { + return str > r->str; +} + +bool StrObj::le(StrObj *r) { + return str <= r->str; +} + +bool StrObj::ge(StrObj *r) { + return str >= r->str; +} + +bool StrObj::eq(StrObj *r) { + return str == r->str; +} + BuiltinProcObj::BuiltinProcObj(BuiltinProc f, string _name) : OptObj(), handler(f), name(_name) {} -- cgit v1.2.3