summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/scdl/scdl.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-12-26 03:25:34 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-12-26 03:25:34 +0000
commit0999fd565d6d629df87d3db38a84d4701b494b3b (patch)
tree287bb29d011a1c1616ca434ce6c51ab57b63dda2 /sca-cpp/trunk/modules/scdl/scdl.hpp
parentbd4c1d47aeaf1d4bca76d5713e705b0869d3f2f7 (diff)
Simplified server configuration, HTTPD modules now use deployment composite to route service requests, minor fixes to store integration test.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@893939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/scdl/scdl.hpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/sca-cpp/trunk/modules/scdl/scdl.hpp b/sca-cpp/trunk/modules/scdl/scdl.hpp
index 4d84610fb0..9d4bf38b50 100644
--- a/sca-cpp/trunk/modules/scdl/scdl.hpp
+++ b/sca-cpp/trunk/modules/scdl/scdl.hpp
@@ -53,6 +53,16 @@ const value name(const value& l) {
}
/**
+ * Convert a list of elements to a name -> element assoc list.
+ */
+const list<value> nameToElementAssoc(const list<value>& l) {
+ if (isNil(l))
+ return l;
+ const value e(car(l));
+ return cons<value>(mklist<value>(name(e), e), nameToElementAssoc(cdr(l)));
+}
+
+/**
* Returns the scdl declaration with the given name.
*/
struct filterName {
@@ -107,17 +117,20 @@ const list<value> references(const value& l) {
}
/**
- * Returns a list of properties in a component.
+ * Returns the target of a reference.
*/
-const list<value> properties(const value& l) {
- return elementChildren("property", l);
+const value target(const value& l) {
+ return attributeValue("target", l);
}
/**
- * Returns the target of a reference.
+ * Convert a list of references to a reference name -> target assoc list.
*/
-const value target(const value& l) {
- return attributeValue("target", l);
+const list<value> referenceToTargetAssoc(const list<value>& r) {
+ if (isNil(r))
+ return r;
+ const value ref(car(r));
+ return cons<value>(mklist<value>(scdl::name(ref), scdl::target(ref)), referenceToTargetAssoc(cdr(r)));
}
/**
@@ -132,6 +145,13 @@ const list<value> bindings(const value& l) {
}
/**
+ * Returns a list of properties in a component.
+ */
+const list<value> properties(const value& l) {
+ return elementChildren("property", l);
+}
+
+/**
* Returns the type of an implementation.
*/
const value implementationType(const value& l) {