From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../CalculatorBackImpl_CalculatorService_Proxy.cpp | 81 ++++++++++++++++++++++ .../CalculatorBackImpl_CalculatorService_Proxy.h | 35 ++++++++++ ...alculatorBackImpl_CalculatorService_Wrapper.cpp | 78 +++++++++++++++++++++ .../CalculatorBackImpl_CalculatorService_Wrapper.h | 36 ++++++++++ ...lculatorForwardImpl_CalculatorService_Proxy.cpp | 81 ++++++++++++++++++++++ ...CalculatorForwardImpl_CalculatorService_Proxy.h | 35 ++++++++++ ...ulatorForwardImpl_CalculatorService_Wrapper.cpp | 78 +++++++++++++++++++++ ...lculatorForwardImpl_CalculatorService_Wrapper.h | 36 ++++++++++ 8 files changed, 460 insertions(+) create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp create mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h (limited to 'tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest') diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp new file mode 100644 index 0000000000..ded3e76eb0 --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp @@ -0,0 +1,81 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "CalculatorBackImpl_CalculatorService_Proxy.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + CalculatorBackImpl_CalculatorService_Proxy* CalculatorBackImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target) + { + return new CalculatorBackImpl_CalculatorService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CalculatorBackImpl_CalculatorService_Proxy_Destructor(void* proxy) + { + delete (CalculatorBackImpl_CalculatorService_Proxy*)proxy; + } +} + +CalculatorBackImpl_CalculatorService_Proxy::CalculatorBackImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CalculatorBackImpl_CalculatorService_Proxy::~CalculatorBackImpl_CalculatorService_Proxy() +{ + if (target) + delete target; +} + +long CalculatorBackImpl_CalculatorService_Proxy::subtractBack( long arg0, long arg1) +{ + Operation operation("subtractBack", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + long ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +long CalculatorBackImpl_CalculatorService_Proxy::addBack( long arg0, long arg1) +{ + Operation operation("addBack", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + long ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h new file mode 100644 index 0000000000..2a2474aad1 --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h @@ -0,0 +1,35 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CalculatorBackImpl_CalculatorService_Proxy_h +#define CalculatorBackImpl_CalculatorService_Proxy_h + +#include "otherSubFolder/CalculatorBack.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CalculatorBackImpl_CalculatorService_Proxy : public CalculatorBack +{ +public: + CalculatorBackImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CalculatorBackImpl_CalculatorService_Proxy(); + virtual long subtractBack( long a, long b); + virtual long addBack( long a, long b); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CalculatorBackImpl_CalculatorService_Proxy_h + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp new file mode 100644 index 0000000000..b9a7f0a69a --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp @@ -0,0 +1,78 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "CalculatorBackImpl_CalculatorService_Wrapper.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + CalculatorBackImpl_CalculatorService_Wrapper* CalculatorBackImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CalculatorBackImpl_CalculatorService_Wrapper(target); + } +} + +CalculatorBackImpl_CalculatorService_Wrapper::CalculatorBackImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CalculatorBackImpl*)getImplementation(); +} + +CalculatorBackImpl_CalculatorService_Wrapper::~CalculatorBackImpl_CalculatorService_Wrapper() +{ + releaseImplementation(); +} + +void* CalculatorBackImpl_CalculatorService_Wrapper::newImplementation() +{ + return new CalculatorBackImpl; +} + +void CalculatorBackImpl_CalculatorService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CalculatorBackImpl_CalculatorService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "subtractBack") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + *(long*)operation.getReturnValue() = impl->subtractBack(p0, p1); + return; + } + if (operationName == "addBack") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + *(long*)operation.getReturnValue() = impl->addBack(p0, p1); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h new file mode 100644 index 0000000000..da132b9e34 --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h @@ -0,0 +1,36 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CalculatorBackImpl_CalculatorService_Wrapper_h +#define CalculatorBackImpl_CalculatorService_Wrapper_h + +#include "subFolder/CalculatorBackImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CalculatorBackImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CalculatorBackImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CalculatorBackImpl_CalculatorService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CalculatorBackImpl* impl; +}; + +#endif // CalculatorBackImpl_CalculatorService_Wrapper_h + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp new file mode 100644 index 0000000000..77c6b7e29b --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp @@ -0,0 +1,81 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "CalculatorForwardImpl_CalculatorService_Proxy.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + CalculatorForwardImpl_CalculatorService_Proxy* CalculatorForwardImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target) + { + return new CalculatorForwardImpl_CalculatorService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CalculatorForwardImpl_CalculatorService_Proxy_Destructor(void* proxy) + { + delete (CalculatorForwardImpl_CalculatorService_Proxy*)proxy; + } +} + +CalculatorForwardImpl_CalculatorService_Proxy::CalculatorForwardImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CalculatorForwardImpl_CalculatorService_Proxy::~CalculatorForwardImpl_CalculatorService_Proxy() +{ + if (target) + delete target; +} + +long CalculatorForwardImpl_CalculatorService_Proxy::subtractForward( long arg0, long arg1) +{ + Operation operation("subtractForward", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + long ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +long CalculatorForwardImpl_CalculatorService_Proxy::addForward( long arg0, long arg1) +{ + Operation operation("addForward", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + long ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h new file mode 100644 index 0000000000..8714cddb83 --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h @@ -0,0 +1,35 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CalculatorForwardImpl_CalculatorService_Proxy_h +#define CalculatorForwardImpl_CalculatorService_Proxy_h + +#include "otherSubFolder/CalculatorForward.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CalculatorForwardImpl_CalculatorService_Proxy : public CalculatorForward +{ +public: + CalculatorForwardImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CalculatorForwardImpl_CalculatorService_Proxy(); + virtual long subtractForward( long a, long b); + virtual long addForward( long a, long b); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CalculatorForwardImpl_CalculatorService_Proxy_h + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp new file mode 100644 index 0000000000..019cf00ca8 --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp @@ -0,0 +1,78 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "CalculatorForwardImpl_CalculatorService_Wrapper.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + CalculatorForwardImpl_CalculatorService_Wrapper* CalculatorForwardImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CalculatorForwardImpl_CalculatorService_Wrapper(target); + } +} + +CalculatorForwardImpl_CalculatorService_Wrapper::CalculatorForwardImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CalculatorForwardImpl*)getImplementation(); +} + +CalculatorForwardImpl_CalculatorService_Wrapper::~CalculatorForwardImpl_CalculatorService_Wrapper() +{ + releaseImplementation(); +} + +void* CalculatorForwardImpl_CalculatorService_Wrapper::newImplementation() +{ + return new CalculatorForwardImpl; +} + +void CalculatorForwardImpl_CalculatorService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CalculatorForwardImpl_CalculatorService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "subtractForward") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + *(long*)operation.getReturnValue() = impl->subtractForward(p0, p1); + return; + } + if (operationName == "addForward") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + *(long*)operation.getReturnValue() = impl->addForward(p0, p1); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h new file mode 100644 index 0000000000..3ab3fd9a7d --- /dev/null +++ b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h @@ -0,0 +1,36 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CalculatorForwardImpl_CalculatorService_Wrapper_h +#define CalculatorForwardImpl_CalculatorService_Wrapper_h + +#include "subFolder/CalculatorForwardImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CalculatorForwardImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CalculatorForwardImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CalculatorForwardImpl_CalculatorService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CalculatorForwardImpl* impl; +}; + +#endif // CalculatorForwardImpl_CalculatorService_Wrapper_h + -- cgit v1.2.3