From a2a2cb76e9582af32b6803be7fa99af074dc04ae Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 25 Oct 2010 03:18:16 +0000 Subject: Support python method invocation style on references, ref.func(...) in addition to ref('func', ...). Minor cleanup of the various samples, renamed gettotal to total and getcatalog to items, for consistency with the python sample. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1026939 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp') diff --git a/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp b/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp index 3a1df44490..738ab2f4c7 100644 --- a/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp +++ b/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp @@ -109,7 +109,7 @@ const double sum(const list& items) { /** * Return the total price of the items in the cart. */ -const failable gettotal(const lambda&)> cache) { +const failable total(const lambda&)> cache) { const list cart(getcart(cartId, cache)); return value(sum(cart)); } @@ -127,8 +127,8 @@ const tuscany::value apply(const tuscany::list& params) { return tuscany::store::get(cadr(params), caddr(params)); if (func == "delete") return tuscany::store::del(cadr(params), caddr(params)); - if (func == "gettotal") - return tuscany::store::gettotal(cadr(params)); + if (func == "total") + return tuscany::store::total(cadr(params)); return tuscany::mkfailure(); } -- cgit v1.2.3