Modified: tuscany/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp?rev=1420007&r1=1420006&r2=1420007&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp (original)
+++ tuscany/sca-cpp/trunk/samples/store-cpp/shopping-cart.cpp Tue Dec 11 06:13:02 2012
@@ -38,7 +38,7 @@ const string cartId("1234");
* Get the shopping cart from the cache. Return an empty
* cart if not found.
*/
-const list<value> getcart(const value& id, const lambda<value(const list<value>&)>&
cache) {
+const list<value> getcart(const value& id, const lvvlambda& cache) {
const value cart = cache(mklist<value>("get", mklist<value>(id)));
cerr << "cart value: " << cart << "\n";
const failable<value> fcart = cart;
@@ -46,14 +46,14 @@ const list<value> getcart(const value& i
cerr << "cart content: " << content(fcart) << "\n";
cerr << "cart reason: " << reason(fcart) << "\n";
if (isNil(cart))
- return value(list<value>());
+ return value(nilListValue);
return (list<value>)cart;
}
/**
* Post a new item to the cart. Create a new cart if necessary.
*/
-const failable<value> post(unused const list<value>& collection, const value&
item, const lambda<value(const list<value>&)>& cache) {
+const failable<value> post(unused const list<value>& collection, const value&
item, const lvvlambda& cache) {
const value id(mkuuid());
const list<value> newItem(mklist<value>("entry", cadr<value>(car<value>(item)),
mklist<value>("id", id), cadddr<value>(car<value>(item))));
const list<value> cart(cons<value>(newItem, getcart(cartId, cache)));
@@ -75,7 +75,7 @@ const value find(const value& id, const
/**
* Return items from the cart.
*/
-const failable<value> get(const list<value>& id, const lambda<value(const
list<value>&)>& cache) {
+const failable<value> get(const list<value>& id, const lvvlambda& cache)
{
if (isNil(id))
return value(mklist<value>(append(mklist<value>("feed", mklist<value>("title",
string("Your Cart")), mklist<value>("id", cartId)), getcart(cartId, cache))));
return find(car(id), getcart(cartId, cache));
@@ -84,10 +84,10 @@ const failable<value> get(const list<val
/**
* Delete items from the cart.
*/
-const failable<value> del(const list<value>& id, unused const lambda<value(const
list<value>&)>& cache) {
+const failable<value> del(const list<value>& id, unused const lvvlambda&
cache) {
if (isNil(id))
return cache(mklist<value>("delete", mklist<value>(cartId)));
- return value(true);
+ return trueValue;
}
/**
@@ -109,7 +109,7 @@ const double sum(const list<value>& item
/**
* Return the total price of the items in the cart.
*/
-const failable<value> total(const lambda<value(const list<value>&)>&
cache) {
+const failable<value> total(const lvvlambda& cache) {
const list<value> cart(getcart(cartId, cache));
return value(sum(cart));
}
Modified: tuscany/sca-cpp/trunk/samples/store-java/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-java/Makefile.am?rev=1420007&r1=1420006&r2=1420007&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-java/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/samples/store-java/Makefile.am Tue Dec 11 06:13:02 2012
@@ -22,11 +22,16 @@ if WANT_JAVA
dist_sample_SCRIPTS = start stop ssl-start
sampledir=$(prefix)/samples/store-java
-AM_JAVACFLAGS = -cp ${top_builddir}/modules/java/libmod-tuscany-java-${PACKAGE_VERSION}.jar:${JAVAROOT}
dist_sample_JAVA = store/*.java
+
+SUFFIXES = .class
+AM_JAVACFLAGS = -cp ${top_builddir}/modules/java/libmod-tuscany-java-${PACKAGE_VERSION}.jar:${JAVAROOT}
+.java.class:
+ ${JAVAC} ${AM_JAVACFLAGS} store/*.java
+
CLEANFILES = *.stamp store/*.class
-nobase_dist_sample_DATA = store.composite htdocs/*.html store/*.*
+nobase_dist_sample_DATA = store.composite htdocs/*.html store/*.java store/CurrencyConverterImpl.class
store/CurrencyConverter.class store/FruitsCatalogImpl.class store/ShoppingCartImpl.class
dist_noinst_SCRIPTS = server-test
TESTS = server-test
Modified: tuscany/sca-cpp/trunk/samples/store-scheme/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-scheme/Makefile.am?rev=1420007&r1=1420006&r2=1420007&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-scheme/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/samples/store-scheme/Makefile.am Tue Dec 11 06:13:02 2012
@@ -25,6 +25,6 @@ EXTRA_DIST = script-test.scm
dist_noinst_SCRIPTS = server-test
noinst_PROGRAMS = script-test
script_test_SOURCES = script-test.cpp
-script_test_LDFLAGS = -lxml2 -lmozjs
+script_test_LDFLAGS = -lxml2 -ljansson
TESTS = script-test server-test
Modified: tuscany/sca-cpp/trunk/samples/store-scheme/script-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-scheme/script-test.cpp?rev=1420007&r1=1420006&r2=1420007&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-scheme/script-test.cpp (original)
+++ tuscany/sca-cpp/trunk/samples/store-scheme/script-test.cpp Tue Dec 11 06:13:02 2012
@@ -28,16 +28,16 @@
#include "stream.hpp"
#include "string.hpp"
#include "list.hpp"
-#include "xml.hpp"
-#include "../../modules/scheme/driver.hpp"
+#include "../../modules/xml/xml.hpp"
#include "../../modules/json/json.hpp"
+#include "../../modules/scheme/driver.hpp"
namespace store {
using namespace tuscany;
-bool testScript() {
- gc_scoped_pool pool;
+const bool testScript() {
+ const gc_scoped_pool pool;
ifstream is("script-test.scm");
ostringstream os;
@@ -49,9 +49,9 @@ bool testScript() {
return true;
}
-bool testEval() {
+const bool testEval() {
{
- gc_scoped_pool pool;
+ const gc_scoped_pool pool;
ifstream is("script-test.scm");
ostringstream os;
scheme::setupDisplay(os);
@@ -65,7 +65,7 @@ bool testEval() {
}
{
- gc_scoped_pool pool;
+ const gc_scoped_pool pool;
ifstream is("script-test.scm");
ostringstream os;
scheme::setupDisplay(os);
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/Makefile.am (from r1419987, tuscany/sca-cpp/trunk/components/kvdb/Makefile.am)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/Makefile.am?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/Makefile.am&p1=tuscany/sca-cpp/trunk/components/kvdb/Makefile.am&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/client-test.cpp (from r1419987,
tuscany/sca-cpp/trunk/components/kvdb/client-test.cpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/client-test.cpp?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/client-test.cpp&p1=tuscany/sca-cpp/trunk/components/kvdb/client-test.cpp&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb-test (from r1419987, tuscany/sca-cpp/trunk/components/kvdb/kvdb-test)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb-test?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb-test&p1=tuscany/sca-cpp/trunk/components/kvdb/kvdb-test&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.componentType (from r1419987,
tuscany/sca-cpp/trunk/components/kvdb/kvdb.componentType)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.componentType?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.componentType&p1=tuscany/sca-cpp/trunk/components/kvdb/kvdb.componentType&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.composite (from r1419987,
tuscany/sca-cpp/trunk/components/kvdb/kvdb.composite)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.composite?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.composite&p1=tuscany/sca-cpp/trunk/components/kvdb/kvdb.composite&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.cpp (from r1419987, tuscany/sca-cpp/trunk/components/kvdb/kvdb.cpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.cpp?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/kvdb.cpp&p1=tuscany/sca-cpp/trunk/components/kvdb/kvdb.cpp&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb (from r1419987, tuscany/sca-cpp/trunk/components/kvdb/leveldb)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb&p1=tuscany/sca-cpp/trunk/components/kvdb/leveldb&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb-test.cpp (from r1419987,
tuscany/sca-cpp/trunk/components/kvdb/leveldb-test.cpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb-test.cpp?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb-test.cpp&p1=tuscany/sca-cpp/trunk/components/kvdb/leveldb-test.cpp&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb.hpp (from r1419987, tuscany/sca-cpp/trunk/components/kvdb/leveldb.hpp)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb.hpp?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/leveldb.hpp&p1=tuscany/sca-cpp/trunk/components/kvdb/leveldb.hpp&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/unmaintained/components/kvdb/server-test (from r1419987, tuscany/sca-cpp/trunk/components/kvdb/server-test)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/unmaintained/components/kvdb/server-test?p2=tuscany/sca-cpp/trunk/unmaintained/components/kvdb/server-test&p1=tuscany/sca-cpp/trunk/components/kvdb/server-test&r1=1419987&r2=1420007&rev=1420007&view=diff
==============================================================================
(empty)
|