diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-11 00:01:04 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-11 00:01:04 +0000 |
commit | a64c1ec2a50f62d63872eac6bc740966602e87bd (patch) | |
tree | e4eab2e74b82eb51c4a5d9b3a132506895974f93 /cpp/sca/kernel/value.hpp | |
parent | 89246640ca239097800fed58e7abc5bc050e3f56 (diff) |
Some code cleanup, removed unused functions, changed == empty-list to isNil to avoid unnecessary construction of empty lists, replaced some casts by generic declarations. Added simple maybe, failable and state monad classes to help return optional objects or failures and carry state around. Added utility functions to zip and unzip list.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823981 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/sca/kernel/value.hpp')
-rw-r--r-- | cpp/sca/kernel/value.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/sca/kernel/value.hpp b/cpp/sca/kernel/value.hpp index cf356b8a24..ae4c69aab9 100644 --- a/cpp/sca/kernel/value.hpp +++ b/cpp/sca/kernel/value.hpp @@ -128,43 +128,43 @@ public: } value(const std::string& str) : - type(value::String), data(vdata(unit(str))) { + type(value::String), data(vdata(result(str))) { countValues++; countVValues++; } value(const char* str) : - type(value::Symbol), data(vdata(unit(std::string(str)))) { + type(value::Symbol), data(vdata(result(std::string(str)))) { countValues++; countVValues++; } value(const list<value>& lst) : - type(value::List), data(vdata(unit(lst))) { + type(value::List), data(vdata(result(lst))) { countValues++; countVValues++; } value(const double num) : - type(value::Number), data(vdata(unit(num))) { + type(value::Number), data(vdata(result(num))) { countValues++; countVValues++; } value(const int num) : - type(value::Number), data(vdata(unit((double)num))) { + type(value::Number), data(vdata(result((double)num))) { countValues++; countVValues++; } value(const bool boo) : - type(value::Boolean), data(vdata(unit(boo))) { + type(value::Boolean), data(vdata(result(boo))) { countValues++; countVValues++; } value(const char chr) : - type(value::Character), data(vdata(unit(chr))) { + type(value::Character), data(vdata(result(chr))) { countValues++; countVValues++; } |