summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/server/mod-eval.cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-01-17 09:02:29 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-01-17 09:02:29 +0000
commitb00fe2747627bc95ac8d1d548e0621930a1775a2 (patch)
tree64561e332127d72763850196be5f0538cac9b8bb /sca-cpp/trunk/modules/server/mod-eval.cpp
parent9cb610814d58da1ba2617f78e36e9635f2e7d508 (diff)
Cleaned up test composite files. Adjusted C++ implementation elements to match the spec. Minor refactoring/terminology cleanup in HTTPD modules, renamed readImplementation to evalImplementation and evalImplementation to applyImplementation.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@900071 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/server/mod-eval.cpp')
-rw-r--r--sca-cpp/trunk/modules/server/mod-eval.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/sca-cpp/trunk/modules/server/mod-eval.cpp b/sca-cpp/trunk/modules/server/mod-eval.cpp
index 936c68d70f..54ca171ec4 100644
--- a/sca-cpp/trunk/modules/server/mod-eval.cpp
+++ b/sca-cpp/trunk/modules/server/mod-eval.cpp
@@ -37,14 +37,15 @@ namespace server {
namespace modeval {
/**
- * Return a configured component implementation.
- * For now only Scheme and C++ implementations are supported.
+ * Evaluate a Scheme or C++ component implementation and convert it to an
+ * applicable lambda function.
*/
-const failable<lambda<value(const list<value>&)> > readImplementation(const string& itype, const string& path, const list<value>& px) {
+const failable<lambda<value(const list<value>&)> > evalImplementation(const string& path, const value& impl, const list<value>& px) {
+ const string itype(elementName(impl));
if (contains(itype, ".scheme"))
- return modscheme::readImplementation(path, px);
+ return modscheme::evalImplementation(path, impl, px);
if (contains(itype, ".cpp"))
- return modcpp::readImplementation(path, px);
+ return modcpp::evalImplementation(path, impl, px);
return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype);
}