From 9c1af3a6e77d7a0e1dc66aa9166d0ead6a56d963 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 4 Aug 2013 10:00:30 +0800 Subject: modified the API of Env: add_binding --- model.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'model.h') diff --git a/model.h b/model.h index 13a5af2..ee0e8ae 100644 --- a/model.h +++ b/model.h @@ -253,19 +253,19 @@ class Environment { public: /** Create an runtime environment * @param prev_envt the outer environment - * */ + */ Environment(Environment *prev_envt); - /** Add a binding entry which binds sym_obj to eval_obj */ - void add_binding(SymObj *sym_obj, EvalObj *eval_obj); + /** Add a binding entry which binds sym_obj to eval_obj + * @param def true to force the assignment + * @return when def is set to false, this return value is true iff. the + * assignment carried out successfully + */ + bool add_binding(SymObj *sym_obj, EvalObj *eval_obj, bool def = true); /** Extract the corresponding EvalObj if obj is a SymObj, or just * simply return obj as it is * @param obj the object as request * */ EvalObj *get_obj(EvalObj *obj); - /** Check if the desired obj exists - * @return true for yes - */ - bool has_obj(SymObj *); }; /** @class Continuation -- cgit v1.2.3