From d36c8e323a6f8df998edd185de8972dc5e6f87f0 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Nov 2009 06:37:38 +0000 Subject: Cleaning up SVN structure, moving tag under sca-cpp/tags. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880619 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/tags/cpp-sca-20060405/AUTHORS | 0 sca-cpp/tags/cpp-sca-20060405/COPYING | 203 +++ sca-cpp/tags/cpp-sca-20060405/ChangeLog | 0 sca-cpp/tags/cpp-sca-20060405/Developers Guide.txt | 346 +++++ sca-cpp/tags/cpp-sca-20060405/INSTALL | 13 + sca-cpp/tags/cpp-sca-20060405/LICENSE | 203 +++ sca-cpp/tags/cpp-sca-20060405/Makefile.am | 1 + sca-cpp/tags/cpp-sca-20060405/NEWS | 0 sca-cpp/tags/cpp-sca-20060405/README | 0 sca-cpp/tags/cpp-sca-20060405/autogen.sh | 14 + sca-cpp/tags/cpp-sca-20060405/build.sh | 46 + sca-cpp/tags/cpp-sca-20060405/configure.ac | 57 + .../projects/tuscany_sca/tuscany_sca.dsw | 113 ++ .../projects/tuscany_sca/tuscany_sca.ncb | Bin 0 -> 500736 bytes .../projects/tuscany_sca/tuscany_sca.opt | Bin 0 -> 75264 bytes .../tuscany_sca/tuscany_sca/Build Instructions.txt | 32 + .../tuscany_sca/tuscany_sca/tuscany_sca.dsp | 520 +++++++ .../tuscany_sca_axis_handler.dsp | 121 ++ .../tuscany_sca_axis_wrapper.dsp | 121 ++ .../MyValueServiceModule/CustomerInfo.fragment | 36 + .../CustomerInfoImpl.componentType | 30 + .../MyValueServiceModule/MyValueImpl.componentType | 36 + .../MyValueServiceModule/StockQuoteService.wsdl | 157 ++ .../MyValueServiceModule/Tuscany-model.config | 24 + .../modules/MyValueServiceModule/sca.module | 51 + .../subsystems/SubSystem1/sca.subsystem | 27 + .../tuscany_sca_test/tuscany_sca_test.dsp | 104 ++ .../tuscany_sca_test_CustomerInfo.dsp | 133 ++ .../tuscany_sca_test_MyValue.dsp | 153 ++ sca-cpp/tags/cpp-sca-20060405/readme.txt | 37 + sca-cpp/tags/cpp-sca-20060405/runtime/Makefile.am | 1 + .../runtime/axis_binding/Makefile.am | 1 + .../runtime/axis_binding/handler/Makefile.am | 2 + .../runtime/axis_binding/handler/src/.cdtbuild | 39 + .../runtime/axis_binding/handler/src/.cdtproject | 15 + .../runtime/axis_binding/handler/src/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 9 + .../runtime/axis_binding/handler/src/Makefile.am | 9 + .../axis_binding/handler/src/SCAWSHandler.cpp | 154 ++ .../axis_binding/handler/src/SCAWSHandler.h | 79 + .../runtime/axis_binding/wrapper/Makefile.am | 1 + .../runtime/axis_binding/wrapper/src/.cdtbuild | 43 + .../runtime/axis_binding/wrapper/src/.cdtproject | 15 + .../runtime/axis_binding/wrapper/src/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 9 + .../wrapper/src/AxisServiceException.cpp | 105 ++ .../wrapper/src/AxisServiceException.h | 44 + .../runtime/axis_binding/wrapper/src/Makefile.am | 12 + .../axis_binding/wrapper/src/SCAWSWrapper.cpp | 268 ++++ .../axis_binding/wrapper/src/SCAWSWrapper.h | 110 ++ .../tags/cpp-sca-20060405/runtime/core/Makefile.am | 1 + .../cpp-sca-20060405/runtime/core/src/.cdtbuild | 43 + .../cpp-sca-20060405/runtime/core/src/.cdtproject | 15 + .../cpp-sca-20060405/runtime/core/src/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 9 + .../cpp-sca-20060405/runtime/core/src/Makefile.am | 103 ++ .../runtime/core/src/osoa/sca/ComponentContext.cpp | 132 ++ .../runtime/core/src/osoa/sca/ComponentContext.h | 105 ++ .../core/src/osoa/sca/ComponentContextImpl.cpp | 270 ++++ .../core/src/osoa/sca/ComponentContextImpl.h | 120 ++ .../runtime/core/src/osoa/sca/ModuleContext.cpp | 93 ++ .../runtime/core/src/osoa/sca/ModuleContext.h | 80 + .../core/src/osoa/sca/ModuleContextImpl.cpp | 102 ++ .../runtime/core/src/osoa/sca/ModuleContextImpl.h | 71 + .../runtime/core/src/osoa/sca/SCA.cpp | 21 + .../runtime/core/src/osoa/sca/ServiceList.cpp | 105 ++ .../runtime/core/src/osoa/sca/ServiceList.h | 84 ++ .../core/src/osoa/sca/ServiceRuntimeException.cpp | 208 +++ .../core/src/osoa/sca/ServiceRuntimeException.h | 236 +++ .../runtime/core/src/osoa/sca/export.h | 39 + .../runtime/core/src/osoa/sca/sca.h | 29 + .../tuscany/sca/core/ComponentServiceWrapper.cpp | 202 +++ .../src/tuscany/sca/core/ComponentServiceWrapper.h | 156 ++ .../tuscany/sca/core/ExternalServiceWrapper.cpp | 102 ++ .../src/tuscany/sca/core/ExternalServiceWrapper.h | 81 + .../core/src/tuscany/sca/core/Operation.cpp | 88 ++ .../runtime/core/src/tuscany/sca/core/Operation.h | 115 ++ .../core/src/tuscany/sca/core/SCAEntryPoint.cpp | 215 +++ .../core/src/tuscany/sca/core/SCAEntryPoint.h | 126 ++ .../core/src/tuscany/sca/core/SCARuntime.cpp | 288 ++++ .../runtime/core/src/tuscany/sca/core/SCARuntime.h | 166 +++ .../core/src/tuscany/sca/core/ServiceProxy.cpp | 121 ++ .../core/src/tuscany/sca/core/ServiceProxy.h | 89 ++ .../core/src/tuscany/sca/core/ServiceWrapper.cpp | 55 + .../core/src/tuscany/sca/core/ServiceWrapper.h | 73 + .../runtime/core/src/tuscany/sca/model/Binding.cpp | 44 + .../runtime/core/src/tuscany/sca/model/Binding.h | 85 ++ .../src/tuscany/sca/model/CPPImplementation.cpp | 54 + .../core/src/tuscany/sca/model/CPPImplementation.h | 125 ++ .../core/src/tuscany/sca/model/CPPInterface.cpp | 67 + .../core/src/tuscany/sca/model/CPPInterface.h | 143 ++ .../core/src/tuscany/sca/model/Component.cpp | 303 ++++ .../runtime/core/src/tuscany/sca/model/Component.h | 202 +++ .../core/src/tuscany/sca/model/EntryPoint.cpp | 96 ++ .../core/src/tuscany/sca/model/EntryPoint.h | 138 ++ .../core/src/tuscany/sca/model/ExternalService.cpp | 55 + .../core/src/tuscany/sca/model/ExternalService.h | 97 ++ .../core/src/tuscany/sca/model/Implementation.cpp | 44 + .../core/src/tuscany/sca/model/Implementation.h | 66 + .../core/src/tuscany/sca/model/Interface.cpp | 44 + .../runtime/core/src/tuscany/sca/model/Interface.h | 65 + .../core/src/tuscany/sca/model/ModelLoader.cpp | 1555 ++++++++++++++++++++ .../core/src/tuscany/sca/model/ModelLoader.h | 104 ++ .../runtime/core/src/tuscany/sca/model/Module.cpp | 235 +++ .../runtime/core/src/tuscany/sca/model/Module.h | 235 +++ .../runtime/core/src/tuscany/sca/model/Service.cpp | 47 + .../runtime/core/src/tuscany/sca/model/Service.h | 81 + .../src/tuscany/sca/model/ServiceReference.cpp | 89 ++ .../core/src/tuscany/sca/model/ServiceReference.h | 136 ++ .../core/src/tuscany/sca/model/Subsystem.cpp | 122 ++ .../runtime/core/src/tuscany/sca/model/Subsystem.h | 131 ++ .../runtime/core/src/tuscany/sca/model/System.cpp | 118 ++ .../runtime/core/src/tuscany/sca/model/System.h | 89 ++ .../core/src/tuscany/sca/model/WSBinding.cpp | 127 ++ .../runtime/core/src/tuscany/sca/model/WSBinding.h | 106 ++ .../runtime/core/src/tuscany/sca/model/Wire.cpp | 46 + .../runtime/core/src/tuscany/sca/model/Wire.h | 91 ++ .../core/src/tuscany/sca/model/WireTarget.cpp | 49 + .../core/src/tuscany/sca/model/WireTarget.h | 106 ++ .../runtime/core/src/tuscany/sca/model/Wsdl.cpp | 345 +++++ .../runtime/core/src/tuscany/sca/model/Wsdl.h | 132 ++ .../core/src/tuscany/sca/model/WsdlOperation.cpp | 57 + .../core/src/tuscany/sca/model/WsdlOperation.h | 117 ++ .../core/src/tuscany/sca/util/DefaultLogWriter.cpp | 43 + .../core/src/tuscany/sca/util/DefaultLogWriter.h | 46 + .../runtime/core/src/tuscany/sca/util/Exceptions.h | 48 + .../runtime/core/src/tuscany/sca/util/File.cpp | 216 +++ .../runtime/core/src/tuscany/sca/util/File.h | 133 ++ .../core/src/tuscany/sca/util/FileLogWriter.cpp | 49 + .../core/src/tuscany/sca/util/FileLogWriter.h | 53 + .../runtime/core/src/tuscany/sca/util/Library.cpp | 119 ++ .../runtime/core/src/tuscany/sca/util/Library.h | 97 ++ .../core/src/tuscany/sca/util/LogWriter.cpp | 32 + .../runtime/core/src/tuscany/sca/util/LogWriter.h | 47 + .../runtime/core/src/tuscany/sca/util/Logger.cpp | 107 ++ .../runtime/core/src/tuscany/sca/util/Logger.h | 89 ++ .../runtime/core/src/tuscany/sca/util/Logging.h | 72 + .../runtime/core/src/tuscany/sca/util/Utils.cpp | 212 +++ .../runtime/core/src/tuscany/sca/util/Utils.h | 61 + .../runtime/core/src/tuscany/sca/ws/SDOStub.cpp | 448 ++++++ .../runtime/core/src/tuscany/sca/ws/SDOStub.h | 143 ++ .../core/src/tuscany/sca/ws/WSServiceWrapper.cpp | 116 ++ .../core/src/tuscany/sca/ws/WSServiceWrapper.h | 48 + .../runtime/core/test/CustomerInfo/.cdtbuild | 41 + .../runtime/core/test/CustomerInfo/.cdtproject | 15 + .../runtime/core/test/CustomerInfo/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 9 + .../runtime/core/test/CustomerInfo/CustomerInfo.h | 30 + .../core/test/CustomerInfo/CustomerInfoImpl.cpp | 79 + .../core/test/CustomerInfo/CustomerInfoImpl.h | 36 + .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 64 + .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 34 + ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 71 + .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 + .../runtime/core/test/CustomerInfo/Makefile.am | 14 + .../cpp-sca-20060405/runtime/core/test/Makefile.am | 20 + .../runtime/core/test/MyValue/.cdtbuild | 43 + .../runtime/core/test/MyValue/.cdtproject | 15 + .../runtime/core/test/MyValue/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 9 + .../runtime/core/test/MyValue/Makefile.am | 17 + .../runtime/core/test/MyValue/MyValue.h | 34 + .../runtime/core/test/MyValue/MyValueImpl.cpp | 159 ++ .../runtime/core/test/MyValue/MyValueImpl.h | 39 + .../MyValue/MyValueImpl_MyValueService_Proxy.cpp | 100 ++ .../MyValue/MyValueImpl_MyValueService_Proxy.h | 37 + .../MyValue/MyValueImpl_MyValueService_Wrapper.cpp | 89 ++ .../MyValue/MyValueImpl_MyValueService_Wrapper.h | 36 + .../MyValue/MyValueImpl_customerInfo_Proxy.cpp | 64 + .../test/MyValue/MyValueImpl_customerInfo_Proxy.h | 34 + .../test/MyValue/MyValueImpl_stockQuote_Proxy.cpp | 66 + .../test/MyValue/MyValueImpl_stockQuote_Proxy.h | 34 + .../runtime/core/test/MyValue/StockQuoteService.h | 32 + .../runtime/core/test/src/.cdtbuild | 69 + .../runtime/core/test/src/.cdtproject | 15 + .../runtime/core/test/src/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 9 + .../runtime/core/test/src/Makefile.am | 13 + .../runtime/core/test/src/TestSCA.cpp | 77 + .../MyValueServiceModule/CustomerInfo.fragment | 36 + .../CustomerInfoImpl.componentType | 30 + .../MyValueServiceModule/MyValueImpl.componentType | 36 + .../MyValueServiceModule/StockQuoteService.wsdl | 157 ++ .../MyValueServiceModule/Tuscany-model.config | 24 + .../modules/MyValueServiceModule/sca.module | 51 + .../subsystems/SubSystem1/sca.subsystem | 27 + .../samples/Calculator/Calculator.dsw | 53 + .../samples/Calculator/Calculator.ncb | Bin 0 -> 50176 bytes .../samples/Calculator/Calculator.opt | Bin 0 -> 62976 bytes .../samples/Calculator/CalculatorModule/.cdtbuild | 42 + .../Calculator/CalculatorModule/.cdtproject | 15 + .../samples/Calculator/CalculatorModule/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 6 + .../Calculator/CalculatorModule/Calculator.h | 33 + .../CalculatorModule/CalculatorImpl.componentType | 10 + .../Calculator/CalculatorModule/CalculatorImpl.cpp | 55 + .../Calculator/CalculatorModule/CalculatorImpl.h | 39 + .../CalculatorModule/CalculatorModule.dsp | 138 ++ .../CalculatorModule/CalculatorModule.plg | 39 + .../Calculator/CalculatorModule/Debug/makefile | 43 + .../Calculator/CalculatorModule/Debug/objects.mk | 7 + .../Calculator/CalculatorModule/Debug/sources.mk | 20 + .../Calculator/CalculatorModule/Debug/subdir.mk | 35 + .../samples/Calculator/CalculatorModule/sca.module | 11 + .../Calculator/CalculatorModule/sca.module.lin | 11 + .../CalculatorSubsystem/CalculatorSubsystem.dsp | 67 + .../Calculator/CalculatorSubsystem/sca.subsystem | 23 + .../samples/Calculator/Client/.cdtbuild | 50 + .../samples/Calculator/Client/.cdtproject | 15 + .../samples/Calculator/Client/.project | 19 + .../org.eclipse.cdt.managedbuilder.core.prefs | 6 + .../samples/Calculator/Client/Calc.cpp | 144 ++ .../samples/Calculator/Client/Calculator.h | 33 + .../samples/Calculator/Client/Client.dsp | 108 ++ .../samples/Calculator/Client/Client.plg | 16 + .../samples/Calculator/Client/Debug/makefile | 43 + .../samples/Calculator/Client/Debug/objects.mk | 7 + .../samples/Calculator/Client/Debug/sources.mk | 20 + .../samples/Calculator/Client/Debug/subdir.mk | 29 + .../samples/Calculator/Client/readme.txt | 53 + .../samples/Calculator/Client/runclient.cmd | 14 + .../cpp-sca-20060405/samples/Calculator/build.sh | 75 + .../samples/Calculator/pack_deploy.cmd | 27 + .../samples/Calculator/runclient.sh | 53 + sca-cpp/tags/cpp-sca-20060405/samples/Makefile.am | 1 + .../samples/MyValue/Client/Makefile.am | 13 + .../samples/MyValue/Client/MyValueClient.cpp | 180 +++ .../cpp-sca-20060405/samples/MyValue/Makefile.am | 23 + .../MyValue/MyValueModule/CustomerInfo.fragment | 36 + .../MyValueModule/CustomerInfo/CustomerInfo.h | 30 + .../CustomerInfo/CustomerInfoImpl.componentType | 30 + .../CustomerInfo/CustomerInfoImpl.cpp | 79 + .../MyValueModule/CustomerInfo/CustomerInfoImpl.h | 36 + .../MyValue/MyValueModule/CustomerInfo/Makefile.am | 16 + .../samples/MyValue/MyValueModule/Makefile.am | 10 + .../MyValue/MyValueModule/MyValue/Makefile.am | 18 + .../MyValue/MyValueModule/MyValue/MyValue.h | 30 + .../MyValue/MyValueImpl.componentType | 36 + .../MyValue/MyValueModule/MyValue/MyValueImpl.cpp | 143 ++ .../MyValue/MyValueModule/MyValue/MyValueImpl.h | 32 + .../MyValueModule/MyValue/MyValueService.wsdl | 65 + .../MyValueModule/MyValue/MyValueService.xsd | 22 + .../StockQuoteService/StockQuoteService.h | 32 + .../StockQuoteService/StockQuoteService.wsdl | 157 ++ .../MyValue/MyValueModule/Tuscany-model.config | 25 + .../samples/MyValue/MyValueModule/sca.module | 51 + .../samples/MyValue/MyValueSubsystem/sca.subsystem | 27 + .../samples/MyValue/runMyValueClient.sh | 51 + .../cpp-sca-20060405/samples/MyValue/server.wsdd | 22 + .../subsystems/MyValueSubsystem/sca.subsystem | 27 + sca-cpp/tags/cpp-sca-20060405/scatest.sh | 51 + .../tags/cpp-sca-20060405/tools/scagen/build.xml | 130 ++ .../tools/scagen/docs/api/allclasses-frame.html | 84 ++ .../tools/scagen/docs/api/allclasses-noframe.html | 84 ++ .../tools/scagen/docs/api/constant-values.html | 305 ++++ .../tools/scagen/docs/api/deprecated-list.html | 138 ++ .../tools/scagen/docs/api/help-doc.html | 197 +++ .../tools/scagen/docs/api/index-all.html | 701 +++++++++ .../tools/scagen/docs/api/index.html | 26 + .../tuscany/sca/cpp/tools/common/BodyPart.html | 396 +++++ .../tuscany/sca/cpp/tools/common/CParsingTool.html | 389 +++++ .../sca/cpp/tools/common/Configuration.html | 373 +++++ .../sca/cpp/tools/common/DirectoryTree.html | 289 ++++ .../tuscany/sca/cpp/tools/common/FileActor.html | 231 +++ .../tuscany/sca/cpp/tools/common/FilePart.html | 538 +++++++ .../tuscany/sca/cpp/tools/common/Headers.html | 403 +++++ .../sca/cpp/tools/common/InputCppSourceCode.html | 297 ++++ .../tuscany/sca/cpp/tools/common/MethodPart.html | 307 ++++ .../tuscany/sca/cpp/tools/common/Options.html | 294 ++++ .../tuscany/sca/cpp/tools/common/Parameter.html | 392 +++++ .../sca/cpp/tools/common/ParsingException.html | 284 ++++ .../sca/cpp/tools/common/PrototypePart.html | 309 ++++ .../tuscany/sca/cpp/tools/common/Signature.html | 584 ++++++++ .../apache/tuscany/sca/cpp/tools/common/Utils.html | 411 ++++++ .../sca/cpp/tools/common/class-use/BodyPart.html | 177 +++ .../cpp/tools/common/class-use/CParsingTool.html | 186 +++ .../cpp/tools/common/class-use/Configuration.html | 138 ++ .../cpp/tools/common/class-use/DirectoryTree.html | 138 ++ .../sca/cpp/tools/common/class-use/FileActor.html | 256 ++++ .../sca/cpp/tools/common/class-use/FilePart.html | 184 +++ .../sca/cpp/tools/common/class-use/Headers.html | 192 +++ .../tools/common/class-use/InputCppSourceCode.html | 138 ++ .../sca/cpp/tools/common/class-use/MethodPart.html | 138 ++ .../sca/cpp/tools/common/class-use/Options.html | 138 ++ .../sca/cpp/tools/common/class-use/Parameter.html | 192 +++ .../tools/common/class-use/ParsingException.html | 196 +++ .../cpp/tools/common/class-use/PrototypePart.html | 138 ++ .../sca/cpp/tools/common/class-use/Signature.html | 208 +++ .../sca/cpp/tools/common/class-use/Utils.html | 138 ++ .../sca/cpp/tools/common/package-frame.html | 78 + .../sca/cpp/tools/common/package-summary.html | 273 ++++ .../tuscany/sca/cpp/tools/common/package-tree.html | 162 ++ .../tuscany/sca/cpp/tools/common/package-use.html | 231 +++ .../tools/services/ComponentDomNodeHandler.html | 303 ++++ .../tools/services/ComponentTypeFileHandler.html | 299 ++++ .../sca/cpp/tools/services/DirectoryScanner.html | 271 ++++ .../tuscany/sca/cpp/tools/services/DomHandler.html | 341 +++++ .../sca/cpp/tools/services/DomNodeHandler.html | 262 ++++ .../cpp/tools/services/GenericDomNodeHandler.html | 396 +++++ .../sca/cpp/tools/services/LittleClass.html | 231 +++ .../services/ModuleOrFragmentFileHandler.html | 258 ++++ .../tools/services/ReferenceDomNodeHandler.html | 311 ++++ .../tuscany/sca/cpp/tools/services/Scagen.html | 344 +++++ .../cpp/tools/services/ServiceDomNodeHandler.html | 305 ++++ .../sca/cpp/tools/services/ServicesGenerator.html | 312 ++++ .../sca/cpp/tools/services/XMLFileActor.html | 469 ++++++ .../class-use/ComponentDomNodeHandler.html | 138 ++ .../class-use/ComponentTypeFileHandler.html | 138 ++ .../tools/services/class-use/DirectoryScanner.html | 138 ++ .../cpp/tools/services/class-use/DomHandler.html | 138 ++ .../tools/services/class-use/DomNodeHandler.html | 212 +++ .../services/class-use/GenericDomNodeHandler.html | 204 +++ .../cpp/tools/services/class-use/LittleClass.html | 138 ++ .../class-use/ModuleOrFragmentFileHandler.html | 138 ++ .../class-use/ReferenceDomNodeHandler.html | 138 ++ .../sca/cpp/tools/services/class-use/Scagen.html | 138 ++ .../services/class-use/ServiceDomNodeHandler.html | 138 ++ .../services/class-use/ServicesGenerator.html | 138 ++ .../cpp/tools/services/class-use/XMLFileActor.html | 186 +++ .../sca/cpp/tools/services/package-frame.html | 65 + .../sca/cpp/tools/services/package-summary.html | 364 +++++ .../sca/cpp/tools/services/package-tree.html | 162 ++ .../sca/cpp/tools/services/package-use.html | 179 +++ .../tools/scagen/docs/api/overview-frame.html | 46 + .../tools/scagen/docs/api/overview-summary.html | 174 +++ .../tools/scagen/docs/api/overview-tree.html | 167 +++ .../tools/scagen/docs/api/package-list | 2 + .../tools/scagen/docs/api/packages.html | 37 + .../tools/scagen/docs/api/resources/inherit.gif | Bin 0 -> 57 bytes .../tools/scagen/docs/api/serialized-form.html | 159 ++ .../tools/scagen/docs/api/stylesheet.css | 29 + .../sca/cpp/tools/junit/CalculatorTest.java | 29 + .../sca/cpp/tools/junit/EnvHandlerTest.java | 46 + .../tools/junit/ImplClassWithNameSpaceTest.java | 46 + ...ntfClassWithNameSpaceButNotInClassAttrTest.java | 46 + .../tools/junit/IntfClassWithNameSpaceTest.java | 46 + .../tools/junit/MissingModuleAndFragmentTest.java | 46 + .../junit/SimplePublicPrivateProtectedTest.java | 47 + .../sca/cpp/tools/junit/TestAllModulesTest.java | 82 ++ .../sca/cpp/tools/junit/TestDeployAssistTool.java | 94 ++ .../sca/cpp/tools/junit/TuscanyTestCase.java | 332 +++++ .../junit/scripts_for_standalone_testing/go.cmd | 2 + .../go_no_dir_option.cmd | 1 + .../go_no_input_dir.cmd | 1 + .../go_no_output_dir.cmd | 1 + .../refresh-tools-jar.cmd | 1 + .../CalculatorModuleAndComponent/Calculator.h | 32 + .../CalculatorImpl.componentType | 25 + .../CalculatorModuleAndComponent/CalculatorImpl.h | 33 + .../CalculatorModuleAndComponent/sca.module | 28 + .../otherSubFolder/CalculatorBack.h | 31 + .../otherSubFolder/CalculatorForward.h | 30 + .../CalculatorSlashDirectionTest/sca.module | 31 + .../subFolder/CalculatorBackImpl.componentType | 25 + .../subFolder/CalculatorBackImpl.h | 33 + .../subFolder/CalculatorForwardImpl.componentType | 25 + .../subFolder/CalculatorForwardImpl.h | 32 + .../CustomerInfo.fragment | 39 + .../CustomerInfo.h | 94 ++ .../CustomerInfoImpl.componentType | 33 + .../CustomerInfoImpl.h | 34 + .../CustomerInfo.fragment | 39 + .../CustomerInfo.h | 89 ++ .../CustomerInfoImpl.componentType | 33 + .../CustomerInfoImpl.h | 43 + .../MyValueServiceModule/CustomerInfo.fragment | 38 + .../modules/MyValueServiceModule/CustomerInfo.h | 36 + .../CustomerInfoImpl.componentType | 32 + .../MyValueServiceModule/CustomerInfoImpl.h | 46 + .../modules/MyValueServiceModule/MyValue.h | 35 + .../MyValueServiceModule/MyValueImpl.componentType | 38 + .../modules/MyValueServiceModule/MyValueImpl.hpp | 38 + .../MyValueImpl_stockQuote_Proxy.h | 34 + .../MyValueServiceModule/StockQuoteService.h | 33 + .../modules/MyValueServiceModule/sca.module | 59 + .../CustomerInfo.fragment | 38 + .../CustomerInfo.h | 37 + .../CustomerInfoImpl.componentType | 32 + .../CustomerInfoImpl.h | 47 + .../MyValue.h | 36 + .../MyValueImpl.componentType | 38 + .../MyValueImpl.hpp | 38 + .../MyValueImpl_stockQuote_Proxy.h | 34 + .../StockQuoteService.h | 32 + .../sca.module | 59 + .../MyValue.h | 39 + .../MyValueImpl.componentType | 28 + .../MyValueImpl.hpp | 38 + .../sca.module | 48 + .../MyValue.h | 37 + .../MyValueImpl.componentType | 28 + .../MyValueImpl.hpp | 38 + .../sca.module | 48 + .../CustomerInfo.fragmentX | 38 + .../sca.moduleX | 60 + .../CustomerInfo.fragment | 38 + .../MyValueServiceModuleTwoClasses/CustomerInfo.h | 36 + .../CustomerInfoImpl.componentType | 32 + .../CustomerInfoImpl.h | 45 + .../MyValueServiceModuleTwoClasses/MyValue.h | 35 + .../MyValueImpl.componentType | 38 + .../MyValueServiceModuleTwoClasses/MyValueImpl.hpp | 38 + .../MyValueImpl_stockQuote_Proxy.h | 34 + .../StockQuoteService.h | 32 + .../MyValueServiceModuleTwoClasses/sca.module | 59 + .../CustomerInfo.fragment | 39 + .../CustomerInfo.h | 40 + .../CustomerInfoImpl.componentType | 32 + .../CustomerInfoImpl.h | 34 + .../CalculatorImpl_CalculatorService_Proxy.cpp | 67 + .../CalculatorImpl_CalculatorService_Proxy.h | 34 + .../CalculatorImpl_CalculatorService_Wrapper.cpp | 71 + .../CalculatorImpl_CalculatorService_Wrapper.h | 36 + .../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 + .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 699 +++++++++ .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 83 ++ ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 449 ++++++ .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 + .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 556 +++++++ .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 79 + ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 376 +++++ .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 + ...CustomerInfoImpl2_CustomerInfoService_Proxy.cpp | 64 + .../CustomerInfoImpl2_CustomerInfoService_Proxy.h | 34 + ...stomerInfoImpl2_CustomerInfoService_Wrapper.cpp | 71 + ...CustomerInfoImpl2_CustomerInfoService_Wrapper.h | 36 + .../MyValueImpl_MyValueService_Proxy.cpp | 100 ++ .../MyValueImpl_MyValueService_Proxy.h | 37 + .../MyValueImpl_MyValueService_Wrapper.cpp | 89 ++ .../MyValueImpl_MyValueService_Wrapper.h | 36 + .../MyValueImpl_customerInfo_Proxy.cpp | 64 + .../MyValueImpl_customerInfo_Proxy.h | 34 + .../MyValueImpl_stockQuote_Proxy.cpp | 66 + .../expected_output/MyValueImpl_stockQuote_Proxy.h | 34 + .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 64 + .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 34 + ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 71 + .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 + .../MyValueImpl_MyValueService_Proxy.cpp | 100 ++ .../MyValueImpl_MyValueService_Proxy.h | 37 + .../MyValueImpl_MyValueService_Wrapper.cpp | 89 ++ .../MyValueImpl_MyValueService_Wrapper.h | 36 + .../MyValueImpl_customerInfo_Proxy.cpp | 64 + .../MyValueImpl_customerInfo_Proxy.h | 34 + .../MyValueImpl_stockQuote_Proxy.cpp | 66 + .../expected_output/MyValueImpl_stockQuote_Proxy.h | 34 + .../MyValueImpl_MyValueService_Proxy.cpp | 100 ++ .../MyValueImpl_MyValueService_Proxy.h | 37 + .../MyValueImpl_MyValueService_Wrapper.cpp | 89 ++ .../MyValueImpl_MyValueService_Wrapper.h | 36 + .../MyValueImpl_MyValueService_Proxy.cpp | 100 ++ .../MyValueImpl_MyValueService_Proxy.h | 37 + .../MyValueImpl_MyValueService_Wrapper.cpp | 89 ++ .../MyValueImpl_MyValueService_Wrapper.h | 36 + ...CustomerInfoImpl2_CustomerInfoService_Proxy.cpp | 64 + .../CustomerInfoImpl2_CustomerInfoService_Proxy.h | 34 + ...stomerInfoImpl2_CustomerInfoService_Wrapper.cpp | 71 + ...CustomerInfoImpl2_CustomerInfoService_Wrapper.h | 36 + .../MyValueImpl_MyValueService_Proxy.cpp | 100 ++ .../MyValueImpl_MyValueService_Proxy.h | 37 + .../MyValueImpl_MyValueService_Wrapper.cpp | 89 ++ .../MyValueImpl_MyValueService_Wrapper.h | 36 + .../MyValueImpl_customerInfo_Proxy.cpp | 64 + .../MyValueImpl_customerInfo_Proxy.h | 34 + .../MyValueImpl_stockQuote_Proxy.cpp | 66 + .../expected_output/MyValueImpl_stockQuote_Proxy.h | 34 + .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 92 ++ .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 36 + ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 88 ++ .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 + .../cpp-sca-20060405/tools/scagen/lib/readme.txt | 4 + .../tags/cpp-sca-20060405/tools/scagen/scagen.cmd | 1 + .../tags/cpp-sca-20060405/tools/scagen/scagen.sh | 17 + .../tuscany/sca/cpp/tools/common/BodyPart.java | 90 ++ .../tuscany/sca/cpp/tools/common/CParsingTool.java | 119 ++ .../sca/cpp/tools/common/Configuration.java | 126 ++ .../sca/cpp/tools/common/DirectoryTree.java | 100 ++ .../tuscany/sca/cpp/tools/common/FileActor.java | 32 + .../tuscany/sca/cpp/tools/common/FilePart.java | 75 + .../tuscany/sca/cpp/tools/common/Headers.java | 162 ++ .../sca/cpp/tools/common/InputCppSourceCode.java | 412 ++++++ .../tuscany/sca/cpp/tools/common/MacroPart.java | 82 ++ .../tuscany/sca/cpp/tools/common/MethodPart.java | 128 ++ .../tuscany/sca/cpp/tools/common/Options.java | 159 ++ .../tuscany/sca/cpp/tools/common/Parameter.java | 211 +++ .../sca/cpp/tools/common/ParsingException.java | 42 + .../sca/cpp/tools/common/PrototypePart.java | 51 + .../tuscany/sca/cpp/tools/common/Signature.java | 501 +++++++ .../apache/tuscany/sca/cpp/tools/common/Utils.java | 543 +++++++ .../tuscany/sca/cpp/tools/common/package.html | 39 + .../tools/services/ComponentDomNodeHandler.java | 352 +++++ .../tools/services/ComponentTypeFileHandler.java | 124 ++ .../sca/cpp/tools/services/DirectoryScanner.java | 87 ++ .../tuscany/sca/cpp/tools/services/DomHandler.java | 77 + .../sca/cpp/tools/services/DomNodeHandler.java | 40 + .../cpp/tools/services/GenericDomNodeHandler.java | 214 +++ .../sca/cpp/tools/services/LittleClass.java | 27 + .../services/ModuleOrFragmentFileHandler.java | 85 ++ .../tools/services/ReferenceDomNodeHandler.java | 67 + .../tuscany/sca/cpp/tools/services/Scagen.java | 170 +++ .../cpp/tools/services/ServiceDomNodeHandler.java | 62 + .../sca/cpp/tools/services/ServicesGenerator.java | 802 ++++++++++ .../sca/cpp/tools/services/XMLFileActor.java | 202 +++ .../tuscany/sca/cpp/tools/services/package.html | 140 ++ .../cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl | 398 +++++ .../tools/services/xsl/SCA4CPPIntfProxyHeader.xsl | 215 +++ .../tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl | 278 ++++ .../services/xsl/SCA4CPPIntfWrapperHeader.xsl | 178 +++ sca-cpp/tags/cpp-sca-20060405/xsd/readme.txt | 2 + .../tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd | 37 + .../xsd/sca-binding-webservice.xsd | 38 + sca-cpp/tags/cpp-sca-20060405/xsd/sca-core.xsd | 240 +++ .../xsd/sca-implementation-cpp.xsd | 40 + .../xsd/sca-implementation-java.xsd | 38 + .../cpp-sca-20060405/xsd/sca-interface-cpp.xsd | 50 + .../cpp-sca-20060405/xsd/sca-interface-java.xsd | 39 + .../cpp-sca-20060405/xsd/sca-interface-wsdl.xsd | 39 + sca-cpp/tags/cpp-sca-20060405/xsd/sca.xsd | 34 + sca-cpp/tags/cpp-sca-20060405/xsd/tuscany.xsd | 48 + tags/cpp-sca-20060405/AUTHORS | 0 tags/cpp-sca-20060405/COPYING | 203 --- tags/cpp-sca-20060405/ChangeLog | 0 tags/cpp-sca-20060405/Developers Guide.txt | 346 ----- tags/cpp-sca-20060405/INSTALL | 13 - tags/cpp-sca-20060405/LICENSE | 203 --- tags/cpp-sca-20060405/Makefile.am | 1 - tags/cpp-sca-20060405/NEWS | 0 tags/cpp-sca-20060405/README | 0 tags/cpp-sca-20060405/autogen.sh | 14 - tags/cpp-sca-20060405/build.sh | 46 - tags/cpp-sca-20060405/configure.ac | 57 - .../projects/tuscany_sca/tuscany_sca.dsw | 113 -- .../projects/tuscany_sca/tuscany_sca.ncb | Bin 500736 -> 0 bytes .../projects/tuscany_sca/tuscany_sca.opt | Bin 75264 -> 0 bytes .../tuscany_sca/tuscany_sca/Build Instructions.txt | 32 - .../tuscany_sca/tuscany_sca/tuscany_sca.dsp | 520 ------- .../tuscany_sca_axis_handler.dsp | 121 -- .../tuscany_sca_axis_wrapper.dsp | 121 -- .../MyValueServiceModule/CustomerInfo.fragment | 36 - .../CustomerInfoImpl.componentType | 30 - .../MyValueServiceModule/MyValueImpl.componentType | 36 - .../MyValueServiceModule/StockQuoteService.wsdl | 157 -- .../MyValueServiceModule/Tuscany-model.config | 24 - .../modules/MyValueServiceModule/sca.module | 51 - .../subsystems/SubSystem1/sca.subsystem | 27 - .../tuscany_sca_test/tuscany_sca_test.dsp | 104 -- .../tuscany_sca_test_CustomerInfo.dsp | 133 -- .../tuscany_sca_test_MyValue.dsp | 153 -- tags/cpp-sca-20060405/readme.txt | 37 - tags/cpp-sca-20060405/runtime/Makefile.am | 1 - .../runtime/axis_binding/Makefile.am | 1 - .../runtime/axis_binding/handler/Makefile.am | 2 - .../runtime/axis_binding/handler/src/.cdtbuild | 39 - .../runtime/axis_binding/handler/src/.cdtproject | 15 - .../runtime/axis_binding/handler/src/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../runtime/axis_binding/handler/src/Makefile.am | 9 - .../axis_binding/handler/src/SCAWSHandler.cpp | 154 -- .../axis_binding/handler/src/SCAWSHandler.h | 79 - .../runtime/axis_binding/wrapper/Makefile.am | 1 - .../runtime/axis_binding/wrapper/src/.cdtbuild | 43 - .../runtime/axis_binding/wrapper/src/.cdtproject | 15 - .../runtime/axis_binding/wrapper/src/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../wrapper/src/AxisServiceException.cpp | 105 -- .../wrapper/src/AxisServiceException.h | 44 - .../runtime/axis_binding/wrapper/src/Makefile.am | 12 - .../axis_binding/wrapper/src/SCAWSWrapper.cpp | 268 ---- .../axis_binding/wrapper/src/SCAWSWrapper.h | 110 -- tags/cpp-sca-20060405/runtime/core/Makefile.am | 1 - tags/cpp-sca-20060405/runtime/core/src/.cdtbuild | 43 - tags/cpp-sca-20060405/runtime/core/src/.cdtproject | 15 - tags/cpp-sca-20060405/runtime/core/src/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - tags/cpp-sca-20060405/runtime/core/src/Makefile.am | 103 -- .../runtime/core/src/osoa/sca/ComponentContext.cpp | 132 -- .../runtime/core/src/osoa/sca/ComponentContext.h | 105 -- .../core/src/osoa/sca/ComponentContextImpl.cpp | 270 ---- .../core/src/osoa/sca/ComponentContextImpl.h | 120 -- .../runtime/core/src/osoa/sca/ModuleContext.cpp | 93 -- .../runtime/core/src/osoa/sca/ModuleContext.h | 80 - .../core/src/osoa/sca/ModuleContextImpl.cpp | 102 -- .../runtime/core/src/osoa/sca/ModuleContextImpl.h | 71 - .../runtime/core/src/osoa/sca/SCA.cpp | 21 - .../runtime/core/src/osoa/sca/ServiceList.cpp | 105 -- .../runtime/core/src/osoa/sca/ServiceList.h | 84 -- .../core/src/osoa/sca/ServiceRuntimeException.cpp | 208 --- .../core/src/osoa/sca/ServiceRuntimeException.h | 236 --- .../runtime/core/src/osoa/sca/export.h | 39 - .../runtime/core/src/osoa/sca/sca.h | 29 - .../tuscany/sca/core/ComponentServiceWrapper.cpp | 202 --- .../src/tuscany/sca/core/ComponentServiceWrapper.h | 156 -- .../tuscany/sca/core/ExternalServiceWrapper.cpp | 102 -- .../src/tuscany/sca/core/ExternalServiceWrapper.h | 81 - .../core/src/tuscany/sca/core/Operation.cpp | 88 -- .../runtime/core/src/tuscany/sca/core/Operation.h | 115 -- .../core/src/tuscany/sca/core/SCAEntryPoint.cpp | 215 --- .../core/src/tuscany/sca/core/SCAEntryPoint.h | 126 -- .../core/src/tuscany/sca/core/SCARuntime.cpp | 288 ---- .../runtime/core/src/tuscany/sca/core/SCARuntime.h | 166 --- .../core/src/tuscany/sca/core/ServiceProxy.cpp | 121 -- .../core/src/tuscany/sca/core/ServiceProxy.h | 89 -- .../core/src/tuscany/sca/core/ServiceWrapper.cpp | 55 - .../core/src/tuscany/sca/core/ServiceWrapper.h | 73 - .../runtime/core/src/tuscany/sca/model/Binding.cpp | 44 - .../runtime/core/src/tuscany/sca/model/Binding.h | 85 -- .../src/tuscany/sca/model/CPPImplementation.cpp | 54 - .../core/src/tuscany/sca/model/CPPImplementation.h | 125 -- .../core/src/tuscany/sca/model/CPPInterface.cpp | 67 - .../core/src/tuscany/sca/model/CPPInterface.h | 143 -- .../core/src/tuscany/sca/model/Component.cpp | 303 ---- .../runtime/core/src/tuscany/sca/model/Component.h | 202 --- .../core/src/tuscany/sca/model/EntryPoint.cpp | 96 -- .../core/src/tuscany/sca/model/EntryPoint.h | 138 -- .../core/src/tuscany/sca/model/ExternalService.cpp | 55 - .../core/src/tuscany/sca/model/ExternalService.h | 97 -- .../core/src/tuscany/sca/model/Implementation.cpp | 44 - .../core/src/tuscany/sca/model/Implementation.h | 66 - .../core/src/tuscany/sca/model/Interface.cpp | 44 - .../runtime/core/src/tuscany/sca/model/Interface.h | 65 - .../core/src/tuscany/sca/model/ModelLoader.cpp | 1555 -------------------- .../core/src/tuscany/sca/model/ModelLoader.h | 104 -- .../runtime/core/src/tuscany/sca/model/Module.cpp | 235 --- .../runtime/core/src/tuscany/sca/model/Module.h | 235 --- .../runtime/core/src/tuscany/sca/model/Service.cpp | 47 - .../runtime/core/src/tuscany/sca/model/Service.h | 81 - .../src/tuscany/sca/model/ServiceReference.cpp | 89 -- .../core/src/tuscany/sca/model/ServiceReference.h | 136 -- .../core/src/tuscany/sca/model/Subsystem.cpp | 122 -- .../runtime/core/src/tuscany/sca/model/Subsystem.h | 131 -- .../runtime/core/src/tuscany/sca/model/System.cpp | 118 -- .../runtime/core/src/tuscany/sca/model/System.h | 89 -- .../core/src/tuscany/sca/model/WSBinding.cpp | 127 -- .../runtime/core/src/tuscany/sca/model/WSBinding.h | 106 -- .../runtime/core/src/tuscany/sca/model/Wire.cpp | 46 - .../runtime/core/src/tuscany/sca/model/Wire.h | 91 -- .../core/src/tuscany/sca/model/WireTarget.cpp | 49 - .../core/src/tuscany/sca/model/WireTarget.h | 106 -- .../runtime/core/src/tuscany/sca/model/Wsdl.cpp | 345 ----- .../runtime/core/src/tuscany/sca/model/Wsdl.h | 132 -- .../core/src/tuscany/sca/model/WsdlOperation.cpp | 57 - .../core/src/tuscany/sca/model/WsdlOperation.h | 117 -- .../core/src/tuscany/sca/util/DefaultLogWriter.cpp | 43 - .../core/src/tuscany/sca/util/DefaultLogWriter.h | 46 - .../runtime/core/src/tuscany/sca/util/Exceptions.h | 48 - .../runtime/core/src/tuscany/sca/util/File.cpp | 216 --- .../runtime/core/src/tuscany/sca/util/File.h | 133 -- .../core/src/tuscany/sca/util/FileLogWriter.cpp | 49 - .../core/src/tuscany/sca/util/FileLogWriter.h | 53 - .../runtime/core/src/tuscany/sca/util/Library.cpp | 119 -- .../runtime/core/src/tuscany/sca/util/Library.h | 97 -- .../core/src/tuscany/sca/util/LogWriter.cpp | 32 - .../runtime/core/src/tuscany/sca/util/LogWriter.h | 47 - .../runtime/core/src/tuscany/sca/util/Logger.cpp | 107 -- .../runtime/core/src/tuscany/sca/util/Logger.h | 89 -- .../runtime/core/src/tuscany/sca/util/Logging.h | 72 - .../runtime/core/src/tuscany/sca/util/Utils.cpp | 212 --- .../runtime/core/src/tuscany/sca/util/Utils.h | 61 - .../runtime/core/src/tuscany/sca/ws/SDOStub.cpp | 448 ------ .../runtime/core/src/tuscany/sca/ws/SDOStub.h | 143 -- .../core/src/tuscany/sca/ws/WSServiceWrapper.cpp | 116 -- .../core/src/tuscany/sca/ws/WSServiceWrapper.h | 48 - .../runtime/core/test/CustomerInfo/.cdtbuild | 41 - .../runtime/core/test/CustomerInfo/.cdtproject | 15 - .../runtime/core/test/CustomerInfo/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../runtime/core/test/CustomerInfo/CustomerInfo.h | 30 - .../core/test/CustomerInfo/CustomerInfoImpl.cpp | 79 - .../core/test/CustomerInfo/CustomerInfoImpl.h | 36 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 64 - .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 34 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 71 - .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 - .../runtime/core/test/CustomerInfo/Makefile.am | 14 - .../cpp-sca-20060405/runtime/core/test/Makefile.am | 20 - .../runtime/core/test/MyValue/.cdtbuild | 43 - .../runtime/core/test/MyValue/.cdtproject | 15 - .../runtime/core/test/MyValue/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../runtime/core/test/MyValue/Makefile.am | 17 - .../runtime/core/test/MyValue/MyValue.h | 34 - .../runtime/core/test/MyValue/MyValueImpl.cpp | 159 -- .../runtime/core/test/MyValue/MyValueImpl.h | 39 - .../MyValue/MyValueImpl_MyValueService_Proxy.cpp | 100 -- .../MyValue/MyValueImpl_MyValueService_Proxy.h | 37 - .../MyValue/MyValueImpl_MyValueService_Wrapper.cpp | 89 -- .../MyValue/MyValueImpl_MyValueService_Wrapper.h | 36 - .../MyValue/MyValueImpl_customerInfo_Proxy.cpp | 64 - .../test/MyValue/MyValueImpl_customerInfo_Proxy.h | 34 - .../test/MyValue/MyValueImpl_stockQuote_Proxy.cpp | 66 - .../test/MyValue/MyValueImpl_stockQuote_Proxy.h | 34 - .../runtime/core/test/MyValue/StockQuoteService.h | 32 - .../runtime/core/test/src/.cdtbuild | 69 - .../runtime/core/test/src/.cdtproject | 15 - .../runtime/core/test/src/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../runtime/core/test/src/Makefile.am | 13 - .../runtime/core/test/src/TestSCA.cpp | 77 - .../MyValueServiceModule/CustomerInfo.fragment | 36 - .../CustomerInfoImpl.componentType | 30 - .../MyValueServiceModule/MyValueImpl.componentType | 36 - .../MyValueServiceModule/StockQuoteService.wsdl | 157 -- .../MyValueServiceModule/Tuscany-model.config | 24 - .../modules/MyValueServiceModule/sca.module | 51 - .../subsystems/SubSystem1/sca.subsystem | 27 - .../samples/Calculator/Calculator.dsw | 53 - .../samples/Calculator/Calculator.ncb | Bin 50176 -> 0 bytes .../samples/Calculator/Calculator.opt | Bin 62976 -> 0 bytes .../samples/Calculator/CalculatorModule/.cdtbuild | 42 - .../Calculator/CalculatorModule/.cdtproject | 15 - .../samples/Calculator/CalculatorModule/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 6 - .../Calculator/CalculatorModule/Calculator.h | 33 - .../CalculatorModule/CalculatorImpl.componentType | 10 - .../Calculator/CalculatorModule/CalculatorImpl.cpp | 55 - .../Calculator/CalculatorModule/CalculatorImpl.h | 39 - .../CalculatorModule/CalculatorModule.dsp | 138 -- .../CalculatorModule/CalculatorModule.plg | 39 - .../Calculator/CalculatorModule/Debug/makefile | 43 - .../Calculator/CalculatorModule/Debug/objects.mk | 7 - .../Calculator/CalculatorModule/Debug/sources.mk | 20 - .../Calculator/CalculatorModule/Debug/subdir.mk | 35 - .../samples/Calculator/CalculatorModule/sca.module | 11 - .../Calculator/CalculatorModule/sca.module.lin | 11 - .../CalculatorSubsystem/CalculatorSubsystem.dsp | 67 - .../Calculator/CalculatorSubsystem/sca.subsystem | 23 - .../samples/Calculator/Client/.cdtbuild | 50 - .../samples/Calculator/Client/.cdtproject | 15 - .../samples/Calculator/Client/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 6 - .../samples/Calculator/Client/Calc.cpp | 144 -- .../samples/Calculator/Client/Calculator.h | 33 - .../samples/Calculator/Client/Client.dsp | 108 -- .../samples/Calculator/Client/Client.plg | 16 - .../samples/Calculator/Client/Debug/makefile | 43 - .../samples/Calculator/Client/Debug/objects.mk | 7 - .../samples/Calculator/Client/Debug/sources.mk | 20 - .../samples/Calculator/Client/Debug/subdir.mk | 29 - .../samples/Calculator/Client/readme.txt | 53 - .../samples/Calculator/Client/runclient.cmd | 14 - tags/cpp-sca-20060405/samples/Calculator/build.sh | 75 - .../samples/Calculator/pack_deploy.cmd | 27 - .../samples/Calculator/runclient.sh | 53 - tags/cpp-sca-20060405/samples/Makefile.am | 1 - .../samples/MyValue/Client/Makefile.am | 13 - .../samples/MyValue/Client/MyValueClient.cpp | 180 --- tags/cpp-sca-20060405/samples/MyValue/Makefile.am | 23 - .../MyValue/MyValueModule/CustomerInfo.fragment | 36 - .../MyValueModule/CustomerInfo/CustomerInfo.h | 30 - .../CustomerInfo/CustomerInfoImpl.componentType | 30 - .../CustomerInfo/CustomerInfoImpl.cpp | 79 - .../MyValueModule/CustomerInfo/CustomerInfoImpl.h | 36 - .../MyValue/MyValueModule/CustomerInfo/Makefile.am | 16 - .../samples/MyValue/MyValueModule/Makefile.am | 10 - .../MyValue/MyValueModule/MyValue/Makefile.am | 18 - .../MyValue/MyValueModule/MyValue/MyValue.h | 30 - .../MyValue/MyValueImpl.componentType | 36 - .../MyValue/MyValueModule/MyValue/MyValueImpl.cpp | 143 -- .../MyValue/MyValueModule/MyValue/MyValueImpl.h | 32 - .../MyValueModule/MyValue/MyValueService.wsdl | 65 - .../MyValueModule/MyValue/MyValueService.xsd | 22 - .../StockQuoteService/StockQuoteService.h | 32 - .../StockQuoteService/StockQuoteService.wsdl | 157 -- .../MyValue/MyValueModule/Tuscany-model.config | 25 - .../samples/MyValue/MyValueModule/sca.module | 51 - .../samples/MyValue/MyValueSubsystem/sca.subsystem | 27 - .../samples/MyValue/runMyValueClient.sh | 51 - tags/cpp-sca-20060405/samples/MyValue/server.wsdd | 22 - .../subsystems/MyValueSubsystem/sca.subsystem | 27 - tags/cpp-sca-20060405/scatest.sh | 51 - tags/cpp-sca-20060405/tools/scagen/build.xml | 130 -- .../tools/scagen/docs/api/allclasses-frame.html | 84 -- .../tools/scagen/docs/api/allclasses-noframe.html | 84 -- .../tools/scagen/docs/api/constant-values.html | 305 ---- .../tools/scagen/docs/api/deprecated-list.html | 138 -- .../tools/scagen/docs/api/help-doc.html | 197 --- .../tools/scagen/docs/api/index-all.html | 701 --------- .../tools/scagen/docs/api/index.html | 26 - .../tuscany/sca/cpp/tools/common/BodyPart.html | 396 ----- .../tuscany/sca/cpp/tools/common/CParsingTool.html | 389 ----- .../sca/cpp/tools/common/Configuration.html | 373 ----- .../sca/cpp/tools/common/DirectoryTree.html | 289 ---- .../tuscany/sca/cpp/tools/common/FileActor.html | 231 --- .../tuscany/sca/cpp/tools/common/FilePart.html | 538 ------- .../tuscany/sca/cpp/tools/common/Headers.html | 403 ----- .../sca/cpp/tools/common/InputCppSourceCode.html | 297 ---- .../tuscany/sca/cpp/tools/common/MethodPart.html | 307 ---- .../tuscany/sca/cpp/tools/common/Options.html | 294 ---- .../tuscany/sca/cpp/tools/common/Parameter.html | 392 ----- .../sca/cpp/tools/common/ParsingException.html | 284 ---- .../sca/cpp/tools/common/PrototypePart.html | 309 ---- .../tuscany/sca/cpp/tools/common/Signature.html | 584 -------- .../apache/tuscany/sca/cpp/tools/common/Utils.html | 411 ------ .../sca/cpp/tools/common/class-use/BodyPart.html | 177 --- .../cpp/tools/common/class-use/CParsingTool.html | 186 --- .../cpp/tools/common/class-use/Configuration.html | 138 -- .../cpp/tools/common/class-use/DirectoryTree.html | 138 -- .../sca/cpp/tools/common/class-use/FileActor.html | 256 ---- .../sca/cpp/tools/common/class-use/FilePart.html | 184 --- .../sca/cpp/tools/common/class-use/Headers.html | 192 --- .../tools/common/class-use/InputCppSourceCode.html | 138 -- .../sca/cpp/tools/common/class-use/MethodPart.html | 138 -- .../sca/cpp/tools/common/class-use/Options.html | 138 -- .../sca/cpp/tools/common/class-use/Parameter.html | 192 --- .../tools/common/class-use/ParsingException.html | 196 --- .../cpp/tools/common/class-use/PrototypePart.html | 138 -- .../sca/cpp/tools/common/class-use/Signature.html | 208 --- .../sca/cpp/tools/common/class-use/Utils.html | 138 -- .../sca/cpp/tools/common/package-frame.html | 78 - .../sca/cpp/tools/common/package-summary.html | 273 ---- .../tuscany/sca/cpp/tools/common/package-tree.html | 162 -- .../tuscany/sca/cpp/tools/common/package-use.html | 231 --- .../tools/services/ComponentDomNodeHandler.html | 303 ---- .../tools/services/ComponentTypeFileHandler.html | 299 ---- .../sca/cpp/tools/services/DirectoryScanner.html | 271 ---- .../tuscany/sca/cpp/tools/services/DomHandler.html | 341 ----- .../sca/cpp/tools/services/DomNodeHandler.html | 262 ---- .../cpp/tools/services/GenericDomNodeHandler.html | 396 ----- .../sca/cpp/tools/services/LittleClass.html | 231 --- .../services/ModuleOrFragmentFileHandler.html | 258 ---- .../tools/services/ReferenceDomNodeHandler.html | 311 ---- .../tuscany/sca/cpp/tools/services/Scagen.html | 344 ----- .../cpp/tools/services/ServiceDomNodeHandler.html | 305 ---- .../sca/cpp/tools/services/ServicesGenerator.html | 312 ---- .../sca/cpp/tools/services/XMLFileActor.html | 469 ------ .../class-use/ComponentDomNodeHandler.html | 138 -- .../class-use/ComponentTypeFileHandler.html | 138 -- .../tools/services/class-use/DirectoryScanner.html | 138 -- .../cpp/tools/services/class-use/DomHandler.html | 138 -- .../tools/services/class-use/DomNodeHandler.html | 212 --- .../services/class-use/GenericDomNodeHandler.html | 204 --- .../cpp/tools/services/class-use/LittleClass.html | 138 -- .../class-use/ModuleOrFragmentFileHandler.html | 138 -- .../class-use/ReferenceDomNodeHandler.html | 138 -- .../sca/cpp/tools/services/class-use/Scagen.html | 138 -- .../services/class-use/ServiceDomNodeHandler.html | 138 -- .../services/class-use/ServicesGenerator.html | 138 -- .../cpp/tools/services/class-use/XMLFileActor.html | 186 --- .../sca/cpp/tools/services/package-frame.html | 65 - .../sca/cpp/tools/services/package-summary.html | 364 ----- .../sca/cpp/tools/services/package-tree.html | 162 -- .../sca/cpp/tools/services/package-use.html | 179 --- .../tools/scagen/docs/api/overview-frame.html | 46 - .../tools/scagen/docs/api/overview-summary.html | 174 --- .../tools/scagen/docs/api/overview-tree.html | 167 --- .../tools/scagen/docs/api/package-list | 2 - .../tools/scagen/docs/api/packages.html | 37 - .../tools/scagen/docs/api/resources/inherit.gif | Bin 57 -> 0 bytes .../tools/scagen/docs/api/serialized-form.html | 159 -- .../tools/scagen/docs/api/stylesheet.css | 29 - .../sca/cpp/tools/junit/CalculatorTest.java | 29 - .../sca/cpp/tools/junit/EnvHandlerTest.java | 46 - .../tools/junit/ImplClassWithNameSpaceTest.java | 46 - ...ntfClassWithNameSpaceButNotInClassAttrTest.java | 46 - .../tools/junit/IntfClassWithNameSpaceTest.java | 46 - .../tools/junit/MissingModuleAndFragmentTest.java | 46 - .../junit/SimplePublicPrivateProtectedTest.java | 47 - .../sca/cpp/tools/junit/TestAllModulesTest.java | 82 -- .../sca/cpp/tools/junit/TestDeployAssistTool.java | 94 -- .../sca/cpp/tools/junit/TuscanyTestCase.java | 332 ----- .../junit/scripts_for_standalone_testing/go.cmd | 2 - .../go_no_dir_option.cmd | 1 - .../go_no_input_dir.cmd | 1 - .../go_no_output_dir.cmd | 1 - .../refresh-tools-jar.cmd | 1 - .../CalculatorModuleAndComponent/Calculator.h | 32 - .../CalculatorImpl.componentType | 25 - .../CalculatorModuleAndComponent/CalculatorImpl.h | 33 - .../CalculatorModuleAndComponent/sca.module | 28 - .../otherSubFolder/CalculatorBack.h | 31 - .../otherSubFolder/CalculatorForward.h | 30 - .../CalculatorSlashDirectionTest/sca.module | 31 - .../subFolder/CalculatorBackImpl.componentType | 25 - .../subFolder/CalculatorBackImpl.h | 33 - .../subFolder/CalculatorForwardImpl.componentType | 25 - .../subFolder/CalculatorForwardImpl.h | 32 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 94 -- .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 34 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 89 -- .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 43 - .../MyValueServiceModule/CustomerInfo.fragment | 38 - .../modules/MyValueServiceModule/CustomerInfo.h | 36 - .../CustomerInfoImpl.componentType | 32 - .../MyValueServiceModule/CustomerInfoImpl.h | 46 - .../modules/MyValueServiceModule/MyValue.h | 35 - .../MyValueServiceModule/MyValueImpl.componentType | 38 - .../modules/MyValueServiceModule/MyValueImpl.hpp | 38 - .../MyValueImpl_stockQuote_Proxy.h | 34 - .../MyValueServiceModule/StockQuoteService.h | 33 - .../modules/MyValueServiceModule/sca.module | 59 - .../CustomerInfo.fragment | 38 - .../CustomerInfo.h | 37 - .../CustomerInfoImpl.componentType | 32 - .../CustomerInfoImpl.h | 47 - .../MyValue.h | 36 - .../MyValueImpl.componentType | 38 - .../MyValueImpl.hpp | 38 - .../MyValueImpl_stockQuote_Proxy.h | 34 - .../StockQuoteService.h | 32 - .../sca.module | 59 - .../MyValue.h | 39 - .../MyValueImpl.componentType | 28 - .../MyValueImpl.hpp | 38 - .../sca.module | 48 - .../MyValue.h | 37 - .../MyValueImpl.componentType | 28 - .../MyValueImpl.hpp | 38 - .../sca.module | 48 - .../CustomerInfo.fragmentX | 38 - .../sca.moduleX | 60 - .../CustomerInfo.fragment | 38 - .../MyValueServiceModuleTwoClasses/CustomerInfo.h | 36 - .../CustomerInfoImpl.componentType | 32 - .../CustomerInfoImpl.h | 45 - .../MyValueServiceModuleTwoClasses/MyValue.h | 35 - .../MyValueImpl.componentType | 38 - .../MyValueServiceModuleTwoClasses/MyValueImpl.hpp | 38 - .../MyValueImpl_stockQuote_Proxy.h | 34 - .../StockQuoteService.h | 32 - .../MyValueServiceModuleTwoClasses/sca.module | 59 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 40 - .../CustomerInfoImpl.componentType | 32 - .../CustomerInfoImpl.h | 34 - .../CalculatorImpl_CalculatorService_Proxy.cpp | 67 - .../CalculatorImpl_CalculatorService_Proxy.h | 34 - .../CalculatorImpl_CalculatorService_Wrapper.cpp | 71 - .../CalculatorImpl_CalculatorService_Wrapper.h | 36 - .../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 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 699 --------- .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 83 -- ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 449 ------ .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 556 ------- .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 79 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 376 ----- .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 - ...CustomerInfoImpl2_CustomerInfoService_Proxy.cpp | 64 - .../CustomerInfoImpl2_CustomerInfoService_Proxy.h | 34 - ...stomerInfoImpl2_CustomerInfoService_Wrapper.cpp | 71 - ...CustomerInfoImpl2_CustomerInfoService_Wrapper.h | 36 - .../MyValueImpl_MyValueService_Proxy.cpp | 100 -- .../MyValueImpl_MyValueService_Proxy.h | 37 - .../MyValueImpl_MyValueService_Wrapper.cpp | 89 -- .../MyValueImpl_MyValueService_Wrapper.h | 36 - .../MyValueImpl_customerInfo_Proxy.cpp | 64 - .../MyValueImpl_customerInfo_Proxy.h | 34 - .../MyValueImpl_stockQuote_Proxy.cpp | 66 - .../expected_output/MyValueImpl_stockQuote_Proxy.h | 34 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 64 - .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 34 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 71 - .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 - .../MyValueImpl_MyValueService_Proxy.cpp | 100 -- .../MyValueImpl_MyValueService_Proxy.h | 37 - .../MyValueImpl_MyValueService_Wrapper.cpp | 89 -- .../MyValueImpl_MyValueService_Wrapper.h | 36 - .../MyValueImpl_customerInfo_Proxy.cpp | 64 - .../MyValueImpl_customerInfo_Proxy.h | 34 - .../MyValueImpl_stockQuote_Proxy.cpp | 66 - .../expected_output/MyValueImpl_stockQuote_Proxy.h | 34 - .../MyValueImpl_MyValueService_Proxy.cpp | 100 -- .../MyValueImpl_MyValueService_Proxy.h | 37 - .../MyValueImpl_MyValueService_Wrapper.cpp | 89 -- .../MyValueImpl_MyValueService_Wrapper.h | 36 - .../MyValueImpl_MyValueService_Proxy.cpp | 100 -- .../MyValueImpl_MyValueService_Proxy.h | 37 - .../MyValueImpl_MyValueService_Wrapper.cpp | 89 -- .../MyValueImpl_MyValueService_Wrapper.h | 36 - ...CustomerInfoImpl2_CustomerInfoService_Proxy.cpp | 64 - .../CustomerInfoImpl2_CustomerInfoService_Proxy.h | 34 - ...stomerInfoImpl2_CustomerInfoService_Wrapper.cpp | 71 - ...CustomerInfoImpl2_CustomerInfoService_Wrapper.h | 36 - .../MyValueImpl_MyValueService_Proxy.cpp | 100 -- .../MyValueImpl_MyValueService_Proxy.h | 37 - .../MyValueImpl_MyValueService_Wrapper.cpp | 89 -- .../MyValueImpl_MyValueService_Wrapper.h | 36 - .../MyValueImpl_customerInfo_Proxy.cpp | 64 - .../MyValueImpl_customerInfo_Proxy.h | 34 - .../MyValueImpl_stockQuote_Proxy.cpp | 66 - .../expected_output/MyValueImpl_stockQuote_Proxy.h | 34 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 92 -- .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 36 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 88 -- .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 36 - tags/cpp-sca-20060405/tools/scagen/lib/readme.txt | 4 - tags/cpp-sca-20060405/tools/scagen/scagen.cmd | 1 - tags/cpp-sca-20060405/tools/scagen/scagen.sh | 17 - .../tuscany/sca/cpp/tools/common/BodyPart.java | 90 -- .../tuscany/sca/cpp/tools/common/CParsingTool.java | 119 -- .../sca/cpp/tools/common/Configuration.java | 126 -- .../sca/cpp/tools/common/DirectoryTree.java | 100 -- .../tuscany/sca/cpp/tools/common/FileActor.java | 32 - .../tuscany/sca/cpp/tools/common/FilePart.java | 75 - .../tuscany/sca/cpp/tools/common/Headers.java | 162 -- .../sca/cpp/tools/common/InputCppSourceCode.java | 412 ------ .../tuscany/sca/cpp/tools/common/MacroPart.java | 82 -- .../tuscany/sca/cpp/tools/common/MethodPart.java | 128 -- .../tuscany/sca/cpp/tools/common/Options.java | 159 -- .../tuscany/sca/cpp/tools/common/Parameter.java | 211 --- .../sca/cpp/tools/common/ParsingException.java | 42 - .../sca/cpp/tools/common/PrototypePart.java | 51 - .../tuscany/sca/cpp/tools/common/Signature.java | 501 ------- .../apache/tuscany/sca/cpp/tools/common/Utils.java | 543 ------- .../tuscany/sca/cpp/tools/common/package.html | 39 - .../tools/services/ComponentDomNodeHandler.java | 352 ----- .../tools/services/ComponentTypeFileHandler.java | 124 -- .../sca/cpp/tools/services/DirectoryScanner.java | 87 -- .../tuscany/sca/cpp/tools/services/DomHandler.java | 77 - .../sca/cpp/tools/services/DomNodeHandler.java | 40 - .../cpp/tools/services/GenericDomNodeHandler.java | 214 --- .../sca/cpp/tools/services/LittleClass.java | 27 - .../services/ModuleOrFragmentFileHandler.java | 85 -- .../tools/services/ReferenceDomNodeHandler.java | 67 - .../tuscany/sca/cpp/tools/services/Scagen.java | 170 --- .../cpp/tools/services/ServiceDomNodeHandler.java | 62 - .../sca/cpp/tools/services/ServicesGenerator.java | 802 ---------- .../sca/cpp/tools/services/XMLFileActor.java | 202 --- .../tuscany/sca/cpp/tools/services/package.html | 140 -- .../cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl | 398 ----- .../tools/services/xsl/SCA4CPPIntfProxyHeader.xsl | 215 --- .../tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl | 278 ---- .../services/xsl/SCA4CPPIntfWrapperHeader.xsl | 178 --- tags/cpp-sca-20060405/xsd/readme.txt | 2 - tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd | 37 - .../xsd/sca-binding-webservice.xsd | 38 - tags/cpp-sca-20060405/xsd/sca-core.xsd | 240 --- .../xsd/sca-implementation-cpp.xsd | 40 - .../xsd/sca-implementation-java.xsd | 38 - tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd | 50 - tags/cpp-sca-20060405/xsd/sca-interface-java.xsd | 39 - tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd | 39 - tags/cpp-sca-20060405/xsd/sca.xsd | 34 - tags/cpp-sca-20060405/xsd/tuscany.xsd | 48 - 1052 files changed, 53662 insertions(+), 53662 deletions(-) create mode 100644 sca-cpp/tags/cpp-sca-20060405/AUTHORS create mode 100755 sca-cpp/tags/cpp-sca-20060405/COPYING create mode 100644 sca-cpp/tags/cpp-sca-20060405/ChangeLog create mode 100644 sca-cpp/tags/cpp-sca-20060405/Developers Guide.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/INSTALL create mode 100755 sca-cpp/tags/cpp-sca-20060405/LICENSE create mode 100644 sca-cpp/tags/cpp-sca-20060405/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/NEWS create mode 100644 sca-cpp/tags/cpp-sca-20060405/README create mode 100755 sca-cpp/tags/cpp-sca-20060405/autogen.sh create mode 100755 sca-cpp/tags/cpp-sca-20060405/build.sh create mode 100644 sca-cpp/tags/cpp-sca-20060405/configure.ac create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/readme.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100755 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp create mode 100755 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceRuntimeException.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceRuntimeException.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Exceptions.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/build.sh create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/Calculator/runclient.sh create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Makefile.am create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Makefile.am create mode 100644 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/Makefile.am create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValue.h create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.componentType create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/MyValue/server.wsdd create mode 100755 sca-cpp/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem create mode 100755 sca-cpp/tags/cpp-sca-20060405/scatest.sh create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/build.xml create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.cmd create mode 100755 sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.sh create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl create mode 100644 sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/readme.txt create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-core.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/sca.xsd create mode 100644 sca-cpp/tags/cpp-sca-20060405/xsd/tuscany.xsd delete mode 100644 tags/cpp-sca-20060405/AUTHORS delete mode 100755 tags/cpp-sca-20060405/COPYING delete mode 100644 tags/cpp-sca-20060405/ChangeLog delete mode 100644 tags/cpp-sca-20060405/Developers Guide.txt delete mode 100644 tags/cpp-sca-20060405/INSTALL delete mode 100755 tags/cpp-sca-20060405/LICENSE delete mode 100644 tags/cpp-sca-20060405/Makefile.am delete mode 100644 tags/cpp-sca-20060405/NEWS delete mode 100644 tags/cpp-sca-20060405/README delete mode 100755 tags/cpp-sca-20060405/autogen.sh delete mode 100755 tags/cpp-sca-20060405/build.sh delete mode 100644 tags/cpp-sca-20060405/configure.ac delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp delete mode 100644 tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp delete mode 100644 tags/cpp-sca-20060405/readme.txt delete mode 100644 tags/cpp-sca-20060405/runtime/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100755 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp delete mode 100755 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/.cdtproject delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/.project delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceRuntimeException.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceRuntimeException.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Exceptions.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/.project delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/src/.project delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module delete mode 100644 tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Calculator.opt delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/.project delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd delete mode 100755 tags/cpp-sca-20060405/samples/Calculator/build.sh delete mode 100644 tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd delete mode 100755 tags/cpp-sca-20060405/samples/Calculator/runclient.sh delete mode 100644 tags/cpp-sca-20060405/samples/Makefile.am delete mode 100644 tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp delete mode 100644 tags/cpp-sca-20060405/samples/MyValue/Makefile.am delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am delete mode 100644 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Makefile.am delete mode 100644 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/Makefile.am delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValue.h delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.componentType delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh delete mode 100755 tags/cpp-sca-20060405/samples/MyValue/server.wsdd delete mode 100755 tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem delete mode 100755 tags/cpp-sca-20060405/scatest.sh delete mode 100644 tags/cpp-sca-20060405/tools/scagen/build.xml delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/index.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/package-list delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-sca-20060405/tools/scagen/lib/readme.txt delete mode 100644 tags/cpp-sca-20060405/tools/scagen/scagen.cmd delete mode 100755 tags/cpp-sca-20060405/tools/scagen/scagen.sh delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl delete mode 100644 tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl delete mode 100644 tags/cpp-sca-20060405/xsd/readme.txt delete mode 100644 tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-core.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-interface-java.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/sca.xsd delete mode 100644 tags/cpp-sca-20060405/xsd/tuscany.xsd diff --git a/sca-cpp/tags/cpp-sca-20060405/AUTHORS b/sca-cpp/tags/cpp-sca-20060405/AUTHORS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-cpp/tags/cpp-sca-20060405/COPYING b/sca-cpp/tags/cpp-sca-20060405/COPYING new file mode 100755 index 0000000000..6b0b1270ff --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/COPYING @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. + diff --git a/sca-cpp/tags/cpp-sca-20060405/ChangeLog b/sca-cpp/tags/cpp-sca-20060405/ChangeLog new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-cpp/tags/cpp-sca-20060405/Developers Guide.txt b/sca-cpp/tags/cpp-sca-20060405/Developers Guide.txt new file mode 100644 index 0000000000..96b0476174 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/Developers Guide.txt @@ -0,0 +1,346 @@ +Tuscany SCA For C++ Developers Guide +==================================== + +Contents: + Developing Services in C++ + Running C++ Services + + +See cpp/build.txt in the parent directory or the cpp/sca/INSTALL file +for build instructions. + +Building the tools +------------------ + +NOTE: this is built and installed by the build step above. + +Currently, there is only one tool: "scagen". It can be built using the +ant build script at \tuscany\cpp\sca\tools\scagen\build.xml. +The default target "all" will build the java jars, documentation, +scripts and a zip file of the whole thing. This is all the ant +build tasks apart from "test" which runs all the junit tests. + +The ant build script can be altered to add the junit tests to the +default target. Replace the line + + + +The "test" task was not included in "all" as it requires a +junit jar file to run. This jar is available here: +http://www.junit.org/index.htm testing has been done with +Junit version 3.8.1. + +Running the scagen tool +----------------------- + +The scagen tool user interface is quite basic in this initial release. +It can be run from the scagen.jar file using "java -jar scagen.jar" +or from small scripts - scagen.cmd for Windows and scagen.sh for Unix. +The parameters are: + -dir + -output + +e.g. + scagen -dir c:\mymodules\module1 -output c:\mymodules\bld\module1 + +What scagen does +---------------- + +The input directory passed to the scagen tools as +the -dir parameter method is taken to be the SCA +module root directory. All the sca.module and .fragment +files in that directory are inspected to resolve all +the elements within them. + +Each element found is inspected +to see if it has a element within it. + +Each element should have a +header attribute that represents a C++ header file +that contains function prototypes for the C++ +implementation of the service. An optional class +attribute can be used to select one class if more than +one that is present in the header file. The default +class is the one with the same name as the header file. +The tool will verify that the implementation header +contains an appropriate class prototype. + +The directory that contains the implementation header +should also contain a matching .componentType file for +the equivalent SCA component. So for example, a +MyServiceImpl.h file would have a corresponding +MyServiceImpl.componentType file in the same directory. + +Each componentType file is inspected for +and elements. For each element +that is found that contains a element +within it, + +the header attribute of the is taken +as the filename of the C++ interface header for the +SCA service. This C++ header file is opened and used +as a means for specifying the SCA service resulting +in an appropriate wrapper and proxy being generated +for this service interface. Both method bodies and h +eaders are generated in the given output directory. +The processing of a element is the same +except that only a proxy header and implementation +re generated. + + +Getting started with the code +----------------------------- + +The following is a list of tasks that are performed by the scagen tool +for each task we will describe technically how it is accomplished and +the location of the code that can be inspected/changed to alter the +behaviour. + +Here are the tasks listed, below is a paragraph for each one: + + o (Overall structure of the code) + o Walking the input directory + o Scanning the .module and .fragment files + o finding the C++ implementation headers + o finding/checking the classname in the C++ implementation headers + o find the matching .componentTemplate files + o going into the componentTemplate files to extract the interface header filenames + o going into the interface header files and parsing them to extract the method signatures + into a network of objects we can inspect. + o taking all the meta data stored as objects and building a DOM for XSLT processing + o using XSLT to produce a proxy header + o using XSLT to produce a proxy implementation + o using XSLT to produce a wrapper header + o using XSLT to produce a wrapper implementation + + +Overall structure of the code +----------------------------- + +There are two packages org.apache.tuscany.sca.cpp.tools.common and +org.apache.tuscany.sca.cpp.tools.services. The ...common package is +taken from some existing code that was also contributed to axis that +was used to parse C++ code and do various tasks like insert trace. +This code was repackaged and shipped as a tuscany package but there +has been a desire not to change it significantly from the equivalent +org.apache.axis.tools.common package to leave the door open for +future convergence. + +Where the ...common package has been amended (for example to cope with +namespaces better or the provision of an Options.reset method to reset a static +variable and enable the tuscany junit tests to run independently) these +have been flagged with a "Tuscany" comment. The ...common package basically +provides two functions - 1) the ability to go into a directory (see DirectoryTree.java) +and process files that fit a particular filter (e.g. "*.hpp") by passing them to +implementer of the FileActor Interface (see the classes "Headers" for the +actor that processes C++ headers and "XMLFileActor" for the file actor that +processes the .componentType and sca.module/fragment files.) + +The ...services package contains the majority of code written afresh for the +scagen tool including the subclasses of XMLFileActor (see ComponentTypeFileHandler.java +and ModuleOrFragmentFileHandler.java) that are the classes that tie this +package to the ...common package and which are called by the +DirectoryTree walker. + +Walking the module root input directory +--------------------------------------- + +The main method of the scagen class creates an instance of +"DirectoryScanner" and registers with it a file handler of +type "ModuleOrFragmentFileHandler" for all files that end +in ".module" or ".fragment". On calling the "walkTree" method +on the scanner it will in turn call the actOnFile method on the +ModuleOrFragmentFileHandler for appropriate files. + +Scanning the .module and .fragment files +---------------------------------------- + +The scanning of these files by the respective "ModuleOrFragmentFileHandler" +and "ComponentTypeFileHandler" is mostly handled by the superclass +"XMLFileActor". This class will recursively goes through the whole +XML file and considers the name of the XML element it finds. +"XMLFileActor" contains a map of element names to element handlers +that will "flatten out" the structure of the XML file "above" the +level of node we are interested in. + +So for example the ComponentTypeFile handler sets up the handlers +map as follows: + + GenericDomNodeHandler gdnh = new GenericDomNodeHandler(); + handlers.put("componentType", gdnh); + handlers.put("interface.cpp", gdnh); + ServiceDomNodeHandler sdnh = new ServiceDomNodeHandler(); + handlers.put("service", sdnh); + + ReferenceDomNodeHandler rdnh = new ReferenceDomNodeHandler(); + handlers.put("reference", rdnh); + +The majority of processing done by these DomNOdeHandlers is to +place the attributes and values discovered into another map that +maps an (static version of) the XPath of a value to the value itself. +So for example "/componentType/service/interface.cpp/@header" might contain +the current ("root to here") value of the header attribute of the current +interface. + +Particular handlers for the "leaves" of this tree +such as ServiceDomNodeHandler and ReferenceDomNodeHandler +can then consume these values from the map without having +to be concerned with the actual names of things, +like the service name, appearing in the key. It should be +understood though that there are multiple values placed in the map +for one "key" as the processing works its way through the +XML tree. For example the processing of a second component will +overlay its data over the same keys as the first component. +(After "wiping" the appropriate subtree.) + +Finding the C++ implementation headers +-------------------------------------- + +The "/module/component/implementation.cpp/@header" and +is used to key into the name of the implementation header +and this is opened directly and passed to the +actOnFileMethod of a Headers object from the ...common package +bypassing the DirectoryScanner code. The path is relative to +the given (-dir option) module root directory. + +Finding/checking the classname in the C++ implementation headers +----------------------------------------------------------------- + +This implementation header is not used to define the +methods of the SCA service but rather is opened to check + any given implementation.cpp/@class attribute +(or find out the name of the implementation class +in the header if this is not specified in the XML. This +is done using the same method that later parses the interface +C++ headers into java objects - we just them inspect the +class attribute of the "Signature" objects that represent the methods +we find in the header. + +Find the matching .componentType files +------------------------------------------ + +By SCA convention we go to the same directory as the implementation +files and look for the XXX.componentType files with the same name. +A instance of the ComponentDOMNodeHandler handles the data in the +Component Element and pre-creates a ComponentTypeFileHandler that +will eventually be called to process the .componentType file. This +object receives a number of "setParameter" calls to poke into it +matadata that is available prior/outside the the actual .componentType +file it will read. + +Go into the componentType files to extract the interface header filenames +----------------------------------------------------------------------------- + +We open up the .componentTemplateFiles with exactly the same +mechanism as we read the sca.module/fragment file (by creating +a DOM and descending through it this time using a ComponentTypeFileHandler that it +has had various data values ( e.g. the implementation class and namespace used later) +poked into it. The ComponentTypeFileHandler itself has individual +handlers for the service and reference XML/DOM element/nodes +that is comes across (ServiceDomNodeHandler and ReferenceDomNodeHandler +respectively). Each these handlers will pull out the name of +a C++ interface header and use it to resolve the interface of the +SCA Service. + +Parsing the interface header files for signatures +------------------------------------------------- + +The Service/Reference DOM Node hander both call the + ServicesGenerator.handleInterfaceHeader(parameters, true); +method, the second parameter is used to differentiate +the call source as we don't need wrapper files for +SCA references (just proxies). + +The ServicesGenerator uses the Headers file actor from +the ...common package to create a List of Signature +objects that describe the interface methods in the C++ +header. + +Take all the meta data stored as objects and build a DOM +-------------------------------------------------------- +We now have a List of Signature objects and a map that +represents the flattened information that we have pulled +from the XML files in the ServiceGenerator class. +We call a "createDOMofMethods" method +to consolidate all this information into one DOM +(this task should be split into more than one method as the +signature/parameter list of the method is too large). + +Use XSLT to produce the output files (Proxy/Wrapper headers and Implementations) +-------------------------------------------------------------------------------- + +The ServicesGenerator.handleInterfaceHeader(parameters, forReference); +method closes of with the code: + + createProxyCPPFromDom(outputDir, dom); + createProxyHeaderFromDom(outputDir, dom); + + if (!forReference) { + createWrapperCPPFromDom(outputDir, dom); + createWrapperHeaderFromDom(outputDir, dom); + } + + +Each of the create methods sets up the output +file name and a different XSLT transform and calls +"createOutputFromDom" to transform/filter the data in the +"model" that is held in our DOM of the data to a particular +"view" as expressed in the C++ output file. + +The four XSLT style sheets are in rough order of the output +file and this corresponds very roughly to a depth first descent +of the DOM tree so, for example, we could have in a stylesheet: + +... + void* + ::newImplementation() + { + return new (target); + } + +which would be output as: + + void* MyClassImpl_MyClass_Proxy::newImplementation() + { + return new MyClassImpl(target) + } + +given appropriate valies for $class and "../@implClass" and +$class might be defined to be: +xsl:variable name="clazz"> + + _ + + _Proxy + + +giving "MyClassImpl_MyClass_Proxy" + +The stylesheets can be found in the xsl subdirectory of the +org.apache.tuscany.sca.cpp.tools.services package. + +Unit Testing Scagen Code Changes +-------------------------------- + +The junit unit test + /tuscany/cpp/sca/tools/scagen/ + junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java + +will dynamically look for all the subdirectores of the directory +path given by TuscanyTestCase.junit_modules and run the scagen +tool on them as if they were modules roots. + +By convention an "expected_output" directory is located +(see the CVS tree or the test program) and the actual +and expected results compared. This testcase is thus a +good first/basic regression test for any changes. + +New test cases can thus be added without having to write +any new junit java code by by creating new SCA modules and +the associated expected Scagen output - perhaps by using the tool +initially and checking the output is satisfactory before copying +it to the expected output directory at: + +/tuscany/cpp/sca/tools/scagen/junit/testoutput//expected_output +where input data is taken from +/tuscany/cpp/sca/tools/scagen/junit/testinput/modules/ diff --git a/sca-cpp/tags/cpp-sca-20060405/INSTALL b/sca-cpp/tags/cpp-sca-20060405/INSTALL new file mode 100644 index 0000000000..196c78c22a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/INSTALL @@ -0,0 +1,13 @@ +Building Tuscany SCA on Linux. +============================== + +1. Extract the source to a folder. + +2. You need to set the following environment variable to point to tuscany sdo + TUSCANY_SDOCPP + +3. You need to set the following environment variable to point to Axis-c installation: + AXISCPP_DEPLOY + +4. Build the source + ./build.sh diff --git a/sca-cpp/tags/cpp-sca-20060405/LICENSE b/sca-cpp/tags/cpp-sca-20060405/LICENSE new file mode 100755 index 0000000000..6b0b1270ff --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/LICENSE @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. + diff --git a/sca-cpp/tags/cpp-sca-20060405/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/Makefile.am new file mode 100644 index 0000000000..943bcc3797 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = runtime samples diff --git a/sca-cpp/tags/cpp-sca-20060405/NEWS b/sca-cpp/tags/cpp-sca-20060405/NEWS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-cpp/tags/cpp-sca-20060405/README b/sca-cpp/tags/cpp-sca-20060405/README new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-cpp/tags/cpp-sca-20060405/autogen.sh b/sca-cpp/tags/cpp-sca-20060405/autogen.sh new file mode 100755 index 0000000000..d40a2eb9d4 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/autogen.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +for i in libtoolize aclocal autoconf autoheader +do + echo -n "Running $i..." + $i || exit 1 + echo 'done.' +done + +echo -n 'Running automake...' +automake --add-missing +echo 'done.' +exit 0 + diff --git a/sca-cpp/tags/cpp-sca-20060405/build.sh b/sca-cpp/tags/cpp-sca-20060405/build.sh new file mode 100755 index 0000000000..217569303a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/build.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +# 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. + +TUSCANY_SCACPP_HOME=`pwd` + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$TUSCANY_SDOCPP = x ]; then +echo "TUSCANY_SDOCPP not set" +exit; +fi +echo "Using SDO installed at $TUSCANY_SDOCPP" + +# Build tools first as they will be used to generate cpp code +cd $TUSCANY_SCACPP_HOME/tools/scagen +ant +chmod a+x $TUSCANY_SCACPP_HOME/bin/scagen.sh + +cd $TUSCANY_SCACPP_HOME +./autogen.sh +./configure --prefix=${TUSCANY_SCACPP_HOME} +make +make install diff --git a/sca-cpp/tags/cpp-sca-20060405/configure.ac b/sca-cpp/tags/cpp-sca-20060405/configure.ac new file mode 100644 index 0000000000..8316b09828 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/configure.ac @@ -0,0 +1,57 @@ +dnl run autogen.sh to generate the configure script. + +AC_PREREQ(2.59) +AC_INIT(tuscany_sca, 1.0.0) +AC_CANONICAL_SYSTEM +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS([inttypes.h stdlib.h string.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_C_INLINE + +# Checks for library functions. +AC_FUNC_CLOSEDIR_VOID +AC_FUNC_STAT +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([getcwd putenv strdup]) + +AC_CONFIG_FILES([Makefile + runtime/Makefile + runtime/core/Makefile + runtime/core/src/Makefile + runtime/axis_binding/Makefile + runtime/axis_binding/handler/Makefile + runtime/axis_binding/handler/src/Makefile + runtime/axis_binding/wrapper/Makefile + runtime/axis_binding/wrapper/src/Makefile + runtime/core/test/Makefile + runtime/core/test/CustomerInfo/Makefile + runtime/core/test/MyValue/Makefile + runtime/core/test/src/Makefile + samples/Makefile + samples/MyValue/Makefile + samples/MyValue/MyValueModule/Makefile + samples/MyValue/MyValueModule/CustomerInfo/Makefile + samples/MyValue/MyValueModule/MyValue/Makefile + samples/MyValue/Client/Makefile + ]) +AC_OUTPUT + diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw new file mode 100644 index 0000000000..81e97ea3fb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw @@ -0,0 +1,113 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "tuscany_sca"=.\tuscany_sca\tuscany_sca.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tuscany_sca_axis_handler"=.\tuscany_sca_axis_handler\tuscany_sca_axis_handler.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name tuscany_sca + End Project Dependency +}}} + +############################################################################### + +Project: "tuscany_sca_axis_wrapper"=.\tuscany_sca_axis_wrapper\tuscany_sca_axis_wrapper.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name tuscany_sca + End Project Dependency + Begin Project Dependency + Project_Dep_Name tuscany_sca_axis_handler + End Project Dependency +}}} + +############################################################################### + +Project: "tuscany_sca_test"=.\tuscany_sca_test\tuscany_sca_test.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name tuscany_sca + End Project Dependency + Begin Project Dependency + Project_Dep_Name tuscany_sca_test_CustomerInfo + End Project Dependency + Begin Project Dependency + Project_Dep_Name tuscany_sca_test_MyValue + End Project Dependency +}}} + +############################################################################### + +Project: "tuscany_sca_test_CustomerInfo"=.\tuscany_sca_test_CustomerInfo\tuscany_sca_test_CustomerInfo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name tuscany_sca + End Project Dependency +}}} + +############################################################################### + +Project: "tuscany_sca_test_MyValue"=.\tuscany_sca_test_MyValue\tuscany_sca_test_MyValue.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name tuscany_sca + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb new file mode 100644 index 0000000000..907058086b Binary files /dev/null and b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb differ diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt new file mode 100644 index 0000000000..1fc90712e5 Binary files /dev/null and b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt differ diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt new file mode 100644 index 0000000000..3dbf56c29e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt @@ -0,0 +1,32 @@ +Tuscanny SCA Build Instructions +=============================== + +1) Set the environment variable TUSCANY_SDOCPP to the path of an SDO driver + +2) Set the environment variable AXISCPP to the path of Axis for C++ + +NOTE: The environment variables must be set BEFORE launching Visual Studio + +3) Build->Rebuild All + +The output for the build will be in tuscany\cpp\sca\include, lib and bin + +To run the test from a command prompt: + +1) Set the environment variable TUSCANY_SCACPP to the location of the built SCA + (...tuscany\cpp\sca) + +2) Add %TUSCANY_SCACPP%\lib and %TUSCANY_SDOCPP%\lib to the PATH + (ensure required libraries for SDO are also on the path. e.g. libxml2) + +3) Set the environment variable TUSCANY_SCACPP_SYSTEM_ROOT to the test system folder + (%TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\testSCASystem) + +4) Set the environment variable TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1 + +5) cd %TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\Debug + +6) tuscany_sca_test + +NOTE: To run the test from the workspace the environment variables must be set + BEFORE launching Visual Studio diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp new file mode 100644 index 0000000000..669784184a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp @@ -0,0 +1,520 @@ +# Microsoft Developer Studio Project File - Name="tuscany_sca" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=tuscany_sca - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca.mak" CFG="tuscany_sca - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tuscany_sca - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tuscany_sca - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tuscany_sca - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /machine:I386 /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=del ..\..\..\bin\tuscany_sca.* del ..\..\..\lib\*.lib copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\include\osoa\sca copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\include\tuscany\sca\core copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\include\tuscany\sca\model copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\include\tuscany\sca\util copy Release\tuscany_sca.dll ..\..\..\bin copy Release\tuscany_sca.lib ..\..\..\lib copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\include\tuscany\sca\ws +# End Special Build Tool + +!ELSEIF "$(CFG)" == "tuscany_sca - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=del ..\..\..\bin\tuscany_sca.* del ..\..\..\lib\*.lib copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\include\osoa\sca copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\include\tuscany\sca\core copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\include\tuscany\sca\model copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\include\tuscany\sca\util copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\include\tuscany\sca\ws copy Debug\tuscany_sca.dll ..\..\..\bin copy Debug\tuscany_sca.pdb ..\..\..\bin copy Debug\tuscany_sca.lib ..\..\..\lib +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "tuscany_sca - Win32 Release" +# Name "tuscany_sca - Win32 Debug" +# Begin Group "osoa/sca" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\export.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\SCA.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\sca.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.h +# End Source File +# End Group +# Begin Group "tuscany/sca" + +# PROP Default_Filter "" +# Begin Group "core" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.h +# End Source File +# End Group +# Begin Group "model" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.h +# End Source File +# End Group +# Begin Group "util" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Exceptions.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logging.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.h +# End Source File +# End Group +# Begin Group "ws" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\SDOStub.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\SDOStub.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\WSServiceWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\WSServiceWrapper.h +# End Source File +# End Group +# End Group +# Begin Group "xsd" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE="..\..\..\xsd\sca-binding-sca.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-binding-webservice.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-core.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-implementation-cpp.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-implementation-java.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-interface-cpp.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-interface-java.xsd" +# End Source File +# Begin Source File + +SOURCE="..\..\..\xsd\sca-interface-wsdl.xsd" +# End Source File +# Begin Source File + +SOURCE=..\..\..\xsd\sca.xsd +# End Source File +# Begin Source File + +SOURCE=..\..\..\xsd\tuscany.xsd +# End Source File +# End Group +# Begin Source File + +SOURCE=".\Build Instructions.txt" +# End Source File +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp new file mode 100644 index 0000000000..2918310756 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp @@ -0,0 +1,121 @@ +# Microsoft Developer Studio Project File - Name="tuscany_sca_axis_handler" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=tuscany_sca_axis_handler - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_axis_handler.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_axis_handler.mak" CFG="tuscany_sca_axis_handler - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tuscany_sca_axis_handler - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tuscany_sca_axis_handler - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tuscany_sca_axis_handler - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /machine:I386 /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy Release\tuscany_sca_axis_handler.dll ..\..\..\bin copy Release\tuscany_sca_axis_handler.lib ..\..\..\lib +# End Special Build Tool + +!ELSEIF "$(CFG)" == "tuscany_sca_axis_handler - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy Debug\tuscany_sca_axis_handler.dll ..\..\..\bin copy Debug\tuscany_sca_axis_handler.pdb ..\..\..\bin copy Debug\tuscany_sca_axis_handler.lib ..\..\..\lib +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "tuscany_sca_axis_handler - Win32 Release" +# Name "tuscany_sca_axis_handler - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\runtime\axis_binding\handler\src\SCAWSHandler.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\runtime\axis_binding\handler\src\SCAWSHandler.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp new file mode 100644 index 0000000000..b8290f3176 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp @@ -0,0 +1,121 @@ +# Microsoft Developer Studio Project File - Name="tuscany_sca_axis_wrapper" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=tuscany_sca_axis_wrapper - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_axis_wrapper.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_axis_wrapper.mak" CFG="tuscany_sca_axis_wrapper - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tuscany_sca_axis_wrapper - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tuscany_sca_axis_wrapper - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tuscany_sca_axis_wrapper - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_WRAPPER_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_AXIS_SCA_EXPORTS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /machine:I386 /libpath:".\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" /libpath:"..\..\..\lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy Release\tuscany_sca_axis_wrapper.dll ..\..\..\bin copy Release\tuscany_sca_axis_wrapper.lib ..\..\..\lib +# End Special Build Tool + +!ELSEIF "$(CFG)" == "tuscany_sca_axis_wrapper - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_WRAPPER_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_AXIS_SCA_EXPORTS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy Debug\tuscany_sca_axis_wrapper.dll ..\..\..\bin copy Debug\tuscany_sca_axis_wrapper.pdb ..\..\..\bin copy Debug\tuscany_sca_axis_wrapper.lib ..\..\..\lib +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "tuscany_sca_axis_wrapper - Win32 Release" +# Name "tuscany_sca_axis_wrapper - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\runtime\axis_binding\wrapper\src\SCAWSWrapper.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\runtime\axis_binding\wrapper\src\SCAWSWrapper.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment new file mode 100644 index 0000000000..c2c521ed96 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment @@ -0,0 +1,36 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..48651b63fe --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType new file mode 100644 index 0000000000..ace4154966 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl new file mode 100644 index 0000000000..4917cde583 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config new file mode 100644 index 0000000000..7fee074333 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module new file mode 100644 index 0000000000..e94a8ef795 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module @@ -0,0 +1,51 @@ + + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem new file mode 100644 index 0000000000..1b32bf8a93 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem @@ -0,0 +1,27 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp new file mode 100644 index 0000000000..909b2b22f8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp @@ -0,0 +1,104 @@ +# Microsoft Developer Studio Project File - Name="tuscany_sca_test" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tuscany_sca_test - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_test.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_test.mak" CFG="tuscany_sca_test - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tuscany_sca_test - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tuscany_sca_test - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tuscany_sca_test - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy ..\tuscany_sca_test_MyValue\Release\MyValue.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Release\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule +# End Special Build Tool + +!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy ..\tuscany_sca_test_MyValue\Debug\MyValue.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_MyValue\Debug\MyValue.pdb testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.pdb testSCASystem\modules\MyValueServiceModule +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "tuscany_sca_test - Win32 Release" +# Name "tuscany_sca_test - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\src\TestSCA.cpp +# End Source File +# End Group +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp new file mode 100644 index 0000000000..465eae5e72 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp @@ -0,0 +1,133 @@ +# Microsoft Developer Studio Project File - Name="tuscany_sca_test_CustomerInfo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=tuscany_sca_test_CustomerInfo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_test_CustomerInfo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_test_CustomerInfo.mak" CFG="tuscany_sca_test_CustomerInfo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /out:"Release/CustomerInfo.dll" /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" + +!ELSEIF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /out:"Debug/CustomerInfo.dll" /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" + +!ENDIF + +# Begin Target + +# Name "tuscany_sca_test_CustomerInfo - Win32 Release" +# Name "tuscany_sca_test_CustomerInfo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp new file mode 100644 index 0000000000..36798c24da --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp @@ -0,0 +1,153 @@ +# Microsoft Developer Studio Project File - Name="tuscany_sca_test_MyValue" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=tuscany_sca_test_MyValue - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_test_MyValue.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tuscany_sca_test_MyValue.mak" CFG="tuscany_sca_test_MyValue - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tuscany_sca_test_MyValue - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "tuscany_sca_test_MyValue - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /out:"Release/MyValue.dll" /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" + +!ELSEIF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /out:"Debug/MyValue.dll" /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" + +!ENDIF + +# Begin Target + +# Name "tuscany_sca_test_MyValue - Win32 Release" +# Name "tuscany_sca_test_MyValue - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\runtime\core\test\MyValue\StockQuoteService.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/readme.txt b/sca-cpp/tags/cpp-sca-20060405/readme.txt new file mode 100644 index 0000000000..146bef5f26 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/readme.txt @@ -0,0 +1,37 @@ +Tuscany SCA C++ +=============== + +Tuscany SCA C++ provides a runtime implementation for the Service Component +Architecture 0.9 specification, written in C++ and will currently support C++ +component implementation types. This is not yet a complete implementation and +known restrictions are described below. + +Supported SCA Assembly Model features + * All features are supported unless listed under the known restrictions + below. See SCA Assembly Model specification. + +Supported language bindings + * Component implementations written in C++. See SCA Client and + Implementation Model specification. + * Component interfaces described by C++ classes. See SCA Client and + Implementation Model specification. + +Supported external service and entry point bindings + * The web service binding is supported. This implementation will support + web services which using document literal SOAP bindings conforming to the + WS-I basic profile (rpc/encoded is not supported). + +Known restrictions + * Subsystem wiring, entry points and external services are not supported. + * Remotable services that will be bound to the web service binding must have + an interface with a single input parameter which is an SDO DataObjectPtr, + and a single return type which is an SDO DataObjectPtr. + * Local service interfaces cannot use overloaded operations (the SCA + specification limits remote service interfaces to not using overloaded + operations). + * Only component properties with simple types are supported. + * Each WSDL definition for a web service binding must be in a single WSDL + document. + * No load time validation of the deployed SCA application (run time validation + only). + * No metadata API. diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/Makefile.am new file mode 100644 index 0000000000..caacfcdef5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = core axis_binding diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am new file mode 100644 index 0000000000..f7eaa50485 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = handler wrapper diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am new file mode 100644 index 0000000000..956b824d5c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = src + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild new file mode 100644 index 0000000000..55590cf0c8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project new file mode 100644 index 0000000000..a2718eca4f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project @@ -0,0 +1,19 @@ + + + tuscany_sca_axis_handler + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..1023be0afa --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Thu Feb 16 14:40:27 GMT 2006 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.2106566379=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.221779505=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.2106566379=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.221779505=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.2106566379=\n\n +environment/project/cdt.managedbuild.config.gnu.so.release.221779505=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am new file mode 100644 index 0000000000..6054ec7b31 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am @@ -0,0 +1,9 @@ +lib_LTLIBRARIES = libtuscany_sca_axis_handler.la + +libtuscany_sca_axis_handler_la_SOURCES = SCAWSHandler.cpp + +libtuscany_sca_axis_handler_la_LIBADD = -lstdc++ + +INCLUDES = -I$(top_builddir)/runtime/core/src \ + -I${AXISCPP_DEPLOY}/include + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp new file mode 100644 index 0000000000..ed57c0677e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp @@ -0,0 +1,154 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date$ */ + +#include "SCAWSHandler.h" +#include +#include + +AXIS_CPP_NAMESPACE_USE +using std::string; + +/** Construct an SCAWSHandler. + */ +SCAWSHandler::SCAWSHandler() +{ + return; +} + +/** Destruct an SCAWSHandler. + */ +SCAWSHandler::~SCAWSHandler() +{ +} + + +/** Perform any necessary initialization. + */ +int SCAWSHandler::init() +{ + return AXIS_SUCCESS; +} + +/** Perform any necessary finalization. + */ +int SCAWSHandler::fini() +{ + return AXIS_SUCCESS; +} + +/** Get the SCA specific properties that were set in the deployment + * descriptor (server.wsdd) and set them into the MessageData where + * they can be retrieved by the SCAWSWrapper to invoke the correct + * SCA Entry Point. + * @param pvIMsg - pointer to IMessageData + * + * @see SCAWSWrapper + */ +int SCAWSHandler::invoke(void *pvIMsg) +{ + IMessageData *pIMsg = (IMessageData*) pvIMsg; + + if(pIMsg->isPastPivot()) + { + // This is a response. + } + else + { + // This is a request + + // + // Get the SCA specific properties from the handler. + // + + // NOTE: WE CANNOT MAKE THE SIMPLE 'GETOPTION' CALLS BECAUSE THE + // STD::MAP CODE WILL CAUSE AN ACCESS VIOLATION IN AXISSERVER.DLL. + // THE GETOPTION METHOD IN HANDLER.HPP NEEDS TO BE MOVED INTO + // AXISSERVER.DLL AND BE EXPORTED. + //const string& strTargetNamespace = getOption("targetNamespace"); + //const string& strSCAEntryPoint = getOption("scaEntryPoint"); + + // HACK + // BECAUSE WE CANNOT MAKE ANY MAP CALLS THAT REQUIRE PARAMETERS AND + // CANNOT SEEM TO ITERATE OVER THE MAP IN A FOR LOOP EITHER WITHOUT + // TRAPPING, WE RESORT TO READING THE FIRST AND LAST PROPERTIES. + // THIS IS ACCEPTABLE AS A WORKAROUND FOR NOW BECAUSE WE ONLY + // HAVE TWO PROPERTIES. + string strName; + string strValue; + // Read the first property in the map and set its name and value + // into the IMessageData. + map::const_iterator it = m_pOption->begin(); + strName = (*it).first; + strValue = (*it).second; + pIMsg->setProperty(strName.c_str(), strValue.c_str()); + // Read the last property in the map and set its name and value + // into the IMessageData. + map::const_reverse_iterator itr = m_pOption->rbegin(); + strName = (*itr).first; + strValue = (*itr).second; + pIMsg->setProperty(strName.c_str(), strValue.c_str()); + // END HACK + } + + return AXIS_SUCCESS; +} + +/** Handle Faults. + */ +void SCAWSHandler::onFault(void *pvIMsg) +{ + +} + +// +// These functions are exported from the SCAWSHandler DLL and are called by the Axis Engine +// to create/destroy instances of the SCAWSHandler class. +// +extern "C" +{ +STORAGE_CLASS_INFO +int GetClassInstance(BasicHandler **inst) +{ + *inst = new BasicHandler(); + + SCAWSHandler* pSCAWSHandler = new SCAWSHandler(); + (*inst)->_functions = 0; + if (pSCAWSHandler) + { + (*inst)->_object = pSCAWSHandler; + return pSCAWSHandler->init(); + } + + return AXIS_FAIL; +} + +STORAGE_CLASS_INFO +int DestroyInstance(BasicHandler *inst) +{ + if (inst) + { + Handler* pH = static_cast(inst->_object); + pH->fini(); + delete pH; + delete inst; + return AXIS_SUCCESS; + } + return AXIS_FAIL; +} +} // extern "C" diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h new file mode 100644 index 0000000000..3f0c576921 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h @@ -0,0 +1,79 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#if !defined(SCAWSHANDLER_H_INCLUDED) +#define SCAWSHANDLER_H_INCLUDED + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include + +/** The SCAWSHandler class is an Axis Handler that retrieves properties set + * in the deployment descriptor (server.wsdd) and sets them into the + * MessageData for use by the SCAWSWrapper which invokes SCA Entry Points. + * + * @see SCAWSWrapper + */ +AXIS_CPP_NAMESPACE_USE + +class SCAWSHandler : public Handler +{ + public: + /** Construct an SCAWSHandler. + */ + SCAWSHandler(void); + + /** Destruct an SCAWSHandler. + */ + virtual ~SCAWSHandler(void); + + // Axis WrapperClassHandler interface. + + /** Perform an necessary initialization. + */ + int AXISCALL init(); + + /** Perform any necessary finalization. + */ + int AXISCALL fini(); + + /** Get the SCA specific properties that were set in the deployment + * descriptor (server.wsdd) and set them into the MessageData where + * they can be retrieved by the SCAWSWrapper to invoke the correct + * SCA Entry Point. + * @param pvIMsg - pointer to IMessageData + * + * @see SCAWSWrapper + */ + int AXISCALL invoke(void* pvIMsg); + + /** Handle Faults. + */ + void AXISCALL onFault(void* pvIMsg); + + private: + +}; + + +#endif // !defined(SCAWSHANDLER_H_INCLUDED) + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am new file mode 100644 index 0000000000..af437a64d6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild new file mode 100644 index 0000000000..cad284f534 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project new file mode 100644 index 0000000000..526e05b5c0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project @@ -0,0 +1,19 @@ + + + tuscany_sca_axis_wrapper + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..263f7d68d6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Thu Feb 16 14:46:12 GMT 2006 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.928824798=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.417732635=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.928824798=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.417732635=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.928824798=\n\n\n\n +environment/project/cdt.managedbuild.config.gnu.so.release.417732635=\n\n\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp new file mode 100755 index 0000000000..d23689ad9d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp @@ -0,0 +1,105 @@ +/* + * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) + * This file contains implementations of the Exception class of the web service. + */ + +#include "AxisServiceException.h" + +#include + +AxisServiceException::AxisServiceException() +{ +/* This only serves the purpose of indicating that the + * service has thrown an excpetion + */ + m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; + processException(m_iExceptionCode); +} + +AxisServiceException::AxisServiceException(ISoapFault* pFault) +{ + m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; + m_pISoapFault = pFault; + processException(pFault);} + +AxisServiceException::AxisServiceException(int iExceptionCode) +{ + + m_iExceptionCode = iExceptionCode; + processException (iExceptionCode); +} + +AxisServiceException::AxisServiceException(exception* e) +{ + processException (e); +} + +AxisServiceException::AxisServiceException(exception* e,int iExceptionCode) +{ + + processException (e, iExceptionCode); +} + +AxisServiceException::AxisServiceException(string sMessage) +{ + m_sMessage =sMessage; +} + +AxisServiceException::~AxisServiceException() throw () +{ + m_sMessage =""; +} + +void AxisServiceException:: processException(exception* e, int iExceptionCode) +{ + m_sMessage = getMessage (e) + getMessage (iExceptionCode); +} + +void AxisServiceException::processException (ISoapFault* pFault) +{ + /*User can do something like deserializing the struct into a string*/ +} + +void AxisServiceException::processException(exception* e) +{ + m_sMessage = getMessage (e); +} + +void AxisServiceException::processException(int iExceptionCode) +{ + m_sMessage = getMessage (iExceptionCode); +} + +const string AxisServiceException::getMessage (exception* objException) +{ + string sMessage = objException->what(); + return sMessage; +} + +const string AxisServiceException::getMessage (int iExceptionCode) +{ + string sMessage; + switch(iExceptionCode) + { + case AXISC_SERVICE_THROWN_EXCEPTION: + sMessage = "The service has thrown an exception. see details"; + break; + default: + sMessage = "Unknown Exception has occured in the service"; + } +return sMessage; +} + +const char* AxisServiceException::what() throw () +{ + return m_sMessage.c_str (); +} + +const int AxisServiceException::getExceptionCode(){ + return m_iExceptionCode; +} + +const ISoapFault* AxisServiceException::getFault(){ + return m_pISoapFault; +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h new file mode 100755 index 0000000000..7684740b88 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h @@ -0,0 +1,44 @@ +/* + * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) + * This file contains an Exception class of the web service. + */ + +#if !defined(__AXISSERVICEEXCEPTION_EXCEPTION_H__INCLUDED_) +#define __AXISSERVICEEXCEPTION_EXCEPTION_H__INCLUDED_ + +#include +#include +#include +#include + +using namespace std; +AXIS_CPP_NAMESPACE_USE + +class AxisServiceException: public AxisException +{ +public: + STORAGE_CLASS_INFO AxisServiceException(); + STORAGE_CLASS_INFO AxisServiceException(ISoapFault* pFault); + STORAGE_CLASS_INFO AxisServiceException(int iExceptionCode); + STORAGE_CLASS_INFO AxisServiceException(exception* e); + STORAGE_CLASS_INFO AxisServiceException(exception* e, int iExceptionCode); + STORAGE_CLASS_INFO AxisServiceException(string sMessage); + STORAGE_CLASS_INFO virtual ~AxisServiceException() throw(); + STORAGE_CLASS_INFO const char* what() throw(); + STORAGE_CLASS_INFO const int getExceptionCode(); + STORAGE_CLASS_INFO const string getMessage(exception* e); + STORAGE_CLASS_INFO const string getMessage(int iExceptionCode); + STORAGE_CLASS_INFO const ISoapFault* getFault(); + +private: + void processException(exception* e); + void processException(ISoapFault* pFault); + void processException(exception* e, int iExceptionCode); + void processException(int iExceptionCode); + string m_sMessage; + int m_iExceptionCode; + ISoapFault* m_pISoapFault; + +}; + +#endif /* !defined(__AXISSERVICEEXCEPTION_EXCEPTION_H__INCLUDED_)*/ diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am new file mode 100644 index 0000000000..ec6e6eccdf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am @@ -0,0 +1,12 @@ +lib_LTLIBRARIES = libtuscany_sca_axis_wrapper.la + +libtuscany_sca_axis_wrapper_la_SOURCES = SCAWSWrapper.cpp AxisServiceException.cpp + +libtuscany_sca_axis_wrapper_la_LIBADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ + -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -lxml2 -lstdc++ \ + -L${AXISCPP_DEPLOY}/lib -laxis_client + +INCLUDES = -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include \ + -I${AXISCPP_DEPLOY}/include + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp new file mode 100644 index 0000000000..57f3f40148 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp @@ -0,0 +1,268 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "SCAWSWrapper.h" + +#include "commonj/sdo/SDO.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/core/SCAEntryPoint.h" + +#include "axis/GDefine.h" +#include "AxisServiceException.h" + + +using namespace std; +using namespace commonj::sdo; +using namespace tuscany::sca; +AXIS_CPP_NAMESPACE_USE; + +/** Construct an SCAWSWrapper. + */ +SCAWSWrapper::SCAWSWrapper() +{ +} + +/** Destruct an SCAWSWrapper. + */ +SCAWSWrapper::~SCAWSWrapper() +{ +} + + +// +// Implementation of WrapperClassHandler interface +// + +/** Perform any necessary initialization. + */ +int SCAWSWrapper::init() +{ + return AXIS_SUCCESS; +} + +/** Perform an necessary finalization. + */ +int SCAWSWrapper::fini() +{ + return AXIS_SUCCESS; +} + +/** Invoke a web service operation. The invoke method expects SCA specific + * properties to have been set into the MessageData by the SCAWSHandler. + * Using those properties, the wrapper will invoke the correct SCA Entry + * Point. + * @param pMsg - pointer to IMessageData. + * + * @see SCAWSHandler + */ +int SCAWSWrapper::invoke(void *pMsg) +{ + + IMessageData *pIMsg = (IMessageData*)pMsg; + const AxisChar *operationName = pIMsg->getOperationName(); + + int axisReturn = invokeService(pIMsg, operationName); + return axisReturn; +} + +/** Handle Faults. + */ +void SCAWSWrapper::onFault(void *pMsg) +{ +} + + +// Invoke an operation on an SCA Entry Point. +int SCAWSWrapper::invokeService(IMessageData *pIMsg, + const AxisChar *operationName) +{ + int axisReturn = AXIS_SUCCESS; + + // Get the SoapSerializer. + IWrapperSoapSerializer* pIWSSZ; + pIMsg->getSoapSerializer(&pIWSSZ); + if (!pIWSSZ) + { + return AXIS_FAIL; + } + + // Get the SoapDeSerializer. + IWrapperSoapDeSerializer* pIWSDZ; + pIMsg->getSoapDeSerializer(&pIWSDZ); + if (!pIWSDZ) + { + return AXIS_FAIL; + } + + // Target Namespace was set into the MessageData by the SCAWSHandler. + const AxisChar *targetNamespace = (const AxisChar *)pIMsg->getProperty("targetNamespace"); + + // Make sure we have the correct message. + if (AXIS_SUCCESS != pIWSDZ->checkMessageBody(operationName, targetNamespace)) + { + return AXIS_FAIL; + } + + try + { + // + // Create the SCA EntryPoint + // + const AxisChar *scaEntryPointName = (const AxisChar *)pIMsg->getProperty("scaEntryPoint"); + SCAEntryPoint entrypoint(scaEntryPointName); + + // Get the DataFactory which has Types loaded from WSDLs + DataFactoryPtr dataFactory = entrypoint.getDataFactory(); + + // + // Get the Soap body and create an SDO request object from it. + // + AnyType *soapAny = pIWSDZ->getAnyObject(); + + // The Doc Literal soap message does not include the root element (operation name) when + // we use getAnyObject. Axis calls this element the 'soap method' but there is no + // 'getSoapMethod' method on the deserializer - we need to wrap the soap body with an + // element named for the operation name. + + string soapBody("<"); + soapBody.append(operationName); + soapBody.append(" "); + soapBody.append("xmlns"); + soapBody.append("=\""); + soapBody.append(targetNamespace); + soapBody.append("\">"); + for (int i=0; i < soapAny->_size ; i++) + { + // The soap body is stored in the _array member of AnyType. + soapBody.append(soapAny->_array[i]); + } + soapBody.append(""); + + // + // Create the SDO request object from the soap body. + // + XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(dataFactory); + XMLDocumentPtr xmlDoc = xmlHelper->load(soapBody.c_str(), targetNamespace); + DataObjectPtr requestSDO = xmlDoc->getRootDataObject(); + + // + // Invoke the operation on the SCA EntryPoint. + // + DataObjectPtr responseSDO = entrypoint.invoke(operationName, requestSDO); + + // + // Serialize the responseSDO into a SOAP response. + // + // Get the name of the response SDO. The entry point was invoked using an + // SDOStub and the stub makes sure that the response includes the root + // element (operation response name). + + const Type &responseType = responseSDO->getType(); + const char *operationResponseName = responseType.getName(); + + // Get the first child of the root element - this is the soap body + // to return in the response. The body will be wrapped with the root + // element (operation response name) when we call the Axis method + // 'createSoapmMethod'. + DataObjectPtr soapBodySDO = responseSDO->getDataObject((unsigned int)0); + const Type& soapBodyType = soapBodySDO->getType(); + const char *soapBodyName = soapBodyType.getName(); + // Convert the soap body DataObject into XML. + XMLDocumentPtr responseDoc = xmlHelper->createDocument(soapBodySDO, + targetNamespace, + soapBodyName); + responseDoc->setXMLDeclaration(false); + char *responseXML = xmlHelper->save(responseDoc); + + // + // Serialize the response + // + // Wrap the soap body with the root element (operation response name). + pIWSSZ->createSoapMethod(operationResponseName, targetNamespace); + // Add the XML response document (soap body) as an AnyType. + AnyType *soapAnyResponse = new AnyType(); + soapAnyResponse->_size = 1; + soapAnyResponse->_array = new char*[1]; + soapAnyResponse->_array[0] = strdup(responseXML); + + pIWSSZ->addOutputAnyObject(soapAnyResponse); + + } + catch(ServiceRuntimeException e) + { + + // Throw a useful fault + string faultCode = string("Server.TuscanySCA.") + string(e.getEClassName()); + string faultString = string(e.getEClassName()) + string(":") + string (e.getMessageText()); + + pIWSSZ->createSoapFault("ServiceRuntimeException","tempURI", faultCode.c_str(), faultString.c_str()); + throw AxisServiceException(); + } + catch(SDORuntimeException e) + { + // Throw a useful fault + string faultCode = string("Server.TuscanySDO.") + string(e.getEClassName()); + string faultString = string(e.getEClassName()) + string(":") + string (e.getMessageText()); + + pIWSSZ->createSoapFault("SDORuntimeException","tempURI", faultCode.c_str(), faultString.c_str()); + throw AxisServiceException(); + } + + + return axisReturn; +} + +// +// These functions are exported from the SCAWSWrapper DLL and are called by the Axis Engine +// to create/destroy instances of the service wrapper class. +// +extern "C" +{ +STORAGE_CLASS_INFO +int GetClassInstance(BasicHandler **inst) +{ + *inst = new BasicHandler(); + WrapperClassHandler* pWCH = new SCAWSWrapper(); + (*inst)->_functions = 0; + if (pWCH) + { + (*inst)->_object = pWCH; + return pWCH->init(); + } + return AXIS_FAIL; +} +STORAGE_CLASS_INFO +int DestroyInstance(BasicHandler *inst) +{ + if (inst) + { + WrapperClassHandler* pWCH = reinterpret_cast(inst); + pWCH->fini(); + delete pWCH; + delete inst; + return AXIS_SUCCESS; + } + return AXIS_FAIL; +} +} // extern "C" + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h new file mode 100644 index 0000000000..474c39977f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h @@ -0,0 +1,110 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#if !defined(SCAWSWRAPPER_H_INCLUDED) +#define SCAWSWRAPPER_H_INCLUDED + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "osoa/sca/export.h" +#include +#include +#include +#include +#include + + +AXIS_CPP_NAMESPACE_USE + +/** The SCAWSWrapper class is an Axis WrapperClassHandler that acts as a generic service wrapper for + * invoking services using the SCARuntime. Any services defined in the deployment descriptor (server.wsdd) + * with will be invoked by the SCAWSWrapper. + * The service must also be configured with a handler (SCAWSHandler) that sets SCA specific properties + * from the deployment descriptor into the MessageData that is passed to the wrapper's invoke method. + * The SCAWSWrapper uses the properties to configure an SCA Entry Point and invoke the requested operation + * on the service. + * + * Example: + * + * + * + * + * + * + * + * + * + * + * + * + * + * @see SCAWSHandler + */ +class SCAWSWrapper : public WrapperClassHandler +{ + public: + + /** Construct an SCAWSWrapper. + */ + SCAWSWrapper(); + + /** Destruct an SCAWSWrapper. + */ + virtual ~SCAWSWrapper(); + + // + // Axis WrapperClassHandler interface. + // + + /** Perform any necessary initialization. + */ + int AXISCALL init(); + + /** Perform any necessary finalization. + */ + int AXISCALL fini(); + + /** Invoke a web service operation. The invoke method expects SCA specific + * properties to have been set into the MessageData by the SCAWSHandler. + * Using those properties, the wrapper will invoke the correct SCA Entry + * Point. + * @param pMsg - pointer to IMessageData. + * + * @see SCAWSHandler + */ + int AXISCALL invoke(void* pMsg); + + /** Handle Faults. + */ + void AXISCALL onFault(void* pMsg); + + /** Binding Style: Document Literal. + */ + AXIS_BINDING_STYLE AXISCALL getBindingStyle() { return DOC_LITERAL; }; + + private: + + // Invoke an SCA Entry Point and return an SDO object as a result. + int invokeService(IMessageData *pIMsg, + const AxisChar *operationName); +}; + +#endif // !defined(SCAWSWRAPPER_H_INCLUDED) diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/Makefile.am new file mode 100644 index 0000000000..b4b5bc3097 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src test diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild new file mode 100644 index 0000000000..60990b3bc1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.project new file mode 100644 index 0000000000..86fb4b8663 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.project @@ -0,0 +1,19 @@ + + + tuscany_sca + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..0e5a987932 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Thu Feb 16 12:50:21 GMT 2006 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.1559343291=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1621584437=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.1559343291=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1621584437=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.1559343291=\n\n\n\n +environment/project/cdt.managedbuild.config.gnu.so.release.1621584437=\n\n\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/Makefile.am new file mode 100644 index 0000000000..a09444250c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/Makefile.am @@ -0,0 +1,103 @@ +lib_LTLIBRARIES = libtuscany_sca.la + +nobase_include_HEADERS = \ +osoa/sca/ComponentContext.h \ +osoa/sca/ComponentContextImpl.h \ +osoa/sca/export.h \ +osoa/sca/ModuleContext.h \ +osoa/sca/ModuleContextImpl.h \ +osoa/sca/sca.h \ +osoa/sca/ServiceList.h \ +osoa/sca/ServiceRuntimeException.h \ +tuscany/sca/core/ComponentServiceWrapper.h \ +tuscany/sca/core/ExternalServiceWrapper.h \ +tuscany/sca/core/Operation.h \ +tuscany/sca/core/SCAEntryPoint.h \ +tuscany/sca/core/SCARuntime.h \ +tuscany/sca/core/ServiceProxy.h \ +tuscany/sca/core/ServiceWrapper.h \ +tuscany/sca/model/Binding.h \ +tuscany/sca/model/Component.h \ +tuscany/sca/model/CPPImplementation.h \ +tuscany/sca/model/CPPInterface.h \ +tuscany/sca/model/EntryPoint.h \ +tuscany/sca/model/ExternalService.h \ +tuscany/sca/model/Implementation.h \ +tuscany/sca/model/Interface.h \ +tuscany/sca/model/ModelLoader.h \ +tuscany/sca/model/Module.h \ +tuscany/sca/model/Service.h \ +tuscany/sca/model/ServiceReference.h \ +tuscany/sca/model/Subsystem.h \ +tuscany/sca/model/System.h \ +tuscany/sca/model/Wire.h \ +tuscany/sca/model/WireTarget.h \ +tuscany/sca/model/WSBinding.h \ +tuscany/sca/model/Wsdl.h \ +tuscany/sca/model/WsdlOperation.h \ +tuscany/sca/util/DefaultLogWriter.h \ +tuscany/sca/util/Exceptions.h \ +tuscany/sca/util/File.h \ +tuscany/sca/util/FileLogWriter.h \ +tuscany/sca/util/Library.h \ +tuscany/sca/util/Logger.h \ +tuscany/sca/util/Logging.h \ +tuscany/sca/util/LogWriter.h \ +tuscany/sca/util/Utils.h \ +tuscany/sca/ws/SDOStub.h \ +tuscany/sca/ws/WSServiceWrapper.h + + +libtuscany_sca_la_SOURCES = \ +osoa/sca/ComponentContext.cpp \ +osoa/sca/ComponentContextImpl.cpp \ +osoa/sca/ModuleContext.cpp \ +osoa/sca/ModuleContextImpl.cpp \ +osoa/sca/SCA.cpp \ +osoa/sca/ServiceList.cpp \ +osoa/sca/ServiceRuntimeException.cpp \ +tuscany/sca/util/DefaultLogWriter.cpp \ +tuscany/sca/util/File.cpp \ +tuscany/sca/util/FileLogWriter.cpp \ +tuscany/sca/util/Library.cpp \ +tuscany/sca/util/Logger.cpp \ +tuscany/sca/util/LogWriter.cpp \ +tuscany/sca/util/Utils.cpp \ +tuscany/sca/model/Binding.cpp \ +tuscany/sca/model/Component.cpp \ +tuscany/sca/model/CPPImplementation.cpp \ +tuscany/sca/model/CPPInterface.cpp \ +tuscany/sca/model/EntryPoint.cpp \ +tuscany/sca/model/ExternalService.cpp \ +tuscany/sca/model/Implementation.cpp \ +tuscany/sca/model/Interface.cpp \ +tuscany/sca/model/ModelLoader.cpp \ +tuscany/sca/model/Module.cpp \ +tuscany/sca/model/Service.cpp \ +tuscany/sca/model/ServiceReference.cpp \ +tuscany/sca/model/Subsystem.cpp \ +tuscany/sca/model/System.cpp \ +tuscany/sca/model/Wire.cpp \ +tuscany/sca/model/WireTarget.cpp \ +tuscany/sca/model/WSBinding.cpp \ +tuscany/sca/model/Wsdl.cpp \ +tuscany/sca/model/WsdlOperation.cpp \ +tuscany/sca/core/ComponentServiceWrapper.cpp \ +tuscany/sca/core/ExternalServiceWrapper.cpp \ +tuscany/sca/core/Operation.cpp \ +tuscany/sca/core/SCAEntryPoint.cpp \ +tuscany/sca/core/SCARuntime.cpp \ +tuscany/sca/core/ServiceProxy.cpp \ +tuscany/sca/core/ServiceWrapper.cpp \ +tuscany/sca/ws/SDOStub.cpp \ +tuscany/sca/ws/WSServiceWrapper.cpp + +libtuscany_sca_la_LIBADD = -lstdc++ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ + -L${AXISCPP_DEPLOY}/lib -laxis_client + +AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG + +INCLUDES = -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include \ + -I${AXISCPP_DEPLOY}/include + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp new file mode 100644 index 0000000000..73c3ed2e36 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp @@ -0,0 +1,132 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "osoa/sca/ComponentContext.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "osoa/sca/ComponentContextImpl.h" +#include "tuscany/sca/core/SCARuntime.h" + +using namespace tuscany::sca; + +namespace osoa +{ + namespace sca + { + + // ======================================================= + // getCurrent: create a context from the current component + // ======================================================= + ComponentContext ComponentContext::getCurrent() + { + LOGENTRY(1, "ComponentContext::getCurrent"); + Component* component = SCARuntime::getInstance()->getCurrentComponent(); + if (!component) + { + throw ComponentContextException("No current component"); + } + ComponentContextImpl* cci = new ComponentContextImpl(component); + LOGEXIT(1, "ComponentContext::constructor"); + return ComponentContext(cci); + } + + // =========== + // Constructor + // =========== + ComponentContext::ComponentContext(ComponentContextImpl* implementation) + : impl(implementation) + { + LOGENTRY(1, "ComponentContext::constructor"); + LOGEXIT(1, "ComponentContext::constructor"); + } + + // ========== + // Destructor + // ========== + ComponentContext::~ComponentContext() + { + LOGENTRY(1, "ComponentContext::destructor"); + delete impl; + LOGEXIT(1, "ComponentContext::destructor"); + } + + // =================================== + // Copy constructor: create a new impl + // =================================== + ComponentContext::ComponentContext(const ComponentContext& ctx) + { + impl = new ComponentContextImpl(impl->getComponent()); + } + + // ============================= + // operator= : create a new impl + // ============================= + ComponentContext& ComponentContext::operator=(const ComponentContext& ctx) + { + if (this != &ctx) + { + impl = new ComponentContextImpl(impl->getComponent()); + } + return *this; + } + + // ========== + // getService + // ========== + void* ComponentContext::getService(const char* referenceName) + { + LOGENTRY(1, "ComponentContext::getService"); + void* service = impl->getService(referenceName); + LOGEXIT(1, "ComponentContext::getService"); + return service; + } + + // =========== + // getServices + // =========== + ServiceList ComponentContext::getServices(const char* referenceName) + { + return impl->getServices(referenceName); + } + + // ============ + // getProperties + // ============= + DataObjectPtr ComponentContext::getProperties() + { + LOGENTRY(1, "ComponentContext::getProperties"); + DataObjectPtr properties = impl->getProperties(); + LOGEXIT(1, "ComponentContext::getProperties"); + return properties; + } + + // ============ + // getDataFactory + // ============= + DataFactoryPtr ComponentContext::getDataFactory() + { + LOGENTRY(1, "ComponentContext::getDataFactory"); + DataFactoryPtr dataFactory = impl->getDataFactory(); + LOGEXIT(1, "ComponentContext::getDataFactory"); + return dataFactory; + } + + + } // End namespace sca +} // End namespace osoa diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h new file mode 100644 index 0000000000..10d334a936 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h @@ -0,0 +1,105 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef osoa_sca_componentcontext_h +#define osoa_sca_componentcontext_h + +#include "osoa/sca/export.h" +#include "osoa/sca/ServiceList.h" +#include "commonj/sdo/SDO.h" +namespace osoa +{ + namespace sca + { + class ComponentContextImpl; + + /** + * An SCA component implementation uses the ComponentContext class to + * retrieve information about the configured SCA component. + */ + class SCA_API ComponentContext + { + + public: + /** + * Return a new ComponentContext for the current Component. + */ + static ComponentContext getCurrent(); + + /** + * Resolve a reference name into a single configured service. + * If the component's reference is wired to more than one service + * then theis method will return an exception. + * @param referenceName The reference to be resolved. This must match + * the name of a reference configured in the component type file for + * this component. + */ + void* getService(const char* referenceName); + + /** + * Resolve a reference name into a list of configured services. + * @param referenceName The reference to be resolved. This must match + * the name of a reference configured in the component type file for + * this component. + */ + ServiceList getServices(const char* referenceName); + + /** + * Get the configured properties for the component. + * @return A data object representing all the properties that + * are configured for this component. + */ + commonj::sdo::DataObjectPtr getProperties(); + + /** + * Get an SDO data factory which will allow the component to + * create data objects for all the types configured for this + * component. + * @return A data factory to be used by the component to create + * new data objects. + */ + commonj::sdo::DataFactoryPtr getDataFactory(); + + /** + * Destructor + */ + virtual ~ComponentContext(); + + + ComponentContext(const ComponentContext&); + ComponentContext& operator=(const ComponentContext&); + + private: + /** + * Constructor to create an interface class from the contained + * implementation. + * @param implementation the actual implementation class + */ + ComponentContext(ComponentContextImpl* implementation); + + /** + * Pointer to the class which provides the actual implementation. + */ + ComponentContextImpl* impl; + + }; + } // End namespace sca +} // End namespace osoa + +#endif // osoa_sca_componentcontext_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp new file mode 100644 index 0000000000..436e44d5e1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp @@ -0,0 +1,270 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "osoa/sca/ComponentContextImpl.h" +#include "tuscany/sca/model/WireTarget.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" +#include "tuscany/sca/core/ExternalServiceWrapper.h" +#include "tuscany/sca/model/CPPImplementation.h" +#include "tuscany/sca/model/Module.h" + +using namespace tuscany::sca; +using namespace tuscany::sca::model; + +namespace osoa +{ + namespace sca + { + // =========== + // Constructor + // =========== + ComponentContextImpl::ComponentContextImpl(Component* comp) + : component(comp) + { + LOGENTRY(1, "ComponentContextImpl::constructor"); + LOGEXIT(1, "ComponentContextImpl::constructor"); + } + + // ========== + // Destructor + // ========== + ComponentContextImpl::~ComponentContextImpl() + { + // -------------------------------------------- + // Delete the proxies served up by this context + // -------------------------------------------- + for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++) + { + delete (ServiceProxy*)*iter; + } + } + + + // ========================================================================== + // getServices: return a list of Proxies for services wired to this reference + // ========================================================================== + ServiceList ComponentContextImpl::getServices(const char* referenceName) + { + LOGENTRY(1, "ComponentContextImpl::getServices"); + + string message; + + // -------------------------------------------------------------- + // locate reference in the current component and determine target + // -------------------------------------------------------------- + ServiceReference* serviceReference = component->findReference(referenceName); + if (!serviceReference) + { + message = "Reference not defined: "; + message = message + referenceName; + throw ServiceNotFoundException(message.c_str()); + } + + // Get the target services from the ServiceReference + const ServiceReference::TARGETS& targets = serviceReference->getTargets(); + + // -------------------- + // Validate the request + // -------------------- + switch (serviceReference->getMultiplicity()) + { + case ServiceReference::ONE_MANY: + case ServiceReference::ONE_ONE: + { + if (targets.size() == 0) + { + message = "Reference "; + message = message + referenceName + " not wired"; + throw ServiceNotFoundException(message.c_str()); + } + } + default: + { + } + } // end switch + + // ------------------------------ + // Create a proxy for each target + // ------------------------------ + ServiceList services(targets.size()); + for (ServiceReference::TARGETS::const_iterator iter = targets.begin(); + iter!=targets.end(); + iter++) + { + services.addService(getServiceProxy(serviceReference, *iter)); + } + + return services; + + } // End getServices() + + + // =================================================================== + // getService: return a Proxy for the services wired to this reference + // =================================================================== + void* ComponentContextImpl::getService(const char* referenceName) + { + LOGENTRY(1, "ComponentContextImpl::getService"); + + string message; + + // -------------------------------------------------------------- + // locate reference in the current component and determine target + // -------------------------------------------------------------- + ServiceReference* serviceReference = component->findReference(referenceName); + if (!serviceReference) + { + message = "Reference not defined: "; + message = message + referenceName; + throw ServiceNotFoundException(message.c_str()); + } + + // Get the target service from the ServiceReference + const ServiceReference::TARGETS& targets = serviceReference->getTargets(); + + // -------------------- + // Validate the request + // -------------------- + switch (serviceReference->getMultiplicity()) + { + case ServiceReference::ZERO_MANY: + case ServiceReference::ONE_MANY: + { + message = "getService() called for reference with multiplicity >1 :"; + message = message + referenceName; + throw ServiceNotFoundException(message.c_str()); + } + case ServiceReference::ONE_ONE: + { + if (targets.size() == 0) + { + message = "Reference "; + message = message + referenceName + " not wired"; + throw ServiceNotFoundException(message.c_str()); + } + } + default: + { + } + } // end switch + + // Return the proxy + return getServiceProxy(serviceReference, *targets.begin()); + + } // End getService() + + + // ================================================================== + // getServiceProxy: Create and return an instance of the ServiceProxy + // ================================================================== + void* ComponentContextImpl::getServiceProxy( + ServiceReference* serviceReference, + WireTarget* target) + { + // ----------------------------------- + // Get a ServiceWrapper for the target + // ----------------------------------- + ServiceWrapper* serviceWrapper = getServiceWrapper(target); + + // ------------------------------ + // Get a Proxy for this reference + // ------------------------------ + try + { + ServiceProxy* serviceProxy = new ServiceProxy(component, serviceReference->getName(), serviceWrapper); + void* service = serviceProxy->getProxy(); + // service MUST be set here or an exception will have been thrown + proxies.push_back(serviceProxy); + return service; + } + catch (ServiceRuntimeException&) + { + delete serviceWrapper; + throw ; + } + } + + + // ====================================================================== + // getServiceWrapper: Create and return an instance of the ServiceWrapper + // ====================================================================== + ServiceWrapper* ComponentContextImpl::getServiceWrapper(WireTarget* target) + { + // ------------------------- + // Determine type of Service + // ------------------------- + switch (target->getServiceType()) + { + case WireTarget::ExternalServiceType: + { + // ---------------- + // External Service + // ---------------- + return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target); + } + + case WireTarget::ComponentServiceType: + { + // ----------------- + // Component Service + // ----------------- + return ComponentServiceWrapper::createServiceWrapper((Service*)target); + } + + default: + { + string message = "Undefined wire target type for : "; + message = message + target->getName(); + throw ServiceNotFoundException(message.c_str()); + } + } // end switch + } + + + + // ============================================== + // getProperties: return the component properties + // ============================================== + DataObjectPtr ComponentContextImpl::getProperties() + { + LOGENTRY(1, "ComponentContextImpl::getProperties"); + DataObjectPtr properties = component->getProperties(); + + LOGEXIT(1, "ComponentContextImpl::getProperties"); + return properties; + } + + // ============================================== + // getDataFactory: return the data factory for the module in which + // this component resides + // ============================================== + DataFactoryPtr ComponentContextImpl::getDataFactory() + { + LOGENTRY(1, "ComponentContextImpl::getProperties"); + DataFactoryPtr dataFactory = component->getModule()->getDataFactory(); + + LOGEXIT(1, "ComponentContextImpl::getDataFactory"); + return dataFactory; + } + + + } // End namespace sca +} // End namespace osoa diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h new file mode 100644 index 0000000000..bd3a0d106a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h @@ -0,0 +1,120 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef osoa_sca_componentcontextimpl_h +#define osoa_sca_componentcontextimpl_h + +#include "osoa/sca/ServiceList.h" + +#include "tuscany/sca/model/Component.h" +#include "tuscany/sca/core/ServiceWrapper.h" +#include "tuscany/sca/core/ServiceProxy.h" +#include "tuscany/sca/model/Service.h" + +using namespace tuscany::sca; +using namespace tuscany::sca::model; + +namespace osoa +{ + namespace sca + { + /** + * Contains the actual implementation of a ComponentContext interface. + */ + class ComponentContextImpl + { + + public: + /** + * Constructor that takes a Component which represents the runtime + * model for this context. + */ + ComponentContextImpl(Component* component); + + /** + * Default constructor. + */ + virtual ~ComponentContextImpl(); + + /** + * See ComponentContext. + */ + void* getService(const char* referenceName); + + /** + * See ComponentContext. + */ + ServiceList getServices(const char* referenceName); + + /** + * See ComponentContext. + */ + DataObjectPtr getProperties(); + + /** + * See ComponentContext. + */ + commonj::sdo::DataFactoryPtr getDataFactory(); + + /** + * Returns the contained Component. + * @return The Component to which this context refers. + */ + Component* getComponent() {return component;} + + private: + ComponentContextImpl(const ComponentContextImpl&); + ComponentContextImpl& operator=(const ComponentContextImpl&); + + /** + * Pointer to the runtime model Component to which this + * context refers. + */ + Component* component; + + /** + * Helper method to return a proxy to a service. + * @param serviceReference The source reference. + * @param target The target to which this source reference is wired. + * @return A pointer to an object which can be cast to the business + * class representing the target. + */ + void* getServiceProxy( + ServiceReference* serviceReference, + WireTarget* target); + + /** + * Helper method to return a wrapper for a target service. + * @param target The target for which this wrapper is to be created. + * @return The service wrapper. + */ + ServiceWrapper* getServiceWrapper(WireTarget* target); + + + typedef vector PROXIES; + /** + * A vector of the proxies created by this ComponentContext. The + * proxies will be destroyed when the ComponentContext is destroyed. + */ + PROXIES proxies; + }; + } // End namespace sca +} // End namespace osoa + +#endif // osoa_sca_componentcontextimpl_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp new file mode 100644 index 0000000000..93e36b297f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp @@ -0,0 +1,93 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "osoa/sca/ModuleContext.h" +#include "tuscany/sca/util/Logging.h" +#include "osoa/sca/ModuleContextImpl.h" +#include "tuscany/sca/core/SCARuntime.h" + +using namespace tuscany::sca; + +namespace osoa +{ + namespace sca + { + // =========== + // Constructor + // =========== + ModuleContext::ModuleContext(ModuleContextImpl* implementation) + : impl(implementation) + { + } + + // =================================== + // Copy constructor: create a new impl + // =================================== + ModuleContext::ModuleContext(const ModuleContext& ctx) + { + impl = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule()); + } + + // ============================= + // operator= : create a new impl + // ============================= + ModuleContext& ModuleContext::operator=(const ModuleContext& ctx) + { + if (this != &ctx) + { + impl = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule()); + } + return *this; + } + + // ========== + // Destructor + // ========== + ModuleContext::~ModuleContext() + { + LOGENTRY(1, "ModuleContext::destructor"); + delete impl; + LOGEXIT(1, "ModuleContext::destructor"); + } + + // ==================================================== + // getCurrent: create a context from the current module + // ==================================================== + ModuleContext ModuleContext::getCurrent() + { + LOGENTRY(1, "ModuleContext::getCurrent"); + ModuleContextImpl* mci = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule()); + LOGEXIT(1, "ModuleContext::getCurrent"); + return ModuleContext(mci); + } + + // ============= + // locateService + // ============= + void* ModuleContext::locateService(const char* serviceName) + { + LOGENTRY(1, "ModuleContext::locateService"); + void* sp = impl->locateService(serviceName); + LOGEXIT(1, "ModuleContext::locateService"); + return sp; + } + + + } // End namespace sca +} // End namespace osoa diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h new file mode 100644 index 0000000000..7aacb00123 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h @@ -0,0 +1,80 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef osoa_sca_modulecontext_h +#define osoa_sca_modulecontext_h + +#include "osoa/sca/export.h" + +namespace osoa +{ + namespace sca + { + class ModuleContextImpl; + + /** + * An SCA component implementation, or a non-SCA client, uses the + * ModuleContext class to retrieve information about the configured + * SCA module. + */ + class SCA_API ModuleContext + { + + public: + /** + * Return a new ModuleContext for the current Component. + */ + static ModuleContext getCurrent(); + + /** + * Resolve a service name into a single component service. + * @param serviceName The name of the service in the form + * "component name"/"service name". The service name is + * optional in the component has one service. + * @return A pointer to an object which can be cast to the + * business interface of the target service. + */ + void* locateService(const char* serviceName); + + /** + * Destructor. + */ + virtual ~ModuleContext(); + + ModuleContext(const ModuleContext&); + ModuleContext& operator=(const ModuleContext&); + + private: + /** + * Constructor to create an interface class from the contained + * implementation. + * @param implementation The actual implementation class. + */ + ModuleContext(ModuleContextImpl* implementation); + + /** + * Pointer to the class which provides the actual implementation. + */ + ModuleContextImpl* impl; + + }; + } // End namespace sca +} // End namespace osoa + +#endif // osoa_sca_modulecontext_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp new file mode 100644 index 0000000000..4d96ee336d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp @@ -0,0 +1,102 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/model/Component.h" +#include "tuscany/sca/model/CPPImplementation.h" +#include "osoa/sca/ModuleContextImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +using namespace tuscany::sca; +using namespace tuscany::sca::model; + +namespace osoa +{ + namespace sca + { + // =========== + // Constructor + // =========== + ModuleContextImpl::ModuleContextImpl(Module* mod) + : module(mod) + { + } + + // ========== + // Destructor + // ========== + ModuleContextImpl::~ModuleContextImpl() + { + // -------------------------------------------- + // Delete the proxies served up by this context + // -------------------------------------------- + for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++) + { + delete (ServiceProxy*)*iter; + } + } + + // =========================================================================== + // locateService: return a proxy connected to a wrapper for the target service + // =========================================================================== + void* ModuleContextImpl::locateService(const char* serviceName) + { + LOGENTRY(1, "ModuleContextImpl::locateService"); + + + // ---------------------------- + // Locate the component service + // ---------------------------- + Service* service = module->findComponentService(serviceName); + string msg; + if (!service) + { + msg = "Service not found: "; + msg = msg + serviceName; + throw ServiceNotFoundException(msg.c_str()); + } + + // ------------------------- + // Create the ServiceWrapper + // ------------------------- + ComponentServiceWrapper* serviceWrapper = ComponentServiceWrapper::createServiceWrapper(service); + + // ---------------------------- + // Get a Proxy for this service + // ---------------------------- + try + { + ServiceProxy* serviceProxy = new ServiceProxy(service->getComponent(), service->getName(), serviceWrapper); + proxies.push_back(serviceProxy); + LOGEXIT(1, "ModuleContextImpl::locateService"); + return serviceProxy->getProxy(); + } + catch (ServiceRuntimeException&) + { + delete serviceWrapper; + throw ; + } + + } + + + + } // End namespace sca +} // End namespace osoa diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h new file mode 100644 index 0000000000..5950313a06 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h @@ -0,0 +1,71 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef osoa_sca_modulecontextimpl_h +#define osoa_sca_modulecontextimpl_h +#include "tuscany/sca/model/Module.h" +#include "tuscany/sca/core/ServiceProxy.h" + +namespace osoa +{ + namespace sca + { + /** + * Contains the actual implementation of a ModuleContext interface. + */ + class ModuleContextImpl + { + + public: + /** + * Constructor that takes a Module which represents the runtime + * model for this context. + */ + ModuleContextImpl(tuscany::sca::model::Module* module); + + /** + * See ModuleContext#locateService. + */ + void* locateService(const char* serviceName); + + /** + * Destructor. + */ + virtual ~ModuleContextImpl(); + private: + ModuleContextImpl(const ModuleContextImpl&); + ModuleContextImpl& operator=(const ModuleContextImpl&); + + /** + * Pointer to the runtime model Module object to which this + * context refers. + */ + tuscany::sca::model::Module* module; + + typedef vector PROXIES; + /** + * Vector of proxies created from calls to the locateService + * method. + */ + PROXIES proxies; + }; + } // End namespace sca +} // End namespace osoa + +#endif // osoa_sca_modulecontextimpl_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp new file mode 100644 index 0000000000..bcca254028 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp @@ -0,0 +1,21 @@ +/* + * + * 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. + */ + +/* $Rev: $ $Date: $ */ + +#include "osoa/sca/sca.h" + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp new file mode 100644 index 0000000000..ba2b418a7c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp @@ -0,0 +1,105 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "osoa/sca/ServiceList.h" + +#include "osoa/sca/ServiceRuntimeException.h" + +namespace osoa +{ + namespace sca + { + // =========== + // Constructor + // =========== + ServiceList::ServiceList(unsigned int numTargets) + : maxServices(numTargets), numServices(0) + { + services = new void*[numTargets]; + } + + // ========================================== + // Copy comstructor: create new service array + // ========================================== + ServiceList::ServiceList(const ServiceList& sl) + : maxServices(sl.maxServices), numServices(sl.numServices) + { + services = new void*[maxServices]; + for (unsigned int i=0; i + +namespace osoa +{ + namespace sca + { + + /** + * Top level exception to represent all the exceptions that may be + * thrown by an SCA runtime implementation. + */ + class SCA_API ServiceRuntimeException + { + public: + /** + * Represents the possible severity levels for an exception. + */ + enum severity_level + { + Normal, + Warning, + Error, + Severe + }; + + /** + * Constructor. + * @param name Class name of the exception. + * @param sev Severity level. + * @param msg_text Detailed description of the exception. + */ + ServiceRuntimeException( + const char *name="ServiceRuntimeException", + severity_level sev=Severe, + const char* msg_text=""); + + ServiceRuntimeException(const ServiceRuntimeException& c); + + // Destructor + virtual ~ServiceRuntimeException(); + + /** + * Return class name of this exception. + */ + const char* getEClassName() const; + + /** + * Return severity. + */ + severity_level getSeverity() const; + + /** + * Return message text associated with exception. + */ + const char* getMessageText() const; + + /* + * Return file name where the exception was raised. + */ + const char* getFileName() const; + + /** + * Return line number where the exception was raised. + */ + unsigned long getLineNumber() const; + + /** + * Return function name where the exception was raised. + */ + const char* getFunctionName() const; + + /** + * Set the exception severity. + */ + void setSeverity(severity_level sev); + + /** + * Set the message text associated with exception. + */ + void setMessageText(const char* msg_text); + + /** + * Set the location where the exception was raised. + * @param file Name of the file. + * @param line Line number in the file. + * @param function Name of the function. + */ + void setLocation(const char* file, + unsigned long line, + const char* function=""); + + /** + * Append exception details to ostream. + */ + virtual std::ostream& PrintSelf(std::ostream &os) const; + + /** + * Operator to send exceptions details to a stream. + */ + SCA_API friend std::ostream& operator<< (std::ostream &os, const ServiceRuntimeException &except); + protected: + + private: + /** + * Class name of the exception. + */ + char* class_name; + + /** + * Severity level of the exception. + */ + severity_level severity; + + /** + * Description of the exception. + */ + char* message_text; // Description of exception + + /** + * Location where the exception was thrown or handled and thrown. + */ + class location + { + public: + char* file; // File name (from __FILE__) + unsigned long line; // Line number (from __LINE__) + char* function; // Function name + }; + + + enum {num_locations=5}; + /** + * Array of locations where the exception has been handled and thrown. + */ + location locations[num_locations]; + + /** + * The current location (index into ServiceRuntimeException#location). + */ + int location_set; + + + }; // End ServiceRuntimeException class definition + + + /** + * A remotable service is currently unavailable. It is possible that a retry + * may resolve this exception. + */ + class SCA_API ServiceUnavailableException: public ServiceRuntimeException + { + public: + ServiceUnavailableException(const char* serviceName) + : ServiceRuntimeException("ServiceUnavailableException", Warning, + serviceName) + { + } + private: + }; // End ServiceUnavailableException class definition + + + /** + * The target of a wire cannot be found, or the reference has not been + * configured. + */ + class ServiceNotFoundException: public ServiceRuntimeException + { + public: + ServiceNotFoundException(const char* msg) + : ServiceRuntimeException("ServiceNotFoundException", Error, + msg) + { + } + private: + }; // End ServiceNotFoundException class definition + + + /** + * There is no current component (for example, if a non-SCA component + * tries to get the current ComponentContext). + */ + class ComponentContextException: public ServiceRuntimeException + { + public: + ComponentContextException(const char* msg) + : ServiceRuntimeException("ComponentContextException", Error, + msg) + { + } + private: + }; // End ComponentContextException class definition + + /** + * Unable to find the specified entry point in the module. + */ + class EntryPointNotFoundException: public ServiceRuntimeException + { + public: + EntryPointNotFoundException(const char* msg) + : ServiceRuntimeException("EntryPointNotFoundException", Error, + msg) + { + } + private: + }; // End EntryPointNotFoundException class definition + + + + } // End namespace sca +} // End namespace osoa + +#endif // osoa_sca_serviceruntimeexception_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h new file mode 100644 index 0000000000..6ef7960284 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h @@ -0,0 +1,39 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef osoa_sca_export_h +#define osoa_sca_export_h + +#if defined(WIN32) || defined (_WINDOWS) +#pragma warning(disable: 4786) + +#ifdef SCA_EXPORTS +#define SCA_API __declspec(dllexport) +#else +#define SCA_API __declspec(dllimport) +#endif + +#else +#include +#include +#include +#define SCA_API +#endif + +#endif // osoa_sca_export_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h new file mode 100644 index 0000000000..528bd91c4a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h @@ -0,0 +1,29 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef osoa_sca_sca_h +#define osoa_sca_sca_h + +#include "osoa/sca/export.h" +#include "osoa/sca/ModuleContext.h" +#include "osoa/sca/ComponentContext.h" +#include "osoa/sca/ServiceList.h" +#include "osoa/sca/ServiceRuntimeException.h" + +#endif // osoa_sca_sca_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp new file mode 100644 index 0000000000..9db068a2ff --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp @@ -0,0 +1,202 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/core/SCARuntime.h" +#include "tuscany/sca/model/CPPImplementation.h" +using namespace osoa::sca; + +namespace tuscany +{ + namespace sca + { + // =================== + // Static data members + // =================== + void* ComponentServiceWrapper::staticImpl = 0; + + // =========== + // Constructor + // =========== + ComponentServiceWrapper::ComponentServiceWrapper(Service* target) + : ServiceWrapper(target), service(target) + { + LOGENTRY(1,"ComponentServiceWrapper::constructor"); + if (target->getServiceType() != WireTarget::ComponentServiceType) + { + throw ServiceRuntimeException("ComponentServiceWrapper: target is not a component service"); + } + + component = target->getComponent(); + interf = (CPPInterface*)target->getInterface(); + + remotable = interf->getRemotable(); + + + LOGEXIT(1,"ComponentServiceWrapper::constructor"); + + } + + // ========== + // Destructor + // ========== + ComponentServiceWrapper::~ComponentServiceWrapper() + { + LOGENTRY(1,"ComponentServiceWrapper::destructor"); + LOGEXIT(1,"ComponentServiceWrapper::destructor"); + } + + + // ====================================================================== + // getImplementation: get an implementation for this scope + // ====================================================================== + void* ComponentServiceWrapper::getImplementation() + { + CPPInterface::SCOPE scope = interf->getScope(); + if (scope == CPPInterface::MODULE) + { + if (!staticImpl) + { + staticImpl = newImplementation(); + } + return staticImpl; + } + else // (scope == CPPInterface::STATELESS) + { + return newImplementation(); + } + } + + // ====================================================================== + // releaseImplementation: release the implementation for this scope + // ====================================================================== + void ComponentServiceWrapper::releaseImplementation() + { + CPPInterface::SCOPE scope = interf->getScope(); + if (scope == CPPInterface::STATELESS) + { + deleteImplementation(); + } + } + + // ====================================================================== + // invoke: wrapper call to service with setting the component context + // ====================================================================== + void ComponentServiceWrapper::invoke(Operation& operation) + { + + SCARuntime* runtime = SCARuntime::getInstance(); + runtime->setCurrentComponent(component); + + try + { + invokeService(operation); + } + catch (...) + { + runtime->unsetCurrentComponent(); + throw; + } + runtime->unsetCurrentComponent(); + + } + + void ComponentServiceWrapper::setLibrary(Library* lib) + { + wrapperLibrary = lib; + } + + // ====================================================================== + // createServiceWrapper: create a wrapper for the target ComponentService + // ====================================================================== + ComponentServiceWrapper* ComponentServiceWrapper::createServiceWrapper(Service* service) + { + string msg; + ComponentServiceWrapper* serviceWrapper = 0; + + // ----------------------------------------------- + // Get the implementation for the target component + // ----------------------------------------------- + Component* targetComponent = service->getComponent(); + Implementation* impl = targetComponent->getImplementation(); + if (!impl) + { + msg = "Component " + targetComponent->getName() + " has no implementation defined"; + throw ServiceNotFoundException(msg.c_str()); + } + + // TODO: This only handle CPP implementation for now + if (impl->getImplementationType() == Implementation::CPP) + { + // ---------------------------------------------------- + // Get implementation dll name and wrapper factory name + // ---------------------------------------------------- + string dllName = ((CPPImplementation*)impl)->getDll(); + string wrapperFactoryName = ((CPPImplementation*)impl)->getHeaderStub() + + "_" + service->getName() + "_Wrapper_Factory"; + + // ------------ + // Load the dll + // ------------ + string fullDllName = targetComponent->getModule()->getRoot() + "/" + dllName; + typedef ComponentServiceWrapper* (* WRAPPERFACTORY) (Service*); + Library* wrapperLib = new Library(fullDllName); + + // ------------------------- + // Locate the factory method + // ------------------------- + WRAPPERFACTORY wrapperFactory = (WRAPPERFACTORY)wrapperLib->getSymbol(wrapperFactoryName); + if (!wrapperFactory) + { + LOGERROR_2(1, "ComponentServiceWrapper::createServiceWrapper: Unable to locate %s in library %s", + wrapperFactoryName.c_str(), fullDllName.c_str()); + msg = "Unable to locate " + wrapperFactoryName + " in library " + fullDllName; + throw ServiceNotFoundException(msg.c_str()); + } + + // ------------------------------------- + // Now create an instance of the wrapper + // ------------------------------------- + serviceWrapper = wrapperFactory(service); + if (!serviceWrapper) + { + LOGERROR_2(1, "ComponentServiceWrapper::createServiceWrapper: Factory method %s in library %s returned null", + wrapperFactoryName.c_str(), fullDllName.c_str()); + msg = "Factory method " + wrapperFactoryName + " in library " + fullDllName + " returned null"; + throw ServiceNotFoundException(msg.c_str()); + } + serviceWrapper->setLibrary(wrapperLib); + } + else + { + // ---------------------- + // Non CPP Implementation + // ---------------------- + msg = "Unsupported implementation type for service: " + service->getName(); + throw ServiceNotFoundException(msg.c_str()); + } + + return serviceWrapper; + } + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h new file mode 100644 index 0000000000..3a5e990bf0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h @@ -0,0 +1,156 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_componentservicewrapper_h +#define tuscany_sca_core_componentservicewrapper_h + +#include "osoa/sca/export.h" +#include "tuscany/sca/core/ServiceWrapper.h" +#include "tuscany/sca/model/Component.h" +#include "tuscany/sca/core/Operation.h" +#include "tuscany/sca/model/CPPInterface.h" +#include "tuscany/sca/util/Library.h" + +using namespace tuscany::sca::model; + +namespace tuscany +{ + namespace sca + { + /** + * Wraps the service on a component implementation. + * This abstract class is extended by generated code which provides + * the implementation of some of the methods. + * An instance of this class wraps the actual component implementation which + * has been written by a developer of an SCA application. + */ + class ComponentServiceWrapper : public ServiceWrapper + { + public: + /** + * Factory method to create a new ComponentServiceWrapper for a given target + * service. This method will provide all the loading of dlls required to + * create the target component. + * @param target The service on the component for which this wrapper is to be + * created. + * @return A wrapper that references the given target. + */ + static SCA_API ComponentServiceWrapper* createServiceWrapper(Service* target); + + /** + * Constructor. + * @param target The component service to which this wrapper refers. + */ + SCA_API ComponentServiceWrapper(Service* target); + + /** + * Destructor. + */ + SCA_API virtual ~ComponentServiceWrapper(); + + /** + * All business method calls to the target component go through the invoke method. + * @param operation The details of the method, paramaters and return value for the + * business method to be called on the target component. + */ + SCA_API virtual void invoke(Operation& operation); + + /** + * Return the loaded shared library for the target component. + */ + Library* getLibrary() {return wrapperLibrary;} + protected: + /** + * Delegated method to invoke the correct method on the target component. + * Implemented by the subtype. + */ + SCA_API virtual void invokeService(Operation& operation) = 0; + + /** + * Delegated method to create a new component implementation. + * Implemented by the subtype. + * @return A pointer to an instance of the component implementation class. + */ + SCA_API virtual void* newImplementation() = 0; + + /** + * Delegated method to delete the current instance of the component + * implementation. + * Implemented by the subtype. + */ + SCA_API virtual void deleteImplementation() = 0; + + /** + * Return the current instance of the component implementation. + * @return A pointer to an instance of the component implementation class. + */ + SCA_API virtual void* getImplementation(); + + /** + * Indicates that the current instance of the component implementation + * has been finished with. + * Will call ComponentServiceWrapper#deleteImplementation if the + * implementation is stateless (so that a new instance is returned + * for each call). + */ + SCA_API virtual void releaseImplementation(); + + private: + /** + * Holds an implementation instance if the scope is set to module. + */ + static void* staticImpl; + + /** + * The component to which this wrapper refers. + */ + Component* component; + + /** + * The service on the component to which this wrapper refers. + */ + Service* service; + + /** + * A pointer to the interface which the service exposes. + */ + CPPInterface* interf; + + /** + * Set to true if the service is remotable. + */ + bool remotable; + + /** + * Pointer to the loaded library which contains the component + * implementation. + */ + Library* wrapperLibrary; + + /** + * Set the loaded library which contains the component + * implementation. + * @param lib The library. + */ + void setLibrary(Library* lib); + }; + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_core_componentservicewrapper_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp new file mode 100644 index 0000000000..2838bbe4d4 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp @@ -0,0 +1,102 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/ExternalServiceWrapper.h" +#include + +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/core/SCARuntime.h" + +#include "tuscany/sca/ws/WSServiceWrapper.h" +using tuscany::sca::ws::WSServiceWrapper; + +using namespace osoa::sca; + + +namespace tuscany +{ + namespace sca + { + + ////////////////////////////////////////////////////////////////////// + // Construction/Destruction + ////////////////////////////////////////////////////////////////////// + + ExternalServiceWrapper::ExternalServiceWrapper(tuscany::sca::model::WireTarget* target) + : ServiceWrapper(target) + { + LOGENTRY(1,"ExternalServiceWrapper::constructor"); + if (target->getServiceType() != WireTarget::ExternalServiceType) + { + throw ServiceRuntimeException("ExternalServiceWrapper: target is not an ExternalService"); + } + + LOGEXIT(1,"ExternalServiceWrapper::constructor"); + + } + + ExternalServiceWrapper::~ExternalServiceWrapper() + { + LOGENTRY(1,"ExternalServiceWrapper::destructor"); + LOGEXIT(1,"ExternalServiceWrapper::destructor"); + } + + // ====================================================================== + // createServiceWrapper: create a wrapper for the target ExternalService + // ====================================================================== + ExternalServiceWrapper* ExternalServiceWrapper::createServiceWrapper(ExternalService* service) + { + string msg; + ExternalServiceWrapper* serviceWrapper = 0; + + // ----------------------------------------------- + // Get the binding for the target component + // ----------------------------------------------- + Binding* targetBinding = service->getBinding(); + if (!targetBinding) + { + msg = "External service " + service->getName() + " has no binding defined"; + throw ServiceNotFoundException(msg.c_str()); + } + + // TODO: This only handles ws implementation for now + if (targetBinding->getBindingType() == Binding::WS) + { + // ------------------------------------- + // Create an instance of the wrapper + // ------------------------------------- + serviceWrapper = new WSServiceWrapper(service); + + } + else + { + // ---------------------- + // Non WS Binding + // ---------------------- + msg = "Unsupported binding type for externalService: " + service->getName(); + throw ServiceNotFoundException(msg.c_str()); + } + + return serviceWrapper; + } + + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h new file mode 100644 index 0000000000..b2dcfb3a6b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h @@ -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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_externalservicewrapper_h +#define tuscany_sca_core_externalservicewrapper_h + +#include "osoa/sca/export.h" +#include "tuscany/sca/core/ServiceWrapper.h" +#include "tuscany/sca/core/Operation.h" +#include "tuscany/sca/model/ExternalService.h" +using tuscany::sca::model::ExternalService; + +namespace tuscany +{ + namespace sca + { + + /** + * Wraps an SCA external service so that it can be called by a + * proxy. + * This abstract class will be extended by a class which supports + * a specific external service binding (for example, the web services binding). + */ + class SCA_API ExternalServiceWrapper : public ServiceWrapper + { + public: + /** + * Factory method to create a new ExternaServiceWrapper for a given + * external service described in the SCA module. + */ + static ExternalServiceWrapper* createServiceWrapper(ExternalService* service); + + /** + * Constructor. + * @param target The target external service for which this wrapper is to be + * created. + * @return A wrapper that references the given target. + */ + ExternalServiceWrapper(tuscany::sca::model::WireTarget* target); + + /** + * Destructor. + */ + virtual ~ExternalServiceWrapper(); + + /** + * Return the external service (in the runtime model) that is wrapped by + * the instance of this class. + */ + virtual ExternalService* getExternalService() {return (ExternalService*)getTarget();}; + + /** + * All business method calls to the external service go through the invoke method. + * This is a delegated method which will be implemented by the subclass. + * @param operation The details of the method, paramaters and return value for the + * business method to be called on the external service. + */ + virtual void invoke(Operation& operation) = 0; + private: + + }; + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_core_externalservicewrapper_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp new file mode 100644 index 0000000000..ea9dfdb15a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp @@ -0,0 +1,88 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/Operation.h" +#include + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/core/SCARuntime.h" + + + +namespace tuscany +{ + namespace sca + { + // =========== + // Constructor + // =========== + Operation::Operation(const char* operationName, unsigned int numParameters) + : name(operationName), nparms(numParameters) + { + LOGENTRY(1,"Operation::constructor"); + + parameters = new void*[nparms]; + + LOGEXIT(1,"Operation::constructor"); + } + + // ========== + // Destructor + // ========== + Operation::~Operation() + { + LOGENTRY(1,"Operation::destructor"); + LOGEXIT(1,"Operation::destructor"); + } + + + // ============================================== + // getParameter: return parameter at position pos + // ============================================== + void* Operation::getParameter(unsigned int pos) + { + if (pos < nparms) + { + return parameters[pos]; + } + + return 0; + } + + // =========================================== + // setParameter: set parameter at position pos + // =========================================== + void Operation::setParameter(unsigned int pos, void* parm) + { + if (pos < nparms) + { + parameters[pos] = parm; + } + } + + // ==================================== + // setReturnValue: set the return value + // ==================================== + void Operation::setReturnValue(void* val) + { + returnType = val; + } + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h new file mode 100644 index 0000000000..9e080363aa --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h @@ -0,0 +1,115 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_operation_h +#define tuscany_sca_core_operation_h +#include "osoa/sca/export.h" + +#include +using std::string; + +namespace tuscany +{ + namespace sca + { + /** + * Holds the details of a single invocation of a business method. + * This class is used to pass the parameters and operation name from the + * client to a service. It will also hold the return value on the + * return from the business method. + */ + class Operation + { + public: + /** + * Create a new operation. + * @param operationName The method name of the business method to be invoked. + * @param numParameters The number of parameters to be passed. + */ + SCA_API Operation(const char* operationName, unsigned int numParameters); + + /** + * Destructor. + */ + SCA_API virtual ~Operation(); + + /** + * Return the operation name. + * @return The name of the operation. + */ + SCA_API const char* getName() {return name;} + + /** + * Set a parameter on the operation. + * @param pos The position of the parameter in the parameter list. + * @param parm Pointer to the parameter to be passed. + */ + SCA_API void setParameter(unsigned int pos, void* parm); + + /** + * Get a parameter from the operation. + * @param pos The position of the parameter in the parameter list. + * @return Pointer to the paramter at the given postion. Should be + * cast to the appropriate type. + */ + SCA_API void* getParameter(unsigned int pos); + + /** + * Get the return value on the operation. + * Normally the client + * would set the return value and the service will get this + * return value pointer and set the return value. + * @return Pointer to the return type. + */ + SCA_API void* getReturnValue() {return returnType;} + + /** + * Set the return value on the operation. + * Normally the client + * would set the return value pointer so that the service can + * return a value + * @param valPtr Pointer to the return type. + */ + SCA_API void setReturnValue(void* valPtr); + + private: + /** + * Operation name (method name). + */ + const char* name; + + /** + * Number of paramaters passed for this operation. + */ + unsigned int nparms; + + /** + * Pointer to the array of parameters. + */ + void** parameters; + + /** + * The return value. + */ + void* returnType; + }; + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_core_operation_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp new file mode 100644 index 0000000000..a505ba9636 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp @@ -0,0 +1,215 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/SCAEntryPoint.h" + +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/core/SCARuntime.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" +#include "tuscany/sca/core/ExternalServiceWrapper.h" +using namespace osoa::sca; + +namespace tuscany +{ + namespace sca + { + // =========== + // Constructor + // =========== + SCAEntryPoint::SCAEntryPoint(const char* epName) + : subsystem(0), entrypoint(0), module(0) + { + LOGENTRY(1,"SCAEntryPoint::constructor"); + string message; + + // initialize the system if necessary + System* system = SCARuntime::getInstance()->getSystem(); + + string subsystemName; + string entrypointName; + + Utils::tokeniseUri(epName, subsystemName, entrypointName); + + // -------------------- + // locate the Subsystem + // -------------------- + subsystem = system->findSubsystem(subsystemName); + if (!subsystem) + { + throw EntryPointNotFoundException(epName); + } + + // --------------------- + // locate the EntryPoint + // --------------------- + entrypoint = subsystem->findEntryPoint(entrypointName); + if (entrypoint) + { + // found Subsystem EntryPoint + throw EntryPointNotFoundException("Subsystem EntryPoint not yet supported"); + } + else + { + // ----------------------------------- + // locate the EntryPoint in the Module + // ----------------------------------- + string moduleComponentName; + Utils::tokeniseUri(entrypointName, moduleComponentName, entrypointName); + module = subsystem->findModuleByComponentName(moduleComponentName); + if (module) + { + dataFactory = module->getDataFactory(); + entrypoint = module->findEntryPoint(entrypointName); + } + } + + if (!entrypoint) + { + throw EntryPointNotFoundException(epName); + } + + // --------------------------------- + // Get Wrappers for each wire target + // --------------------------------- + + // Get the target services from the EntryPoint + const EntryPoint::TARGETS& targets = entrypoint->getTargets(); + + // -------------------- + // Validate the request + // -------------------- + switch (entrypoint->getMultiplicity()) + { + case EntryPoint::ONE_MANY: + case EntryPoint::ONE_ONE: + { + if (targets.size() == 0) + { + message = "EntryPoint " + entrypoint->getName() + " not wired"; + throw ServiceNotFoundException(message.c_str()); + } + } + default: + { + } + } // end switch + + for (EntryPoint::TARGETS::const_iterator iter = targets.begin(); + iter!=targets.end(); + iter++) + { + ServiceWrapper* service = getServiceWrapper(*iter); + if (service) + { + services.push_back(service); + } + } + + LOGEXIT(1,"SCAEntryPoint::constructor"); + } + + // ========== + // Destructor + // ========== + SCAEntryPoint::~SCAEntryPoint() + { + LOGENTRY(1,"SCAEntryPoint::destructor"); + + // Delete any ServiceWrappers + for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++) + { + delete (*iter); + } + LOGEXIT(1,"SCAEntryPoint::destructor"); + } + + + // ====================================================================== + // invoke: + // ====================================================================== + SCA_API DataObjectPtr SCAEntryPoint::invoke(const char* operationName, DataObjectPtr inDataObject) + { + string message; + + // -------------------- + // Validate the request + // -------------------- + if (services.size() == 0) + { + message = "EntryPoint " + entrypoint->getName() + " not wired"; + throw ServiceNotFoundException(message.c_str()); + } + + // ------------------- + // Invoke each target + // ------------------- + Operation operation(operationName, 1); + operation.setParameter(0, &inDataObject); + DataObjectPtr ret; + operation.setReturnValue((void *)&ret); + + for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++) + { + (*iter)->invoke(operation); + } + + return ret; + } + + + // ====================================================================== + // getServiceWrapper: Create and return an instance of the ServiceWrapper + // ====================================================================== + ServiceWrapper* SCAEntryPoint::getServiceWrapper(WireTarget* target) + { + // ------------------------- + // Determine type of Service + // ------------------------- + switch (target->getServiceType()) + { + case WireTarget::ExternalServiceType: + { + // ---------------- + // External Service + // ---------------- + return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target); + } + + case WireTarget::ComponentServiceType: + { + // ----------------- + // Component Service + // ----------------- + return ComponentServiceWrapper::createServiceWrapper((Service*)target); + } + + default: + { + string message = "Undefined wire target type for : "; + message = message + target->getName(); + throw ServiceNotFoundException(message.c_str()); + } + } // end switch + } + + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h new file mode 100644 index 0000000000..34c9f3e0d8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h @@ -0,0 +1,126 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_scaentrypoint_h +#define tuscany_sca_core_scaentrypoint_h + +#include "osoa/sca/export.h" + +#include +using std::vector; +#include "tuscany/sca/core/ServiceWrapper.h" +#include "tuscany/sca/model/WireTarget.h" +#include "tuscany/sca/model/Subsystem.h" +#include "tuscany/sca/model/EntryPoint.h" +#include "tuscany/sca/model/Module.h" +using namespace tuscany::sca::model; +#include "commonj/sdo/SDO.h" +using commonj::sdo::DataObjectPtr; +using commonj::sdo::DataFactoryPtr; + +namespace tuscany +{ + namespace sca + { + /** + * A runtime class which is used by external bindings to provide the entry + * point into the SCA runtime. An entry point will be defined in an SCA + * module, and a binding class will be provided to service the + * communication between the external binding (e.g. for web services the + * SOAP/HTTP communication) and the SCA runtime. The binding class will + * use SCAEntryPoint to call into the SCA runtime. + */ + class SCAEntryPoint + { + public: + /** + * Constructor to create a new instance which will be associated with + * a given entry point in an SCA module. + * @param entryPointName The qualified name of the entry point in an + * SCA module. It is of the form + * "subsystem name"/"module component name"/"entry point name". + */ + SCA_API SCAEntryPoint(const char* entryPointName); + + /** + * Destructor. + */ + SCA_API virtual ~SCAEntryPoint(); + + /** + * Invokes an operation on the component to which the SCA entry point + * is wired in the SCA module. + * Note that the operation must take a single data object as a parameter, and + * the return is a single data object. + * @param operationName Name of the operation. + * @param inDataObject The parameter for the operation. + * @return The data object which holds the result of the operation. + */ + SCA_API virtual DataObjectPtr invoke(const char* operationName, DataObjectPtr inDataObject); + + /** + * Returns a SDO data factory from which all the types associated with the entry point + * and module can be created. + */ + SCA_API DataFactoryPtr getDataFactory() {return dataFactory;} + + protected: + + private: + /** + * The subsystem in which this entry point is found. + */ + Subsystem* subsystem; + + /** + * The entry point in the module. + */ + EntryPoint* entrypoint; + + /** + * The module component in the subsystem. + */ + Module* module; + + /** + * Cached data factory which has all the types defined for the module in which + * this entry point is found. + */ + DataFactoryPtr dataFactory; + + typedef vector SERVICES; + /** + * Vector of all the service wrappers created for this entry point. + * Used to destroy the wrappers when this class is destroyed. + */ + SERVICES services; + + /** + * Creates and returns the service wrapper for a given target. + * @param target The target of the wire for which a service wrapper is + * to be created. + * @return A service wrapper to be used for invoking the target implementation. + */ + ServiceWrapper* getServiceWrapper(WireTarget* target); + + }; + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_core_scaentrypoint_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp new file mode 100644 index 0000000000..deca72c378 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp @@ -0,0 +1,288 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/SCARuntime.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/util/Exceptions.h" + +#include "tuscany/sca/model/System.h" +#include "tuscany/sca/model/Subsystem.h" +#include "tuscany/sca/model/ModelLoader.h" + +#if defined(WIN32) || defined (_WINDOWS) +#include +#endif + +namespace tuscany +{ + namespace sca + { + /** + * Environment variable names + */ + static const char* TUSCANY_SCACPP = "TUSCANY_SCACPP"; + static const char* TUSCANY_SCACPP_SYSTEM_ROOT = "TUSCANY_SCACPP_SYSTEM_ROOT"; + static const char* TUSCANY_SCACPP_DEFAULT_MODULE = "TUSCANY_SCACPP_DEFAULT_MODULE"; + + + // ========================================================== + // Initialize static class member to not pointing at anything + // ========================================================== + SCARuntime* SCARuntime::instance = 0; + + + // =================================================================== + // Constructor for the SCARuntime class. This will be a singleton that + // holds all the information about the current runtime. + // =================================================================== + SCARuntime::SCARuntime() : system(new System()), defaultModule(0) + { + LOGENTRY(1, "SCARuntime::constructor"); + + // Locate the SCA install root + char* root = 0; + root = getenv(TUSCANY_SCACPP); + if (root == 0) + { + string msg = TUSCANY_SCACPP; + msg += " environment variable not set"; + throw SystemConfigurationException(msg.c_str()); + } + else + { + SCARoot = root; + } + + LOGEXIT(1, "SCARuntime::constructor"); + } + + // ============================================================= + // Get the instance of the runtime, creates it if does not exist + // static method + // ============================================================= + SCARuntime* SCARuntime::getInstance() + { + LOGENTRY(1, "SCARuntime::getInstance"); + + if (instance == NULL) + { + instance = new SCARuntime(); + + // Load the runtime + // Get root from environment variable TUSCANY_SCACPP_SYSTEM_ROOT + char* systemRoot = getenv(TUSCANY_SCACPP_SYSTEM_ROOT); + if (systemRoot == 0) + { + string msg = TUSCANY_SCACPP_SYSTEM_ROOT; + msg += " environment variable not set"; + throw SystemConfigurationException(msg.c_str()); + } + instance->load(systemRoot); + } + + LOGEXIT(1, "SCARuntime::getInstance"); + + return instance; + + } + + // ====================================== + // Load up all the details of the runtime + // ====================================== + void SCARuntime::load(const char *configurationRoot) + { + LOGENTRY(1, "SCARuntime::load"); + std::string root = configurationRoot; + + LOGINFO_1(2,"configuration root: %s", configurationRoot); + + ModelLoader loader(system); + // Load details of the module + loader.load(configurationRoot); + + LOGEXIT(1, "SCARuntime::load"); + } + + + // =================================== + // Return the top of the runtime model + // =================================== + System* SCARuntime::getSystem() + { + return system; + } + + + // =================================================== + // setCurrentComponent: push component for this thread + // =================================================== + void SCARuntime::setCurrentComponent(Component* component) + { + +#if defined(WIN32) || defined (_WINDOWS) + DWORD currentThreadId = GetCurrentThreadId(); +#else + pthread_t currentThreadId = pthread_self(); +#endif + COMPONENTS_MAP::iterator iter = components.find(currentThreadId); + if (iter == components.end()) + { + components[currentThreadId] = COMPONENT_STACK(); + iter = components.find(currentThreadId); + } + + COMPONENT_STACK& compStack = iter->second; + compStack.push(component); + } + + + // ==================================================== + // unsetCurrentComponent: pop component for this thread + // ==================================================== + Component* SCARuntime::unsetCurrentComponent() + { +#if defined(WIN32) || defined (_WINDOWS) + DWORD currentThreadId = GetCurrentThreadId(); +#else + pthread_t currentThreadId = pthread_self(); +#endif + + COMPONENTS_MAP::iterator iter = components.find(currentThreadId); + if (iter != components.end()) + { + COMPONENT_STACK& compStack = iter->second; + if (compStack.size() > 0) + { + Component* component = compStack.top(); + compStack.pop(); + return component; + } + } + + return 0; + } + + // ============================================================= + // getCurrentComponent: return current component for this thread + // ============================================================= + Component* SCARuntime::getCurrentComponent() + { +#if defined(WIN32) || defined (_WINDOWS) + DWORD currentThreadId = GetCurrentThreadId(); +#else + pthread_t currentThreadId = pthread_self(); +#endif + + COMPONENTS_MAP::iterator iter = components.find(currentThreadId); + if (iter == components.end()) + { + components[currentThreadId] = COMPONENT_STACK(); + iter = components.find(currentThreadId); + } + + COMPONENT_STACK& compStack = iter->second; + if (compStack.size() > 0) + { + return compStack.top(); + } + else + { + return 0; + } + + } + + + // =========================================== + // getCurrentModule: return the current module + // =========================================== + Module* SCARuntime::getCurrentModule() + { + // --------------------------------------------- + // Get module from current component if possible + // --------------------------------------------- + Component* comp = getCurrentComponent(); + if (comp != 0) + { + return comp->getModule(); + } + + // ---------------------- + // Get the default Module + // ---------------------- + string message; + if (!defaultModule) + { + // ------------------------------------------- + // Get the default module from the environment + // ------------------------------------------- + const char* defMod = getenv(TUSCANY_SCACPP_DEFAULT_MODULE); + if (!defMod) + { + message = TUSCANY_SCACPP_DEFAULT_MODULE; + message += " environment variable not set"; + throw SystemConfigurationException(message.c_str()); + } + + string subsystemName, moduleName; + Utils::tokeniseUri(defMod, subsystemName, moduleName); + + // --------------------------- + // Subsystem must be specified + // --------------------------- + Subsystem* subsystem = system->findSubsystem(subsystemName); + if (!subsystem) + { + message = "Default subsystem \'" + subsystemName + "\' not found"; + throw SystemConfigurationException(message.c_str()); + } + + // -------------------------------------------------------------------------- + // If module is not specified then get the default module for this subsystem. + // This will be the ONLY module for this subsystem + // -------------------------------------------------------------------------- + if (moduleName == "") + { + defaultModule = subsystem->getDefaultModule(); + if (!defaultModule) + { + message = "Default module not found for subsystem \'" + subsystemName + "\'"; + throw SystemConfigurationException(message.c_str()); + } + } + else + { + // ----------------------------- + // get the named ModuleComponent + // ----------------------------- + defaultModule = subsystem->findModuleByComponentName(moduleName); + if (!defaultModule) + { + message = "Default module \'" + moduleName + "\' not found in subsystem \'" + subsystemName +"\'"; + throw SystemConfigurationException(message.c_str()); + } + } + } + return defaultModule; + } + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h new file mode 100644 index 0000000000..42deb85751 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h @@ -0,0 +1,166 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_scaruntime_h +#define tuscany_sca_core_scaruntime_h + +#include "osoa/sca/export.h" + +#include "osoa/sca/ComponentContext.h" +using osoa::sca::ComponentContext; + +#include "tuscany/sca/core/ServiceWrapper.h" +#include "tuscany/sca/model/System.h" +using namespace tuscany::sca::model; + +#if defined(WIN32) || defined (_WINDOWS) +#include +#else +#include +#endif + +#include +#include +#include +using namespace std; + +namespace tuscany +{ + namespace sca + { + + /** + * A singleton which represents the executing SCA runtime. + */ + class SCARuntime { + public: + /** + * Get the single instance. + * @return The single instance of the runtime. + */ + SCA_API static SCARuntime* getInstance(); + + /** + * Set the current component for the current thread. + * @param component The current component. + */ + SCA_API void setCurrentComponent(Component* component); + + /** + * Remove the current component from this thread, and return + * to the previous component (if there was one). + * @return The previous component. + */ + SCA_API Component* unsetCurrentComponent(); + + /** + * Get a pointer to the configured SCA system which this + * SCA runtime represents. + * The rest of the SCA configuration can be navigated from + * the System. + * @return The configured SCA system. + */ + System* getSystem(); + + /** + * The directory in which the Tuscany runtime has been installed. + */ + const string& getInstallRoot() {return SCARoot;} + + /** + * Return the current component for this thread. + * @return The current component for this thread. + */ + Component* getCurrentComponent(); + + /** + * Get the current module. The current module will either + * be the module in which the current component for this thread + * is defined, or it will be the default module if there is no current + * component. There will not be a current component if a client of + * the SCA runtime is making a call into the SCA runtime. + */ + Module* getCurrentModule(); + + private: + /** + * Default constructor is private to prevent more than one instance. + */ + SCARuntime(); + + /** + * Load the SCA configuration from the scdl files (sca.module, + * *.fragment, etc). + * This will create the runtime model from which the SCA runtime + * will operate. + * @param configurationRoot The path to the configuration of the + * SCA runtime. Under this root will be the subsystems and modules + * directories. + */ + void load(const char* configurationRoot); + + /** + * The single instance of this class. + */ + static SCARuntime* instance; + + /** + * Pointer to the top of the runtime model. + */ + System* system; + + /** + * The installed path of the Tuscany runtime. + */ + string SCARoot; + + /** + * Get the default module set for this runtime. + * @return The default module. + */ + Module* getDefaultModule() {return defaultModule;} + + /** + * The default module set for this runtime. + */ + Module* defaultModule; + + + typedef stack COMPONENT_STACK; +#if defined(WIN32) || defined (_WINDOWS) + typedef map COMPONENTS_MAP; +#else + typedef map COMPONENTS_MAP; +#endif + + /** + * A map of threads to components. + */ + COMPONENTS_MAP components; + }; + + + } // End namespace sca +} // End namespace tuscany + + + + +#endif // tuscany_sca_core_scaruntime_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp new file mode 100644 index 0000000000..ef2f2744eb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp @@ -0,0 +1,121 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/ServiceProxy.h" + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/core/SCARuntime.h" +#include "tuscany/sca/model/CPPImplementation.h" + +using namespace osoa::sca; + +namespace tuscany +{ + namespace sca + { + // ============================ + // Constructor: Create a proxy + // ============================ + ServiceProxy::ServiceProxy(Component* component, const string& name, ServiceWrapper* target) + { + LOGENTRY(1,"ServiceProxy::constructor"); + string msg; + + // ---------------------- + // Get the implementation + // ---------------------- + Implementation* impl = component->getImplementation(); + if (!impl) + { + msg = "Component " + component->getName() + " has no implementation defined"; + throw ServiceNotFoundException(msg.c_str()); + } + + // TODO: This only handle CPP implementation for now + if (impl->getImplementationType() == Implementation::CPP) + { + // ---------------------------------------------------- + // Get implementation dll name and service factory name + // ---------------------------------------------------- + string dllName = ((CPPImplementation*)impl)->getDll(); + string headerStub = ((CPPImplementation*)impl)->getHeaderStub(); + + string fullDllName = component->getModule()->getRoot() + "/" + dllName; + string proxyFactoryName = headerStub + "_" + name + "_Proxy_Factory"; + string proxyDestructorName = headerStub + "_" + name + "_Proxy_Destructor"; + typedef void* (* PROXYFACTORY) (ServiceWrapper*); + + // ------------ + // Load the dll + // ------------ + proxyLibrary = Library(fullDllName); + + // ------------------------- + // Locate the factory method + // ------------------------- + PROXYFACTORY proxyFactory = (PROXYFACTORY)proxyLibrary.getSymbol(proxyFactoryName); + if (!proxyFactory) + { + LOGERROR_2(1, "ComponentContextImpl::getServiceProxy: Unable to locate %s in library %s", + proxyFactoryName.c_str(), fullDllName.c_str()); + msg = "Unable to locate " + proxyFactoryName + " in library " + fullDllName; + throw ServiceNotFoundException(msg.c_str()); + } + + // ----------------------------------- + // Now create an instance of the proxy + // ----------------------------------- + proxy = proxyFactory(target); + if (!proxy) + { + LOGERROR_2(1, "ComponentContextImpl::getServiceProxy: Factory method %s in library %s returned null", + proxyFactoryName.c_str(), fullDllName.c_str()); + msg = "Factory method " + proxyFactoryName + " in library " + fullDllName + " returned null"; + throw ServiceNotFoundException(msg.c_str()); + } + + // ------------------------- + // Get the destructor method + // ------------------------- + destructor = (PROXYDESTRUCTOR)proxyLibrary.getSymbol(proxyDestructorName); + } + + LOGEXIT(1,"ServiceProxy::constructor"); + + } + + // ========== + // Destructor + // ========== + ServiceProxy::~ServiceProxy() + { + LOGENTRY(1,"ServiceProxy::destructor"); + + // Delete the proxy + if (destructor) + { + destructor(proxy); + } + LOGEXIT(1,"ServiceProxy::destructor"); + } + + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h new file mode 100644 index 0000000000..073b379cd7 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h @@ -0,0 +1,89 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_serviceproxy_h +#define tuscany_sca_core_serviceproxy_h + +#include "osoa/sca/export.h" + +#include "tuscany/sca/core/ServiceWrapper.h" +#include "tuscany/sca/model/Component.h" +#include "tuscany/sca/util/Library.h" + +using namespace tuscany::sca::model; + +namespace tuscany +{ + namespace sca + { + /** + * Holds a proxy for a given component and reference. + * The proxy which is held inside a ServiceProxy will be specific to the component + * and reference and will have been code generated and be contained in a dll + * created by a developer of an SCA application. + */ + class ServiceProxy + { + public: + /** + * Create a new service proxy for a given component and reference name. The + * create proxy will contain a pointer to the target ServiceWrapper. + * @param component The component for which this proxy will be created (the + * source component). + * @param name The name of the reference on the component. + * @param target The wrapper of the component which is wired to this component and + * reference. + */ + ServiceProxy(Component* component, const string& name, ServiceWrapper* target); + + /** + * Destructor. + */ + virtual ~ServiceProxy(); + + /** + * Return an instance of the proxy created for this particular component and reference. + * @return The proxy. + */ + void* getProxy() {return proxy;} + + + private: + /** + * Holds the instance of the code generated proxy. + */ + void* proxy; + + typedef void (* PROXYDESTRUCTOR) (void*); + + /** + * A function pointer to the destructor of the proxy. + */ + PROXYDESTRUCTOR destructor; + + /** + * The library which contains the code for the proxy. + */ + Library proxyLibrary; + + }; + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_core_serviceproxy_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp new file mode 100644 index 0000000000..5936f526f1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp @@ -0,0 +1,55 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/core/ServiceWrapper.h" +#include + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/core/SCARuntime.h" + + + +namespace tuscany +{ + namespace sca + { + + // =========== + // Constructor + // =========== + ServiceWrapper::ServiceWrapper(WireTarget* targ) + : target(targ) + { + LOGENTRY(1,"ServiceWrapper::constructor"); + + LOGEXIT(1,"ServiceWrapper::constructor"); + + } + + // ========== + // Destructor + // ========== + ServiceWrapper::~ServiceWrapper() + { + LOGENTRY(1,"ServiceWrapper::destructor"); + LOGEXIT(1,"ServiceWrapper::destructor"); + } + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h new file mode 100644 index 0000000000..21c162d77f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h @@ -0,0 +1,73 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_core_servicewrapper_h +#define tuscany_sca_core_servicewrapper_h + +#include "osoa/sca/export.h" + +#include "tuscany/sca/core/Operation.h" +#include "tuscany/sca/model/WireTarget.h" +using tuscany::sca::model::WireTarget; + +namespace tuscany +{ + namespace sca + { + /** + * An abstract class that wraps a component implementation or an external + * service. + */ + class SCA_API ServiceWrapper + { + public: + /** + * Constructor. + * @param target The service wrapper wraps the target of a wire. + */ + ServiceWrapper(WireTarget* target); + + /** + * Destructor. + */ + virtual ~ServiceWrapper(); + + /** + * Get the target represented by this wrapper. + * @return The target represented by this wrapper. + */ + virtual WireTarget* getTarget() {return target;} + + /** + * All business method calls on the target service are performed through + * this invoke method. + * @param operation The details of the method, paramaters and return value for the + * business method to be called on the target service. + */ + virtual void invoke(Operation& operation) = 0; + private: + /** + * The target represented by this wrapper. + */ + WireTarget* target; + }; + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_core_servicewrapper_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp new file mode 100644 index 0000000000..c312d7a077 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp @@ -0,0 +1,44 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/Binding.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + Binding::Binding(const string& uri) : uri(uri) + { + } + + Binding::~Binding() + { + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h new file mode 100644 index 0000000000..ff97990dc6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h @@ -0,0 +1,85 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_binding_h +#define tuscany_sca_model_binding_h +#include +using std::string; + + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Information about the binding for EntryPoint and ExternalService. An + * abstract class which will be extended by classes that hold specific + * information for each type of binding. + */ + class Binding + { + + public: + /** + * Supported binding types. + */ + enum Type + { + WS, + SCA + }; + + /** + * Constructor to create a new binding. + * @param uri The uri specified in the scdl file. + */ + Binding(const string& uri); + + /** + * Destructor. + */ + virtual ~Binding(); + + /** + * Return the enumerated type of binding. + * @return The type of the binding (see Binding#Type). + */ + virtual Type getBindingType() = 0; + + /** + * Return the uri of the binding. + * @return The uri of the binding. + */ + string getUri() {return uri;}; + + private: + /** + * The uri of the binding. + */ + string uri; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_binding_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp new file mode 100644 index 0000000000..7212e777b1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp @@ -0,0 +1,54 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/CPPImplementation.h" +#include "tuscany/sca/util/Utils.h" + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + CPPImplementation::CPPImplementation(const string& dllName, const string& head, const string& classN) + : dll(dllName), header(head), className(classN) + { + // Separate any path element + Utils::rTokeniseString("/", head, headerPath, headerStub); + if (headerPath != "") + { + headerPath += "/"; + } + + // Determine the header stub name + string tmp; + Utils::rTokeniseString(".h", headerStub, headerStub, tmp); + } + + CPPImplementation::~CPPImplementation() + { + } + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h new file mode 100644 index 0000000000..0294649af7 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h @@ -0,0 +1,125 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_cppimplementation_h +#define tuscany_sca_model_cppimplementation_h +#include "tuscany/sca/model/Implementation.h" + +#include +using std::map; +#include +using std::string; + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Holds informatio about an SCA implementation written in C++ + */ + class CPPImplementation : public Implementation + { + + public: + /** + * Constructor. + * @param dllName Name of the shared library. + * @param header Name of the header file that contains the class declaring the + * implementation class. + * @param className Name of the class in the header file (could be a blank string + * if this is not specified). + */ + CPPImplementation(const string& dllName, const string& header, const string& className); + + /** + * Destructor + */ + virtual ~CPPImplementation(); + + /** + * Return the implementation type. + * @return Always returns CPP. + */ + virtual Type getImplementationType() {return CPP;} + + /** + * Returns the name of the shared library. + * @return The name of the shared library. + */ + const string& getDll() {return dll;} + + /** + * Get the name of the header file. + * @return Name of the header file. + */ + const string& getHeader() {return header;} + + /** + * Get the header file name without the extension. + * @return The name of the header file without any extension. + */ + const string& getHeaderStub() {return headerStub;} + + /** + * Get the header path. + * @return The pathe element of the header. + */ + const string& getHeaderPath() {return headerPath;} + + /** + * Get the name of the class. + * @return The class name if specified. + */ + const string& getClass() {return className;} + private: + /** + * Name of the shared library. + */ + string dll; + + /** + * Name of the header file describing the interface. + */ + string header; + + /** + * Name of the header file without the extension. + */ + string headerStub; + + /** + * Path element of the header. + */ + string headerPath; + + /** + * Name of the class in the header file declaring the implementation. + * May be an empty string if not set in the SCDL file. + */ + string className; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_cppimplementation_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp new file mode 100644 index 0000000000..015b54c259 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp @@ -0,0 +1,67 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/CPPInterface.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + CPPInterface::CPPInterface( + const string& head, + const string& classN, + const string& scop, + bool remote) + : header(head), className(classN), remotable(remote) + { + string::size_type dot = header.rfind(".h"); // this will also find .hpp + if (dot != string::npos) + { + headerStub = header.substr(0, dot); + } + else + { + headerStub = header; + } + + if (scop == "module") + { + scope = MODULE; + } + else + { + scope = STATELESS; + } + } + + CPPInterface::~CPPInterface() + { + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h new file mode 100644 index 0000000000..7b37b1892e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h @@ -0,0 +1,143 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_cppinterface_h +#define tuscany_sca_model_cppinterface_h + +#include "tuscany/sca/model/Interface.h" + + +#include +using std::map; +#include +using std::string; + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Holds information about an interface described using a C++ + * header file. + */ + class CPPInterface : public Interface + { + + public: + /** + * Constuctor. + * @param header Name of the header file containing the class that + * describes the interface. + * @param className Name of the class in the header file that + * describes the interface. + * @param scope The scope of the interface (stateless or module). + * @param remotable True if the interface is remotable. + */ + CPPInterface( + const string& header, + const string& className, + const string& scope, + bool remotable); + + /** + * Destructor. + */ + virtual ~CPPInterface(); + + /** + * Return the type of the interface. + * @return Always returns CPP. + */ + virtual Type getInterfaceType() {return CPP;} + + /** + * Get the name of the header file. + * @return The name of the header file containing the definition of the + * interface. + */ + const string& getHeader() {return header;} + + /** + * Return the name of the header file without the extension. + * @return Header file name without any extension. + */ + const string& getHeaderStub() {return headerStub;} + + /** + * Get the name of the class. + * @return The name of the class defining the interface. + */ + const string& getClass() {return className;} + + /** + * Scope of interface. + */ + enum SCOPE + { + MODULE, + STATELESS + }; + + /** + * Get the scope of the interface. + * @return The scope of the interface. + */ + SCOPE getScope() {return scope;} + + /** + * Return whether the interface is remotable or local. + * @return True if the interface is remotable, otherwise false. + */ + bool getRemotable() {return remotable;} + + private: + /** + * Name of the header file containing the definition of the interface. + */ + string header; + + /** + * Name of the header file without the extension. + */ + string headerStub; + + /** + * Name of the class in the header file. + */ + string className; + + /** + * Scope of the interface. + */ + SCOPE scope; + + /** + * Remotable interface or not. + */ + bool remotable; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_cppinterface_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp new file mode 100644 index 0000000000..3e52591b3d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp @@ -0,0 +1,303 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +// Component.cpp : Represent a loaded Component +// +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/model/Component.h" + +using namespace commonj::sdo; + +namespace tuscany +{ + namespace sca + { + namespace model + { + // Constructor + Component::Component(const std::string& componentName, Module* module) + : name(componentName), containingModule(module), implementation(0) + { + LOGENTRY(1, "Component::constructor"); + LOGINFO_1(3, "Component::constructor: Component name: %s", name.c_str()); + LOGEXIT(1, "Component::constructor"); + } + + Component::~Component() + { + } + + Service* Component::addService(const std::string& serviceName) + { + Service* service = new Service(serviceName, this); + services[serviceName] = service; + return service; + } + + Service* Component::findService(const std::string& serviceName) + { + // If serviceName is null then return the ONLY service + if (serviceName == "" + && services.size() == 1) + { + return services.begin()->second; + } + else + { + return services[serviceName]; + } + } + + ServiceReference* Component::findReference(const std::string& referenceName) + { + return references[referenceName]; + } + + ServiceReference* Component::addReference(const std::string& referenceName) + { + ServiceReference* serviceReference = references[referenceName]; + if (!serviceReference) + { + references[referenceName] = new ServiceReference(referenceName); + } + return references[referenceName]; + } + + void Component::setImplementation(Implementation* impl) + { + implementation = impl; + } + + void Component::addProperty(const string& name, + const string& type, + bool many, + bool required, + const char* defaultValue) + { + // Create a Type in the Properties dataFactory + DataFactoryPtr factory = getPropertyDataFactory(); + + string typeUri, typeName; + Utils::tokeniseQName(type, typeUri, typeName); + + if (typeUri == "http://www.w3.org/2001/XMLSchema") + { + typeUri = Type::SDOTypeNamespaceURI; + if (typeName == "string") + { + typeName = "String"; + } + else if (typeName == "anyType") + { + typeName = "DataObject"; + } + else if (typeName == "int") + { + typeName = "Integer"; + } + else if (typeName == "integer") + { + typeName = "Integer"; + } + else if (typeName == "negativeInteger") + { + typeName = "Integer"; + } + else if (typeName == "nonNegativeInteger") + { + typeName = "Integer"; + } + else if (typeName == "positiveInteger") + { + typeName = "Integer"; + } + else if (typeName == "nonPositiveInteger") + { + typeName = "Integer"; + } + else if (typeName == "unsignedLong") + { + typeName = "Integer"; + } + else if (typeName == "unsignedShort") + { + typeName = "Integer"; + } + else if (typeName == "unsignedInt") + { + typeName = "Long"; + } + else if (typeName == "long") + { + typeName = "Long"; + } + else if (typeName == "double") + { + typeName = "Double"; + } + else if (typeName == "short") + { + typeName = "Short"; + } + else if (typeName == "unsignedByte") + { + typeName = "Short"; + } + else if (typeName == "float") + { + typeName = "Float"; + } + else if (typeName == "boolean") + { + typeName = "Boolean"; + } + else if (typeName == "byte") + { + typeName = "Byte"; + } + else if (typeName == "base64Binary") + { + typeName = "Bytes"; + } + else if (typeName == "hexBinary") + { + typeName = "Bytes"; + } + else if (typeName == "anyURI") + { + typeName = "URI"; + } + else if (typeName == "QName") + { + typeName = "URI"; + } + else + { + // Default unknown xs: types to string?? + typeName = "String"; + } + } + else + { + // It's not an XML type + } + + + factory->addPropertyToType( + "org/osoa/sca", + "Properties", + name.c_str(), + typeUri.c_str(), + typeName.c_str(), + many, + false, + true); + + // Set the default + + + // Add to list of required properties + if (required) + { + } + } + + DataFactoryPtr Component::getPropertyDataFactory() + { + if (!propertyFactory) + { + propertyFactory = DataFactory::getDataFactory(); + // Add the root type + propertyFactory->addType("org/osoa/sca", "Properties", false, false, false, false); + } + return propertyFactory; + } + + DataObjectPtr Component::getProperties() + { + if (!properties) + { + properties = getPropertyDataFactory()->create("org/osoa/sca", "Properties"); + } + return properties; + } + + void Component::addProperties(DataObjectPtr values) + { + if (!values) + { + return; + } + + DataObjectPtr props = getProperties(); + + PropertyList pl = values->getInstanceProperties(); + for (int i=0; i < pl.size(); i++) + { + if (!values->isSet(i)) + { + continue; + } + + // Add the property value to the component to be resolved later + string propName = pl[i].getName(); + + // Get the property's type + try + { + const Property& propProperty = props->getProperty(pl[i].getName()); + const Type& propType = propProperty.getType(); + + DataObjectList& proplist = values->getList(pl[i]); + for (int proplistI=0; proplistIgetList(pl[i]); + dol.append(proplist.getCString(proplistI)); + } + else + { + props->setCString(pl[i], proplist.getCString(proplistI)); + } + } + else + { + // Create a new instance of the DO + // iterate over properties setting each one + } + } + } + catch (SDOPropertyNotFoundException&) + { + // Configuration error: property is not defined + string message = "Undefined property: " + propName; + throw SystemConfigurationException(message.c_str()); + } + + } + } + + } // End namespace model + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h new file mode 100644 index 0000000000..f40690c859 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h @@ -0,0 +1,202 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_component_h +#define tuscany_sca_model_component_h + +#include +using std::string; + +#include + +#include "tuscany/sca/model/Service.h" +#include "tuscany/sca/model/Implementation.h" +#include "tuscany/sca/model/ServiceReference.h" + +#include "commonj/sdo/SDO.h" +using commonj::sdo::DataObjectPtr; +using commonj::sdo::DataFactoryPtr; + +namespace tuscany +{ + namespace sca + { + namespace model + { + + class Module; + + /** + * Information about an SCA component. + */ + class Component + { + public: + /** + * Constructor + * @param name The name of the component. + * @param module The module containing this component. + */ + Component(const std::string& name, Module* module); + + /** + * Destructor. + */ + virtual ~Component(); + + /** + * Returns the name of the component. + * @return The name of the component. + */ + const string& getName() {return name;} + + /** + * Get the module containing this component. + * @return The containing module. + */ + Module* getModule() {return containingModule;} + + /** + * Add a new service to this component. + * @param serviceName The name of the service to add. + * @return The newly added service. + */ + Service* addService(const std::string& serviceName); + + /** + * Find an existing service on this component. + * @param serviceName The name of the service to find. + * If the serviceName is the zero length string then if there is + * only one service it will be returned. + * @return The found service, or 0 if not found. + */ + Service* findService(const std::string& serviceName); + + /** + * Add a new reference to this component. + * @param referenceName The name of the reference to add. + * @return The newly added reference. + */ + ServiceReference* addReference(const std::string& referenceName); + + /** + * Find an existing reference on this component. + * @param referenceName The name of the reference to find. + * @return The found reference, or 0 if not found. + */ + ServiceReference* findReference(const std::string& referenceName); + + /** + * Set the details of the implementation of this component. + * @param impl The details of the implementation. + */ + void setImplementation(Implementation* impl); + + /** + * Returns the details of the implementation of this component. + * @return The details of the implementation. + */ + Implementation* getImplementation() {return implementation;} + + /** + * Add a new property to this component. Properties are + * added one at a time. The property definitions come from the component + * type file. + * @param name The name of the property. + * @param type The full name of the type (including uri and local name). + * @param many True if this is a many valued property. + * @param required True if this property must have a value set. + * @param defaultValue The default value if the property does not have a + * value set. + */ + void addProperty(const string& name, + const string& type, + bool many, + bool required, + const char* defaultValue = 0); + + /** + * Add the property values to the properties defined on this + * component. The values will come from the sca.module file. + * @param properties A data object representing all the values set + * for this component. + */ + void addProperties(DataObjectPtr properties); + + /** + * Returns a data object from which all the properties and their + * values can be accessed. + * @return A data object holding the property values. + */ + DataObjectPtr getProperties(); + private: + /** + * Name of the component. + */ + string name; + + /** + * Module containing this component for navigating up the tree. + */ + Module* containingModule; + + /** + * Information about the implementation of this component. + */ + Implementation* implementation; + + typedef std::map SERVICE_MAP; + /** + * Map of all the services defined on this component. + */ + SERVICE_MAP services; + + typedef std::map REFERENCE_MAP; + /** + * Map of all the references defined on this component. + */ + REFERENCE_MAP references; + + /** + * SDO data factory which has all the property types defined from + * the component type file + */ + DataFactoryPtr propertyFactory; + + /** + * Return the SDO data factory which has the property types defined + * in it. + * @return The data factory. + */ + DataFactoryPtr getPropertyDataFactory(); + + /** + * The properties and their values for this component. + */ + DataObjectPtr properties; + + }; + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_component_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp new file mode 100644 index 0000000000..3ca0f8cc5e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp @@ -0,0 +1,96 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/EntryPoint.h" +#include "tuscany/sca/util/Exceptions.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + EntryPoint::EntryPoint(const std::string& epName) + : name(epName) + { + LOGENTRY(1, "EntryPoint::constructor"); + LOGERROR_1(0, "EntryPoint::constructor: EntryPoint name: %s", name.c_str()); + LOGEXIT(1, "EntryPoint::constructor"); + } + + EntryPoint::~EntryPoint() + { + } + + void EntryPoint::addTarget(WireTarget* targ) + { + if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE) + { + if (targets.size() > 0) + { + // throw exception + string message = "Duplicate wire for reference: " + name; + throw SystemConfigurationException(message.c_str()); + } + } + + // TODO - must be remotable + + targets.push_back(targ); + } + + void EntryPoint::setMultiplicity(const std::string& multip) + { + if (multip == "0..1") + { + multiplicity = ZERO_ONE; + } + else if (multip == "1..1") + { + multiplicity = ONE_ONE; + } + else if (multip == "0..n") + { + multiplicity = ZERO_MANY; + } + else if (multip == "1..n") + { + multiplicity = ONE_MANY; + } + else + { + string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name; + throw SystemConfigurationException(msg.c_str()); + } + } + + void EntryPoint::setInterface(Interface* interf) + { + iface = interf; + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h new file mode 100644 index 0000000000..f6e4b485f9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h @@ -0,0 +1,138 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_entrypoint_h +#define tuscany_sca_model_entrypoint_h + +#include +using std::string; +#include +using std::vector; + +#include "tuscany/sca/model/Interface.h" +#include "tuscany/sca/model/WireTarget.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Represents the information about an entry point. + */ + class EntryPoint + { + + public: + /** + * Constructor. + * @param name The name of the entry point. + */ + EntryPoint(const std::string& name); + + /** + * Destructor. + */ + virtual ~EntryPoint(); + + /** + * Return the name of the entry point. + * @return The name of the entry point. + */ + const string& getName() {return name;} + + /** + * How many wires can be wired from this entry point. + */ + enum Multiplicity + { + ZERO_ONE, + ONE_ONE, + ZERO_MANY, + ONE_MANY + }; + + /** + * Set the multiplicity of this entry point. + * @param multiplicity One of 0..1, 1..1, 0..n, 1..n + */ + void setMultiplicity(const std::string& multiplicity); + + /** + * Return the multiplicity of this entry point (how + * many wires can be wired from this entry point). + * @return The multiplicity. + */ + Multiplicity getMultiplicity() {return multiplicity;} + + /** + * Set the interface describing this entry point. + * @param iface The interface. + */ + void setInterface(Interface* iface); + + /** + * Get the interface describing this entry point. Use + * Interface#getType to find out the type of interface + * describing this entry point. + * @return iface The interface. + */ + Interface* getInterface() {return iface;} + + /** + * Add a target to the entry point. + * @param target Add a target (derived from a wire) to + * the entry point. + */ + void addTarget(WireTarget* target); + typedef vector TARGETS; + + /** + * Get a vector of targets added to this entry point. + */ + const TARGETS& getTargets() {return targets;} + private: + /** + * Name of the entry point. + */ + string name; + + /** + * The interface describing this entry point. + */ + Interface* iface; + + /** + * The multiplicity of this entry point.. + */ + Multiplicity multiplicity; + + /** + * The vector of targets added to this entry point. + */ + TARGETS targets; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_entrypoint_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp new file mode 100644 index 0000000000..c0e3afc682 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp @@ -0,0 +1,55 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/ExternalService.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + ExternalService::ExternalService(const std::string& serviceName, Module *module) + : WireTarget(serviceName), containingModule(module) + { + LOGENTRY(1, "ExternalService::constructor"); + LOGERROR_1(0, "ExternalService::constructor: ExternalService name: %s", getName().c_str()); + LOGEXIT(1, "ExternalService::constructor"); + } + + ExternalService::~ExternalService() + { + delete binding; + } + + void ExternalService::setBinding(Binding* bind) + { + binding = bind; + } + + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h new file mode 100644 index 0000000000..fe9640d1b8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h @@ -0,0 +1,97 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_externalservice_h +#define tuscany_sca_model_externalservice_h + +#include + +#include "tuscany/sca/model/WireTarget.h" +#include "tuscany/sca/model/Binding.h" + +namespace tuscany +{ + namespace sca + { + + namespace model + { + class Module; + + /** + * Information about an external service. + */ + class ExternalService : public WireTarget + { + public: + /** + * Constructor. + * @param name The name of the external service. + * @param module The module containing this external service. + */ + ExternalService(const std::string& name, Module *module); + + /** + * Destructor. + */ + virtual ~ExternalService(); + + /** + * Return the type of service. + * @return Always returns ExternalServiceType + */ + virtual Type getServiceType() {return ExternalServiceType;} + + /** + * Set the binding for this external service. + * @param binding The binding to set. + */ + virtual void setBinding(Binding* binding); + + /** + * Get the binding set for this external service. + * @return The binding. + */ + virtual Binding* getBinding() {return binding;}; + + /** + * Get the module containing this external service. + * @return The containing module. + */ + Module* getContainingModule() {return containingModule;}; + + private: + /** + * The binding for this external service. + */ + Binding* binding; + + /** + * The module containing this external service. + */ + Module* containingModule; + + + }; + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_externalservice_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp new file mode 100644 index 0000000000..9703d1bab3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp @@ -0,0 +1,44 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/Implementation.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + Implementation::Implementation() + { + } + + Implementation::~Implementation() + { + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h new file mode 100644 index 0000000000..17414c359b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h @@ -0,0 +1,66 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_implementation_h +#define tuscany_sca_model_implementation_h + +#include + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Abstract class representing information about an implementation + * of a component. The subtypes will hold information specific to + * the type of implementation. + */ + class Implementation + { + + public: + /** + * Supported types of implementation. + */ + enum Type + { + CPP, + JAVA + }; + + Implementation(); + virtual ~Implementation(); + + /** + * Return the type of the implementation. + * @return Will depend on the subtype. + */ + virtual Type getImplementationType() = 0; + + private: + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_implementation_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp new file mode 100644 index 0000000000..9e0aa45889 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp @@ -0,0 +1,44 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/Interface.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + Interface::Interface() + { + } + + Interface::~Interface() + { + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h new file mode 100644 index 0000000000..24bb43224b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h @@ -0,0 +1,65 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_interface_h +#define tuscany_sca_model_interface_h + +#include + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Information about an interface. Subtypes will hold information + * specific to a type of interface. + */ + class Interface + { + + public: + /** + * The supported types of interface. + */ + enum Type + { + CPP, + JAVA + }; + + Interface(); + virtual ~Interface(); + + /** + * Returns the type of the interface. + * @return Will depend on the subtype. + */ + virtual Type getInterfaceType() = 0; + + private: + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_interface_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp new file mode 100644 index 0000000000..751bbe0c9c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp @@ -0,0 +1,1555 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "osoa/sca/export.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/ModelLoader.h" +#include "tuscany/sca/model/CPPImplementation.h" +#include "tuscany/sca/model/CPPInterface.h" +#include "tuscany/sca/core/SCARuntime.h" +#include "tuscany/sca/model/WSBinding.h" + + +using namespace commonj::sdo; + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + // =========== + // Constructor + // =========== + ModelLoader::ModelLoader(System* system) : system(system) + { + LOGENTRY(1, "ModelLoader::constructor"); + + + LOGEXIT(1, "ModelLoader::constructor"); + } + + // ========== + // Destructor + // ========== + ModelLoader::~ModelLoader() + { + } + + // ========================================================= + // load: Load the runtime model from the deployed xml files + // This class has the responsibility for translating from + // the SCA scdl files to the SCA runtime's in memory model. + // ========================================================= + void ModelLoader::load(const char* configurationRoot) + { + LOGENTRY(1, "ModelLoader::load"); + LOGINFO_1(2,"configuration root: %s", configurationRoot); + + // The configuration root path will point to a directory structure: + // root/ + // The sca.subsystem files can be located anywhere under this directory + // structure. + loadSubsystems(configurationRoot); + + // sca.module files represent the root of a module, and can occur anywhere + // under the directory structure + loadModules(configurationRoot); + + system->resolveWires(); + LOGEXIT(1, "ModelLoader::load"); + } + + // ======================================================================== + // loadSubsystems: + // Load all the subsystems from any directory below the configuration root. + // Translate the subsystem information to the runtime information + // ======================================================================== + void ModelLoader::loadSubsystems(const char* configurationRoot) + { + // Get all the sca.subsystem files in the module + LOGENTRY(1, "ModelLoader::loadSubsystems"); + Files files(configurationRoot, "sca.subsystem", true); + for (unsigned int i=0; i < files.size(); i++) + { + loadSubsystemFile(files[i]); + } + LOGEXIT(1, "ModelLoader::loadSubsystems"); + } + + + // ===================================================================== + // loadSubsystemFile: + // This method is called for each sca.subsystem file found in the module + // folder structure + // ===================================================================== + void ModelLoader::loadSubsystemFile(const File& file) + { + LOGENTRY(1, "ModelLoader::loadSubsystemFile"); + LOGINFO_1(2, "subsystem filename: %s", file.getFileName().c_str()); + + try + { + string filename = file.getDirectory() + "/" + file.getFileName(); + XMLDocumentPtr subsystemFile = getXMLHelper()->loadFile(filename.c_str()); + if (subsystemFile->getRootDataObject() == 0) + { + LOGERROR_1(0, "ModelLoader::loadSubsystemFile: Unable to load file: %s", filename.c_str()); + } + else + { + //Utils::printDO(subsystemFile->getRootDataObject()); + mapSubsystem(subsystemFile->getRootDataObject()); + } + } catch (SDORuntimeException ex) + { + LOGERROR_1(0, "ModelLoader::loadSubsytemFile: Exception caught: %s", ex.getMessageText()); + } + + LOGEXIT(1, "ModelLoader::loadSubsystemFile"); + } + + // =============== + // mapSubsystem: + // =============== + void ModelLoader::mapSubsystem(DataObjectPtr root) + { + LOGENTRY(1, "ModelLoader::mapSubsystem"); + + LOGINFO_1(2, "ModelLoader::mapSubsystem: Loaded subsystem: %s", root->getCString("name")); + + Subsystem* subsystem; + subsystem = system->addSubsystem(root->getCString("name")); + + DataObjectList& Modules = root->getList("moduleComponent"); + LOGINFO_1(2, "ModelLoader::mapSubsystem: number of module components: %d", Modules.size()); + + // Iterate over module components + for (int i=0; iaddModuleComponent(Modules[i]->getCString("name"), Modules[i]->getCString("module")); + } + + + /// @todo Add external services and entry points + + + LOGEXIT(1, "ModelLoader::mapSubsystem"); + } + + + // ===================================================================== + // loadModules: + // Load all the modules from any directory below the configuration root. + // Translate the module information to the runtime information + // ===================================================================== + void ModelLoader::loadModules(const char* configurationRoot) + { + // Get all the sca.module files in the module + LOGENTRY(1, "ModelLoader::loadModules"); + Files files(configurationRoot, "sca.module", true); + for (unsigned int i=0; i < files.size(); i++) + { + loadModuleFile(files[i]); + } + LOGEXIT(1, "ModelLoader::loadModules"); + } + + + // ==================================================================== + // loadModuleFile: + // This method is called for each sca.module file found in the module + // folder structure + // The location of this module file will indicate the root of a module + // ==================================================================== + void ModelLoader::loadModuleFile(const File& file) + { + LOGENTRY(1, "ModelLoader::loadModuleFile"); + LOGINFO_1(2, "module filename: %s", file.getFileName().c_str()); + + try + { + string filename = file.getDirectory() + "/" + file.getFileName(); + + XMLDocumentPtr moduleFile = getXMLHelper()->loadFile(filename.c_str()); + if (moduleFile->getRootDataObject() == 0) + { + LOGERROR_1(0, "ModelLoader::loadModuleFile: Unable to load file: %s", filename.c_str()); + } + else + { + string moduleName = moduleFile->getRootDataObject()->getCString("name"); + mapModule(moduleName, moduleFile->getRootDataObject(), file.getDirectory()); + + // -------------------------------------------------------------- + // Load any module Fragments in the same folder as the sca.module + // -------------------------------------------------------------- + Files files(file.getDirectory(), "*.fragment", false); + for (unsigned int i=0; i < files.size(); i++) + { + filename = file.getDirectory() + "/" + files[i].getFileName(); + moduleFile = getXMLHelper()->loadFile(filename.c_str()); + if (moduleFile->getRootDataObject() == 0) + { + LOGERROR_1(0, "ModelLoader::loadModuleFile: Unable to load file: %s", filename.c_str()); + } + else + { + mapModule(moduleName, moduleFile->getRootDataObject(), file.getDirectory()); + } + } + + // Load the xsd types and wsdl files in the module + loadModuleConfig(file.getDirectory(), moduleName); + } + + } catch (SDORuntimeException ex) + { + LOGERROR_1(0, "ModelLoader::loadModuleFile: Exception caught: %s", ex.getMessageText()); + } + + LOGEXIT(1, "ModelLoader::loadModuleFile"); + } + + // =========== + // mapModule + // =========== + void ModelLoader::mapModule(const string& moduleName, DataObjectPtr root, string moduleRootDir) + { + LOGENTRY(1, "ModelLoader::mapModule"); + + LOGINFO_2(2, "ModelLoader::mapModule: Loading module: %s, root Dir: %s", moduleName.c_str(), moduleRootDir.c_str()); + + // Find the ModuleComponent(s) that refer to this module. If a ModuleComponent does not refer to this + // module then ignore it + MODULE_LIST moduleList = system->findModules(moduleName); + MODULE_LIST::iterator moduleIter; + + for (moduleIter = moduleList.begin(); + moduleIter != moduleList.end(); + moduleIter++ ) + { + LOGINFO_1(2, "ModelLoader::mapModule: Loading module details for module component: %s", (*moduleIter)->getName().c_str()); + + string message; // for exceptions + // Set module root + (*moduleIter)->setRoot(moduleRootDir); + + // ---------------------------- + // Add components to the module + // ---------------------------- + DataObjectList& componentList = root->getList("component"); + int i; + for (i=0; i < componentList.size(); i++) + { + addComponent(*moduleIter, componentList[i]); + } + + // ------------ + // Entry points + // ------------ + DataObjectList& entryPointList = root->getList("entryPoint"); + for (i=0; i < entryPointList.size(); i++) + { + addEntryPoint(*moduleIter, entryPointList[i]); + } + + + // ----------------- + // External services + // ----------------- + DataObjectList& externalServiceList = root->getList("externalService"); + for (i=0; i < externalServiceList.size(); i++) + { + addExternalService(*moduleIter, externalServiceList[i]); + } + + // ----- + // Wires + // ----- + DataObjectList& wireList = root->getList("wire"); + for (int l=0; l < wireList.size(); l++) + { + string source = wireList[l]->getCString("sourceUri"); + string target = wireList[l]->getCString("targetUri"); + (*moduleIter)->addWire(source, target); + } + + } + + LOGEXIT(1, "ModelLoader::mapModule"); + } + + // ================================= + // addComponent: + // ================================= + void ModelLoader::addComponent(Module* module, DataObjectPtr componentDO) + { + Component* component = module->addComponent(componentDO->getCString("name")); + + string message; + + // ------------------- + // Implementation type + // ------------------- + DataObjectPtr impl = componentDO->getDataObject("implementation"); + if (!impl) + { + message = "No implementation for component: "; + message = message + componentDO->getCString("name"); + throw SystemConfigurationException(message.c_str()); + } + // Determine the type + string componentTypeName; + string componentTypePath; + string implType = impl->getType().getName(); + if (implType == "CPPImplementation") + { + string dll = impl->getCString("dll"); + string header = impl->getCString("header"); + string className = impl->getCString("class"); + CPPImplementation* cppImpl = new CPPImplementation(dll, header, className); + componentTypePath = cppImpl->getHeaderPath(); + componentTypeName = cppImpl->getHeaderStub(); + component->setImplementation(cppImpl); + + } + else if (implType == "JavaImplementation") + { + } + + // ----------------------- + // Load the .componentType + // ----------------------- + string typeFileName = module->getRoot() + "/" + componentTypePath + componentTypeName + ".componentType"; + try + { + XMLDocumentPtr componentTypeFile = getXMLHelper()->loadFile(typeFileName.c_str()); + if (componentTypeFile->getRootDataObject() == 0) + { + LOGERROR_1(0, "ModelLoader::mapModule: Unable to load file: %s", typeFileName.c_str()); + } + else + { + //Utils::printDO(componentTypeFile->getRootDataObject()); + //commonj::sdo::SDOUtils::printDataObject(componentTypeFile->getRootDataObject()); + addServices(component, componentTypeFile->getRootDataObject()); + addReferences(component, componentTypeFile->getRootDataObject()); + addProperties(component, componentTypeFile->getRootDataObject()); + } + } catch (SDORuntimeException& ex) + { + LOGERROR_1(0, "ModelLoader::mapModule: Exception caught: %s", ex.getMessageText()); + throw SystemConfigurationException(ex.getMessageText()); + } + + // ---------- + // Properties + // ---------- + DataObjectPtr props = componentDO->getDataObject("properties"); + component->addProperties(props); + + // ---------- + // References + // ---------- + DataObjectPtr refs = componentDO->getDataObject("references"); + if (refs) + { + PropertyList pl = refs->getInstanceProperties(); + for (int refI=0; refI < pl.size(); refI++) + { + // ---------------------------------------------------------- + // Add the reference to the module wires to be resolved later + // ---------------------------------------------------------- + string refName = pl[refI].getName(); + if (!component->findReference(pl[refI].getName())) + { + // Configuration error: reference is not defined + message = "Undefined reference: " + refName; + throw SystemConfigurationException(message.c_str()); + } + + string src = component->getName() + "/" + refName; + DataObjectList& reflist = refs->getList(pl[refI]); + for (int refslistI=0; refslistIaddWire(src, targ); + } + } + } + } + + + // ===================================================================== + // addServices: add the services from the componentType to the component + // ===================================================================== + void ModelLoader::addServices(Component* component, DataObjectPtr componentType) + { + DataObjectList& services = componentType->getList("service"); + for (int i=0; iaddService(services[i]->getCString("name")); + service->setInterface(getInterface(services[i])); + } + } + + // =================================================== + // addReferences: add the references to the component + // =================================================== + void ModelLoader::addReferences(Component* component, DataObjectPtr componentType) + { + DataObjectList& refs = componentType->getList("reference"); + for (int i=0; iaddReference(refs[i]->getCString("name")); + string multiplicity = "1..1"; + if (refs[i]->isSet("multiplicity")) + { + multiplicity = refs[i]->getCString("multiplicity"); + } + serviceRef->setMultiplicity(multiplicity); + serviceRef->setInterface(getInterface(refs[i])); + } + } + + + // ============== + // getInterface + // ============== + Interface* ModelLoader::getInterface(DataObjectPtr obj) + { + // ----------------- + // get the interface + // ----------------- + DataObjectPtr iface = obj->getDataObject("interface"); + if (!iface) + { + string message = "No interface for: "; + message = message + obj->getCString("name"); + throw SystemConfigurationException(message.c_str()); + } + + // Determine the type + string componentTypeName; + string ifType = iface->getType().getName(); + if (ifType == "CPPInterface") + { + string header = iface->getCString("header"); + string className = iface->getCString("class"); + string scope = iface->getCString("scope"); + bool remotable = iface->getBoolean("remotable"); + + return new CPPInterface(header, className, scope, remotable); + } + else + { + // Error? + return 0; + } + } + + // ============================================== + // addProperties: add Properties to the component + // ============================================== + void ModelLoader::addProperties(Component* component, DataObjectPtr componentType) + { + DataObjectList& props = componentType->getList("property"); + for (int i=0; igetCString("name"); + string type = props[i]->getCString("type"); + bool many=false; + if (props[i]->isSet("many")) + { + many = props[i]->getBoolean("many"); + } + + bool required=false; + if (props[i]->isSet("required")) + { + many = props[i]->getBoolean("required"); + } + + const char* defaultValue = 0; + if (props[i]->isSet("default")) + { + defaultValue = props[i]->getCString("default"); + } + + component->addProperty(name, type, many, required, defaultValue); + } + } + + // =============================================== + // addEntryPoint: add an EntryPoint to the module + // =============================================== + void ModelLoader::addEntryPoint(Module* module, DataObjectPtr entryPointDO) + { + //Utils::printDO(entryPointDO); + EntryPoint* entryPoint = module->addEntryPoint(entryPointDO->getCString("name")); + + string multiplicity = "1..1"; + if (entryPointDO->isSet("multiplicity")) + { + multiplicity = entryPointDO->getCString("multiplicity"); + } + + entryPoint->setMultiplicity(multiplicity); + entryPoint->setInterface(getInterface(entryPointDO)); + + DataObjectList& refs = entryPointDO->getList("reference"); + for (int i=0; iaddWire(entryPoint->getName(), targ); + } + } + + + // ========================================================= + // addExternalService: add an ExternalService to the module + // ========================================================= + void ModelLoader::addExternalService(Module* module, DataObjectPtr externalServiceDO) + { + string message; + + ExternalService* externalService = module->addExternalService(externalServiceDO->getCString("name")); + // Add the interface + externalService->setInterface(getInterface(externalServiceDO)); + + // Get binding, it will be the first and only binding + DataObjectPtr binding = externalServiceDO->getList("binding")[0]; + if (!binding) + { + message = "No binding for externalService: "; + message = message + externalServiceDO->getCString("name"); + throw SystemConfigurationException(message.c_str()); + } + + //Utils::printDO(binding); + + string uri = binding->getCString("uri"); + + // Determine the binding type + string bindingType = binding->getType().getName(); + if (bindingType == "WebServiceBinding") + { + string port = binding->getCString("port"); + + WSBinding* wsBinding = new WSBinding(uri,port); + + externalService->setBinding(wsBinding); + + } + else if (bindingType == "SCABinding") + { + } + } + + + + /// + /// Use the Tuscany-model.config file in the module root directory to + /// determine which xsds and wsdls to load into a dataFactory. + /// + void ModelLoader::loadModuleConfig(const string &moduleRootDir, const string &moduleName) + { + LOGENTRY(1, "ModelLoader::loadModuleConfig"); + + // Load the "Tuscany-model.config" file, if it exists + Files files(moduleRootDir, "Tuscany-model.config", false); + for (unsigned int i=0; i < files.size(); i++) + { + string filename = moduleRootDir + "/" + files[i].getFileName(); + XMLDocumentPtr moduleConfigFile = getXMLHelper()->loadFile(filename.c_str()); + if (moduleConfigFile->getRootDataObject() == 0) + { + LOGERROR_1(0, "ModelLoader::loadModuleConfig: Unable to load file: %s", filename.c_str()); + } + else + { + LOGINFO_2(2, "ModelLoader::loadModuleConfig: Loading module config for: %s, root Dir: %s", moduleName.c_str(), moduleRootDir.c_str()); + + DataObjectList& xsds = moduleConfigFile->getRootDataObject()->getList("xsd/file"); + for (int i=0; i set the types in the moduleComponents data factory file + string xsdName = moduleRootDir + "/" +xsds[i]->getCString("name"); + loadTypes(xsdName.c_str(), moduleName); + + + } + + DataObjectList& wsdls = moduleConfigFile->getRootDataObject()->getList("wsdl/file"); + for (int j=0; jgetCString("name"); + // Load a wsdl file -> get the types, then the contents of the wsdl + loadTypes(wsdlName.c_str(), moduleName); + + // Load the contents of the wsdl files + loadWsdl(wsdlName.c_str(), moduleName); + + } + + } + } + + + LOGEXIT(1, "ModelLoader::loadModuleConfig"); + } + + + /// + /// Use the types from an xsd or wsdl file + /// + void ModelLoader::loadTypes(const char *fileName, const string &moduleName) + { + + + // Load a xsd file -> set the types in the moduleComponents data factory file + + MODULE_LIST moduleList = system->findModules(moduleName); + MODULE_LIST::iterator moduleIter; + + for (moduleIter = moduleList.begin(); + moduleIter != moduleList.end(); + moduleIter++ ) + { + try { + (*moduleIter)->getXSDHelper()->defineFile(fileName); + //Utils::printTypes((*moduleIter)->getXSDHelper()->getDataFactory()); + + } catch (SDOTypeNotFoundException ex) + { + LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText()); + throw ex; + } + } + + } + + /// + /// Load the web services definition from a wsdl + /// + void ModelLoader::loadWsdl(const char *fileName, const string &moduleName) + { + + try { + // Load the wsdl file + XMLDocumentPtr doc = getXMLHelper()->loadFile(fileName); + + + if (doc->getRootDataObject()!=0) + { + MODULE_LIST moduleList = system->findModules(moduleName); + MODULE_LIST::iterator moduleIter; + + for (moduleIter = moduleList.begin(); + moduleIter != moduleList.end(); + moduleIter++ ) + { + // Add the root object to the module + (*moduleIter)->addWsdl(doc->getRootDataObject()); + + } + + } + else + { + LOGERROR_1(0, "ModuleLoader: Unable to load %s", fileName); + } + + } catch (SDOTypeNotFoundException ex) + { + LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText()); + throw ex; + } + + + + } + + ////////////////////////////////////////////////////////////////////////////// + // Methods used to load the model into memory + ////////////////////////////////////////////////////////////////////////////// + + /// + /// Get an XSDHelper that has the appropriate XSDs already loaded + /// + const XSDHelperPtr ModelLoader::getXSDHelper() + { + if (myXSDHelper == 0) + { + + // Create an xsd helper + myXSDHelper = HelperProvider::getXSDHelper(); + + // Now add to it some xsd files + try { + string root = SCARuntime::getInstance()->getInstallRoot(); + string filename = root + "/xsd/sca.xsd"; + + myXSDHelper->defineFile(filename.c_str()); + + // Tuscany specific xsd for config files + filename = root + "/xsd/tuscany.xsd"; + myXSDHelper->defineFile(filename.c_str()); + + // Load types derived from WSDL schema + loadWSDLTypes(myXSDHelper->getDataFactory()); + + //Utils::printTypes(myXSDHelper->getDataFactory()); + + } catch (SDOTypeNotFoundException ex) + { + LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText()); + throw ex; + } + } + + + return myXSDHelper; + } + + + /// + /// Get an XMLHelper to load files + /// + const XMLHelperPtr ModelLoader::getXMLHelper() + { + if (myXMLHelper == 0) { + + // Create an xml helper + myXMLHelper = HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory()); + + } + + return myXMLHelper; + } + + void ModelLoader::loadWSDLTypes(DataFactoryPtr dataFactory) + { + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tBinding", + false, true, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tDocumentation", + true, true, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tDocumented", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement", + false, false, true); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented", + false, true, true); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented", + false, true, true); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tFault", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tImport", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tMessage", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tPart", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tPort", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tPortType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tService", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/", "tTypes", + false, false, false); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "definitions", + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "import", + "http://schemas.xmlsoap.org/wsdl/", "tImport", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "types", + "http://schemas.xmlsoap.org/wsdl/", "tTypes", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "message", + "http://schemas.xmlsoap.org/wsdl/", "tMessage", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "portType", + "http://schemas.xmlsoap.org/wsdl/", "tPortType", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "binding", + "http://schemas.xmlsoap.org/wsdl/", "tBinding", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "service", + "http://schemas.xmlsoap.org/wsdl/", "tService", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "input", + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "output", + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "fault", + "http://schemas.xmlsoap.org/wsdl/", "tFault", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "output", + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "input", + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "fault", + "http://schemas.xmlsoap.org/wsdl/", "tFault", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "arrayType", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "RootType", + "required", + "commonj.sdo", "Boolean", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBinding", + "operation", + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBinding", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBinding", + "type", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + "input", + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + "output", + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + "fault", + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "import", + "http://schemas.xmlsoap.org/wsdl/", "tImport", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "types", + "http://schemas.xmlsoap.org/wsdl/", "tTypes", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "message", + "http://schemas.xmlsoap.org/wsdl/", "tMessage", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "portType", + "http://schemas.xmlsoap.org/wsdl/", "tPortType", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "binding", + "http://schemas.xmlsoap.org/wsdl/", "tBinding", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "service", + "http://schemas.xmlsoap.org/wsdl/", "tService", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "targetNamespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tDocumented", + "documentation", + "http://schemas.xmlsoap.org/wsdl/", "tDocumentation", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement", + "required", + "commonj.sdo", "Boolean", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented", + "http://schemas.xmlsoap.org/wsdl/", "tDocumented"); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented", + "http://schemas.xmlsoap.org/wsdl/", "tDocumented"); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tFault", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tFault", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tFault", + "message", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tImport", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tImport", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tImport", + "location", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tMessage", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tMessage", + "part", + "http://schemas.xmlsoap.org/wsdl/", "tPart", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tMessage", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + "input", + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + "output", + "http://schemas.xmlsoap.org/wsdl/", "tParam", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + "fault", + "http://schemas.xmlsoap.org/wsdl/", "tFault", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + "parameterOrder", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tParam", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tParam", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tParam", + "message", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tPart", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPart", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPart", + "element", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPart", + "type", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tPort", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPort", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPort", + "binding", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tPortType", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPortType", + "operation", + "http://schemas.xmlsoap.org/wsdl/", "tOperation", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tPortType", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tService", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tService", + "port", + "http://schemas.xmlsoap.org/wsdl/", "tPort", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/", "tService", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/", "tTypes", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + false, false, true); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, false); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "binding", + "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "operation", + "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "body", + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "encodingStyle", + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "use", + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "fault", + "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "header", + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "message", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "part", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "use", + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "encodingStyle", + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "headerfault", + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", + "address", + "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", + "location", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", + "transport", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", + "style", + "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + "parts", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + "encodingStyle", + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + "use", + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", + "name", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + "http://schemas.xmlsoap.org/wsdl/soap/", "tBody"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + "required", + "commonj.sdo", "Boolean", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + "parts", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + "encodingStyle", + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + "use", + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "headerfault", + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + true, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "message", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "part", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "use", + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "encodingStyle", + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + "message", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + "part", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + "use", + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + "encodingStyle", + "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", + "namespace", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", + "soapAction", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", + "style", + "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", + "commonj.sdo", "String"); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", + "commonj.sdo", "String"); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/http/", "RootType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/http/", "addressType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/http/", "operationType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/http/", "urlEncoded", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/http/", "urlReplacement", + false, false, false); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "RootType", + "address", + "http://schemas.xmlsoap.org/wsdl/http/", "addressType", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "RootType", + "binding", + "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "RootType", + "operation", + "http://schemas.xmlsoap.org/wsdl/http/", "operationType", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "RootType", + "urlEncoded", + "http://schemas.xmlsoap.org/wsdl/http/", "urlEncoded", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "RootType", + "urlReplacement", + "http://schemas.xmlsoap.org/wsdl/http/", "urlReplacement", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/http/", "addressType", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "addressType", + "location", + "commonj.sdo", "URI", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", + "verb", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/http/", "operationType", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/http/", "operationType", + "location", + "commonj.sdo", "URI", + false, false, true); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", + false, false, false); + dataFactory->addType( + "http://schemas.xmlsoap.org/wsdl/mime/", "tPart", + false, true, false); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", + "content", + "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", + "multipartRelated", + "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", + "mimeXml", + "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", + "type", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", + "part", + "commonj.sdo", "String", + false, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", + "part", + "http://schemas.xmlsoap.org/wsdl/mime/", "tPart", + true, false, true); + dataFactory->setBaseType( + "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", + "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", + "part", + "commonj.sdo", "String", + false, false, true); + dataFactory->addPropertyToType( + "http://schemas.xmlsoap.org/wsdl/mime/", "tPart", + "name", + "commonj.sdo", "String", + false, false, true); + } + + + } // End namespace model + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h new file mode 100644 index 0000000000..6d6e19a510 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h @@ -0,0 +1,104 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_modelloader_h +#define tuscany_sca_model_modelloader_h + +#include "osoa/sca/export.h" +#include "commonj/sdo/SDO.h" +using commonj::sdo::DataObjectPtr; +using commonj::sdo::DataFactoryPtr; + +#include "tuscany/sca/model/System.h" +#include "tuscany/sca/model/Subsystem.h" + +#include "tuscany/sca/util/File.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Provides methods to load the runtime model from the SCDL file. + */ + class ModelLoader { + public: + /** + * Constructor. + * @param system The SCA system to load. + */ + ModelLoader(System* system); + + /** + * Destructor. + */ + virtual ~ModelLoader(); + + /** + * Load the model from the configuration information. + * @param configurationRoot The location of the deployed SCA + * modules and subsystems. + */ + void load(const char *configurationRoot); + + private: + System* system; + void loadModule(const char *moduleRoot); + + + commonj::sdo::XMLHelperPtr myXMLHelper; // Used to load scdl files + commonj::sdo::XSDHelperPtr myXSDHelper; // Used to load xsds + const commonj::sdo::XSDHelperPtr getXSDHelper(void); + const commonj::sdo::XMLHelperPtr getXMLHelper(void); + + void loadSubsystems(const char *configurationRoot); + void loadSubsystemFile(const File& file); + void mapSubsystem(commonj::sdo::DataObjectPtr rootDO); + + void loadModules(const char *configurationRoot); + void loadModuleFile(const File& file); + void mapModule(const string& moduleName, commonj::sdo::DataObjectPtr rootDO, std::string moduleRootDir); + + void addComponent(Module* module, DataObjectPtr componentDO); + void addEntryPoint(Module* module, DataObjectPtr entryPointDO); + void addExternalService(Module* module, DataObjectPtr externalServiceDO); + + void addServices(Component* component, DataObjectPtr componentType); + void addReferences(Component* component, DataObjectPtr componentType); + void addProperties(Component* component, DataObjectPtr componentType); + + + void loadModuleConfig(const string &moduleRootDir, const string &moduleName); + void loadTypes(const char *fileName, const string &moduleName); + void loadWsdl(const char *fileName, const string &moduleName); + + void loadWSDLTypes(DataFactoryPtr dataFactory); + + Interface* getInterface(DataObjectPtr obj); + + + }; + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_modelloader_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp new file mode 100644 index 0000000000..43702144a2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp @@ -0,0 +1,235 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/model/Module.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + Module::Module(const std::string& moduleName) + : name(moduleName) + { + LOGENTRY(1, "Module::constructor"); + LOGEXIT(1, "Module::constructor"); + } + + Module::~Module() + { + } + + void Module::setRoot(const std::string& rootDirectory) + { + moduleRoot = rootDirectory; + } + + + /// + /// Add a new component to the module component + /// + Component* Module::addComponent(const std::string& name) + { + LOGENTRY(1, "Module::addComponent"); + Component* newComponent = new Component(name, this); + components[name] = newComponent; + LOGEXIT(1, "Module::addComponent"); + return newComponent; + } + + Component* Module::findComponent(const std::string& name) + { + LOGENTRY(1, "Module::findComponent"); + Component* foundComponent = components[name]; + LOGEXIT(1, "Module::findComponent"); + return foundComponent; + } + + Service* Module::findComponentService(const std::string& name) + { + LOGENTRY(1, "Module::findComponentService"); + + Service* service = 0; + + string componentName; + string serviceName; + Utils::tokeniseUri(name, componentName, serviceName); + + // Locate the component + Component* foundComponent = components[name]; + if (foundComponent) + { + // Locate the service + service = foundComponent->findService(serviceName); + } + LOGEXIT(1, "Module::findComponentService"); + return service; + } + + ExternalService* Module::findExternalService(const std::string& name) + { + LOGENTRY(1, "Module::findExternalService"); + ExternalService* foundService = externalServices[name]; + LOGEXIT(1, "Module::findExternalService"); + return foundService; + } + + + EntryPoint* Module::addEntryPoint(const std::string& name) + { + LOGENTRY(1, "Module::addEntryPoint"); + EntryPoint* ep = new EntryPoint(name); + entryPoints[name] = ep; + LOGEXIT(1, "Module::addEntryPoint"); + return findEntryPoint(name); + } + + EntryPoint* Module::findEntryPoint(const std::string& name) + { + return entryPoints[name]; + } + + + ExternalService* Module::addExternalService(const std::string& name) + { + LOGENTRY(1, "Module::addExternalService"); + ExternalService* es = new ExternalService(name, this); + externalServices[name] = es; + LOGEXIT(1, "Module::addExternalService"); + return es; + } + + void Module::addWire(const std::string& source, const std::string& target) + { + LOGENTRY(1, "Module::addWire"); + wires.push_back(Wire(source, target)); + LOGEXIT(1, "Module::addWire"); + } + + + void Module::resolveWires() + { + LOGENTRY(1, "Module::resolveWires"); + for (WIRES::iterator iter = wires.begin(); + iter != wires.end(); + iter++) + { + // ----------------- + // Locate the target + // ----------------- + WireTarget* target = findComponentService(iter->getTarget()); + if (!target) + { + target = findExternalService(iter->getTarget()); + } + if (!target) + { + LOGERROR_1(0, "Module::resolveWires: Wire target %s not found", iter->getTarget().c_str()); + } + else + { + EntryPoint* entrypoint = findEntryPoint(iter->getSourceComponent()); + if (entrypoint) + { + entrypoint->addTarget(target); + } + else + { + Component* component = findComponent(iter->getSourceComponent()); + if (component) + { + ServiceReference* serviceReference = component->findReference(iter->getSourceReference()); + if (serviceReference) + { + serviceReference->addTarget(target); + } + else + { + LOGERROR_1(0, "Module::resolveWires: Wire source reference %s not found", iter->getSourceReference().c_str()); + } + } + else + { + LOGERROR_1(0, "Module::resolveWires: Wire source %s not found", iter->getSourceComponent().c_str()); + } + } + } + } + + LOGEXIT(1, "Module::resolveWires"); + } + + + + void Module::addWsdl(commonj::sdo::DataObjectPtr wsdlModel) + { + LOGENTRY(1, "Module::addWsdl"); + Wsdl* wsdl = new Wsdl(wsdlModel); + wsdls[wsdl->getNamespace()] = wsdl; + LOGEXIT(1, "Module::addWsdl"); + + } + + Wsdl* Module::findWsdl(const std::string& wsdlNamespace ) + { + return wsdls[wsdlNamespace]; + + } + + + // Get an XSDHelper - one will be created for each module + commonj::sdo::XSDHelperPtr Module::getXSDHelper() + { + if (xsdHelper == 0) + { + xsdHelper = commonj::sdo::HelperProvider::getXSDHelper(); + } + + return xsdHelper; + } + + // Get an XMLHelper - one will be created for each module + commonj::sdo::XMLHelperPtr Module::getXMLHelper() + { + if (xmlHelper == 0) + { + xmlHelper = commonj::sdo::HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory()); + } + + return xmlHelper; + } + + + // Get a data factory - the one in the xsd/xml helper + commonj::sdo::DataFactoryPtr Module::getDataFactory() + { + return getXSDHelper()->getDataFactory(); + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h new file mode 100644 index 0000000000..f73f1d36bc --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h @@ -0,0 +1,235 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_module_h +#define tuscany_sca_model_module_h + +#include +using std::string; + +#include +using std::map; +#include +using std::vector; + +#include "commonj/sdo/SDO.h" + + +#include "tuscany/sca/model/Component.h" +#include "tuscany/sca/model/ExternalService.h" +#include "tuscany/sca/model/EntryPoint.h" +#include "tuscany/sca/model/Wire.h" +#include "tuscany/sca/model/Wsdl.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + /** + * Information about a module. + */ + class Module + { + public: + /** + * Constructor. + * @param name the name of the module. + */ + Module(const std::string& name); + + /** + * Destructor. + */ + virtual ~Module(); + + /** + * Set the root directory of the module information. + * @param rootDirectory The root of the module in the file system. + */ + void setRoot(const std::string& rootDirectory); + + /** + * Get the root directory of the module. + * @return The root of the module in the file system. + */ + const std::string& getRoot() {return moduleRoot;} + + /** + * Return the name of the module. + * @return Name of the module. + */ + const std::string& getName() {return name;} + + /** + * Add a new component to the module. + * @param componentName The name of the new component. + * @return The Component added to the module. + */ + Component* addComponent(const std::string& componentName); + + /** + * Add a new entry point to the module. + * @param name The name of the new entry point. + * @return The entry point added to the module. + */ + EntryPoint* addEntryPoint(const std::string& name); + + /** + * Find an entry point by name. + * @param name The name of the entry point to be found. + * @return The entry point that was found, or 0 if not found. + */ + EntryPoint* findEntryPoint(const std::string& name); + + /** + * Add a new external service to the module. + * @param name The name of the new external service. + * @return The external service added to the module. + */ + ExternalService* addExternalService(const std::string& name); + + /** + * Add a wire to the model. + * @param source The source location. Either the source component and + * reference (optional), or an entry point. + * @param target The target location. Either the target component and + * service (optional), or an external service. + */ + void addWire(const std::string& source, const std::string& target); + + /** + * Find a component by name. + * @param componentName The name of the component to be found. + * @return The component that was found, or 0 if not found. + */ + Component* findComponent(const std::string& componentName); + + /** + * Find a component and service by name. + * @param componentServiceName A string of the form + * "componentName"/"serviceName" where the service name is optional + * if there is only one service on the component. + * @return The Service that was found, or 0 if not found. + */ + Service* findComponentService(const std::string& componentServiceName); + + /** + * Find an external service by name. + * @param serviceName The name of the external service to be found. + * @return The external service that was found, or 0 if not found. + */ + ExternalService* findExternalService(const std::string& serviceName); + + /** + * Add a WSDL definition to the module. + * @param wsdlModel A data object holding all the information about + * the WSDL definition from a WSDL file. + */ + void addWsdl(commonj::sdo::DataObjectPtr wsdlModel); + + /** + * Find a WSDL definition by target namespace. + * @param wsdlNamespace The namespace of the WSDL definitions to find. + */ + Wsdl* findWsdl(const std::string& wsdlNamespace); + + /** + * Return a cached SDO XSDHelper. + */ + commonj::sdo::XSDHelperPtr getXSDHelper(void); + + /** + * Return a cached SDO XMLHelper. + */ + commonj::sdo::XMLHelperPtr getXMLHelper(void); + + /** + * Return a data factory which has all the types defined in XSDs and + * WSDL files configured for this module. + * @return The data factory for this module. + */ + commonj::sdo::DataFactoryPtr getDataFactory(void); + + /** + * Work through the list of wires and connect the source and target uris. + */ + void resolveWires(); + + private: + /** + * Name of the module. + */ + string name; + + /** + * Directory of the root of the module. + */ + string moduleRoot; + + /** + * Cached XSDHelper. + */ + commonj::sdo::XSDHelperPtr xsdHelper; + + /** + * Cached XMLHelper. + */ + commonj::sdo::XMLHelperPtr xmlHelper; + + typedef map COMPONENT_MAP; + /** + * Map (by name) of all the components in this module. + */ + COMPONENT_MAP components; + + typedef map EXTERNALSERVICE_MAP; + /** + * Map (by name) of all the external services in this module. + */ + EXTERNALSERVICE_MAP externalServices; + + typedef map ENTRYPOINT_MAP; + /** + * Map (by name) of all the entry points in this module. + */ + ENTRYPOINT_MAP entryPoints; + + typedef vector WIRES; + /** + * Vector of all the wires in this module. + */ + WIRES wires; + + typedef map WSDL_MAP; + /** + * Map by namespace of all the wsdl definitions in this module. + */ + WSDL_MAP wsdls; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // SCA_ModuleComponent_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp new file mode 100644 index 0000000000..42ccecbc99 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp @@ -0,0 +1,47 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/Service.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + + + // Constructor + Service::Service(const std::string& serviceName, Component* comp) + : WireTarget(serviceName), + component(comp) + { + LOGENTRY(1, "Service::constructor (Component)"); + LOGINFO_1(3, "Service::constructor: Service name: %s", serviceName.c_str()); + LOGEXIT(1, "Service::constructor"); + } + + Service::~Service() + { + } + + } // End namespace model + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h new file mode 100644 index 0000000000..6c37dabb3e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h @@ -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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_service_h +#define tuscany_sca_model_service_h + +#include +using std::string; + +#include "tuscany/sca/model/WireTarget.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + class Component; + + /** + * Information about a service defined on a component. + */ + class Service : public WireTarget + { + public: + /** + * Destructor. + */ + virtual ~Service(); + + /** + * Return the type of the wire target. + * @return Always returns ComponentServiceType. + */ + virtual Type getServiceType() {return ComponentServiceType;} + + /** + * Get the component on which this service is defined. + * @return The component on which this service is defined. + */ + Component* getComponent() {return component;} + + + private: + friend class Component; + /** + * Constructor. + * @param name The name of the service. + * @param component The component on which this service is defined. + */ + Service(const std::string& name, Component* component); + + /** + * The component on which this service is defined. + */ + Component* component; + + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_service_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp new file mode 100644 index 0000000000..cada38dec2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp @@ -0,0 +1,89 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/model/ServiceReference.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + + + // Constructor + ServiceReference::ServiceReference(const std::string& referenceName) + : name(referenceName), multiplicity(ONE_ONE) + { + } + + ServiceReference::~ServiceReference() + { + } + + void ServiceReference::addTarget(WireTarget* targ) + { + if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE) + { + if (targets.size() > 0) + { + // throw exception + string message = "Duplicate wire for reference: " + name; + throw SystemConfigurationException(message.c_str()); + } + } + + targets.push_back(targ); + } + + void ServiceReference::setMultiplicity(const std::string& multip) + { + if (multip == "0..1") + { + multiplicity = ZERO_ONE; + } + else if (multip == "1..1") + { + multiplicity = ONE_ONE; + } + else if (multip == "0..n") + { + multiplicity = ZERO_MANY; + } + else if (multip == "1..n") + { + multiplicity = ONE_MANY; + } + else + { + string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name; + throw SystemConfigurationException(msg.c_str()); + } + } + + void ServiceReference::setInterface(Interface* interf) + { + iface = interf; + } + + } // End namespace model + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h new file mode 100644 index 0000000000..062d7a4c19 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h @@ -0,0 +1,136 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_servicereference_h +#define tuscany_sca_model_servicereference_h + +#include +using std::string; +#include +using std::vector; + +#include "tuscany/sca/model/Interface.h" +#include "tuscany/sca/model/WireTarget.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Information about a reference on a serivce. + */ + class ServiceReference + { + public: + /** + * Constructor. + * @param name The name of the reference. + */ + ServiceReference(const std::string& name) + + /** + * Destructor. + */; + virtual ~ServiceReference(); + + /** + * Get the name of the service. + * @return The name of the service. + */ + const std::string& getName() {return name;} + + /** + * Multiplicity (how many wires can be attached to this + * reference as their source) + */ + enum Multiplicity + { + ZERO_ONE, + ONE_ONE, + ZERO_MANY, + ONE_MANY + }; + + /** + * Set the multiplicity of this reference. + * @param multiplicity One of "0..1", "1..1", "0..n", "1..n" + */ + void setMultiplicity(const std::string& multiplicity); + + /** + * Get the multiplicity of this reference. + * @return The multiplicity. + */ + Multiplicity getMultiplicity() {return multiplicity;} + + /** + * Set the interface required by this reference. + * @param iface The interface. + */ + void setInterface(Interface* iface); + + /** + * Get the interface. + * @return The interface. + */ + Interface* getInterface() {return iface;} + + /** + * Add a target for a reference. There may be more than + * one if the multiplicity is 0..n or 1..n. + * @param target The target for a wire. + */ + void addTarget(WireTarget* target); + typedef vector TARGETS; + + /** + * Get a vector of all the targets from this reference. + * @return The targets of this reference. + */ + const TARGETS& getTargets() {return targets;} + private: + /** + * Name of this reference. + */ + string name; + + /** + * The interface defining this reference. + */ + Interface* iface; + + /** + * The multiplicity of this reference. + */ + Multiplicity multiplicity; + + /** + * Vector of all the targets wired from this reference. + */ + TARGETS targets; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_servicereference_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp new file mode 100644 index 0000000000..08ef0dde49 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp @@ -0,0 +1,122 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/Subsystem.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + + // Constructor + Subsystem::Subsystem(const std::string& subsystemName) : name(subsystemName) + { + LOGENTRY(1, "Subsystem::constructor"); + + + LOGEXIT(1, "Subsystem::constructor"); + } + + Subsystem::~Subsystem() + { + } + + /// + /// Add a new module component + /// + Module* Subsystem::addModuleComponent(const std::string& name, const std::string& moduleName) + { + LOGENTRY(1, "Subsystem::addModuleComponent"); + + Module* newModule = new Module(moduleName); + + // TODO: Should check for duplicates and throw exception + moduleComponents[name] = newModule; + + LOGEXIT(1, "Subsystem::addModuleComponent"); + + return newModule; + } + + Module* Subsystem::findModule(const std::string& moduleName) + { + for (MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin(); + moduleComponentIter != moduleComponents.end(); + moduleComponentIter++) + { + if (moduleName == moduleComponentIter->second->getName()) + { + return (Module*)moduleComponentIter->second; + } + } + return 0; + } + + Module* Subsystem::findModuleByComponentName(const std::string& moduleComponentName) + { + return moduleComponents[moduleComponentName]; + } + + Module* Subsystem::getDefaultModule() + { + if (moduleComponents.size() == 1) + { + MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin(); + return moduleComponentIter->second; + } + return 0; + } + + /// + /// Add a new entrypoint + /// + EntryPoint* Subsystem::addEntryPoint(const std::string& name) + { + LOGENTRY(1, "Subsystem::addEntryPoint"); + + EntryPoint* newEntryPoint = new EntryPoint(name); + entryPoints[name] = newEntryPoint; + LOGEXIT(1, "Subsystem::addEntryPoint"); + return findEntryPoint(name); + } + + EntryPoint* Subsystem::findEntryPoint(const std::string& name) + { + return entryPoints[name]; + } + + void Subsystem::resolveWires() + { + for (MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin(); + moduleComponentIter != moduleComponents.end(); + moduleComponentIter++) + { + moduleComponentIter->second->resolveWires(); + } + + // Resolve EntryPoint wires + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h new file mode 100644 index 0000000000..b3c59898eb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h @@ -0,0 +1,131 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_h +#define tuscany_sca_model_h + +#include +using std::string; +#include +using std::map; + +#include "tuscany/sca/model/Module.h" +#include "tuscany/sca/model/EntryPoint.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Information about a subsystem. + */ + class Subsystem { + public: + /** + * Constructor. + * @param name The name of the subsystem. + */ + Subsystem(const std::string& name); + + /** + * Destructor. + */ + virtual ~Subsystem(); + + /** + * Add a new module component to the subsystem. + * @param name The name of the module component. + * @param moduleName The name of the module. + * @return The new Module added to the subsystem. + */ + Module* addModuleComponent(const std::string& name, const std::string& moduleName); + + /** + * Find a module by module name. + * @param moduleName The name of the module to be found. + * @return The Module that was found, or 0 if not found. + */ + Module* findModule(const std::string& moduleName); + + /** + * Find a module by the module component name. + * @param moduleComponentName The module component name to be used to find + * the module. + * @return The Module that was found, or 0 if not found. + */ + Module* findModuleByComponentName(const std::string& moduleComponentName); + + /** + * Get the default module set for this subsystem. + * @return The default module. + */ + Module* getDefaultModule(); + + /** + * Add an new entry point to the subsystem. + * @param name The name of the entry point. + * @return The new EntryPoint added to the subsystem. + */ + EntryPoint* addEntryPoint(const std::string& name); + + /** + * Find an entry point by name. + * @param name The name of the entry point to be found. + * @return The EntryPoint that was found, or 0 if not found. + */ + EntryPoint* findEntryPoint(const std::string& name); + + /** + * Return the name of the subsystem. + * @return The name. + */ + const std::string& getName() {return name;} + + /** + * Resolve all the wires configured in all the modules in this + * subsystem. + */ + void resolveWires(); + + private: + /** + * The name of the subsystem. + */ + std::string name; + + typedef std::map MODULECOMPONENT_MAP; + /** + * A map by module component name of modules. + */ + MODULECOMPONENT_MAP moduleComponents; + + typedef map ENTRYPOINT_MAP; + /** + * A map of entry points defined in this subsystem. + */ + ENTRYPOINT_MAP entryPoints; + }; + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp new file mode 100644 index 0000000000..dfc4a21b1c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp @@ -0,0 +1,118 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/System.h" + + +namespace tuscany +{ + namespace sca + { + namespace model + { + + // ============ + // Constructor + // ============ + System::System() + { + LOGENTRY(1, "System::constructor"); + + + LOGEXIT(1, "System::constructor"); + } + + System::~System() + { + SUBSYSTEM_MAP::iterator subsystemsIter; + for (subsystemsIter = subsystemMap.begin(); + subsystemsIter != subsystemMap.end(); + subsystemsIter++ ) + { + delete subsystemsIter->second; + } + } + + // ================================= + // Add a new subsystem to the system + // ================================= + Subsystem* System::addSubsystem(const std::string& name) + { + LOGENTRY(1, "System::addSubsystem"); + + Subsystem* newSubsystem = new Subsystem(name); + + subsystemMap[name] = newSubsystem; + + LOGEXIT(1, "System::addSubsystem"); + + return newSubsystem; + } + + // ==================================================================== + // Get a map of all the moduleComponents that use a particular module + // ==================================================================== + MODULE_LIST System::findModules(const std::string& name) + { + LOGENTRY(1, "System::findModules"); + MODULE_LIST foundModules; + + SUBSYSTEM_MAP::iterator subsystemsIter; + for (subsystemsIter = subsystemMap.begin(); + subsystemsIter != subsystemMap.end(); subsystemsIter++ ) { + LOGINFO_1(2, "System::findModules: Found subsystem: %s", subsystemsIter->second->getName().c_str()); + // In each subsystem, find module components with this module defined + + Module* module = subsystemsIter->second->findModule(name); + if (module) + { + LOGINFO_1(2, "System::findModules: Found module: %s", module->getName().c_str()); + foundModules.push_back(module); + } + } + LOGEXIT(1, "System::findModules"); + + return foundModules; + } + + + // ==================================================================== + // Get a map of all the moduleComponents that use a particular module + // ==================================================================== + Subsystem* System::findSubsystem(const std::string& subsystem) + { + return subsystemMap[subsystem]; + } + + void System::resolveWires() + { + SUBSYSTEM_MAP::iterator subsystemsIter; + for (subsystemsIter = subsystemMap.begin(); + subsystemsIter != subsystemMap.end(); + subsystemsIter++ ) + { + subsystemsIter->second->resolveWires(); + } + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h new file mode 100644 index 0000000000..a0f62ce67a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h @@ -0,0 +1,89 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_system_h +#define tuscany_sca_model_system_h + +#include +#include +#include + +#include "tuscany/sca/model/Subsystem.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + typedef std::vector MODULE_LIST; + + /** + * The root of the runtime model supported by a Tuscany runtime. + */ + class System { + public: + System(); + virtual ~System(); + + /** + * Add a new subsystem to the system. + * @param subsystemName The name of the new subsystem to add. + * @return The new Subsystem added to the system. + */ + Subsystem* addSubsystem(const std::string& subsystemName); + + /** + * Find subsystem by name. + * @param subsystemName The name of the subsystem to be found. + * @return The Subsystem found, or 0 if not found. + */ + Subsystem* findSubsystem(const std::string& subsystemName); + + typedef std::vector MODULE_LIST; + + /** + * Return a vector of all the modules with a given module name. + * @param moduleName The name of the module to find + * @return A vector of all the times the module appears in the + * system. It can be more than once because the same module name + * is used by more than one module component. + */ + MODULE_LIST findModules(const std::string& moduleName); + + /** + * Resolve all the wires defined in the system. + */ + void resolveWires(); + + private: + + typedef std::map SUBSYSTEM_MAP; + + /** + * Map by name of subsystems. + */ + SUBSYSTEM_MAP subsystemMap; + }; + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_system_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp new file mode 100644 index 0000000000..85cb7482bd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp @@ -0,0 +1,127 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/WSBinding.h" + + +namespace tuscany +{ + namespace sca + { + + namespace model + { + + // Constructor + WSBinding::WSBinding(const string& uri, const string& port) + : Binding(uri), port(port) + { + + // Port is of the form: #wsdl.endpoint(/) + string::size_type hash = port.find("#"); + if (hash != string::npos) + { + // Found a hash + + // Namepace is the part before the # + wsdlNamespaceURL = port.substr(0, hash); + + + if ( (hash+1) < port.length()) + { + // Check the next part is wsdl.endpoint( + int ending = hash+15; + string check = port.substr(hash+1, 14); + if (check.compare("wsdl.endpoint(") == 0) + { + // Find the matching ) + int endBracket = port.find(")",ending); + if (endBracket-1 > ending+1) + { + string serviceAndPort = port.substr(ending, endBracket-ending); + // Look for a '/' + string::size_type slash = serviceAndPort.find("/"); + if (slash != string::npos) + { + serviceName = serviceAndPort.substr(0, slash); + + if ( (slash+1) < serviceAndPort.length()) + { + portName = serviceAndPort.substr(slash+1); + } + else + { + portName = ""; + } + + } + else + { + // No '/' so all of it is the service name + serviceName = serviceAndPort; + portName = ""; + + } + } + else + { + // Nothing between the () + serviceName = ""; + portName = ""; + } + } + else + { + // not the correct characters after the #, ignore the rest + serviceName = ""; + portName = ""; + } + + } + else + { + // Nothing after the hash + serviceName = ""; + portName = ""; + } + } + else + { + // No hash at all + wsdlNamespaceURL = port; + serviceName = ""; + portName = ""; + } + + + + + + + } + + WSBinding::~WSBinding() + { + } + + } // End namespace model + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h new file mode 100644 index 0000000000..e7963d205b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h @@ -0,0 +1,106 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_wsbinding_h +#define tuscany_sca_model_wsbinding_h + +#include "tuscany/sca/model/Binding.h" + +#include + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Information about a web service binding for an entry point or an + * external service. + */ + class WSBinding : public Binding + { + public: + /** + * Constructor. + * @param uri The uri of the binding. + * @param port The definition of the port to which the entrypoint + * or external service is to be bound. This is of the form + * "namespace"#endpoint("service"/"port") + */ + WSBinding(const string&uri, const string& port); + + /** + * Destructor. + */ + virtual ~WSBinding(); + + /** + * Return the type of the binding. + * @return Always returns WS. + */ + virtual Type getBindingType() {return WS;}; + + /** + * Return the part of the port definition describing the wsdl + * namespace. + * @return The wsdl namespace. + */ + string getWSDLNamespaceURL() {return wsdlNamespaceURL;}; + + /** + * Return the service part of the port definition. + * @return The service to use. + */ + string getServiceName() {return serviceName;}; + + /** + * Return the port name part of the port definition. + * @return The port name to use. + */ + string getPortName() {return portName;}; + + private: + /** + * The full port string. + */ + string port; + + /** + * Namespace from the port. + */ + string wsdlNamespaceURL; + + /** + * Service name from the port. + */ + string serviceName; + + /** + * Port name from the port. + */ + string portName; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_wsbinding_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp new file mode 100644 index 0000000000..6c1b14940f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp @@ -0,0 +1,46 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/model/Wire.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + + // Constructor + Wire::Wire(const std::string& source, const std::string& targ) + { + Utils::tokeniseUri(source, sourceComponent, sourceReference); + target = targ; + } + + Wire::~Wire() + { + } + + } // End namespace model + + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h new file mode 100644 index 0000000000..b126137118 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h @@ -0,0 +1,91 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_wire_h +#define tuscany_sca_model_wire_h + +#include +using std::string; + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Information about a wire in the model. + */ + class Wire + { + public: + /** + * Constructor. + * @param source The source of the wire. Either the component and + * reference name (optional) or an entry point. + * @param target The target of the wire. Either a component and service + * service name (optional) or an external sevice. + */ + Wire(const std::string& source, const std::string& target); + + /** + * Destructor. + */ + virtual ~Wire(); + + /** + * Get the component name defined by the source of the wire. + * @return The component name which is the source of the wire. + */ + const std::string& getSourceComponent() {return sourceComponent;} + + /** + * Get the reference name defined by the source of the wire. + * @return The reference name which is the source of the wire. + */ + const std::string& getSourceReference() {return sourceReference;} + + /** + * Get the target uri defined by the target of the wire. + * @return The target uri which is the source of the wire. + */ + const std::string& getTarget() {return target;} + private: + /** + * The source component of the wire. + */ + string sourceComponent; + + /** + * The source reference of the wire. + */ + string sourceReference; + + /** + * The target uri of the wire. + */ + string target; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_wire_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp new file mode 100644 index 0000000000..a35b07f5fe --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp @@ -0,0 +1,49 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/WireTarget.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + + // Constructor + WireTarget::WireTarget(const std::string& targetName) + : name(targetName) + { + } + + WireTarget::~WireTarget() + { + } + + void WireTarget::setInterface(Interface* interf) + { + iface = interf; + } + + } // End namespace model + + + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h new file mode 100644 index 0000000000..312d20a704 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h @@ -0,0 +1,106 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_wiretarget_h +#define tuscany_sca_model_wiretarget_h + +#include +using std::string; + +#include "tuscany/sca/model/Interface.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + /** + * Represents the target of a wire. This could be a service on a + * component or an external service. + */ + class WireTarget + { + public: + /** + * Supported types of wire target. + */ + enum Type + { + ComponentServiceType, + ExternalServiceType + }; + + /** + * Constructor. + * @param name The name of the wire target. + */ + WireTarget(const std::string& name); + + /** + * Destructor. + */ + virtual ~WireTarget(); + + /** + * Return the name of the wire target. + */ + string getName() {return name;} + + /** + * Get the type of the wire target. + * @return Depends on the type of the wire target. + */ + virtual Type getServiceType() = 0; + + /** + * Set the interface describing the wire target. + * @param iface The interface. + */ + void setInterface(Interface* iface); + + /** + * Get the interface describing the wire target. + * @return The interface. + */ + Interface* getInterface() {return iface;} + + private: + /** + * Name of the wire target (service name or external service name) + */ + string name; + + /** + * Type of the service. + */ + Type serviceType; + + /** + * Interface describing the wire target. + */ + Interface* iface; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_wiretarget_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp new file mode 100644 index 0000000000..fcc86c78e5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp @@ -0,0 +1,345 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/model/Wsdl.h" +#include "tuscany/sca/util/Exceptions.h" + +using namespace tuscany::sca; + +using namespace commonj::sdo; + +namespace tuscany +{ + namespace sca + { + namespace model + { + + + // Constructor + Wsdl::Wsdl(DataObjectPtr wsdlModel) + : wsdlModel(wsdlModel) + { + LOGENTRY(1, "Wsdl::constructor"); + + // Trace + Utils::printDO(wsdlModel); + + + + LOGEXIT(1, "Wsdl::constructor"); + } + + Wsdl::~Wsdl() + { + } + + + /// + /// The namespace of the service and other definitions defined in this wsdl definition + string Wsdl::getNamespace() + { + + return wsdlModel->getCString("targetNamespace"); + + } + + /// + /// Find the operation defined in this wsdl + /// + WsdlOperation Wsdl::findOperation(const string& serviceName, + const string& portName, + const string& operationName) + { + string message; + + // Find the service + DataObjectPtr service = findService(serviceName); + if (!service) + { + // Service not found + message = "Unable to find service "; + message = message + serviceName; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + } + else + { + + + // Found the service + DataObjectList& portList = service->getList("port"); + for (int j=0; jgetCString("name")); + if (portListName.compare(portName) == 0) + { + + // found port + // Add address at this point + string targetAddress(portList[j]->getCString("address/location")); + + // find operation by traversing the binding, portType then operation + string wsBindingName(portList[j]->getCString("binding")); + + DataObjectPtr wsBinding = findBinding(wsBindingName); + if (!wsBinding) + { + message = "Unable to find binding "; + message = message + wsBindingName; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + } + + // Get the soapAction + string soapAction = getSoapAction(wsBinding, operationName); + + + // Found the binding, get the portType + string wsPortTypeName(wsBinding->getCString("type")); + DataObjectPtr wsPortType = findPortType(wsPortTypeName); + if (!wsPortType) + { + message = "Unable to find PortType "; + message = message + wsPortTypeName; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + } + + Utils::printDO(wsPortType); + + // Found the portType, find the operation + DataObjectList& operationList = wsPortType->getList("operation"); + for (int k=0; k< operationList.size(); k++) + { + string opName(operationList[k]->getCString("name")); + if( opName.compare(operationName) == 0) + { + // Found the operation + + // Find the type of the request message + string inputMessageType = string(operationList[k]->getCString("input/message")); + + DataObjectPtr wsMessageIn = findMessage(inputMessageType); + if (!wsMessageIn) + { + message = "Unable to find message "; + message = message + inputMessageType; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + } + + string requestType(wsMessageIn->getList("part")[0]->getCString("element")); + string requestTypeName; + string requestTypeUri; + // Utils::tokeniseQName(requestType, requestTypeUri, requestTypeName); + Utils::rTokeniseString(":", requestType, requestTypeUri, requestTypeName); + + // Find the type of the response message + string outputMessageType = string(operationList[k]->getCString("output/message")); + + DataObjectPtr wsMessageOut = findMessage(outputMessageType); + if (!wsMessageOut) + { + message = "Unable to find message "; + message = message + outputMessageType; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + } + + string responseType(wsMessageOut->getList("part")[0]->getCString("element")); + string responseTypeName; + string responseTypeUri; + // Utils::tokeniseQName(responseType, responseTypeUri, responseTypeName); + Utils::rTokeniseString(":", responseType, responseTypeUri, responseTypeName); + + return WsdlOperation(requestTypeName, + soapAction, + targetAddress, + responseTypeName); + } + + } + + message = "Unable to find Operation "; + message = message + operationName; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + + + + + } + + + + + } + // cannot find the port + message = "Unable to find port "; + message = message + portName; + message = message + " in the WSDL definition"; + throw SystemConfigurationException(message.c_str()); + } + + } + + + + /// + /// Find a service + /// + DataObjectPtr Wsdl::findService(const string& serviceName) + { + DataObjectPtr service = 0; + + + // Find the binding + DataObjectList& serviceList = wsdlModel->getList("service"); + for (int i=0; igetCString("name")); + + if (name.compare(serviceName) == 0) + { + return serviceList[i]; + } + } + + return service; + } + + + /// + /// Find a named binding + /// + DataObjectPtr Wsdl::findBinding(const string& bindingName) + { + DataObjectPtr binding = 0; + string uri; + string name; + + + //Utils::tokeniseQName(bindingName, uri, name); + Utils::rTokeniseString(":", bindingName, uri, name); + + + // Find the binding + DataObjectList& bindingList = wsdlModel->getList("binding"); + for (int i=0; igetCString("name")); + + if (nameBinding.compare(name) == 0) + { + return bindingList[i]; + } + } + + return binding; + } + + /// + /// Find a named portType + /// + DataObjectPtr Wsdl::findPortType(const string& portTypeName) + { + DataObjectPtr portType = 0; + string uri; + string name; + + + // Utils::tokeniseQName(portTypeName, uri, name); + Utils::rTokeniseString(":", portTypeName, uri, name); + + + // Find the binding + DataObjectList& portTypeList = wsdlModel->getList("portType"); + for (int i=0; igetCString("name")); + + if (namePortType.compare(name) == 0) + { + return portTypeList[i]; + } + } + + return portType; + } + + /// + /// Find a named message + /// + DataObjectPtr Wsdl::findMessage(const string& messageName) + { + DataObjectPtr message = 0; + string uri; + string name; + + + // Utils::tokeniseQName(messageName, uri, name); + Utils::rTokeniseString(":", messageName, uri, name); + + + // Find the binding + DataObjectList& messageList = wsdlModel->getList("message"); + for (int i=0; igetCString("name")); + + if (nameMessage.compare(name) == 0) + { + return messageList[i]; + } + } + + return message; + } + + /// + /// Get the soap action + /// + string Wsdl::getSoapAction(DataObjectPtr binding, const string& operationName) + { + + + // Find the binding operation + DataObjectList& bindingOperationList = binding->getList("operation"); + for (int i=0; igetCString("name")); + + if (name.compare(operationName) == 0) + { + // Found the binding operation, return the soap action + string soapAction(bindingOperationList[i]->getCString("operation/soapAction")); + return soapAction; + } + } + + return string(""); + } + + + } // End namespace model + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h new file mode 100644 index 0000000000..440ecc4c2d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h @@ -0,0 +1,132 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_wsdl_h +#define tuscany_sca_model_wsdl_h + +#include +using std::string; + +#include "tuscany/sca/model/WsdlOperation.h" + +#include "commonj/sdo/SDO.h" +using commonj::sdo::DataObjectPtr; + + +namespace tuscany +{ + namespace sca + { + namespace model + { + + /** + * Holds information about a WSDL definition loaded into the runtime. + */ + class Wsdl + { + public: + /** + * Constructor. + * @param wsdlModel The data object representing the WSDL document + * defining a web service. + */ + Wsdl(DataObjectPtr wsdlModel); + + /** + * Destructor. + */ + ~Wsdl(); + + + /** + * Returns the target namespace of the WSDL definitions. + * @return The target namespace. + */ + string getNamespace(void); + + /** + * Find an operation in the WSDL definitions. + * @param serviceName The name of the service on which this + * operation is defined. + * @param portName The name of the port in the service to + * use. + * @param operationName The name of the operation to find. + * @return The operation if found. Exception thrown if not found. + */ + WsdlOperation findOperation(const string& serviceName, + const string& portName, + const string& operationName); + + private: + + /** + * Find a service in the wsdl definition. + * @param serviceName The name of the service. + * @return A data object describing the service if found, otherwise + * a 0 if not found. + */ + DataObjectPtr findService(const string& serviceName); + + /** + * Find a binding in the wsdl definition. + * @param bindingName The name of the binding to find. + * @return A data object describing the binding if found, otherwise + * a 0 if not found. + */ + DataObjectPtr findBinding(const string& bindingName); + + /** + * Find a portType in the wsdl definition. + * @param portTypeName The name of the portType. + * @return A data object describing the portType if found, otherwise + * a 0 if not found. + */ + DataObjectPtr findPortType(const string& portTypeName); + + /** + * Find a message in the wsdl definition. + * @param messageName The name of the message. + * @return A data object describing the message if found, otherwise + * a 0 if not found. + */ + DataObjectPtr findMessage(const string& messageName); + + /** + * The the details of the soap action setting for an operation + * on a soap binding. + * @param binding The data object describing the binding. + * @param operationName The name of the operation. + * @return The soap action setting from the WSDL. + */ + string getSoapAction(DataObjectPtr binding, const string& operationName); + + + /** + * The data object representation of the WSDL document. + */ + DataObjectPtr wsdlModel; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_wsdl_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp new file mode 100644 index 0000000000..e248f64caf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp @@ -0,0 +1,57 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/model/Wsdl.h" + +namespace tuscany +{ + namespace sca + { + namespace model + { + + + // Constructor + WsdlOperation::WsdlOperation(const string& operation, + const string& soapAct, + const string& endpointAddress, + const string& response) + : operationName(operation), + responseName(response), + soapAction(soapAct), + endpoint(endpointAddress) + { + LOGENTRY(1, "WsdlOperation::constructor"); + + + + + LOGEXIT(1, "WsdlOperation::constructor"); + } + + WsdlOperation::~WsdlOperation() + { + } + + + } // End namespace model + } // End namespace sca +} // End namespace tuscany diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h new file mode 100644 index 0000000000..a77d576a4f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h @@ -0,0 +1,117 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_model_wsdlOperation_h +#define tuscany_sca_model_wsdlOperation_h + +#include +using std::string; + + +namespace tuscany +{ + namespace sca + { + namespace model + { + + /** + * Represents a single.,bound WSDL defined operation. + * This class includes information from the soapBinding + * in addition to the WSDL definition of the operation. + */ + class WsdlOperation + { + public: + /** + * Constructor. + * @param operation The name of the operation. + * @param soapAction The soapAction associated with this operation + * in the SOAP binding of the operation. + * @param endpoint The endpoint address of the operation. + * @param responseName The name of the response message. + */ + WsdlOperation(const string& operation, + const string& soapAction, + const string& endpoint, + const string& responseName); + + /** + * Destructor. + */ + ~WsdlOperation(); + + /** + * Return the name of the operation for use when serializing an + * outgoing message. + * @return The name of the element in the request message. + */ + const string& getOperationName() {return operationName;}; + + /** + * Return the name of the response for use when deserializing an + * incoming message. + * @return The name of the element in the response message. + */ + const string& getResponseName() {return responseName;}; + + /** + * The soap action string for this operation. + * @return The soap action. + */ + const string& getSoapAction() {return soapAction;}; + + /** + * Return the endpoint address for the target web service. + * @return The endpoint address. + */ + const string& getEndpoint() {return endpoint;}; + + + + private: + /** + * The name of the operation for use when serializing an + * outgoing message. + */ + string operationName; + + /** + * The name of the response for use when deserializing an + * incoming message. + */ + string responseName; + + /** + * The soap action string for this operation. + */ + string soapAction; + + /** + * The endpoint address of the target web service. + */ + string endpoint; + }; + + } // End namespace model + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_model_wsdlOperation_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp new file mode 100644 index 0000000000..3ea2212f7c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp @@ -0,0 +1,43 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/DefaultLogWriter.h" +#include +using namespace std; + +namespace tuscany +{ + namespace sca + { + DefaultLogWriter::~DefaultLogWriter() + { + } + + void DefaultLogWriter::log(int level, const char* msg) + { + for (int i=0; i < level; i++) + { + cout << " "; + } + cout << msg < + +#include + +#if defined(WIN32) || defined (_WINDOWS) +#include +#else +#include +#include +#include +#endif + +namespace tuscany +{ + namespace sca + { + File::File(const string& dir, const string& file) + : directory(dir), fileName(file) + { + } + File::~File() + { + } + + + Files::Files(const string& rootDir, const string& pattern, bool subdirectories) + : rootDirectory(rootDir) + { + findFiles(rootDirectory, pattern, subdirectories); + } + + Files::~Files() + { + } + + unsigned int Files::size() + { + return files.size(); + } + + const File& Files::operator[] (unsigned int index) + { + if (size() <= index) + { + throw ServiceRuntimeException("Files::operator[] index out of bounds"); + } + + FILES::iterator iter = files.begin(); + for (unsigned int i=0; id_name; + struct stat statbuf; + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; + if (stat(entryName.c_str(), &statbuf) != 0) + { + perror("stat"); + } + else + { + if (S_ISDIR(statbuf.st_mode)) + { + if (subdirectories) + { + findFiles(entryName, pattern, subdirectories); + } + } + else if (S_ISREG(statbuf.st_mode)) + { + string filename = entry->d_name; + + if ((exactMatch && filename == pattern) || + (!exactMatch && + ((filename.find(token1) == 0) + && (filename.length() >= token2.length()) + && (filename.rfind(token2) == (filename.length() - token2.length())) ))) + { + // Add the file to our list + files.push_back(File(rootDir, filename)); + } + } + } + } + closedir(root); +#endif + } + + + } // End namespace sca +} // End namespace tuscany + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h new file mode 100644 index 0000000000..f177401442 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h @@ -0,0 +1,133 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_util_file_h +#define tuscany_sca_util_file_h + +#include +using std::string; +#include +using std::vector; + +namespace tuscany +{ + namespace sca + { + /** + * File access methods. Provides platform independent + * access to files. + */ + class File + { + public: + /** + * Constructor. + * @param directory Name of the directory in which this file is located. + * Either / or \ can be used interchangeably for separating directory elements. + * @param fileName Name of the file in the dirctory. + */ + File(const string& directory, const string& fileName); + + /** + * Destructor. + */ + virtual ~File(); + + /** + * Return the directory in which this file is located. + * @return Name of the directory. + */ + const string& getDirectory() const {return directory;} + + /** + * Name of the file. + * @return Name of the file. + */ + const string& getFileName() const {return fileName;} + private: + /** + * Name of the directory. + */ + string directory; + + /** + * Name of the file. + */ + string fileName; + }; + + /** + * Collection of File to provide platform independent access + * to files and directories. + */ + class Files + { + public: + /** + * Constructor which will search a given directory with a pattern and return a + * new instance of this collection class. + * @param rootDirectory The directory in which to search. + * @param pattern A pattern for matching file names. Can include * and ?. + * @param subdirectories Whether subdirectories should be searched too. + */ + Files(const string& rootDirectory, const string& pattern, bool subdirectories = false); + + /** + * Destructor. + */ + virtual ~Files(); + + /** + * Return the number of files found. + * @return The number of files found. + */ + unsigned int size(); + + /** + * Return a File at this position in the collection. + * @param index The index into the collection. + * @return The File at this index in the collection. + */ + const File& operator[] (unsigned int index); + + private: + /** + * Search the given directory and pattern for matching files. + * @param rootDirectory The directory in which to search. + * @param pattern A pattern for matching file names. Can include * and ?. + * @param subdirectories Whether subdirectories should be searched too. + */ + void findFiles(const string& rootDirectory, const string& pattern, bool subdirectories); + + /** + * The top level directory to search. + */ + string rootDirectory; + + typedef vector FILES; + + /** + * Vector of File. + */ + FILES files; + }; + + } // End namespace sca +} // End namespace tuscany +#endif // tuscany_sca_util_file_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp new file mode 100644 index 0000000000..c3749c1be2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp @@ -0,0 +1,49 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date$ */ + +#include "tuscany/sca/util/FileLogWriter.h" +#include +using namespace std; + +namespace tuscany +{ + namespace sca + { + FileLogWriter::FileLogWriter(const char* logfile) + { + logFile.open(logfile, ios_base::app); + } + + FileLogWriter::~FileLogWriter() + { + logFile.close(); + } + + void FileLogWriter::log(int level, const char* msg) + { + for (int i=0; i < level; i++) + { + logFile << " "; + } + logFile << msg < +#include +using std::ofstream; + +namespace tuscany +{ + namespace sca + { + /** + * Log writer to write out to standard out. + */ + class FileLogWriter : public LogWriter + { + public: + FileLogWriter(const char* logfile); + + virtual ~FileLogWriter(); + + /** + * Will write to the console. + * See LogWriter#log. + */ + virtual void log(int level, const char* msg); + private: + ofstream logFile; + }; + + } // End namespace sca +} // End namespace tuscany +#endif // tuscany_sca_util_defaultlogwriter_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp new file mode 100644 index 0000000000..452d185dcd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp @@ -0,0 +1,119 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Library.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Logging.h" +using namespace osoa::sca; + +namespace tuscany +{ + namespace sca + { + Library::Library() + : hDLL(NULL) + { + } + + Library::Library(const string& libraryName) + : name(libraryName), hDLL(NULL) + { + LOGINFO_1(3, "Library::construcor : %s", name.c_str()); + load(); + } + + Library::Library(const Library& lib) + : name(lib.name), hDLL(NULL) + { + LOGINFO_1(3, "Library::copy constructor : %s", name.c_str()); + if (lib.hDLL) + { + load(); + } + } + + Library& Library::operator=(const Library& lib) + { + LOGINFO_1(3, "Library::operator= : %s", name.c_str()); + if (&lib != this) + { + unload(); + name = lib.name; + load(); + } + return *this; + } + + Library::~Library() + { + LOGINFO_1(3, "Library::destructor: %s", name.c_str()); + unload(); + } + + + void Library::load() + { + LOGINFO_1(3, "Library::load : %s", name.c_str()); + string msg; +#if defined(WIN32) || defined (_WINDOWS) + hDLL = LoadLibrary(name.c_str()); +#else + hDLL = dlopen(name.c_str(), RTLD_NOW); +#endif + if (hDLL == NULL) + { + LOGERROR_1(1, "Library::load: Unable to load library %s", name.c_str()); + msg = "Unable to load dll: " + name; + throw ServiceRuntimeException(msg.c_str()); + } + } + + void Library::unload() + { + if (hDLL != NULL) + { + LOGINFO_1(3, "Library::unload : %s", name.c_str()); +#if defined(WIN32) || defined (_WINDOWS) + FreeLibrary(hDLL); +#else + dlclose(hDLL); +#endif + hDLL = NULL; + } + } + + void* Library::getSymbol(const string& symbol) + { + LOGINFO_1(3, "Library::getSymbol : %s", symbol.c_str()); + if (!hDLL) + { + return 0; + } +#if defined(WIN32) || defined (_WINDOWS) + return GetProcAddress(hDLL, symbol.c_str()); +#else + return dlsym(hDLL, symbol.c_str()); +#endif + } + + } // End namespace sca +} // End namespace tuscany + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h new file mode 100644 index 0000000000..69b2f5352a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h @@ -0,0 +1,97 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_util_library_h +#define tuscany_sca_util_library_h + + +#if defined(WIN32) || defined (_WINDOWS) +#include +#else +#include +#include +#endif + +#include +using std::string; + +namespace tuscany +{ + namespace sca + { + /** + * Information about shared libraries and methods to + * access these shared libraries. + */ + class Library + { + public: + Library(); + + /** + * Constructor. Will load the library. + * @param libraryName Fully qualified name of the library. + */ + Library(const string& libraryName); + + /** + * Destructor. Will unload the library. + */ + virtual ~Library(); + + Library(const Library& lib); + Library& operator=(const Library& lib); + + /** + * Find an externalized symbol in the library. + * @param symbol The name of the symbol to be found. + * @return The pointer to the symbol if found, otherwise 0. + */ + void* getSymbol(const string& symbol); + private: + /** + * Name of the library. + */ + string name; + + /** + * Handle to the loaded library. + */ +#if defined(WIN32) || defined (_WINDOWS) + HINSTANCE hDLL; +#else + void* hDLL; +#endif + + /** + * Load the library. + */ + void load(); + + /** + * Unload the library, if successfully loaded. + */ + void unload(); + + }; + + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_util_library_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp new file mode 100644 index 0000000000..d77d1e4bfd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp @@ -0,0 +1,32 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/LogWriter.h" + +namespace tuscany +{ + namespace sca + { + LogWriter::~LogWriter() + { + } + + } // End namespace sca +} // End namespace tuscany + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h new file mode 100644 index 0000000000..edb07c3684 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h @@ -0,0 +1,47 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_util_logwriter_h +#define tuscany_sca_util_logwriter_h + +#include "osoa/sca/export.h" + +namespace tuscany +{ + namespace sca + { + /** + * Abstract class for extending logging to other destinations. + */ + class SCA_API LogWriter + { + public: + virtual ~LogWriter(); + + /** + * Log a message. + * @param level The level of logging for this message. + * @param msg The message to log. + */ + virtual void log(int level, const char* msg) = 0; + }; + + } // End namespace sca +} // End namespace tuscany +#endif // tuscany_sca_util_logwriter_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp new file mode 100644 index 0000000000..0a888a69ef --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp @@ -0,0 +1,107 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include +#include + +#include "tuscany/sca/util/Logger.h" +#include "tuscany/sca/util/DefaultLogWriter.h" +#include "tuscany/sca/util/FileLogWriter.h" + +using namespace std; + +namespace tuscany +{ + namespace sca + { + LogWriter* Logger::logWriter = getLogWriter(); + + LogWriter* Logger::getLogWriter() + { + if (logWriter == 0) + { + setLogWriter(0); + } + return logWriter; + } + + void Logger::setLogWriter(LogWriter* writer) + { + if (logWriter != writer + && logWriter != 0) + { + delete logWriter; + } + + if (writer == 0) + { + char* loggingVar = 0; + loggingVar = getenv("TUSCANY_SCACPP_LOG"); + if (loggingVar == 0) + logWriter = new DefaultLogWriter; + else + logWriter = new FileLogWriter(loggingVar); + } + else + { + logWriter = writer; + } + } + + int Logger::loggingLevel = setLogging(); + + int Logger::setLogging() + { + char* loggingVar = 0; + loggingVar = getenv("TUSCANY_SCACPP_LOGGING"); + if (loggingVar == 0) + return 0; + else + return atoi(loggingVar); + } + + void Logger::setLogging(int level) + { + loggingLevel = level; + } + + void Logger::log(int level, const char* msg) + { + if (level <= loggingLevel) + { + logWriter->log(level, msg); + } + } + + void Logger::logArgs(int level, const char* msg, ...) + { + if (level <= loggingLevel) + { + va_list variableArguments; + va_start(variableArguments, msg); + char messageBuffer[1024]; + vsprintf(messageBuffer, msg, variableArguments); + logWriter->log(level, messageBuffer); + va_end(variableArguments); + } + } + + } // End namespace sca +} // End namespace tuscany + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h new file mode 100644 index 0000000000..8ba934afa5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h @@ -0,0 +1,89 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_util_logger_h +#define tuscany_sca_util_logger_h + +#include "osoa/sca/export.h" +#include "tuscany/sca/util/LogWriter.h" +namespace tuscany +{ + namespace sca + { + /** + * Provide a logging interface. + */ + class Logger { + + public: + /** + * Set the log writer to use. + * @param writer The writer to use for all subsequent logging. + */ + SCA_API static void setLogWriter(LogWriter* writer); + + /** + * Set or reset the logging level. Any message with a higher logging + * level than this value will be filtered (i.e. not shown). + * @param level The level of logging to use for all subsequent logging. + */ + SCA_API static void setLogging(int level); + + /** + * Log a message. + * @param level The log level of this message. + * @param msg The message to be logged. + */ + static void log(int level, const char* msg); + + /** + * Log a message with variable arguments. + * @param level The log level of this message. + * @param msg The message to be logged. Must include template + * characters as described in printf. + * @param ... Variable arguments. + */ + static void logArgs(int level, const char* msg, ...); + + /** + * The currently set logging level + */ + static int loggingLevel; + + private: + /** + * The current log writer. + */ + static LogWriter* logWriter; + + /** + * Get the current log writer. + * @return The current log writer. + */ + static LogWriter* getLogWriter(); + + /** + * Retrieves the logging level set as an environment variable. + */ + static int setLogging(); + }; + + } // End namespace sca +} // End namespace tuscany +#endif // tuscany_sca_util_logger_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h new file mode 100644 index 0000000000..066f6a5733 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h @@ -0,0 +1,72 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_util_logging_h +#define tuscany_sca_util_logging_h + +#include "tuscany/sca/util/Logger.h" + +#ifdef _DEBUG +#define LOGENTRY(level, methodName) \ +if (Logger::loggingLevel >= level) \ +Logger::log(level, "Entering: " methodName); + +#define LOGEXIT(level, methodName) \ +if (Logger::loggingLevel >= level) \ +Logger::log(level, "Exiting: " methodName); + +#define LOGINFO(level, message) \ +if (Logger::loggingLevel >= level) \ +Logger::log(level, message); + +#define LOGINFO_1(level, message, arg1) \ +if (Logger::loggingLevel >= level) \ +Logger::logArgs(level, message, arg1); + +#define LOGINFO_2(level, message, arg1, arg2) \ +if (Logger::loggingLevel >= level) \ +Logger::logArgs(level, message, arg1, arg2); + +#define LOGERROR(level, message) \ +if (Logger::loggingLevel >= level) \ +Logger::log(level, message); + +#define LOGERROR_1(level, message, arg1) \ +if (Logger::loggingLevel >= level) \ +Logger::logArgs(level, message, arg1); + +#define LOGERROR_2(level, message, arg1, arg2) \ +if (Logger::loggingLevel >= level) \ +Logger::logArgs(level, message, arg1, arg2); +#else // Not DEBUG +#define LOGENTRY(level, methodName) + +#define LOGEXIT(level, methodName) + +#define LOGINFO(level, message) + +#define LOGINFO_1(level, message, arg1) + +#define LOGINFO_2(level, message, arg1, arg2) +#define LOGERROR(level, message) +#define LOGERROR_1(level, message, arg1) +#define LOGERROR_2(level, message, arg1, arg2) + +#endif +#endif // tuscany_sca_util_logging_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp new file mode 100644 index 0000000000..7f457e68ed --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp @@ -0,0 +1,212 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Utils.h" + +using namespace std; +using namespace commonj::sdo; +namespace tuscany +{ + namespace sca + { + void Utils::tokeniseUri(const string& uri, string& token1, string& token2) + { + tokeniseString("/", uri, token1, token2); + } + + void Utils::tokeniseQName(const string& qname, string& uri, string& name) + { + tokeniseString("#", qname, uri, name); + if (name == "") + { + name = uri; + uri = ""; + } + } + + void Utils::tokeniseString( + const string& separator, + const string& str, + string& token1, + string& token2) + { + string::size_type sep = str.find(separator); + if (sep != string::npos) + { + token1 = str.substr(0, sep); + if ( (sep+1) < str.length()) + { + token2 = str.substr(sep+1); + } + else + { + token2 = ""; + } + } + else + { + token1 = str; + token2 = ""; + } + } + + void Utils::rTokeniseString( + const string& separator, + const string& str, + string& token1, + string& token2) + { + string::size_type sep = str.rfind(separator); + if (sep != string::npos) + { + token1 = str.substr(0, sep); + if ( (sep+1) < str.length()) + { + token2 = str.substr(sep+1); + } + else + { + token2 = ""; + } + } + else + { + token1 = ""; + token2 = str; + } + } + + ////////////////////////////////////////////////////////////////////////// + // Print a DatObject tree + ////////////////////////////////////////////////////////////////////////// + void Utils::tabs(int inc) + { + for (int ind=0; ind getType(); + tabs(inc); + cout << "DataObject type: " << dataObjectType.getURI()<< "#" << dataObjectType.getName() << endl; + inc++; + + ////////////////////////////////////////////////////////////////////////// + // Iterate over all the properties + ////////////////////////////////////////////////////////////////////////// + PropertyList pl = dataObject->getInstanceProperties(); + for (int i = 0; i < pl.size(); i++) + { + tabs(inc); + cout << "Property: " << pl[i].getName() << endl; + + const Type& propertyType = pl[i].getType(); + + tabs(inc); + cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl; + + if (dataObject->isSet(pl[i])) + { + + ////////////////////////////////////////////////////////////////////// + // For a many-valued property get the list of values + ////////////////////////////////////////////////////////////////////// + if (pl[i].isMany()) + { + inc++; + DataObjectList& dol = dataObject->getList(pl[i]); + for (int j = 0; j getCString(pl[i]) <getDataObject(pl[i]), inc); + inc--; + } + } + else + { + tabs(inc); + cout<< "Property Value: not set" <getTypes(); + for (int i = 0; i < tl.size(); i++) + { + cout << "Type: " << tl[i].getURI()<< "#" << tl[i].getName() << endl; + PropertyList pl = tl[i].getProperties(); + for (int j = 0; j < pl.size(); j++) + { + cout << "\tProperty: " << pl[j].getName() + << " type: " < +using std::string; +#include "commonj/sdo/SDO.h" + +#include "osoa/sca/export.h" + +namespace tuscany +{ + namespace sca + { + /** + * Utility methods to parse strings and provide debugging information. + */ + class Utils { + + public: + static void tokeniseUri(const string& uri, string& token1, string& token2); + static void tokeniseQName(const string& sdoname, string& uri, string& name); + static void tokeniseString( + const string& separator, + const string& str, + string& token1, + string& token2); + + static void rTokeniseString( + const string& separator, + const string& str, + string& token1, + string& token2); + + SCA_API static void printDO(commonj::sdo::DataObjectPtr dataObject, int increment=0); + SCA_API static void printTypes(commonj::sdo::DataFactoryPtr df); + + private: + static void tabs(int increment=0); + }; + + } // End namespace sca +} // End namespace tuscany +#endif // tuscany_sca_util_utils_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp new file mode 100644 index 0000000000..704097833e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp @@ -0,0 +1,448 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "SDOStub.h" +#include "commonj/sdo/HelperProvider.h" +#include "osoa/sca/export.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/util/Exceptions.h" +#include "tuscany/sca/util/Utils.h" + + +// For Axis stub code +#include +#include +#include +#include + +using namespace std; + +AXIS_CPP_NAMESPACE_USE + +using namespace commonj::sdo; +using namespace tuscany::sca; + + +namespace tuscany +{ +namespace sca +{ + namespace ws + { + /** Construct an SDOStub using the default HTTP 1.1 transport. + */ + SDOStub::SDOStub() + : Stub(" ", APTHTTP1_1), + m_strEndpoint(""), + m_strTargetNamespace(""), + m_strOperationName(""), + m_strOperationResponseName(""), + m_strSoapAction("") + { + } + + + /** Construct an SDOStub using the default HTTP 1.1 transport + * and set the web service endpoint URI. + * @param endpoint - web service endpoint URI + */ + SDOStub::SDOStub(const char* endpoint) + : Stub(endpoint, APTHTTP1_1), + m_strEndpoint(endpoint), + m_strTargetNamespace(""), + m_strOperationName(""), + m_strOperationResponseName(""), + m_strSoapAction("") + { + } + + + /** Destruct the SDOStub + */ + SDOStub::~SDOStub() + { + } + + /** Set the web service endpoint URI. + * The endpoint is the value of the soap:address element in the WSDL. + * @param endpoint - web service endpoint URI. + */ + void SDOStub::setEndpoint(const char* endpoint) + { + m_strEndpoint = endpoint; + // Stub::setEndPoint + setEndPoint(endpoint); + } + + /** Get the web service endpoint URI. + * @return web service endpoint URI. + */ + const char* SDOStub::getEndpoint() + { + return m_strEndpoint.c_str(); + } + + /** Set the target namespace for elements and operations. + * @param targetNamespace - the target namespace. + */ + void SDOStub::setTargetNamespace(const char* targetNamespace) + { + m_strTargetNamespace = targetNamespace; + } + + /** Get the target namespace. + * @return - target namespace. + */ + const char* SDOStub::getTargetNamesapce() + { + return m_strTargetNamespace.c_str(); + } + + /** Set the name of the operation to invoke. + * @param operationName - operation name + */ + void SDOStub::setOperationName(const char* operationName) + { + m_strOperationName = operationName; + } + + /** Get the operation name. + * @return operation name. + */ + const char* SDOStub::getOperationName() + { + return m_strOperationName.c_str(); + } + + /** Set the name of the element that is returned as the result of a soap method. + * @param operationResponseName - name of the response element. + */ + void SDOStub::setOperationResponseName(const char* operationResponseName) + { + m_strOperationResponseName = operationResponseName; + } + + /** Get the name of the element that is returned as the result of a soap method. + * @return operation response name. + */ + const char* SDOStub::getOperationResponseName() + { + return m_strOperationResponseName.c_str(); + } + + /** Set the SOAPAction header. + * @param soapAction - the soap action. + */ + void SDOStub::setSoapAction(const char* soapAction) + { + m_strSoapAction = soapAction; + } + + /** Get the SoapAction header. + * @return soap action. + */ + const char* SDOStub::getSoapAction() + { + return m_strSoapAction.c_str(); + } + + /** Invoke the operation on the web service. + * @param requestDO - SDO containing the input parameters for the operation. + * @param dataFactory - DataFactory for de/serialzing the SDOs. + * @return DataObjectPtr - SDO containg the response from the web service. + */ + DataObjectPtr SDOStub::invoke(DataObjectPtr requestDO, DataFactoryPtr dataFactory) + { + LOGENTRY(2, "SDOStub::invoke"); + + // SDO return object + DataObjectPtr pReturn; + + // For faults + //const char* pcCmplxFaultName = NULL; + + // Get an XMLHelper + XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(dataFactory); + + + try + { + // Initialize the call structure for Doc Literal request/response. + if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER)) + { + return pReturn; // Return if there is a failure + } + + // Set the SoapAction if it is not already set. + if (NULL == m_pCall->getTransportProperty("SOAPAction",false)) + { + m_pCall->setTransportProperty(SOAPACTION_HEADER , m_strSoapAction.c_str()); + } + + // Set the Soap Version. + m_pCall->setSOAPVersion(SOAP_VER_1_1); + + // Set the Operation (operationName and targetNamespace) + m_pCall->setOperation(m_strOperationName.c_str(), m_strTargetNamespace.c_str()); + + //includeSecure(); + //applyUserPreferences(); + + // + // Serialize the DataObject. + // + + // DEBUG + XMLDocumentPtr requestDoc = + xmlHelper->createDocument(requestDO, + m_strTargetNamespace.c_str(), + m_strOperationName.c_str()); + requestDoc->setXMLDeclaration(false); + char *requestXML = xmlHelper->save(requestDoc); + LOGINFO_1(2, "SDOStub::invoke: Request XML=%s", requestXML); + + // Loop through the top level data object, serializing individual properties. + // We cannot simply serialize the request DataObject to an XML string and add + // the XML as an AnyType parameter because Axis will wrap the request with an + // element named for the operationName (Doc Literal/Wrapped), duplicating the + // top-level element. + PropertyList properties = requestDO->getInstanceProperties(); + for (int i=0; i < properties.size() ; i++) + { + Property& property = properties[i]; + const char *propertyName = property.getName(); + + // If the property is not set, don't bother adding it as a parameter. + if (!requestDO->isValid(property)) continue; + + switch (property.getTypeEnum()) + { + // Simple string property - add it as an XSD_STRING parameter. + case Type::StringType: + { + if (!property.isMany()) + { + string strPrefixAndParamName; + const char *namespacePrefix = + m_pCall->getNamespacePrefix(m_strTargetNamespace.c_str()); + strPrefixAndParamName.append(namespacePrefix); + strPrefixAndParamName.append(":"); + strPrefixAndParamName.append(propertyName); + const char *paramValue = requestDO->getCString(i); + m_pCall->addParameter((void *)paramValue, + strPrefixAndParamName.c_str(), + XSD_STRING); + } + } + break; + + // DataObject property. + case Type::DataObjectType: + { + const char *dobXML = NULL; + if (property.isMany()) + { + // Many valued property - get the list. + DataObjectList& dobList = requestDO->getList(property); + for (int j=0; j< dobList.size(); j++) + { + DataObjectPtr dob = dobList[j]; + if (dob != 0) + { + // Create an XML string from the DataObject. + XMLDocumentPtr doc = + xmlHelper->createDocument(dob, + m_strTargetNamespace.c_str(), + propertyName); + doc->setXMLDeclaration(false); + dobXML = xmlHelper->save(doc); + + // Add the XML to the call as an AnyType. + AnyType* pAny = new AnyType(); + pAny->_size = 1; + pAny->_array = new char*[1]; + pAny->_array[0] = strdup(dobXML); + m_pCall->addAnyObject(pAny); + } + } + } // if isMany + else + { + // Single valued property. + DataObjectPtr dob = requestDO->getDataObject(property); + if (dob != 0) + { + // Create an XML string from the DataObject. + XMLDocumentPtr doc = + xmlHelper->createDocument(dob, + m_strTargetNamespace.c_str(), + propertyName); + doc->setXMLDeclaration(false); + dobXML = xmlHelper->save(doc); + + // Add the XML to the call as an AnyType. + AnyType* pAny = new AnyType(); + pAny->_size = 1; + pAny->_array = new char*[1]; + pAny->_array[0] = strdup(dobXML); + m_pCall->addAnyObject(pAny); + } + } + } + break; + + default: + break; + } + } + + // Invoke the operation. + if (AXIS_SUCCESS == m_pCall->invoke()) + { + // Make sure the response element is what we expect; ie that the element matches + // the operation response name set on the stub and its targetNamespace matches + // the targetNamespace set on the stub. + if (AXIS_SUCCESS == m_pCall->checkMessage(m_strOperationResponseName.c_str(), + m_strTargetNamespace.c_str())) + { + LOGINFO(2, "SDOStub::invoke: invoke returned AXIS_SUCCESS"); + + // Deserialize the soap response. + string strResponse = getSoapResponse(); + + // Create an XMLDocument from the soap reponse + XMLDocumentPtr returnDoc = + xmlHelper->load(strResponse.c_str(), m_strTargetNamespace.c_str()); + // Get the root DataObject to return as the result. + pReturn = returnDoc->getRootDataObject(); + + } + } + else + { + LOGINFO_2(2, "SDOStub::invoke: checkMessage failed. Expected: %s \' element with namespace \' %s \'.", + m_strOperationResponseName.c_str(), + m_strTargetNamespace.c_str()); + } + + + // Invoked the operation successfully - uninitialize the Call object. + m_pCall->unInitialize(); + + } + catch (AxisException& e) + { + // Get the exception code. + int iExceptionCode = e.getExceptionCode(); + LOGINFO_2(0, "SDOStub::invoke Caught AxisException: %d code: %s", iExceptionCode, e.what()); + if (AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode) + { + m_pCall->unInitialize(); + throw ServiceRuntimeException("AxisException", ServiceRuntimeException::Error, e.what()); + } + + // Get the details of the SoapFault. + ISoapFault* pSoapFault = (ISoapFault*) m_pCall->checkFault("Fault", m_strEndpoint.c_str()); + + if (pSoapFault) + { + const char *detail = pSoapFault->getSimpleFaultDetail(); + bool deleteDetail=false; + + if (NULL==detail || 0==strlen(detail)) + { + detail=m_pCall->getFaultAsXMLString(); + + + if (NULL==detail) + { + detail=""; + } + else + { + deleteDetail=true; + } + } + + OtherFaultException ofe(pSoapFault->getFaultcode(), + pSoapFault->getFaultstring(), + pSoapFault->getFaultactor(), + detail, iExceptionCode); + + if (deleteDetail && NULL!=detail) + { + delete [] const_cast(detail); + } + + m_pCall->unInitialize(); + throw ofe; + } + else + { + m_pCall->unInitialize(); + throw ServiceRuntimeException("AxisException", ServiceRuntimeException::Error, e.what()); + } + } + catch(SDORuntimeException sdoE) + { + throw ServiceRuntimeException("SDORuntimeException", ServiceRuntimeException::Error, sdoE.getMessageText()); + } + + LOGEXIT(2, "SDOStub::invoke"); + return pReturn; + + } + + // Deserialize the soap response from the web service. + string SDOStub::getSoapResponse() + { + // Get the response as an XML string. + AnyType* soapAny = m_pCall->getAnyObject(); + + // The Doc Literal response does not include the top level + // response element if we use getAnyObject - we need to wrap + // the response with the response element. + string strResponse("<"); + strResponse.append(m_strOperationResponseName); + strResponse.append(" xmlns=\""); + strResponse.append(m_strTargetNamespace); + strResponse.append("\">"); + + for (int j=0; j < soapAny->_size ; j++) + { + // DEBUG + cout << "SDOStub::getSoapResponse: soapAny->_array[" << j << "]=" << endl; + cout << soapAny->_array[j] << endl; + cout << endl; + // DEBUG + + strResponse.append(soapAny->_array[j]); + } + + strResponse.append(""); + + return strResponse; + } + + } // end namespace ws +} // end namespace sca +} // end namespace tuscany + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h new file mode 100644 index 0000000000..d5743c9c78 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h @@ -0,0 +1,143 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#if !defined(SDOSTUB_H_INCLUDED) +#define SDOSTUB_H_INCLUDED + +#include "osoa/sca/export.h" +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "commonj/sdo/SDO.h" + +// For stub code +#include +#include +#include + +#include + +AXIS_CPP_NAMESPACE_USE +using namespace commonj::sdo; + +namespace tuscany +{ + namespace sca + { + namespace ws + { + + /** + * The SDOStub class is an Axis Stub that is used to invoke operations on a Web Service + * using SDO objects as input parameters and return values. + */ + class SDOStub : public Stub + { + public: + + /** Construct an SDOStub using the default HTTP 1.1 transport. + */ + SCA_API SDOStub(); + + /** Construct an SDOStub using the default HTTP 1.1 transport + * and set the web service endpoint URI. + * @param endpointURI - web service endpoint URI + */ + SCA_API SDOStub(const char* endpointURI); + + /** Destruct the SDOStub + */ + SCA_API virtual ~SDOStub(); + + /** Set the web service endpoint URI. + * The endpoint is the value of the soap:address element in the WSDL. + * @param endpoint - web service endpoint URI. + */ + SCA_API void setEndpoint(const char* endpoint); + + /** Get the web service endpoint URI. + * @return web service endpoint URI. + */ + SCA_API const char* getEndpoint(); + + /** Set the target namespace for elements and operations. + * @param targetNamespace - the target namespace. + */ + SCA_API void setTargetNamespace(const char* targetNamespace); + + /** Get the target namespace. + * @return - target namespace. + */ + SCA_API const char* getTargetNamesapce(); + + /** Set the name of the operation to invoke. + * @param operationName - operation name + */ + SCA_API void setOperationName(const char* operationName); + + /** Get the operation name. + * @return operation name. + */ + SCA_API const char* getOperationName(); + + /** Set the name of the element that is returned as the result of a soap method. + * @param operationResponseName - name of the response element. + */ + SCA_API void setOperationResponseName(const char* operationResponseName); + + /** Get the name of the element that is returned as the result of a soap method. + * @return operation response name. + */ + SCA_API const char* getOperationResponseName(); + + /** Set the SOAPAction header. + * @param soapAction - the soap action. + */ + SCA_API void setSoapAction(const char* soapAction); + + /** Get the SoapAction header. + * @return soap action. + */ + SCA_API const char* getSoapAction(); + + /** Invoke the operation on the web service. + * @param requestDO - SDO containing the input parameters for the operation. + * @param dataFactory - DataFactory for de/serialzing the SDOs. + * @return DataObjectPtr - SDO containg the response from the web service. + */ + SCA_API DataObjectPtr invoke(DataObjectPtr requestDO, DataFactoryPtr dataFactory); + + private: + // Deserialize the soap response from the web service. + string getSoapResponse(); + + string m_strEndpoint; + string m_strTargetNamespace; + string m_strOperationName; + string m_strOperationResponseName; + string m_strSoapAction; + }; + + } // end namespace ws + } // end namespace sca +} // end namespace tuscany + + +#endif // !defined(SDOSTUB_H_INCLUDED) diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp new file mode 100644 index 0000000000..672a48b697 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp @@ -0,0 +1,116 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/ws/WSServiceWrapper.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +#include "tuscany/sca/core/SCARuntime.h" +#include "tuscany/sca/util/Logging.h" +#include "tuscany/sca/model/WSBinding.h" +#include "tuscany/sca/model/Wsdl.h" +#include "tuscany/sca/ws/SDOStub.h" +#include "tuscany/sca/util/Utils.h" +using namespace tuscany::sca; +using namespace tuscany::sca::ws; + + + +extern "C" +{ + /// + /// Factory function for creating service wrappers for web services. + /// + SCA_API WSServiceWrapper* WSServiceWrapper_Factory(tuscany::sca::model::WireTarget* target) + { + return new WSServiceWrapper(target); + } +} + + +WSServiceWrapper::WSServiceWrapper(tuscany::sca::model::WireTarget* target) : ExternalServiceWrapper(target) +{ + +} + +WSServiceWrapper::~WSServiceWrapper() +{ + +} + +/// +/// This method will be called when a web service call needs to be made. +/// +void WSServiceWrapper::invoke(Operation& operation) +{ + LOGENTRY(1, "WSServiceWrapper::invoke"); + + const string& operationName = operation.getName(); + + LOGINFO_2(2,"External service: %s, Operation: %s", getTarget()->getName().c_str() , operationName.c_str()); + + + // Check one parameter in/ one parameter out and that they are data objects. + + // Get the data factory for the module (it will already have the types loaded for the xsds) + + // From the external service ws-binding, get the namespace of the wsdl endpoint + ExternalService* externalService = getExternalService(); + WSBinding* binding = (WSBinding *)externalService->getBinding(); + + string portNamespace = binding->getWSDLNamespaceURL(); + + // Lookup the wsdl model from the module, keyed on the namespace + // (the wsdl will have been loaded at startup, based on the information in the config file) + Wsdl* wsdlDefinition = externalService->getContainingModule()->findWsdl(portNamespace); + + // Match the operation in Operation to the operation in the wsdl port type. + WsdlOperation wsdlOperation = wsdlDefinition->findOperation( + binding->getServiceName() + , binding->getPortName() + , operationName); + + // Get the name of the response by navigating from the wsdl operation to the return type + + // Get the name of the SoapAction by navigating from the wsdl. + + // Create an SDOStub + try + { + SDOStub wsStub(wsdlOperation.getEndpoint().c_str()); + wsStub.setTargetNamespace(portNamespace.c_str()); + wsStub.setOperationName(wsdlOperation.getOperationName().c_str()); + wsStub.setOperationResponseName(wsdlOperation.getResponseName().c_str()); + wsStub.setSoapAction(wsdlOperation.getSoapAction().c_str()); + + + // Call the service via the SDOStub + *(DataObjectPtr *)operation.getReturnValue() = wsStub.invoke(*((DataObjectPtr*)operation.getParameter(0)), + externalService->getContainingModule()->getDataFactory()); + + } + catch (AxisException& e) + { + throw ServiceRuntimeException("AxisException", ServiceRuntimeException::Error, e.what()); + } + + + LOGEXIT(1, "WSServiceWrapper::invoke"); + +} diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h new file mode 100644 index 0000000000..7ae765950c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h @@ -0,0 +1,48 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef tuscany_sca_ws_wsservicewrapper_h +#define tuscany_sca_ws_wsservicewrapper_h + +#include "osoa/sca/export.h" + +#include "tuscany/sca/core/ExternalServiceWrapper.h" +#include "tuscany/sca/model/ExternalService.h" +#include "tuscany/sca/core/Operation.h" + +namespace tuscany +{ + namespace sca + { + namespace ws + { + + class SCA_API WSServiceWrapper : public tuscany::sca::ExternalServiceWrapper + { + public: + WSServiceWrapper(tuscany::sca::model::WireTarget* target); + virtual ~WSServiceWrapper(); + + virtual void invoke(Operation& operation); + }; + } // End namespace ws + } // End namespace sca +} // End namespace tuscany + +#endif // tuscany_sca_ws_wsservicewrapper_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild new file mode 100644 index 0000000000..ed308ead8d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project new file mode 100644 index 0000000000..60a0a75176 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project @@ -0,0 +1,19 @@ + + + tuscany_sca_test_CustomerInfo + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..691a33706a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Tue Nov 29 15:05:50 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.180210457=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.954607388=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.180210457=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.954607388=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.180210457=\n\n +environment/project/cdt.managedbuild.config.gnu.so.release.954607388=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h new file mode 100644 index 0000000000..6372a5a45a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h @@ -0,0 +1,30 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformation(const char* customerID) = 0; + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp new file mode 100644 index 0000000000..91996bace7 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp @@ -0,0 +1,79 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "CustomerInfoImpl.h" +#include +#include +#include "osoa/sca/sca.h" +#include "commonj/sdo/DataObjectInstance.h" +using namespace osoa::sca; +using namespace commonj::sdo; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CustomerInfoImpl::CustomerInfoImpl() +{ + cout << "Construct CustomerInfoImpl" << endl; + +} + +CustomerInfoImpl::~CustomerInfoImpl() +{ + cout << "Destroy CustomerInfoImpl" << endl; +} + +////////////////////////////////////////////////////////////////////// +// Other methods +////////////////////////////////////////////////////////////////////// +const char* CustomerInfoImpl::getCustomerInformation(const char* customerID) +{ + cout << "In getCustomerInformation with customerid: " << customerID << endl; + + + + ComponentContext myContext = ComponentContext::getCurrent(); + + DataObjectInstance properties = myContext.getProperties(); + DataObjectInstance props2 = properties; + if (properties) + { + const char* fredVal = properties->getCString("Fred"); + cout << "Property Fred value: " << fredVal <getList("Joe"); + for (int i=0; iinvoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..7930c4a16e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h +#define CustomerInfoImpl_CustomerInfoService_Proxy_h + +#include "CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..d1fb6073c9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,71 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl*)getImplementation(); +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformation") + { + const char* p0 = (const char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformation(p0)); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..778a168220 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_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 CustomerInfoImpl_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl* impl; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am new file mode 100644 index 0000000000..b533c6cdb8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am @@ -0,0 +1,14 @@ +lib_LTLIBRARIES = libCustomerInfo.la + +libCustomerInfo_la_SOURCES = \ +CustomerInfoImpl.cpp \ +CustomerInfoImpl_CustomerInfoService_Proxy.cpp \ +CustomerInfoImpl_CustomerInfoService_Wrapper.cpp + +libCustomerInfo_la_LIBADD = + +INCLUDES = -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include \ + -I${AXISCPP_DEPLOY}/include + +install: \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/Makefile.am new file mode 100644 index 0000000000..05516bac23 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/Makefile.am @@ -0,0 +1,20 @@ +SUBDIRS = CustomerInfo MyValue src + +BUILT_SOURCES = scagen + +scagen: + cp ./MyValue/MyValue.h ./testSCASystem/modules/MyValueServiceModule + cp ./MyValue/MyValueImpl.h ./testSCASystem/modules/MyValueServiceModule + cp ./MyValue/StockQuoteService.h ./testSCASystem/modules/MyValueServiceModule + cp ./CustomerInfo/CustomerInfo.h ./testSCASystem/modules/MyValueServiceModule + cp ./CustomerInfo/CustomerInfoImpl.h ./testSCASystem/modules/MyValueServiceModule + cd $(top_builddir)/bin && \ + ./scagen.sh -dir ../runtime/core/test/testSCASystem/modules/MyValueServiceModule -output ../runtime/core/test/tmp + cp tmp/CustomerInfoImpl*.* CustomerInfo + cp tmp/MyValueImpl*.* MyValue + + +install-exec-local: + cp CustomerInfo/.libs/libCustomerInfo.so testSCASystem/modules/MyValueServiceModule + cp MyValue/.libs/libMyValue.so testSCASystem/modules/MyValueServiceModule + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild new file mode 100644 index 0000000000..acc65c20f2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project new file mode 100644 index 0000000000..113442bfd8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project @@ -0,0 +1,19 @@ + + + tuscany_sca_test_MyValue + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..4c585d5bb1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Tue Nov 29 15:11:39 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.903609302=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1558347965=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.903609302=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1558347965=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.903609302=\n\n +environment/project/cdt.managedbuild.config.gnu.so.release.1558347965=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am new file mode 100644 index 0000000000..c6ea61654b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am @@ -0,0 +1,17 @@ +lib_LTLIBRARIES = libMyValue.la + +libMyValue_la_SOURCES = \ +MyValueImpl.cpp \ +MyValueImpl_customerInfo_Proxy.cpp \ +MyValueImpl_MyValueService_Proxy.cpp \ +MyValueImpl_MyValueService_Wrapper.cpp \ +MyValueImpl_stockQuote_Proxy.cpp + +libMyValue_la_LIBADD = + +INCLUDES = -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include \ + -I${AXISCPP_DEPLOY}/include \ + -I../CustomerInfo + +install: \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h new file mode 100644 index 0000000000..710910f08c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h @@ -0,0 +1,34 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef MyValue_h +#define MyValue_h +#include +using std::string; +class MyValue +{ +public: + virtual float getMyValue(const char* customerID) = 0; + virtual float getMyValueS(const string& customerID) = 0; + virtual string getCustname(string& customerID) = 0; + virtual const string& getCustnamecs(string customerID) = 0; + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp new file mode 100644 index 0000000000..8d45eac6e9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp @@ -0,0 +1,159 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "MyValueImpl.h" +#include "CustomerInfo.h" +#include "StockQuoteService.h" +#include +using namespace std; + +#include "osoa/sca/sca.h" +#include "commonj/sdo/SDO.h" +using namespace osoa::sca; +using namespace commonj::sdo; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +MyValueImpl::MyValueImpl() +{ + cout << "Construct MyValueImpl" << endl; + +} + +MyValueImpl::~MyValueImpl() +{ + cout << "Destroy MyValueImpl" << endl; +} + +////////////////////////////////////////////////////////////////////// +// Other methods +////////////////////////////////////////////////////////////////////// +float MyValueImpl::getMyValue(const char *customerID) +{ + cout << "In getMyValue with customerid: " << customerID << endl; + + + ComponentContext myContext = ComponentContext::getCurrent(); + CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo"); + + if (customerInfoService == 0) + { + cout << "unable to find customer info service" << endl; + + return 0.0f; + } + + const char * stock; + try + { + stock = customerInfoService->getCustomerInformation(customerID); + } + catch(const char* x) + { + cout << "Exception caught: " << x <getCustomerInformation(customerID); + cout << "Stock from getServices " << i << " : " << stock <create("http://swanandmokashi.com", "GetQuotes"); + requestDO->setCString("QuoteTicker", stock); + } catch (SDORuntimeException e) + { + cout << e; + } + + // Invoke the service + DataObjectPtr result = stockQuoteService->GetStockQuotes(requestDO); + + float stockPrice = 0.2f; + + try { + float stockPrice = result->getDataObject("GetQuotesResult")->getList("Quote")[0]->getFloat("StockQuote"); + //dataobjectlist& dlist = result->getdataobject("getquotesresult")->getlist("quote"); + //DataObjectList& dlist = result->getDataObject("GetQuotesResult")->getList((unsigned int)0); + //float stockPrice = result->getDataObject("GetQuotesResult")->getList(0u)[0]->getFloat("StockQuote"); + cout << "My stock price is " << stockPrice << endl; + //float stockPrice=((DataObject)result.getDataObject("GetQuotesResult").getList(0).get(0)).getFloat("StockQuote"); + // System.out.println(" [getMyValue] stock quote = "+stockPrice); + } catch (SDORuntimeException e) + { + cout << e; + } + + return stockPrice; + + /* + // Dummy method + + if (!strcmp(stock, "IBM")) + return 99.999f; + else + return 31.05f; + */ + +} + +float MyValueImpl::getMyValueS(const string& customerID) +{ + cout << "In getMyValueS with customerid: " << customerID.c_str() << endl; + return 87.35f; +} + +string MyValueImpl::getCustname(string& customerID) +{ + cout << "In getCustname with customerid: " << customerID.c_str() << endl; + customerID = "FRED"; + cout << "setting customer name to " << customerID.c_str() <invoke(operation); + return ret; + +} + +float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) +{ + Operation operation("getMyValueS", 1); + operation.setParameter(0, (void*)&arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) +{ + Operation operation("getCustname", 1); + operation.setParameter(0, (void*)&arg0); + + string ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) +{ + Operation operation("getCustnamecs", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return *(const string*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h new file mode 100644 index 0000000000..38f22384b0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h @@ -0,0 +1,37 @@ +/* + * 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 MyValueImpl_MyValueService_Proxy_h +#define MyValueImpl_MyValueService_Proxy_h + +#include "MyValue.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_MyValueService_Proxy : public MyValue +{ +public: + MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_MyValueService_Proxy(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname( string& customerID); + virtual const string& getCustnamecs( string customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_MyValueService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp new file mode 100644 index 0000000000..d9337c9341 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp @@ -0,0 +1,89 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new MyValueImpl_MyValueService_Wrapper(target); + } +} + +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (MyValueImpl*)getImplementation(); +} + +MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() +{ + releaseImplementation(); +} + +void* MyValueImpl_MyValueService_Wrapper::newImplementation() +{ + return new MyValueImpl; +} + +void MyValueImpl_MyValueService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getMyValue") + { + const char* p0 = (const char*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValue(p0); + return; + } + if (operationName == "getMyValueS") + { + string& p0 = *(string*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueS(p0); + return; + } + if (operationName == "getCustname") + { + string& p0 = *(string*)operation.getParameter(0); + *(string*)operation.getReturnValue() = impl->getCustname(p0); + return; + } + if (operationName == "getCustnamecs") + { + string& p0 = *( string*)operation.getParameter(0); + const string& ret = impl->getCustnamecs(p0); + operation.setReturnValue((void*)&ret); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h new file mode 100644 index 0000000000..9179537ceb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_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 MyValueImpl_MyValueService_Wrapper_h +#define MyValueImpl_MyValueService_Wrapper_h + +#include "MyValueImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); + virtual ~MyValueImpl_MyValueService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + MyValueImpl* impl; +}; + +#endif // MyValueImpl_MyValueService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp new file mode 100644 index 0000000000..7625556203 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "MyValueImpl_customerInfo_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 + MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_customerInfo_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_customerInfo_Proxy*)proxy; + } +} + +MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() +{ + if (target) + delete target; +} + +const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h new file mode 100644 index 0000000000..cc60ef5005 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_customerInfo_Proxy_h +#define MyValueImpl_customerInfo_Proxy_h + +#include "CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_customerInfo_Proxy : public CustomerInfo +{ +public: + MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_customerInfo_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_customerInfo_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp new file mode 100644 index 0000000000..14b37fa4bd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp @@ -0,0 +1,66 @@ +/* + * 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 "MyValueImpl_stockQuote_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 + MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_stockQuote_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_stockQuote_Proxy*)proxy; + } +} + +MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() +{ + if (target) + delete target; +} + +commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) +{ + Operation operation("GetStockQuotes", 1); + operation.setParameter(0, (void*)&arg0); + + commonj::sdo::DataObjectPtr ret = 0; + operation.setReturnValue((void*)&ret); + + target->invoke(operation); + return ret; + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..850bc3861c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h new file mode 100644 index 0000000000..74479c2800 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h @@ -0,0 +1,32 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#ifndef StockQuoteService_h +#define StockQuoteService_h +#include +#include "commonj/sdo/SDO.h" +using std::string; +class StockQuoteService +{ +public: + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; + +}; + +#endif // StockQuoteService_h diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild new file mode 100644 index 0000000000..73f28e14fd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project new file mode 100644 index 0000000000..5e5b12e9d8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.project @@ -0,0 +1,19 @@ + + + tuscany_sca_test + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..fe629d7d5b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,9 @@ +#Tue Nov 29 17:30:33 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n\n\n\n +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am new file mode 100644 index 0000000000..1dfd79aa21 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am @@ -0,0 +1,13 @@ +prgbindir=$(prefix)/bin/test +prgbin_PROGRAMS = tuscany_sca_test +SUBDIRS = +AM_CPPFLAGS = $(CPPFLAGS) +tuscany_sca_test_SOURCES = TestSCA.cpp + +tuscany_sca_test_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ + -L${TUSCANY_SDOCPP}/lib -ltuscany_sca -lxml2 -lstdc++ \ + -L${AXISCPP_DEPLOY}/lib -laxis_client -laxis_clientC + +INCLUDES = -I$(top_builddir)/runtime/core/test/MyValue \ + -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp new file mode 100644 index 0000000000..0143e32510 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp @@ -0,0 +1,77 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ + +#include "tuscany/sca/util/Logger.h" +#include "commonj/sdo/Logger.h" +#include "osoa/sca/sca.h" +#include +using namespace osoa::sca; +using namespace tuscany::sca; +#include "MyValue.h" + +int main(int argc, char* argv[]) +{ + tuscany::sca::Logger::setLogging(3); + commonj::sdo::Logger::setLogging(20); + cout << "Start of SCA test" << endl; + + try + { + // Locate a service + ModuleContext myContext = ModuleContext::getCurrent(); + ModuleContext myContext2 = myContext; + + + MyValue* myService = (MyValue*) myContext.locateService("MyValueServiceComponent"); + if (myService == 0) + { + cout << "Unable to find service" << endl; + } + else + { + + try + { + float value = myService->getMyValue("12345"); + cout << "My value is: " << value << endl; + value = myService->getMyValueS("12345"); + cout << "My valueSS is: " << value << endl; + string custid = "fred"; + string name = myService->getCustname(custid); + cout << "Returned string: " << name.c_str() << " custid now: " << custid.c_str() <getCustnamecs(custid); + cout << "Returned string: " << csname.c_str() << " custid now: " << custid.c_str() <getMyValue("999"); + cout << "My value is: " << value << endl; + } + catch (char* x) + { + cout << "Exception caught: " << x << endl; + } + } + cout << "End of SCA test" << endl; + + } + catch (ServiceRuntimeException& ex) + { + cout << ex << endl; + } + return 0; +} diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment new file mode 100644 index 0000000000..f473f59748 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment @@ -0,0 +1,36 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..48651b63fe --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType new file mode 100644 index 0000000000..ace4154966 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl new file mode 100644 index 0000000000..4917cde583 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config new file mode 100644 index 0000000000..7fee074333 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module new file mode 100644 index 0000000000..aedaf354e6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module @@ -0,0 +1,51 @@ + + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem new file mode 100644 index 0000000000..1b32bf8a93 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem @@ -0,0 +1,27 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw new file mode 100644 index 0000000000..7df3d3cbe8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw @@ -0,0 +1,53 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CalculatorModule"=.\CalculatorModule\CalculatorModule.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CalculatorSubsystem"=.\CalculatorSubsystem\CalculatorSubsystem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Client"=.\Client\Client.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb new file mode 100644 index 0000000000..fd603e4f04 Binary files /dev/null and b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb differ diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt new file mode 100644 index 0000000000..c399feabb4 Binary files /dev/null and b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt differ diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild new file mode 100644 index 0000000000..ca7fa895f1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project new file mode 100644 index 0000000000..fa611e47c3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project @@ -0,0 +1,19 @@ + + + CalculatorModule + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..415787c073 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,6 @@ +#Tue Dec 13 10:02:34 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h new file mode 100644 index 0000000000..9284178d5f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h @@ -0,0 +1,33 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 CALCULATOR_H +#define CALCULATOR_H +class Calculator +{ +public: + virtual float add(float arg1, float arg2) = 0; + virtual float sub(float arg1, float arg2) = 0; + virtual float mul(float arg1, float arg2) = 0; + virtual float div(float arg1, float arg2) = 0; +}; + +#endif + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType new file mode 100644 index 0000000000..2033f431bb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp new file mode 100644 index 0000000000..96bd363167 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp @@ -0,0 +1,55 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 "CalculatorImpl.h" + +CalculatorImpl::CalculatorImpl() +{ +} + +CalculatorImpl::~CalculatorImpl() +{ +} + +// Calculator interface +float CalculatorImpl::add(float arg1, float arg2) +{ + float result = arg1 + arg2; + return result; +} + +float CalculatorImpl::sub(float arg1, float arg2) +{ + float result = arg1 - arg2; + return result; +} + +float CalculatorImpl::mul(float arg1, float arg2) +{ + float result = arg1 * arg2; + return result; +} + +float CalculatorImpl::div(float arg1, float arg2) +{ + float result = arg1 / arg2; + return result; +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h new file mode 100644 index 0000000000..38570aae28 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h @@ -0,0 +1,39 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 CALCULATORIMPL_H +#define CALCULATORIMPL_H + +#include "Calculator.h" + +class CalculatorImpl : public Calculator +{ +public: + CalculatorImpl(); + virtual ~CalculatorImpl(); + + // Calculator interface + virtual float add(float arg1, float arg2); + virtual float sub(float arg1, float arg2); + virtual float mul(float arg1, float arg2); + virtual float div(float arg1, float arg2); +}; + +#endif + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp new file mode 100644 index 0000000000..43c6bfc044 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp @@ -0,0 +1,138 @@ +# Microsoft Developer Studio Project File - Name="CalculatorModule" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=CalculatorModule - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CalculatorModule.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CalculatorModule.mak" CFG="CalculatorModule - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CalculatorModule - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "CalculatorModule - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CalculatorModule - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 + +!ELSEIF "$(CFG)" == "CalculatorModule - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" + +!ENDIF + +# Begin Target + +# Name "CalculatorModule - Win32 Release" +# Name "CalculatorModule - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CalculatorImpl.cpp +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Proxy.cpp +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Wrapper.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Calculator.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Proxy.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Wrapper.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;module;componentType;fragment" +# Begin Source File + +SOURCE=.\CalculatorImpl.componentType +# End Source File +# Begin Source File + +SOURCE=.\sca.module +# End Source File +# End Group +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg new file mode 100644 index 0000000000..33016bffaf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg @@ -0,0 +1,39 @@ + + +
+

Build Log

+

+--------------------Configuration: CalculatorModule - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7D.tmp" with contents +[ +/nologo /MDd /W3 /Gm /GX /ZI /I "D:\Development\tuscany\cpp\sdo/include" /I "D:\Development\tuscany\cpp\sca/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /Fp"Debug/CalculatorModule.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl.cpp" +"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.cpp" +"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7D.tmp" +Creating temporary file "C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7E.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"Debug/CalculatorModule.pdb" /debug /machine:I386 /out:"Debug/CalculatorModule.dll" /implib:"Debug/CalculatorModule.lib" /pdbtype:sept /libpath:"D:\Development\tuscany\cpp\sdo/lib" /libpath:"D:\Development\tuscany\cpp\sca/lib" +.\Debug\CalculatorImpl.obj +.\Debug\CalculatorImpl_CalculatorService_Proxy.obj +.\Debug\CalculatorImpl_CalculatorService_Wrapper.obj +] +Creating command line "link.exe @C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7E.tmp" +

Output Window

+Compiling... +CalculatorImpl.cpp +CalculatorImpl_CalculatorService_Proxy.cpp +CalculatorImpl_CalculatorService_Wrapper.cpp +Linking... + Creating library Debug/CalculatorModule.lib and object Debug/CalculatorModule.exp + + + +

Results

+CalculatorModule.dll - 0 error(s), 0 warning(s) +
+ + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile new file mode 100644 index 0000000000..1e7f19fce8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile @@ -0,0 +1,43 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ROOT := .. + +-include $(ROOT)/makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include $(SUBDIRS:%=%/subdir.mk) +-include objects.mk +ifneq ($(strip $(DEPS)),) +-include $(DEPS) +endif + +-include $(ROOT)/makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: libCalculatorModule.so + +# Tool invocations +libCalculatorModule.so: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: GCC C++ Linker' + @echo g++ -L${SCA4CPP}/lib -shared -olibCalculatorModule.so $(OBJS) $(USER_OBJS) $(LIBS) + @g++ -L${SCA4CPP}/lib -shared -olibCalculatorModule.so $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(DEPS)$(LIBRARIES) libCalculatorModule.so + -@echo ' ' + +.PHONY: all clean dependents +.SECONDARY: + +-include $(ROOT)/makefile.targets diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk new file mode 100644 index 0000000000..fbdb88403a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk @@ -0,0 +1,7 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +LIBS := -ltuscany_sca + +USER_OBJS := \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk new file mode 100644 index 0000000000..8f0795952f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk @@ -0,0 +1,20 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +C_UPPER_SRCS := +CPP_SRCS := +O_SRCS := +ASM_SRCS := +S_SRCS := +CXX_SRCS := +CC_SRCS := +OBJ_SRCS := +OBJS := +DEPS := +LIBRARIES := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +. \ + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk new file mode 100644 index 0000000000..dd98e3ddc6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk @@ -0,0 +1,35 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(ROOT)/CalculatorImpl.cpp \ +$(ROOT)/CalculatorImpl_CalculatorService_Proxy.cpp \ +$(ROOT)/CalculatorImpl_CalculatorService_Wrapper.cpp + +OBJS += \ +./CalculatorImpl.o \ +./CalculatorImpl_CalculatorService_Proxy.o \ +./CalculatorImpl_CalculatorService_Wrapper.o + +DEPS += \ +${addprefix ./, \ +CalculatorImpl.d \ +CalculatorImpl_CalculatorService_Proxy.d \ +CalculatorImpl_CalculatorService_Wrapper.d \ +} + + +# Each subdirectory must supply rules for building sources it contributes +%.o: $(ROOT)/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< + @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ + echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ + g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module new file mode 100644 index 0000000000..c000e57411 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin new file mode 100644 index 0000000000..2298b5910f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp new file mode 100644 index 0000000000..ed7ceef2a4 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp @@ -0,0 +1,67 @@ +# Microsoft Developer Studio Project File - Name="CalculatorSubsystem" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Generic Project" 0x010a + +CFG=CalculatorSubsystem - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CalculatorSubsystem.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CalculatorSubsystem.mak" CFG="CalculatorSubsystem - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CalculatorSubsystem - Win32 Release" (based on "Win32 (x86) Generic Project") +!MESSAGE "CalculatorSubsystem - Win32 Debug" (based on "Win32 (x86) Generic Project") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +MTL=midl.exe + +!IF "$(CFG)" == "CalculatorSubsystem - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "CalculatorSubsystem - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "CalculatorSubsystem - Win32 Release" +# Name "CalculatorSubsystem - Win32 Debug" +# Begin Source File + +SOURCE=.\sca.subsystem +# End Source File +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem new file mode 100644 index 0000000000..4b9fdd1511 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild new file mode 100644 index 0000000000..68fe431c95 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project new file mode 100644 index 0000000000..20d79410f9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.project @@ -0,0 +1,19 @@ + + + CalculatorClient + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..64ec20058b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,6 @@ +#Tue Dec 13 10:20:35 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp new file mode 100644 index 0000000000..8322532617 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp @@ -0,0 +1,144 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 "Calculator.h" +#include "osoa/sca/sca.h" +#include +#include + +using namespace osoa::sca; +using namespace std; + +void usage(); +bool IsNumber(const char *p); + +int main(int argc, char* argv[]) +{ + const char *operation; + float arg1 = 0; + float arg2 = 0; + + if (argc == 4) + { + operation = argv[1]; + + if (!IsNumber(argv[2])) + { + cout << "Calc.exe: Argument 1 is not a number" << endl; + usage(); + } + else + { + arg1 = atof(argv[2]); + } + + if (!IsNumber(argv[3])) + { + cout << "Calc.exe: Argument 2 is not a number" << endl; + usage(); + } + else + { + arg2 = atof(argv[3]); + } + } + else + { + usage(); + } + + try + { + + // Set the default module environment variable: / + //char *defaultModule = "SCA4CPP_DEFAULT_MODULE=SubSystem2/CalculatorServiceModule"; + //putenv(defaultModule); + + // Locate a service + ModuleContext myContext = ModuleContext::getCurrent(); + Calculator *calcService = (Calculator*) myContext.locateService("CalculatorServiceComponent"); + if (calcService == 0) + { + cout << "Calc.exe: Unable to find Calculator service" << endl; + } + else + { + try + { + float result = 0; + if (strcmp(operation, "add") == 0) + { + result = calcService->add(arg1, arg2); + cout << "Calculator: add(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "sub") == 0) + { + result = calcService->sub(arg1, arg2); + cout << "Calculator: sub(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "mul") == 0) + { + result = calcService->mul(arg1, arg2); + cout << "Calculator: mul(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "div") == 0) + { + result = calcService->div(arg1, arg2); + cout << "Calculator: div(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + { + cout << "Calculator: Unrecognized operation: " << operation << endl; + } + } + catch (char* x) + { + cout << "Calc.exe: exception caught: " << x << endl; + } + } + + } + catch (ServiceRuntimeException& ex) + { + cout << ex << endl; + } + return 0; +} + +void usage() +{ + cout << "Usage: calc add|sub|mul|div arg1 arg2" << endl; + exit(1); +} + +bool IsNumber (const char *p) +{ + int len = strlen(p); + for (int i = 0; i < len; i++) + { + if (!isdigit (p[i])) + { + return false; + } + } + return true; +} diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h new file mode 100644 index 0000000000..9284178d5f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h @@ -0,0 +1,33 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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 CALCULATOR_H +#define CALCULATOR_H +class Calculator +{ +public: + virtual float add(float arg1, float arg2) = 0; + virtual float sub(float arg1, float arg2) = 0; + virtual float mul(float arg1, float arg2) = 0; + virtual float div(float arg1, float arg2) = 0; +}; + +#endif + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp new file mode 100644 index 0000000000..75a19ae815 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp @@ -0,0 +1,108 @@ +# Microsoft Developer Studio Project File - Name="Client" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Client - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Client.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Client.mak" CFG="Client - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Client - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Client - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Client - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "Client - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" + +!ENDIF + +# Begin Target + +# Name "Client - Win32 Release" +# Name "Client - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Calc.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Calculator.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# End Target +# End Project diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg new file mode 100644 index 0000000000..0f33cc8711 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg @@ -0,0 +1,16 @@ + + +
+

Build Log

+

+--------------------Configuration: Client - Win32 Debug-------------------- +

+

Command Lines

+ + + +

Results

+Client.exe - 0 error(s), 0 warning(s) +
+ + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile new file mode 100644 index 0000000000..4fed2ace08 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile @@ -0,0 +1,43 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ROOT := .. + +-include $(ROOT)/makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include $(SUBDIRS:%=%/subdir.mk) +-include objects.mk +ifneq ($(strip $(DEPS)),) +-include $(DEPS) +endif + +-include $(ROOT)/makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: CalculatorClient + +# Tool invocations +CalculatorClient: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: GCC C++ Linker' + @echo g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) + @g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(DEPS)$(EXECUTABLES) CalculatorClient + -@echo ' ' + +.PHONY: all clean dependents +.SECONDARY: + +-include $(ROOT)/makefile.targets diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk new file mode 100644 index 0000000000..a6aa648eba --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk @@ -0,0 +1,7 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +LIBS := -ltuscany_sca -ltuscany_sdo -lxml2 -laxis_clientC -laxis_client + +USER_OBJS := \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk new file mode 100644 index 0000000000..3c384d3f72 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk @@ -0,0 +1,20 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +C_UPPER_SRCS := +CPP_SRCS := +O_SRCS := +ASM_SRCS := +S_SRCS := +CXX_SRCS := +CC_SRCS := +OBJ_SRCS := +OBJS := +DEPS := +EXECUTABLES := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +. \ + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk new file mode 100644 index 0000000000..3328b2862f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk @@ -0,0 +1,29 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(ROOT)/Calc.cpp + +OBJS += \ +./Calc.o + +DEPS += \ +${addprefix ./, \ +Calc.d \ +} + + +# Each subdirectory must supply rules for building sources it contributes +%.o: $(ROOT)/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< + @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ + echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ + g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt new file mode 100644 index 0000000000..615f1533b1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt @@ -0,0 +1,53 @@ +Tuscany SCA for C++ Samples - Calculator Sample +=============================================== + +This is a very simple sample to show how an SCA module with a single component +can be built and called from an executable. + +There are three sub projects in this workspace: + - CalculatorModule + This contains the source code and SCA artifacts for the SCA module. This + is the module that will be deployed into the SCA runtime. + - CalculatorSubsystem + This contains the sca.subsystem file which describes a subsystem to the + SCA runtime. + - Client + An example client which will call the service exposed by the single component + in the CalculatorModule. + + +Build instructions +------------------ + +1) Build the SCA module. + - Set CalculatorModule project as the active project. + Right click->Set as active project + + - Run the SCA generation tool to create the proxy and wrapper classes. + Either Tools->SCA Gen if you have added SCA Gen as an external tool + Or run from the command line: + scagen -dir -output + where the projectDirectory is the directory with the sca.module file. + + - Rebuild All + Build->Rebuild All + +2) Package and deploy the SCA module + - There is a script file in the sca/samples/Calculator directory which will + copy across all the files needed for deployment to the Tuscany runtime. + On a command line run pack_deploy.cmd + As a default, the sample will be copied to sca/samples/runtime directory + Both the SCA module and the subsystem will be copied. + +3) Build the client + - Set the Client project as the active project. + Right click->Set as active project + + - Rebuild All + Build->Rebuild All + +4) Run the client + - Use the command file in the sca/samples/Calculator/Client directory to run the + client. This command file will set the SCA environment variables before running + the client. For example, + runclient add 4 9 diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd new file mode 100644 index 0000000000..8aa6f24f65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd @@ -0,0 +1,14 @@ +@echo off +rem Runs the client after setting the SCA environment variables to use the +rem CalculatorSubsystem +setlocal +set SCA4CPP_SYSTEM_ROOT=%~d0%~p0\..\..\runtime + +rem Only need to specify the subsystem (and not the moduleComponent as well) because +rem there is only one moduleComponent in the subsystem - it is a very simple sample. +set SCA4CPP_DEFAULT_MODULE=CalculatorSubsystem + +rem Run the client +%~d0%~p0\debug\Client.exe %* + +endlocal \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/build.sh b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/build.sh new file mode 100755 index 0000000000..3e2dbcb0bc --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/build.sh @@ -0,0 +1,75 @@ +#!/bin/sh + +# 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. + +APFULLDIR=`pwd` + +export SCA4CPP_HOME="$APFULLDIR/../../" + +if [ x$SCA4CPP = x ]; then +export SCA4CPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$SDO4CPP = x ]; then +echo "SDO4CPP not set" +export SDO4CPP=$SCA4CPP_HOME/../sdo +fi +echo "Using SDO installed at $SDO4CPP" + +TEST_ROOT=$APFULLDIR + +cd $SCA4CPP/bin +./scagen.sh -dir $TEST_ROOT/CalculatorModule -output $TEST_ROOT/CalculatorModule +cd $TEST_ROOT/CalculatorModule/Debug +make clean +make + +cd $TEST_ROOT/Client/Debug +make clean +make + +TEST_SYSTEM=$TEST_ROOT/../runtime + +mkdir -p $TEST_SYSTEM/modules/CalculatorModule +mkdir -p $TEST_SYSTEM/subsystems/CalculatorSubsystem + +cp $TEST_ROOT/CalculatorModule/sca.module.lin $TEST_SYSTEM/modules/CalculatorModule/sca.module +cp $TEST_ROOT/CalculatorModule/*.componentType $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorModule/Calculator.h $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorModule/CalculatorImpl.h $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorModule/Debug/libCalculatorModule.so $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorSubsystem/sca.subsystem $TEST_SYSTEM/subsystems/CalculatorSubsystem + +export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP=$SCA4CPP +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM +export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem + +cd $TEST_ROOT/Client +Debug/CalculatorClient add 4 9 diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd new file mode 100644 index 0000000000..eed6af8411 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd @@ -0,0 +1,27 @@ +@echo off +rem Will copy the correct files from the source tree for packaging and deployment of the +rem SCA sample. +setlocal +set sourcePath=%~d0%~p0 +if . == %1. ( +set destinationPath=%sourcePath%..\runtime +) ELSE ( +set destinationPath=%1 +) + +mkdir %destinationPath%\modules +mkdir %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule + +copy %sourcePath%\CalculatorModule\debug\CalculatorModule.dll %destinationPath%\modules\CalculatorModule + + +mkdir %destinationPath%\subsystems +mkdir %destinationPath%\subsystems\CalculatorSubsystem +copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem + + +endlocal \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/runclient.sh b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/runclient.sh new file mode 100755 index 0000000000..b16ec76414 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Calculator/runclient.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# 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. + +APFULLDIR=`pwd` +export SCA4CPP_HOME="$APFULLDIR/../../" + +if [ x$SCA4CPP = x ]; then +export SCA4CPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$SDO4CPP = x ]; then +echo "SDO4CPP not set" +export SDO4CPP=$SCA4CPP_HOME/../sdo +fi +echo "Using SDO installed at $SDO4CPP" + +TEST_ROOT=$APFULLDIR +TEST_SYSTEM=$TEST_ROOT/../runtime + +export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP=$SCA4CPP +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM +export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem + +cd $TEST_ROOT/Client +Debug/CalculatorClient add 4 9 diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/samples/Makefile.am new file mode 100644 index 0000000000..8cd2985ea1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = MyValue diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am new file mode 100644 index 0000000000..e404f8f077 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am @@ -0,0 +1,13 @@ +prgbindir=$(prefix)/samples/bin +prgbin_PROGRAMS = MyValueClient + +MyValueClient_SOURCES = MyValueClient.cpp + +MyValueClient_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ + -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ + -L$(AXISCPP_DEPLOY)/lib -laxis_client -lxml2 + +INCLUDES = -I.. \ + -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include \ + -I${AXISCPP_DEPLOY}/include diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp new file mode 100755 index 0000000000..9c5c24486a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp @@ -0,0 +1,180 @@ +/* + * + * 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. + */ +#pragma warning(disable: 4786) + +#include "commonj/sdo/Logger.h" +#include "commonj/sdo/SDO.h" +#include "commonj/sdo/HelperProvider.h" +#include "osoa/sca/sca.h" +#include "tuscany/sca/util/Logger.h" +#include "tuscany/sca/util/Utils.h" +#include "tuscany/sca/ws/SDOStub.h" +#include + +using namespace std; +using namespace osoa::sca; +using namespace tuscany::sca; +using namespace commonj::sdo; +using namespace tuscany::sca::ws; + +void usage(); + +// +// MyValueClient is a sample application that invokes operations on the +// MyValueService Web Service. +// +int main(int argc, char* argv[]) +{ + + // + // Schema file for the types used by MyValueService + // + char *pszXSD; + + // + // The WebService endpoint uri. + // + char *pszEndpoint; + + // + // TargetNamespace + // + const char *pszTargetNamespace; + + // + // SOAPAction + // + // Axis 1.5: SoapAction must be #. + const char *pcszSoapAction = "MyValueService#getMyValue"; + + // + // Operation Name + // + const char *pcszOperationName = "getMyValue"; + + // + // Operation Response Name + // + const char *pcszOperationResponseName = "getMyValueResponse"; + + + // Get the input parameters. + if (argc == 3) + { + // Schema file. + pszXSD = argv[1]; + // Web Service endpoint. + pszEndpoint = argv[2]; + } + else + { + usage(); + } + + // The current version of SDO does not support the embedded schema in the wsdl file, + // so we have to load an external schema. + XSDHelperPtr xsdHelper = HelperProvider::getXSDHelper(); + + try + { + cout << "define file: " << pszXSD <defineFile(pszXSD); + } + catch (SDORuntimeException ex) + { + cout << ex << endl; + exit(1); + } + cout << "define file done: " << pszTargetNamespace <getDataFactory(); + DataObjectPtr requestDO = 0; + + try + { + // Create the root element for the operation and then add the parameters + // we need to invoke the operation. + requestDO = factory->create(pszTargetNamespace, pcszOperationName); + requestDO->setCString("customerID", "12345"); + } + catch (SDORuntimeException e) + { + cout << "SDORuntimeException: " << e << endl; + exit(1); + } + + // + // Create an SDOStub that will use the request SDO to invoke the operation. + // + SDOStub *stub = new SDOStub(); + stub->setEndpoint(pszEndpoint); + stub->setOperationName(pcszOperationName); + stub->setTargetNamespace(pszTargetNamespace); + stub->setOperationResponseName(pcszOperationResponseName); + stub->setSoapAction(pcszSoapAction); + // DEBUG - Don't let the soap transport timeout while debugging. + stub->setTransportTimeout(0); + // DEBUG + + try + { + // Invoke the operation. + DataObjectPtr responseDO = stub->invoke(requestDO, factory); + // Print the response. + if (responseDO != 0) + { + cout << "MyValueClient: response DataObject = " << endl; + Utils::printDO(responseDO); + cout << endl; + float fValue = responseDO->getFloat("myValue"); + cout << "MyValueClient: myValue = " << fValue; + } + else + { + cout << "MyValueClient: MyValueService did not return a result" << endl; + } + } + catch (SDORuntimeException& e) + { + cout << "SDORuntimeException: " << e << endl; + } + catch (ServiceRuntimeException& e) + { + cout << "ServiceRuntimeException: " << e << endl; + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + + return 0; +} + +// +// Print usage message. +// +void usage() +{ + cout << "MyValueClient.exe: Invoke operations on MyValueService Web Service" << endl; + cout << "Usage: MyValueClient XSD endpoint" << endl; + cout << "where XSD = path and name of XSD file that defines the MyValue types" << endl; + cout << " endpoint = web service endpoint" << endl; + exit(1); +} diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Makefile.am b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Makefile.am new file mode 100644 index 0000000000..7541093280 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/Makefile.am @@ -0,0 +1,23 @@ +SUBDIRS = MyValueModule Client + +deploy_dir = $(top_builddir)/samples/runtime +deploy_module = $(deploy_dir)/modules/MyValueModule + +install-exec-local: + cp MyValueSubsystem/sca.subsystem $(deploy_dir)/subsystems/MyValueSubsystem + cp MyValueModule/sca.module $(deploy_module) + cp MyValueModule/CustomerInfo.fragment $(deploy_module) + cp MyValueModule/Tuscany-model.config $(deploy_module) + cp MyValueModule/CustomerInfo/CustomerInfoImpl.componentType $(deploy_module)/CustomerInfo + cp MyValueModule/CustomerInfo/.libs/libCustomerInfo.so $(deploy_module)/CustomerInfo + cp MyValueModule/CustomerInfo/CustomerInfo.h $(deploy_module)/CustomerInfo + cp MyValueModule/CustomerInfo/CustomerInfoImpl.h $(deploy_module)/CustomerInfo + cp MyValueModule/MyValue/MyValueImpl.componentType $(deploy_module)/MyValue + cp MyValueModule/MyValue/MyValue.h $(deploy_module)/MyValue + cp MyValueModule/MyValue/MyValueImpl.h $(deploy_module)/MyValue + cp MyValueModule/MyValue/MyValueService.wsdl $(deploy_module)/MyValue + cp MyValueModule/MyValue/.libs/libMyValue.so $(deploy_module)/MyValue + cp MyValueModule/StockQuoteService/StockQuoteService.h $(deploy_module)/StockQuoteService + cp MyValueModule/StockQuoteService/StockQuoteService.wsdl $(deploy_module)/StockQuoteService + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment new file mode 100755 index 0000000000..b7f79799b5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment @@ -0,0 +1,36 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h new file mode 100755 index 0000000000..766fc55fe6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h @@ -0,0 +1,30 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date$ */ + +#ifndef CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformation(const char* customerID) = 0; + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType new file mode 100755 index 0000000000..52988cb90a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp new file mode 100755 index 0000000000..ed3ff5e2ff --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp @@ -0,0 +1,79 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date$ */ + +#include "CustomerInfoImpl.h" +#include +#include +#include "osoa/sca/sca.h" +#include "commonj/sdo/DataObjectInstance.h" +using namespace osoa::sca; +using namespace commonj::sdo; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CustomerInfoImpl::CustomerInfoImpl() +{ + cout << "Construct CustomerInfoImpl" << endl; + +} + +CustomerInfoImpl::~CustomerInfoImpl() +{ + cout << "Destroy CustomerInfoImpl" << endl; +} + +////////////////////////////////////////////////////////////////////// +// Other methods +////////////////////////////////////////////////////////////////////// +const char* CustomerInfoImpl::getCustomerInformation(const char* customerID) +{ + cout << "In getCustomerInformation with customerid: " << customerID << endl; + + + + ComponentContext myContext = ComponentContext::getCurrent(); + + DataObjectInstance properties = myContext.getProperties(); + DataObjectInstance props2 = properties; + if (properties) + { + const char* fredVal = properties->getCString("Fred"); + cout << "Property Fred value: " << fredVal <getList("Joe"); + for (int i=0; i + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp new file mode 100755 index 0000000000..4a2d64ea6d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp @@ -0,0 +1,143 @@ +/* + * + * 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. + */ + +// +// MyValueImpl.cpp: implementation of the MyValueImpl class. +// + +#include "commonj/sdo/HelperProvider.h" +#include "commonj/sdo/SDO.h" +#include "osoa/sca/sca.h" +#include "MyValueImpl.h" +#include "CustomerInfo/CustomerInfo.h" +#include "StockQuoteService/StockQuoteService.h" +#include + +using namespace std; +using namespace osoa::sca; +using namespace commonj::sdo; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +MyValueImpl::MyValueImpl() +{ + cout << "Construct MyValueImpl" << endl; + +} + +MyValueImpl::~MyValueImpl() +{ + cout << "Destroy MyValueImpl" << endl; +} + +////////////////////////////////////////////////////////////////////// +// Other methods +////////////////////////////////////////////////////////////////////// +DataObjectPtr MyValueImpl::getMyValue(DataObjectPtr inDataObject) +{ + DataObjectPtr responseDO = 0; + + string customerID = inDataObject->getCString("customerID"); + cout << "In getMyValue with customerid: " << customerID << endl; + + // Get the CustomerInfo service. + ComponentContext myContext = ComponentContext::getCurrent(); + CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo"); + + if (customerInfoService == 0) + { + cout << "Unable to find customer info service" << endl; + + return responseDO; + } + + // Get the name of the stock for customer 'customerID' from the customerInfoService. + const char * stock; + try + { + stock = customerInfoService->getCustomerInformation(customerID.c_str()); + } + catch(const char* x) + { + cout << "Exception caught: " << x <getCustomerInformation(customerID.c_str()); + cout << "Stock from getServices " << i << " : " << stock <create("http://swanandmokashi.com", "GetQuotes"); + stockQuoteRequestDO->setCString("QuoteTicker", stock); + + // Invoke the StockQuoteService + DataObjectPtr stockQuoteResponseDO = stockQuoteService->GetStockQuotes(stockQuoteRequestDO); + + // DEBUG (Print the response from the StockQuoteService) + XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(factory);; + XMLDocumentPtr responseDoc = + xmlHelper->createDocument(stockQuoteResponseDO, "http://swanandmokashi.com", "GetQuotesResponse"); + responseDoc->setXMLDeclaration(false); + char *responseXML = xmlHelper->save(responseDoc); + cout << "Response XML from StockQuoteService = " << endl; + cout << responseXML << endl; + cout << endl; + // DEBUG + + // Create the MyValueService response DataObject using the results of the StockQuoteService. + responseDO = factory->create("http://www.myvalue.org/MyValueService/", "getMyValueResponse"); + DataObjectPtr getQuotesResultDO = stockQuoteResponseDO->getDataObject("GetQuotesResult"); + DataObjectList& quoteList = getQuotesResultDO->getList("Quote"); + float fQuote = quoteList[0]->getFloat("StockQuote"); + + responseDO->setFloat("myValue", fQuote); + } + catch (SDORuntimeException sdoE) + { + cout << sdoE; + } + + return responseDO; + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h new file mode 100755 index 0000000000..05aa7066c1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h @@ -0,0 +1,32 @@ +/* + * + * 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 MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual DataObjectPtr getMyValue(DataObjectPtr inDataObject); +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl new file mode 100755 index 0000000000..3bc1a12d5c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd new file mode 100755 index 0000000000..4a1674f89d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h new file mode 100755 index 0000000000..7da4069bd1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h @@ -0,0 +1,32 @@ +/* + * + * 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. + */ + +/* $Rev$ $Date$ */ + +#ifndef StockQuoteService_h +#define StockQuoteService_h +#include +#include "commonj/sdo/SDO.h" +using std::string; +class StockQuoteService +{ +public: + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; + +}; + +#endif // StockQuoteService_h diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl new file mode 100755 index 0000000000..4917cde583 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config new file mode 100755 index 0000000000..2667f62990 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config @@ -0,0 +1,25 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module new file mode 100755 index 0000000000..bda42e04bc --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module @@ -0,0 +1,51 @@ + + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem new file mode 100755 index 0000000000..ae858ea331 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem @@ -0,0 +1,27 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh new file mode 100755 index 0000000000..e5feeda1f0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# 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. + + +APFULLDIR=`pwd` + +export SCA4CPP_HOME="$APFULLDIR" +if [ x$SCA4CPP = x ]; then +export TUSCANY_SCACPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP_HOME" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$TUSCANY_SDOCPP = x ]; then +echo "TUSCANY_SDOCPP not set"exit; +fi +echo "Using SDO installed at $TUSCANY_SDOCPP" + +TEST_ROOT=$SCA4CPP_HOME/runtime/core/test + +export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT/testSCASystem +export TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1 + +cd $TUSCANY_SCACPP/bin/test +./tuscany_sca_test diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/server.wsdd b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/server.wsdd new file mode 100755 index 0000000000..8b80b4b6ec --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/MyValue/server.wsdd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem b/sca-cpp/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem new file mode 100755 index 0000000000..ae858ea331 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem @@ -0,0 +1,27 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/scatest.sh b/sca-cpp/tags/cpp-sca-20060405/scatest.sh new file mode 100755 index 0000000000..62bf992bbc --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/scatest.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# 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. + + +APFULLDIR=`pwd` + +export SCA4CPP_HOME="$APFULLDIR" +if [ x$SCA4CPP = x ]; then +export TUSCANY_SCACPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP_HOME" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$TUSCANY_SDOCPP = x ]; then +echo "TUSCANY_SDOCPP not set"exit; +fi +echo "Using SDO installed at $TUSCANY_SDOCPP" + +TEST_ROOT=$SCA4CPP_HOME/runtime/core/test + +export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT +export TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1 + +cd $TUSCANY_SCACPP/bin/test +./tuscany_sca_test diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/build.xml b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/build.xml new file mode 100644 index 0000000000..5207b6cc79 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/build.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SCA for C++ Tools]]> + + + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html new file mode 100644 index 0000000000..1eb0408cef --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html @@ -0,0 +1,84 @@ + + + + + + +All Classes (SCA for C++ Tools) + + + + + + + + + + +All Classes +
+ + + + + +
BodyPart +
+CParsingTool +
+ComponentDomNodeHandler +
+ComponentTypeFileHandler +
+Configuration +
+DirectoryScanner +
+DirectoryTree +
+DomHandler +
+DomNodeHandler +
+FileActor +
+FilePart +
+GenericDomNodeHandler +
+Headers +
+InputCppSourceCode +
+LittleClass +
+MethodPart +
+ModuleOrFragmentFileHandler +
+Options +
+Parameter +
+ParsingException +
+PrototypePart +
+ReferenceDomNodeHandler +
+Scagen +
+ServiceDomNodeHandler +
+ServicesGenerator +
+Signature +
+Utils +
+XMLFileActor +
+
+ + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html new file mode 100644 index 0000000000..fdbfa13e1c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html @@ -0,0 +1,84 @@ + + + + + + +All Classes (SCA for C++ Tools) + + + + + + + + + + +All Classes +
+ + + + + +
BodyPart +
+CParsingTool +
+ComponentDomNodeHandler +
+ComponentTypeFileHandler +
+Configuration +
+DirectoryScanner +
+DirectoryTree +
+DomHandler +
+DomNodeHandler +
+FileActor +
+FilePart +
+GenericDomNodeHandler +
+Headers +
+InputCppSourceCode +
+LittleClass +
+MethodPart +
+ModuleOrFragmentFileHandler +
+Options +
+Parameter +
+ParsingException +
+PrototypePart +
+ReferenceDomNodeHandler +
+Scagen +
+ServiceDomNodeHandler +
+ServicesGenerator +
+Signature +
+Utils +
+XMLFileActor +
+
+ + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html new file mode 100644 index 0000000000..e9b450cd20 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html @@ -0,0 +1,305 @@ + + + + + + +Constant Field Values (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + + + + + + +
+org.apache.*
+ +

+ + + + + + + + + + + + + + + + + + + + + + +
org.apache.tuscany.sca.cpp.tools.common.BodyPart
+public static final intCATCH2
+public static final intRETURN1
+public static final intTRAILING0
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.apache.tuscany.sca.cpp.tools.common.FilePart
+public static final intBEGINSCOPE4
+public static final intCLASSATTRIBUTE9
+public static final intCOMMENT1
+public static final intDIRECTIVE6
+public static final intENDSCOPE5
+public static final intENUM10
+public static final intFIELD3
+public static final intMACRO8
+public static final intMETHOD2
+public static final intPROTOTYPE11
+public static final intTYPEDEF12
+public static final intUNKNOWN0
+public static final intWHITESPACE7
+ +

+ +

+ + + + + + + + + + + + +
org.apache.tuscany.sca.cpp.tools.common.Utils
+public static final java.lang.Stringwhitespace" \t\r\n"
+ +

+ +

+ + + + + + + + + + + + +
org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
+public static final intELEMENT1
+ +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html new file mode 100644 index 0000000000..9063a7fff9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html @@ -0,0 +1,138 @@ + + + + + + +Deprecated List (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Deprecated API

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html new file mode 100644 index 0000000000..5a4302b221 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html @@ -0,0 +1,197 @@ + + + + + + +API Help (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Overview

+
+ +

+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    +
  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors
+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description +

    +

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary +

    +

  • Field Detail
  • Constructor Detail
  • Method Detail
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+

+Use

+
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    +
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html new file mode 100644 index 0000000000..dab7cf9cd3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html @@ -0,0 +1,701 @@ + + + + + + +Index (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +A B C D E F G H I L M O P Q R S T U V W X
+

+A

+
+
actOnFile(File, File, int) - +Method in interface org.apache.tuscany.sca.cpp.tools.common.FileActor +
  +
actOnFile(File, File, int) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
actOnFile(File, File, int) - +Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
This method is the main FileActor method +
+
+

+B

+
+
BEGINSCOPE - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
BodyPart - class org.apache.tuscany.sca.cpp.tools.common.BodyPart.
A snippet of C or C++ source code.
+
+

+C

+
+
CATCH - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
CLASSATTRIBUTE - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
COMMENT - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
CParsingTool - class org.apache.tuscany.sca.cpp.tools.common.CParsingTool.
The superclass of tools that parse C/C++ code.
CParsingTool(String[]) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
  +
ComponentDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler.
This class will do the required processing for the element of a + sca module or fragment file.
ComponentDomNodeHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler +
  +
ComponentTypeFileHandler - class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler.
The purpose of this class is to specialise the map of XML element handlers + for a XXX.componentType file that is used by the XMLFileActor
ComponentTypeFileHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler +
  +
Configuration - class org.apache.tuscany.sca.cpp.tools.common.Configuration.
Encapsulates the tool's configuration file
cPrimitives - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.Utils +
  +
cTypeQualifiers - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.Utils +
  +
checkFile(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
Checks the source directory looks good. +
classExcluded(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
cppsource - +Variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
createDomFromXMLFile(File) - +Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
This method builds an in memory DOM from an XML file +
+
+

+D

+
+
DIRECTIVE - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
DirectoryScanner - class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner.
 
DirectoryScanner(FileActor, Set) - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner +
  +
DirectoryTree - class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree.
 
DirectoryTree(FileActor, Set) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree +
  +
DomHandler - class org.apache.tuscany.sca.cpp.tools.services.DomHandler.
The purpose of this class it to provide a generic class that can handle both + a DOM and a DOM node.
DomHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.DomHandler +
  +
DomNodeHandler - interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler.
 
+
+

+E

+
+
ELEMENT - +Static variable in interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler +
  +
ENDSCOPE - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
ENUM - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
equals(Object) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
For two parameters to match their types must match or both be null, but + the parameters names don't have to match. +
equals(Object) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
+
+

+F

+
+
FIELD - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
FileActor - interface org.apache.tuscany.sca.cpp.tools.common.FileActor.
DirectoryTree calls this interface to allow implementations of this interface + to act on a file in the directory tree.
FilePart - class org.apache.tuscany.sca.cpp.tools.common.FilePart.
A piece of C++ source code
failed - +Variable in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
  +
failed() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
failed() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
failed() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
failed - +Variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
  +
fileExcluded(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
+
+

+G

+
+
GenericDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler.
 
GenericDomNodeHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler +
  +
getAllMethods() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
Tuscany change - a method to get all the method signatures at once +
getAttributes() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getBodyParts() - +Method in class org.apache.tuscany.sca.cpp.tools.common.MethodPart +
Returns the method body as code snippets, each ending with a place where + a trace statement belongs. +
getCaughtValue() - +Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
getClassName() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getCodeFragment() - +Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
getConfigured(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
getFilesActedOn() - +Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
  +
getMethodName() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getMethods(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
getName() - +Method in class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode +
  +
getName() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
getNamespace() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getOption(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Options +
  +
getOriginal() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getOriginalSignature() - +Method in class org.apache.tuscany.sca.cpp.tools.common.MethodPart +
  +
getParameter(String, Object) - +Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
Get a parameter +
getParameters() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getPartIterator() - +Method in class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode +
  +
getReturnType() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getReturnValue() - +Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
getScope() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getSignature() - +Method in class org.apache.tuscany.sca.cpp.tools.common.MethodPart +
  +
getSignature() - +Method in class org.apache.tuscany.sca.cpp.tools.common.PrototypePart +
  +
getTrimClassName() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
getType() - +Method in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
getType() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
getTypeWithoutConst() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
+
+

+H

+
+
Headers - class org.apache.tuscany.sca.cpp.tools.common.Headers.
 
Headers() - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
handleChildElements(Node, String, Map, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler +
This method will iterate through the DOM node's children and call the + appropriate handler for each one. +
handleComponentTypeFile(File, File) - +Method in class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler +
This method just exists to add the default starting depth of 1 to the + underlying actOnFile interface +
handleDom(Document, Map, Map) - +Static method in class org.apache.tuscany.sca.cpp.tools.services.DomHandler +
This method will run through the initial level of the DOM using the + handlers map +
handleInterfaceHeader(Map, boolean) - +Static method in class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator +
  +
handleNode(Node, String, Map, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler +
This method will do the "normal" processing and then trigger a call to + processComponentNode. +
handleNode(Node, String, Map, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.DomHandler +
  +
handleNode(Node, String, Map, Map) - +Method in interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler +
An interface for classes that can process DOM nodes. +
handleNode(Node, String, Map, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler +
This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node. +
handleNode(Node, String, Map, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler +
  +
handleNode(Node, String, Map, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler +
  +
handlers - +Static variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
  +
headers - +Variable in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
  +
+
+

+I

+
+
InputCppSourceCode - class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode.
 
InputCppSourceCode(BufferedReader, String) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode +
  +
initialise(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
Reads in the configuration file +
isAttribute(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
isCatch() - +Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
isClassName(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
isConstructor() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
isDefine(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
isDestructor() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
isDotDotDot() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
isInstanceMethod(Signature) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
isMacro(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
isReturn() - +Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
isStaticMethod(Signature) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Headers +
  +
isTrailing() - +Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
isVoid() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
iterator() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
+
+

+L

+
+
LittleClass - class org.apache.tuscany.sca.cpp.tools.services.LittleClass.
This class is just a convenient application class that is loaded in order to + get the application class loader.
LittleClass() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.LittleClass +
  +
+
+

+M

+
+
MACRO - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
METHOD - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
MODULE_EXTENSIONS - +Static variable in class org.apache.tuscany.sca.cpp.tools.services.Scagen +
  +
MethodPart - class org.apache.tuscany.sca.cpp.tools.common.MethodPart.
A C or C++ method from a piece of source code.
ModuleOrFragmentFileHandler - class org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler.
The purpose of this class is purely to specialise the handler map to one with + a specific ComponentDomNodeHandler.
ModuleOrFragmentFileHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler +
  +
main(String[]) - +Static method in class org.apache.tuscany.sca.cpp.tools.services.Scagen +
Take a directory scanning class and create a vistor that knows how to + handle any sca.module or .fragment that the scanner comes across. +
mapNodeToHandlerAndHandle(Node, String, Map, Map) - +Static method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler +
This method will resolve any registered handler for a particular DOM + element and call the handleNode method on it. +
maybeAppendSeparator(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree +
  +
maybeCreateDirectory(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
Checks the target directory and creates it if it doesn't already exist. +
methodExcluded(String, String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration +
  +
+
+

+O

+
+
Options - class org.apache.tuscany.sca.cpp.tools.common.Options.
Command line options passed to a tool's main program.
org.apache.tuscany.sca.cpp.tools.common - package org.apache.tuscany.sca.cpp.tools.common
+ +
org.apache.tuscany.sca.cpp.tools.services - package org.apache.tuscany.sca.cpp.tools.services
+ +
originalLength() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
outputDebugString(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils +
  +
+
+

+P

+
+
PROTOTYPE - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
Parameter - class org.apache.tuscany.sca.cpp.tools.common.Parameter.
A parameter from a method signature.
ParsingException - exception org.apache.tuscany.sca.cpp.tools.common.ParsingException.
 
ParsingException() - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException +
  +
ParsingException(String) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException +
  +
ParsingException(String, Throwable) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException +
  +
ParsingException(Throwable) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException +
  +
PrototypePart - class org.apache.tuscany.sca.cpp.tools.common.PrototypePart.
A function prototype in an include file and possibly in a class definition.
PrototypePart(String, String, String) - +Constructor for class org.apache.tuscany.sca.cpp.tools.common.PrototypePart +
  +
parameters - +Static variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
  +
preparseHeaders(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
Read in any include files before the main processing of the tool is done. +
printUsage() - +Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool +
  +
printUsage() - +Method in class org.apache.tuscany.sca.cpp.tools.services.Scagen +
Provide a hint to the user on how to call this class +
+
+

+Q

+
+
quiet() - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Options +
  +
+
+

+R

+
+
RETURN - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
ReferenceDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler.
The purpose of this class is to process a element in a + componentType file and then trigger a call to the method in ServicesGenerator + to process the interface header file
ReferenceDomNodeHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler +
  +
rude(String, String, int, String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils +
Failed to parse the source code for some reason. +
rude(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils +
This method reports an error level problem +
+
+

+S

+
+
Scagen - class org.apache.tuscany.sca.cpp.tools.services.Scagen.
This is the main top level class.
Scagen(String[]) - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.Scagen +
  +
ServiceDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler.
 
ServiceDomNodeHandler() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler +
  +
ServicesGenerator - class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator.
This class is the main class that handles the function that parses a C++ + interface header file into a DOM that holds all the semantic information + about the interface - method names, parameters and return values.
ServicesGenerator(String[]) - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator +
  +
Signature - class org.apache.tuscany.sca.cpp.tools.common.Signature.
A C or C++ method signature with the ability to parse it.
safeEquals(Object, Object) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils +
A better method than .equals() because it doesn't NullPointerException + when one of the parameters is null. +
screenMessage(String) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils +
This method reports an error level problem +
set(String[]) - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Options +
Initialises the options based on the args passed to main +
setNamespace(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
setParameter(String, Object) - +Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
Set a parameter +
setScope(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.PrototypePart +
  +
setScope(String) - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
Sets the scope, but only if the scope is not set by an explicit attribute + in the signature. +
+
+

+T

+
+
TRAILING - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.BodyPart +
  +
TYPEDEF - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
toString() - +Method in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
toString() - +Method in class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode +
  +
toString() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter +
  +
toString() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
toStringWithoutAttrs() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
  +
traceable() - +Method in class org.apache.tuscany.sca.cpp.tools.common.Signature +
Should this method be traced? +
transferAttrsToParameters(Node, String, Map) - +Method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler +
This method parses the DOM attributes into name value pairs in the + parameter map each valued keyed by its XPath. +
transformerFactory - +Static variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
  +
type - +Variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
+
+

+U

+
+
UNKNOWN - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
Utils - class org.apache.tuscany.sca.cpp.tools.common.Utils.
Static utility methods.
+
+

+V

+
+
verbose() - +Static method in class org.apache.tuscany.sca.cpp.tools.common.Options +
  +
+
+

+W

+
+
WHITESPACE - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart +
  +
walkTree(File, File, int) - +Method in class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree +
Starts adding trace into the given file. +
walkTree(File, File, int) - +Method in class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner +
  +
whitespace - +Static variable in class org.apache.tuscany.sca.cpp.tools.common.Utils +
  +
+
+

+X

+
+
XMLFileActor - class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor.
The purpose of this abstract class is to provide a home for the standard + processing that is involved in turning a XML file into an internal DOM.
XMLFileActor() - +Constructor for class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor +
  +
+
+A B C D E F G H I L M O P Q R S T U V W X + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html new file mode 100644 index 0000000000..6595eb4eac --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html @@ -0,0 +1,26 @@ + + + + + + +SCA for C++ Tools + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html new file mode 100644 index 0000000000..88b29695e0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html @@ -0,0 +1,396 @@ + + + + + + +BodyPart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class BodyPart

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.BodyPart
+
+
+
+
public class BodyPart
extends java.lang.Object
+ +

+A snippet of C or C++ source code. If this snippet ends with a return + statement, this body part also contains the return value. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intCATCH + +
+           
+static intRETURN + +
+           
+static intTRAILING + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ ParametergetCaughtValue() + +
+           
+ java.lang.StringgetCodeFragment() + +
+           
+ java.lang.StringgetReturnValue() + +
+           
+ booleanisCatch() + +
+           
+ booleanisReturn() + +
+           
+ booleanisTrailing() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+TRAILING

+
+public static final int TRAILING
+
+
+
See Also:
Constant Field Values
+
+
+ +

+RETURN

+
+public static final int RETURN
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CATCH

+
+public static final int CATCH
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + + + + +
+Method Detail
+ +

+getCodeFragment

+
+public java.lang.String getCodeFragment()
+
+
+
+
+
+
+ +

+isTrailing

+
+public boolean isTrailing()
+
+
+
+
+
+
+ +

+isReturn

+
+public boolean isReturn()
+
+
+
+
+
+
+ +

+isCatch

+
+public boolean isCatch()
+
+
+
+
+
+
+ +

+getReturnValue

+
+public java.lang.String getReturnValue()
+
+
+
+
+
+
+ +

+getCaughtValue

+
+public Parameter getCaughtValue()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html new file mode 100644 index 0000000000..f688955d94 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html @@ -0,0 +1,389 @@ + + + + + + +CParsingTool (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class CParsingTool

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.CParsingTool
+
+
+
Direct Known Subclasses:
Scagen, ServicesGenerator
+
+
+
+
public class CParsingTool
extends java.lang.Object
+ +

+The superclass of tools that parse C/C++ code. This CParsingTool provides + some useful common methods. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  booleanfailed + +
+           
+protected  Headersheaders + +
+           
+  + + + + + + + + + + + +
+Constructor Summary
+protected CParsingTool(java.lang.String[] args) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.io.FilecheckFile(java.lang.String option) + +
+          Checks the source directory looks good.
+protected  java.io.FilemaybeCreateDirectory(java.lang.String option) + +
+          Checks the target directory and creates it if it doesn't already exist.
+protected  HeaderspreparseHeaders(java.lang.String option) + +
+          Read in any include files before the main processing of the tool is done.
+protected  voidprintUsage() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+failed

+
+protected boolean failed
+
+
+
+
+
+ +

+headers

+
+protected Headers headers
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+CParsingTool

+
+protected CParsingTool(java.lang.String[] args)
+                throws java.lang.Exception
+
+
+ + + + + + + + +
+Method Detail
+ +

+preparseHeaders

+
+protected Headers preparseHeaders(java.lang.String option)
+                           throws java.lang.Exception
+
+
Read in any include files before the main processing of the tool is done. + This constructs the Headers. +

+

+ +
Throws: +
java.lang.Exception
+
+
+
+ +

+checkFile

+
+protected java.io.File checkFile(java.lang.String option)
+                          throws java.lang.Exception
+
+
Checks the source directory looks good. +

+

+ +
Throws: +
java.lang.Exception
+
+
+
+ +

+maybeCreateDirectory

+
+protected java.io.File maybeCreateDirectory(java.lang.String option)
+                                     throws java.lang.Exception
+
+
Checks the target directory and creates it if it doesn't already exist. +

+

+ +
Throws: +
java.lang.Exception
+
+
+
+ +

+printUsage

+
+protected void printUsage()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html new file mode 100644 index 0000000000..5fa0f3af67 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html @@ -0,0 +1,373 @@ + + + + + + +Configuration (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class Configuration

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.Configuration
+
+
+
+
public class Configuration
extends java.lang.Object
+ +

+Encapsulates the tool's configuration file +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static booleanclassExcluded(java.lang.String s) + +
+           
+static booleanfileExcluded(java.lang.String s) + +
+           
+static java.lang.StringgetConfigured(java.lang.String key) + +
+           
+static voidinitialise(java.lang.String filename) + +
+          Reads in the configuration file
+static booleanisAttribute(java.lang.String s) + +
+           
+static booleanisDefine(java.lang.String s) + +
+           
+static booleanisMacro(java.lang.String s) + +
+           
+static booleanmethodExcluded(java.lang.String className, + java.lang.String method) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+initialise

+
+public static void initialise(java.lang.String filename)
+                       throws java.lang.Exception
+
+
Reads in the configuration file +

+

+ +
Throws: +
java.lang.Exception
+
+
+
+ +

+fileExcluded

+
+public static boolean fileExcluded(java.lang.String s)
+
+
+
+
+
+
+ +

+classExcluded

+
+public static boolean classExcluded(java.lang.String s)
+
+
+
+
+
+
+ +

+methodExcluded

+
+public static boolean methodExcluded(java.lang.String className,
+                                     java.lang.String method)
+
+
+
+
+
+
+ +

+isMacro

+
+public static boolean isMacro(java.lang.String s)
+
+
+
+
+
+
+ +

+isDefine

+
+public static boolean isDefine(java.lang.String s)
+
+
+
+
+
+
+ +

+isAttribute

+
+public static boolean isAttribute(java.lang.String s)
+
+
+
+
+
+
+ +

+getConfigured

+
+public static java.lang.String getConfigured(java.lang.String key)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html new file mode 100644 index 0000000000..88913b0dc8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html @@ -0,0 +1,289 @@ + + + + + + +DirectoryTree (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class DirectoryTree

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.DirectoryTree
+
+
+
+
public class DirectoryTree
extends java.lang.Object
+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
DirectoryTree(FileActor actor, + java.util.Set extensions) + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+static java.lang.StringmaybeAppendSeparator(java.lang.String name) + +
+           
+ voidwalkTree(java.io.File source, + java.io.File target, + int depth) + +
+          Starts adding trace into the given file.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+DirectoryTree

+
+public DirectoryTree(FileActor actor,
+                     java.util.Set extensions)
+
+
+ + + + + + + + +
+Method Detail
+ +

+walkTree

+
+public void walkTree(java.io.File source,
+                     java.io.File target,
+                     int depth)
+              throws java.lang.Exception
+
+
Starts adding trace into the given file. If the given file is a directory + then this the starting directory and all code beneath and in this + directory will be given trace. +

+

+
Parameters:
source - - + either the starting directory or one file to add trace to. +
Throws: +
java.lang.Exception
+
+
+
+ +

+maybeAppendSeparator

+
+public static java.lang.String maybeAppendSeparator(java.lang.String name)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html new file mode 100644 index 0000000000..adc1ec6aab --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html @@ -0,0 +1,231 @@ + + + + + + +FileActor (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Interface FileActor

+
+
All Known Implementing Classes:
Headers, XMLFileActor
+
+
+
+
public interface FileActor
+ +

+DirectoryTree calls this interface to allow implementations of this interface + to act on a file in the directory tree. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidactOnFile(java.io.File source, + java.io.File target, + int depth) + +
+           
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+actOnFile

+
+public void actOnFile(java.io.File source,
+                      java.io.File target,
+                      int depth)
+               throws java.lang.Exception
+
+
+ +
Throws: +
java.lang.Exception
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html new file mode 100644 index 0000000000..c5e0c1da1c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html @@ -0,0 +1,538 @@ + + + + + + +FilePart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class FilePart

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.FilePart
+
+
+
Direct Known Subclasses:
MethodPart, PrototypePart
+
+
+
+
public class FilePart
extends java.lang.Object
+ +

+A piece of C++ source code +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intBEGINSCOPE + +
+           
+static intCLASSATTRIBUTE + +
+           
+static intCOMMENT + +
+           
+protected  java.lang.Stringcppsource + +
+           
+static intDIRECTIVE + +
+           
+static intENDSCOPE + +
+           
+static intENUM + +
+           
+static intFIELD + +
+           
+static intMACRO + +
+           
+static intMETHOD + +
+           
+static intPROTOTYPE + +
+           
+protected  inttype + +
+           
+static intTYPEDEF + +
+           
+static intUNKNOWN + +
+           
+static intWHITESPACE + +
+           
+  + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intgetType() + +
+           
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+UNKNOWN

+
+public static final int UNKNOWN
+
+
+
See Also:
Constant Field Values
+
+
+ +

+COMMENT

+
+public static final int COMMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+METHOD

+
+public static final int METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FIELD

+
+public static final int FIELD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BEGINSCOPE

+
+public static final int BEGINSCOPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ENDSCOPE

+
+public static final int ENDSCOPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DIRECTIVE

+
+public static final int DIRECTIVE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+WHITESPACE

+
+public static final int WHITESPACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MACRO

+
+public static final int MACRO
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CLASSATTRIBUTE

+
+public static final int CLASSATTRIBUTE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ENUM

+
+public static final int ENUM
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PROTOTYPE

+
+public static final int PROTOTYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TYPEDEF

+
+public static final int TYPEDEF
+
+
+
See Also:
Constant Field Values
+
+
+ +

+cppsource

+
+protected java.lang.String cppsource
+
+
+
+
+
+ +

+type

+
+protected int type
+
+
+
+
+ + + + + + + + + + + +
+Method Detail
+ +

+getType

+
+public int getType()
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html new file mode 100644 index 0000000000..3d08c1df43 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html @@ -0,0 +1,403 @@ + + + + + + +Headers (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class Headers

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.Headers
+
+
+
All Implemented Interfaces:
FileActor
+
+
+
+
public class Headers
extends java.lang.Object
implements FileActor
+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
Headers() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidactOnFile(java.io.File header, + java.io.File ignored, + int depth) + +
+           
+ booleanfailed() + +
+           
+ java.util.ListgetAllMethods() + +
+          Tuscany change - a method to get all the method signatures at once
+ java.util.ListgetMethods(java.lang.String method) + +
+           
+ booleanisClassName(java.lang.String text) + +
+           
+ booleanisInstanceMethod(Signature sign) + +
+           
+ booleanisStaticMethod(Signature sign) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+Headers

+
+public Headers()
+
+
+ + + + + + + + +
+Method Detail
+ +

+actOnFile

+
+public void actOnFile(java.io.File header,
+                      java.io.File ignored,
+                      int depth)
+               throws java.lang.Exception
+
+
+
Specified by:
actOnFile in interface FileActor
+
+
+ +
Throws: +
java.lang.Exception
+
+
+
+ +

+failed

+
+public boolean failed()
+
+
+
+
+
+
+
+
+
+ +

+isInstanceMethod

+
+public boolean isInstanceMethod(Signature sign)
+
+
+
+
+
+
+
+
+
+ +

+isStaticMethod

+
+public boolean isStaticMethod(Signature sign)
+
+
+
+
+
+
+
+
+
+ +

+getMethods

+
+public java.util.List getMethods(java.lang.String method)
+
+
+
+
+
+
+
+
+
+ +

+getAllMethods

+
+public java.util.List getAllMethods()
+
+
Tuscany change - a method to get all the method signatures at once +

+

+
+
+
+
+
+
+
+ +

+isClassName

+
+public boolean isClassName(java.lang.String text)
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html new file mode 100644 index 0000000000..0d48df2ac7 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html @@ -0,0 +1,297 @@ + + + + + + +InputCppSourceCode (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class InputCppSourceCode

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode
+
+
+
+
public class InputCppSourceCode
extends java.lang.Object
+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
InputCppSourceCode(java.io.BufferedReader br, + java.lang.String name) + +
+           
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringgetName() + +
+           
+ java.util.IteratorgetPartIterator() + +
+           
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+InputCppSourceCode

+
+public InputCppSourceCode(java.io.BufferedReader br,
+                          java.lang.String name)
+                   throws java.lang.Exception
+
+
+ + + + + + + + +
+Method Detail
+ +

+getPartIterator

+
+public java.util.Iterator getPartIterator()
+
+
+
+
+
+
+ +

+getName

+
+public java.lang.String getName()
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html new file mode 100644 index 0000000000..591a36b08c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html @@ -0,0 +1,307 @@ + + + + + + +MethodPart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class MethodPart

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.FilePart
+      extended byorg.apache.tuscany.sca.cpp.tools.common.MethodPart
+
+
+
+
public class MethodPart
extends FilePart
+ +

+A C or C++ method from a piece of source code. The method has a signature and + a body (the bit between the braces). +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
BEGINSCOPE, CLASSATTRIBUTE, COMMENT, cppsource, DIRECTIVE, ENDSCOPE, ENUM, FIELD, MACRO, METHOD, PROTOTYPE, type, TYPEDEF, UNKNOWN, WHITESPACE
+  + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ BodyPart[]getBodyParts() + +
+          Returns the method body as code snippets, each ending with a place where + a trace statement belongs.
+ java.lang.StringgetOriginalSignature() + +
+           
+ SignaturegetSignature() + +
+           
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
getType, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+getSignature

+
+public Signature getSignature()
+
+
+
+
+
+
+ +

+getOriginalSignature

+
+public java.lang.String getOriginalSignature()
+
+
+
+
+
+
+ +

+getBodyParts

+
+public BodyPart[] getBodyParts()
+                        throws ParsingException
+
+
Returns the method body as code snippets, each ending with a place where + a trace statement belongs. The end of the first code snippet is where the + entry trace should go. The end of every other snippet is a return from + the method. +

+

+ +
Throws: +
ParsingException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html new file mode 100644 index 0000000000..57c1e42dab --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html @@ -0,0 +1,294 @@ + + + + + + +Options (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class Options

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.Options
+
+
+
+
public class Options
extends java.lang.Object
+ +

+Command line options passed to a tool's main program. All command line + options should begin with a dash "-". Some command line options take a value + which is the next parameter after the option. Others do not. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.lang.ObjectgetOption(java.lang.String key) + +
+           
+static booleanquiet() + +
+           
+static voidset(java.lang.String[] args) + +
+          Initialises the options based on the args passed to main
+static booleanverbose() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+set

+
+public static void set(java.lang.String[] args)
+
+
Initialises the options based on the args passed to main +

+

+
+
+
+
+ +

+getOption

+
+public static java.lang.Object getOption(java.lang.String key)
+
+
+
+
+
+
+ +

+verbose

+
+public static boolean verbose()
+
+
+
+
+
+
+ +

+quiet

+
+public static boolean quiet()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html new file mode 100644 index 0000000000..e61c2ae9ae --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html @@ -0,0 +1,392 @@ + + + + + + +Parameter (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class Parameter

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.Parameter
+
+
+
+
public class Parameter
extends java.lang.Object
+ +

+A parameter from a method signature. The parameter is the datatype plus its + name but not its value. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanequals(java.lang.Object o) + +
+          For two parameters to match their types must match or both be null, but + the parameters names don't have to match.
+ booleanfailed() + +
+           
+ java.lang.StringgetName() + +
+           
+ java.lang.StringgetType() + +
+           
+ java.lang.StringgetTypeWithoutConst() + +
+           
+ booleanisDotDotDot() + +
+           
+ booleanisVoid() + +
+           
+ java.util.Iteratoriterator() + +
+           
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+failed

+
+public boolean failed()
+
+
+
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
+
+
+
+
+ +

+getTypeWithoutConst

+
+public java.lang.String getTypeWithoutConst()
+
+
+
+
+
+
+ +

+getName

+
+public java.lang.String getName()
+
+
+
+
+
+
+ +

+isVoid

+
+public boolean isVoid()
+
+
+
+
+
+
+ +

+isDotDotDot

+
+public boolean isDotDotDot()
+
+
+
+
+
+
+ +

+equals

+
+public boolean equals(java.lang.Object o)
+
+
For two parameters to match their types must match or both be null, but + the parameters names don't have to match. Just because a parameter is + called something different in a header file as in the the source file + doesn't mean it's a different parameter. +

+

+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
+
+
+
+ +

+iterator

+
+public java.util.Iterator iterator()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html new file mode 100644 index 0000000000..29585ad7ee --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html @@ -0,0 +1,284 @@ + + + + + + +ParsingException (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class ParsingException

+
+java.lang.Object
+  extended byjava.lang.Throwable
+      extended byjava.lang.Exception
+          extended byorg.apache.tuscany.sca.cpp.tools.common.ParsingException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class ParsingException
extends java.lang.Exception
+ +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+Constructor Summary
ParsingException() + +
+           
ParsingException(java.lang.String message) + +
+           
ParsingException(java.lang.String message, + java.lang.Throwable cause) + +
+           
ParsingException(java.lang.Throwable cause) + +
+           
+  + + + + + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ParsingException

+
+public ParsingException()
+
+
+
+ +

+ParsingException

+
+public ParsingException(java.lang.String message)
+
+
+
+ +

+ParsingException

+
+public ParsingException(java.lang.String message,
+                        java.lang.Throwable cause)
+
+
+
+ +

+ParsingException

+
+public ParsingException(java.lang.Throwable cause)
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html new file mode 100644 index 0000000000..bfd601d5b3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html @@ -0,0 +1,309 @@ + + + + + + +PrototypePart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class PrototypePart

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.FilePart
+      extended byorg.apache.tuscany.sca.cpp.tools.common.PrototypePart
+
+
+
+
public class PrototypePart
extends FilePart
+ +

+A function prototype in an include file and possibly in a class definition. +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
BEGINSCOPE, CLASSATTRIBUTE, COMMENT, cppsource, DIRECTIVE, ENDSCOPE, ENUM, FIELD, MACRO, METHOD, PROTOTYPE, type, TYPEDEF, UNKNOWN, WHITESPACE
+  + + + + + + + + + + +
+Constructor Summary
PrototypePart(java.lang.String s, + java.lang.String className, + java.lang.String namespace) + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+ SignaturegetSignature() + +
+           
+ voidsetScope(java.lang.String scope) + +
+           
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
getType, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+PrototypePart

+
+public PrototypePart(java.lang.String s,
+                     java.lang.String className,
+                     java.lang.String namespace)
+
+
+ + + + + + + + +
+Method Detail
+ +

+getSignature

+
+public Signature getSignature()
+
+
+
+
+
+
+ +

+setScope

+
+public void setScope(java.lang.String scope)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html new file mode 100644 index 0000000000..2a2eef3678 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html @@ -0,0 +1,584 @@ + + + + + + +Signature (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class Signature

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.Signature
+
+
+
+
public class Signature
extends java.lang.Object
+ +

+A C or C++ method signature with the ability to parse it. TODO: properly + support variable length argument lists using "..." TODO: passing or returning + function pointers (hopefully not needed) TODO: Cope with ~ Classname() +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanequals(java.lang.Object obj) + +
+           
+ booleanfailed() + +
+           
+ java.lang.StringgetAttributes() + +
+           
+ java.lang.StringgetClassName() + +
+           
+ java.lang.StringgetMethodName() + +
+           
+ java.lang.StringgetNamespace() + +
+           
+ java.lang.StringgetOriginal() + +
+           
+ Parameter[]getParameters() + +
+           
+ ParametergetReturnType() + +
+           
+ java.lang.StringgetScope() + +
+           
+ java.lang.StringgetTrimClassName() + +
+           
+ booleanisConstructor() + +
+           
+ booleanisDestructor() + +
+           
+ intoriginalLength() + +
+           
+ voidsetNamespace(java.lang.String namespace) + +
+           
+ voidsetScope(java.lang.String scope) + +
+          Sets the scope, but only if the scope is not set by an explicit attribute + in the signature.
+ java.lang.StringtoString() + +
+           
+ java.lang.StringtoStringWithoutAttrs() + +
+           
+ booleantraceable() + +
+          Should this method be traced?
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+getOriginal

+
+public java.lang.String getOriginal()
+
+
+
+
+
+
+ +

+originalLength

+
+public int originalLength()
+
+
+
+
+
+
+ +

+failed

+
+public boolean failed()
+
+
+
+
+
+
+ +

+getAttributes

+
+public java.lang.String getAttributes()
+
+
+
+
+
+
+ +

+getClassName

+
+public java.lang.String getClassName()
+
+
+
+
+
+
+ +

+setNamespace

+
+public void setNamespace(java.lang.String namespace)
+
+
+
Parameters:
namespace - The namespace to set.
+
+
+
+ +

+getNamespace

+
+public java.lang.String getNamespace()
+
+
+ +
Returns:
Returns the namespace.
+
+
+
+ +

+getTrimClassName

+
+public java.lang.String getTrimClassName()
+
+
+
+
+
+
+ +

+getMethodName

+
+public java.lang.String getMethodName()
+
+
+
+
+
+
+ +

+getReturnType

+
+public Parameter getReturnType()
+
+
+
+
+
+
+ +

+getParameters

+
+public Parameter[] getParameters()
+
+
+
+
+
+
+ +

+isConstructor

+
+public boolean isConstructor()
+
+
+
+
+
+
+ +

+isDestructor

+
+public boolean isDestructor()
+
+
+
+
+
+
+ +

+getScope

+
+public java.lang.String getScope()
+
+
+
+
+
+
+ +

+setScope

+
+public void setScope(java.lang.String scope)
+
+
Sets the scope, but only if the scope is not set by an explicit attribute + in the signature. +

+

+
+
+
+
+ +

+traceable

+
+public boolean traceable()
+
+
Should this method be traced? +

+

+
+
+
+
+ +

+equals

+
+public boolean equals(java.lang.Object obj)
+
+
+
+
+
+
+ +

+toStringWithoutAttrs

+
+public java.lang.String toStringWithoutAttrs()
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html new file mode 100644 index 0000000000..8571178678 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html @@ -0,0 +1,411 @@ + + + + + + +Utils (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.common +
+Class Utils

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.Utils
+
+
+
+
public final class Utils
extends java.lang.Object
+ +

+Static utility methods. Some of these methods are similar to the methods on + java.lang.String except they are aware of C/C++ comments and string literals. + + TODO: Many of these methods would perform better using StringBuffer not + String +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static java.util.SetcPrimitives + +
+           
+static java.util.SetcTypeQualifiers + +
+           
+static java.lang.Stringwhitespace + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static voidoutputDebugString(java.lang.String line) + +
+           
+static voidrude(java.lang.String reason) + +
+          This method reports an error level problem
+static voidrude(java.lang.String reason, + java.lang.String filename, + int lineno, + java.lang.String codefragment) + +
+          Failed to parse the source code for some reason.
+static booleansafeEquals(java.lang.Object o1, + java.lang.Object o2) + +
+          A better method than .equals() because it doesn't NullPointerException + when one of the parameters is null.
+static voidscreenMessage(java.lang.String msg) + +
+          This method reports an error level problem
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+cPrimitives

+
+public static final java.util.Set cPrimitives
+
+
+
+
+
+ +

+cTypeQualifiers

+
+public static final java.util.Set cTypeQualifiers
+
+
+
+
+
+ +

+whitespace

+
+public static final java.lang.String whitespace
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + + + + +
+Method Detail
+ +

+rude

+
+public static void rude(java.lang.String reason,
+                        java.lang.String filename,
+                        int lineno,
+                        java.lang.String codefragment)
+                 throws ParsingException
+
+
Failed to parse the source code for some reason. This method prints out a + suitably rude message, and then what? I haven't quite decided yet. + + TODO: Do something sensible here like throw an Exception which will give + up on this file completely and tidy up the output file. It may be just + too dangerous to try to carry on. But we need to fail in such a way that + the build system knows that we've failed for this file and can build this + file without trace. +

+

+ +
Throws: +
ParsingException
+
+
+
+ +

+rude

+
+public static void rude(java.lang.String reason)
+                 throws ParsingException
+
+
This method reports an error level problem +

+

+
Parameters:
reason - why we have an error level problem +
Throws: +
ParsingException
+
+
+
+ +

+screenMessage

+
+public static void screenMessage(java.lang.String msg)
+
+
This method reports an error level problem +

+

+
+
+
+
+ +

+safeEquals

+
+public static boolean safeEquals(java.lang.Object o1,
+                                 java.lang.Object o2)
+
+
A better method than .equals() because it doesn't NullPointerException + when one of the parameters is null. +

+

+
+
+
+
+ +

+outputDebugString

+
+public static void outputDebugString(java.lang.String line)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html new file mode 100644 index 0000000000..109d6c539a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html @@ -0,0 +1,177 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.BodyPart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.BodyPart

+
+ + + + + + + + + +
+Packages that use BodyPart
org.apache.tuscany.sca.cpp.tools.common
+ + 
+  +

+ + + + + +
+Uses of BodyPart in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + +
Methods in org.apache.tuscany.sca.cpp.tools.common that return BodyPart +
+ BodyPart[]MethodPart.getBodyParts() + +
+          Returns the method body as code snippets, each ending with a place where + a trace statement belongs.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html new file mode 100644 index 0000000000..36cb776f02 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html @@ -0,0 +1,186 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.CParsingTool (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.CParsingTool

+
+ + + + + + + + + +
+Packages that use CParsingTool
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + +
+Uses of CParsingTool in org.apache.tuscany.sca.cpp.tools.services
+  +

+ + + + + + + + + + + + +
Subclasses of CParsingTool in org.apache.tuscany.sca.cpp.tools.services +
+ classScagen + +
+          This is the main top level class.
+ classServicesGenerator + +
+          This class is the main class that handles the function that parses a C++ + interface header file into a DOM that holds all the semantic information + about the interface - method names, parameters and return values.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html new file mode 100644 index 0000000000..bb2432666e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.Configuration (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.Configuration

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.Configuration +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html new file mode 100644 index 0000000000..4140168273 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.DirectoryTree

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.DirectoryTree +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html new file mode 100644 index 0000000000..3ab90283bd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html @@ -0,0 +1,256 @@ + + + + + + +Uses of Interface org.apache.tuscany.sca.cpp.tools.common.FileActor (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Interface
org.apache.tuscany.sca.cpp.tools.common.FileActor

+
+ + + + + + + + + + + + + +
+Packages that use FileActor
org.apache.tuscany.sca.cpp.tools.common
+ + 
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + +
+Uses of FileActor in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + +
Classes in org.apache.tuscany.sca.cpp.tools.common that implement FileActor +
+ classHeaders + +
+           
+  +

+ + + + + + + +
Constructors in org.apache.tuscany.sca.cpp.tools.common with parameters of type FileActor +
DirectoryTree(FileActor actor, + java.util.Set extensions) + +
+           
+  +

+ + + + + +
+Uses of FileActor in org.apache.tuscany.sca.cpp.tools.services
+  +

+ + + + + + + + + + + + + + + + +
Classes in org.apache.tuscany.sca.cpp.tools.services that implement FileActor +
+ classComponentTypeFileHandler + +
+          The purpose of this class is to specialise the map of XML element handlers + for a XXX.componentType file that is used by the XMLFileActor
+ classModuleOrFragmentFileHandler + +
+          The purpose of this class is purely to specialise the handler map to one with + a specific ComponentDomNodeHandler.
+ classXMLFileActor + +
+          The purpose of this abstract class is to provide a home for the standard + processing that is involved in turning a XML file into an internal DOM.
+  +

+ + + + + + + +
Constructors in org.apache.tuscany.sca.cpp.tools.services with parameters of type FileActor +
DirectoryScanner(FileActor actor, + java.util.Set extensions) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html new file mode 100644 index 0000000000..aa4796486e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html @@ -0,0 +1,184 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.FilePart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.FilePart

+
+ + + + + + + + + +
+Packages that use FilePart
org.apache.tuscany.sca.cpp.tools.common
+ + 
+  +

+ + + + + +
+Uses of FilePart in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + + + + + +
Subclasses of FilePart in org.apache.tuscany.sca.cpp.tools.common +
+ classMethodPart + +
+          A C or C++ method from a piece of source code.
+ classPrototypePart + +
+          A function prototype in an include file and possibly in a class definition.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html new file mode 100644 index 0000000000..60190bbada --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html @@ -0,0 +1,192 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.Headers (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.Headers

+
+ + + + + + + + + +
+Packages that use Headers
org.apache.tuscany.sca.cpp.tools.common
+ + 
+  +

+ + + + + +
+Uses of Headers in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + +
Fields in org.apache.tuscany.sca.cpp.tools.common declared as Headers +
+protected  HeadersCParsingTool.headers + +
+           
+  +

+ + + + + + + + +
Methods in org.apache.tuscany.sca.cpp.tools.common that return Headers +
+protected  HeadersCParsingTool.preparseHeaders(java.lang.String option) + +
+          Read in any include files before the main processing of the tool is done.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html new file mode 100644 index 0000000000..463968468c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html new file mode 100644 index 0000000000..19b474a7e7 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.MethodPart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.MethodPart

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.MethodPart +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html new file mode 100644 index 0000000000..040187072f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.Options (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.Options

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.Options +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html new file mode 100644 index 0000000000..a91a2c687b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html @@ -0,0 +1,192 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.Parameter (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.Parameter

+
+ + + + + + + + + +
+Packages that use Parameter
org.apache.tuscany.sca.cpp.tools.common
+ + 
+  +

+ + + + + +
+Uses of Parameter in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + + + + + + + + + +
Methods in org.apache.tuscany.sca.cpp.tools.common that return Parameter +
+ ParameterSignature.getReturnType() + +
+           
+ Parameter[]Signature.getParameters() + +
+           
+ ParameterBodyPart.getCaughtValue() + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html new file mode 100644 index 0000000000..dedd25a4f2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html @@ -0,0 +1,196 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.ParsingException (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.ParsingException

+
+ + + + + + + + + +
+Packages that use ParsingException
org.apache.tuscany.sca.cpp.tools.common
+ + 
+  +

+ + + + + +
+Uses of ParsingException in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + + + + + + + + + +
Methods in org.apache.tuscany.sca.cpp.tools.common that throw ParsingException +
+static voidUtils.rude(java.lang.String reason, + java.lang.String filename, + int lineno, + java.lang.String codefragment) + +
+          Failed to parse the source code for some reason.
+static voidUtils.rude(java.lang.String reason) + +
+          This method reports an error level problem
+ BodyPart[]MethodPart.getBodyParts() + +
+          Returns the method body as code snippets, each ending with a place where + a trace statement belongs.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html new file mode 100644 index 0000000000..22c4575fab --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.PrototypePart (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.PrototypePart

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.PrototypePart +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html new file mode 100644 index 0000000000..228807ba8a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html @@ -0,0 +1,208 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.Signature (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.Signature

+
+ + + + + + + + + +
+Packages that use Signature
org.apache.tuscany.sca.cpp.tools.common
+ + 
+  +

+ + + + + +
+Uses of Signature in org.apache.tuscany.sca.cpp.tools.common
+  +

+ + + + + + + + + + + + +
Methods in org.apache.tuscany.sca.cpp.tools.common that return Signature +
+ SignaturePrototypePart.getSignature() + +
+           
+ SignatureMethodPart.getSignature() + +
+           
+  +

+ + + + + + + + + + + + +
Methods in org.apache.tuscany.sca.cpp.tools.common with parameters of type Signature +
+ booleanHeaders.isInstanceMethod(Signature sign) + +
+           
+ booleanHeaders.isStaticMethod(Signature sign) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html new file mode 100644 index 0000000000..cd93afeeb6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.common.Utils (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.common.Utils

+
+No usage of org.apache.tuscany.sca.cpp.tools.common.Utils +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html new file mode 100644 index 0000000000..2e0e528f32 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html @@ -0,0 +1,78 @@ + + + + + + +org.apache.tuscany.sca.cpp.tools.common (SCA for C++ Tools) + + + + + + + + + + + +org.apache.tuscany.sca.cpp.tools.common + + + + +
+Interfaces  + +
+FileActor
+ + + + + + +
+Classes  + +
+BodyPart +
+Configuration +
+CParsingTool +
+DirectoryTree +
+FilePart +
+Headers +
+InputCppSourceCode +
+MethodPart +
+Options +
+Parameter +
+PrototypePart +
+Signature +
+Utils
+ + + + + + +
+Exceptions  + +
+ParsingException
+ + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html new file mode 100644 index 0000000000..3fa24db0cd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html @@ -0,0 +1,273 @@ + + + + + + +org.apache.tuscany.sca.cpp.tools.common (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+Package org.apache.tuscany.sca.cpp.tools.common +

+
+ + +

+See: +
+          Description +

+ + + + + + + + + +
+Interface Summary
FileActorDirectoryTree calls this interface to allow implementations of this interface + to act on a file in the directory tree.
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
BodyPartA snippet of C or C++ source code.
ConfigurationEncapsulates the tool's configuration file
CParsingToolThe superclass of tools that parse C/C++ code.
DirectoryTree 
FilePartA piece of C++ source code
Headers 
InputCppSourceCode 
MethodPartA C or C++ method from a piece of source code.
OptionsCommand line options passed to a tool's main program.
ParameterA parameter from a method signature.
PrototypePartA function prototype in an include file and possibly in a class definition.
SignatureA C or C++ method signature with the ability to parse it.
UtilsStatic utility methods.
+  + +

+ + + + + + + + + +
+Exception Summary
ParsingException 
+  + +

+

+Package org.apache.tuscany.sca.cpp.tools.common Description +

+ +

+

+ +

Overview

+ +This package can be used to reflect across C++ source code. It can produce +a network of descriptive objects describing C++ Headers, Signatures, Parameters and so +on that it finds in a given location of the file system. +Each of the descriptive objects has a set of getters that return either +the descriptive child objects, or for primitives, the string that represents the actual +value such as "int" or "myFunction". +

+There are also various utility methods that help with navigating the information, for example the Signature +class has an isConstructor method. The API Javadoc contains further details of these. +

+The package can scan a directory using a file mask to identify what types +of files are to be scanned. In this application we are interested only +in the function prototypes in the C++ header files. +

+The implementation was originated using some java code that was also +contributed to the Apache org.apache.axis.tools.common package. Care +has been taken that the original code was not sourced via Apache. If +this project is adopted by Apache then it is very possible that this +package could be merged with or made obsolete by org.apache.axis.tools.common +and because of this the design and interfaces have been preserved from +the original code as much as possible. + +

+

+

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html new file mode 100644 index 0000000000..d6ca34c836 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html @@ -0,0 +1,162 @@ + + + + + + +org.apache.tuscany.sca.cpp.tools.common Class Hierarchy (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Hierarchy For Package org.apache.tuscany.sca.cpp.tools.common +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+
    +
  • class java.lang.Object
      +
    • class org.apache.tuscany.sca.cpp.tools.common.BodyPart
    • class org.apache.tuscany.sca.cpp.tools.common.Configuration
    • class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
    • class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree
    • class org.apache.tuscany.sca.cpp.tools.common.FilePart
        +
      • class org.apache.tuscany.sca.cpp.tools.common.MethodPart
      • class org.apache.tuscany.sca.cpp.tools.common.PrototypePart
      +
    • class org.apache.tuscany.sca.cpp.tools.common.Headers (implements org.apache.tuscany.sca.cpp.tools.common.FileActor) +
    • class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode
    • class org.apache.tuscany.sca.cpp.tools.common.Options
    • class org.apache.tuscany.sca.cpp.tools.common.Parameter
    • class org.apache.tuscany.sca.cpp.tools.common.Signature
    • class java.lang.Throwable (implements java.io.Serializable) +
        +
      • class java.lang.Exception +
      +
    • class org.apache.tuscany.sca.cpp.tools.common.Utils
    +
+

+Interface Hierarchy +

+
    +
  • interface org.apache.tuscany.sca.cpp.tools.common.FileActor
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html new file mode 100644 index 0000000000..36fda7a829 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html @@ -0,0 +1,231 @@ + + + + + + +Uses of Package org.apache.tuscany.sca.cpp.tools.common (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Package
org.apache.tuscany.sca.cpp.tools.common

+
+ + + + + + + + + + + + + +
+Packages that use org.apache.tuscany.sca.cpp.tools.common
org.apache.tuscany.sca.cpp.tools.common
+ + 
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Classes in org.apache.tuscany.sca.cpp.tools.common used by org.apache.tuscany.sca.cpp.tools.common
BodyPart + +
+          A snippet of C or C++ source code.
FileActor + +
+          DirectoryTree calls this interface to allow implementations of this interface + to act on a file in the directory tree.
FilePart + +
+          A piece of C++ source code
Headers + +
+           
Parameter + +
+          A parameter from a method signature.
ParsingException + +
+           
Signature + +
+          A C or C++ method signature with the ability to parse it.
+  +

+ + + + + + + + + + + +
+Classes in org.apache.tuscany.sca.cpp.tools.common used by org.apache.tuscany.sca.cpp.tools.services
CParsingTool + +
+          The superclass of tools that parse C/C++ code.
FileActor + +
+          DirectoryTree calls this interface to allow implementations of this interface + to act on a file in the directory tree.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html new file mode 100644 index 0000000000..84b07c500a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html @@ -0,0 +1,303 @@ + + + + + + +ComponentDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class ComponentDomNodeHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
+      extended byorg.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler
+
+
+
All Implemented Interfaces:
DomNodeHandler
+
+
+
+
public class ComponentDomNodeHandler
extends GenericDomNodeHandler
+ +

+This class will do the required processing for the element of a + sca module or fragment file. +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
ELEMENT
+  + + + + + + + + + + +
+Constructor Summary
ComponentDomNodeHandler() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidhandleNode(org.w3c.dom.Node node, + java.lang.String contextXPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will do the "normal" processing and then trigger a call to + processComponentNode.
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ComponentDomNodeHandler

+
+public ComponentDomNodeHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+handleNode

+
+public void handleNode(org.w3c.dom.Node node,
+                       java.lang.String contextXPath,
+                       java.util.Map handlers,
+                       java.util.Map parameters)
+
+
This method will do the "normal" processing and then trigger a call to + processComponentNode. +

+

+
Specified by:
handleNode in interface DomNodeHandler
Overrides:
handleNode in class GenericDomNodeHandler
+
+
+
Parameters:
node - the node being processed
contextXPath - the XPath to the node
handlers - the map pf element names to DomNodeHandlers
parameters - a map of XPaths to parameters values found so far
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html new file mode 100644 index 0000000000..666f530637 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html @@ -0,0 +1,299 @@ + + + + + + +ComponentTypeFileHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class ComponentTypeFileHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.XMLFileActor
+      extended byorg.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler
+
+
+
All Implemented Interfaces:
FileActor
+
+
+
+
public class ComponentTypeFileHandler
extends XMLFileActor
+ +

+The purpose of this class is to specialise the map of XML element handlers + for a XXX.componentType file that is used by the XMLFileActor +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
failed, handlers, parameters, transformerFactory
+  + + + + + + + + + + +
+Constructor Summary
ComponentTypeFileHandler() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidhandleComponentTypeFile(java.io.File componentTypeXML, + java.io.File target) + +
+          This method just exists to add the default starting depth of 1 to the + underlying actOnFile interface
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
actOnFile, createDomFromXMLFile, getFilesActedOn, getParameter, setParameter
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ComponentTypeFileHandler

+
+public ComponentTypeFileHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+handleComponentTypeFile

+
+public void handleComponentTypeFile(java.io.File componentTypeXML,
+                                    java.io.File target)
+                             throws java.lang.Exception
+
+
This method just exists to add the default starting depth of 1 to the + underlying actOnFile interface +

+

+
Parameters:
componentTypeXML -
target - +
Throws: +
java.lang.Exception
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html new file mode 100644 index 0000000000..c7c82a3cc0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html @@ -0,0 +1,271 @@ + + + + + + +DirectoryScanner (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class DirectoryScanner

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.DirectoryScanner
+
+
+
+
public class DirectoryScanner
extends java.lang.Object
+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
DirectoryScanner(FileActor actor, + java.util.Set extensions) + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidwalkTree(java.io.File source, + java.io.File target, + int depth) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+DirectoryScanner

+
+public DirectoryScanner(FileActor actor,
+                        java.util.Set extensions)
+
+
+ + + + + + + + +
+Method Detail
+ +

+walkTree

+
+public void walkTree(java.io.File source,
+                     java.io.File target,
+                     int depth)
+              throws java.lang.Exception
+
+
+
Parameters:
source - The module root directory
target - The directory that will holdthe generated output
depth - The depth from the inial starting point, not significant for + the Scagen tool as we are only interested in the module root + directory but present due to the inherited actOnFile interface + whcih come from the oreg.apache.axis.tools practice This + interface has been left unchanged as we hope to reconverge the + parser here with the original one once the changes are fed + back into the original code. +
Throws: +
java.lang.Exception
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html new file mode 100644 index 0000000000..cf6f2e436c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html @@ -0,0 +1,341 @@ + + + + + + +DomHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class DomHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
+      extended byorg.apache.tuscany.sca.cpp.tools.services.DomHandler
+
+
+
All Implemented Interfaces:
DomNodeHandler
+
+
+
+
public class DomHandler
extends GenericDomNodeHandler
+ +

+The purpose of this class it to provide a generic class that can handle both + a DOM and a DOM node. +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
ELEMENT
+  + + + + + + + + + + +
+Constructor Summary
DomHandler() + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+static voidhandleDom(org.w3c.dom.Document dom, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will run through the initial level of the DOM using the + handlers map
+ voidhandleNode(org.w3c.dom.Node node, + java.lang.String contextXPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node.
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+DomHandler

+
+public DomHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+handleDom

+
+public static void handleDom(org.w3c.dom.Document dom,
+                             java.util.Map handlers,
+                             java.util.Map parameters)
+
+
This method will run through the initial level of the DOM using the + handlers map +

+

+
Parameters:
dom - the document being consumed
handlers - the map from element name to node handler
parameters - a map of parameters - this is often used by a handler to place + a name-value pair, the name is often an Xpath representation + of the location of the data in the DOM but handlers are free + to use whatever they like - the contextXpath is generated as + an Xpath prefix for those handlers that wish to use it.
+
+
+
+ +

+handleNode

+
+public void handleNode(org.w3c.dom.Node node,
+                       java.lang.String contextXPath,
+                       java.util.Map handlers,
+                       java.util.Map parameters)
+
+
Description copied from class: GenericDomNodeHandler
+
This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node. +

+

+
Specified by:
handleNode in interface DomNodeHandler
Overrides:
handleNode in class GenericDomNodeHandler
+
+
+
Parameters:
node - The DOM node being consumed
contextXPath - The XPath to this node
handlers - The map from element name to node handler
parameters - A map of parameters - this is often used by a handler to place + a name-value pair, the name is often an Xpath representation + of the location of the data in the DOM but handlers are free + to use whatever they like - the contextXpath is generated as + an Xpath prefix for those handlers that wish to use it.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html new file mode 100644 index 0000000000..b62f5a4694 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html @@ -0,0 +1,262 @@ + + + + + + +DomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Interface DomNodeHandler

+
+
All Known Implementing Classes:
GenericDomNodeHandler
+
+
+
+
public interface DomNodeHandler
+ +

+


+ +

+ + + + + + + + + + + + + + +
+Field Summary
+static intELEMENT + +
+           
+  + + + + + + + + + + + + + + +
+Method Summary
+ voidhandleNode(org.w3c.dom.Node node, + java.lang.String contextXPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          An interface for classes that can process DOM nodes.
+  +

+ + + + + + + + +
+Field Detail
+ +

+ELEMENT

+
+public static final int ELEMENT
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + + + + +
+Method Detail
+ +

+handleNode

+
+public void handleNode(org.w3c.dom.Node node,
+                       java.lang.String contextXPath,
+                       java.util.Map handlers,
+                       java.util.Map parameters)
+
+
An interface for classes that can process DOM nodes. +

+

+
Parameters:
node - the DOM node being consumed
contextXPath - the XPath to this node
handlers - The map from element name to node handler
parameters - A map of parameters - this is often used by a handler to place + a name-value pair, the name is often an Xpath representation of the + location of the data in the DOM but handlers are free to use whatever + they like - the contextXpath is generated as an Xpath prefix for those + handlers that wish to use it.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html new file mode 100644 index 0000000000..2a7a65c242 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html @@ -0,0 +1,396 @@ + + + + + + +GenericDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class GenericDomNodeHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
+
+
+
All Implemented Interfaces:
DomNodeHandler
+
+
+
Direct Known Subclasses:
ComponentDomNodeHandler, DomHandler, ReferenceDomNodeHandler, ServiceDomNodeHandler
+
+
+
+
public class GenericDomNodeHandler
extends java.lang.Object
implements DomNodeHandler
+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
ELEMENT
+  + + + + + + + + + + +
+Constructor Summary
GenericDomNodeHandler() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidhandleChildElements(org.w3c.dom.Node node, + java.lang.String contextPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will iterate through the DOM node's children and call the + appropriate handler for each one.
+ voidhandleNode(org.w3c.dom.Node node, + java.lang.String contextXPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node.
+static voidmapNodeToHandlerAndHandle(org.w3c.dom.Node node, + java.lang.String contextPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will resolve any registered handler for a particular DOM + element and call the handleNode method on it.
+ voidtransferAttrsToParameters(org.w3c.dom.Node node, + java.lang.String contextPath, + java.util.Map parameters) + +
+          This method parses the DOM attributes into name value pairs in the + parameter map each valued keyed by its XPath.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+GenericDomNodeHandler

+
+public GenericDomNodeHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+transferAttrsToParameters

+
+public void transferAttrsToParameters(org.w3c.dom.Node node,
+                                      java.lang.String contextPath,
+                                      java.util.Map parameters)
+
+
This method parses the DOM attributes into name value pairs in the + parameter map each valued keyed by its XPath. +

+

+
+
+
+
Parameters:
node - the DOM node being processed
contextPath - the XPath to the DOM node being processed
parameters - a scratchpad map of name value pairs
+
+
+
+ +

+handleChildElements

+
+public void handleChildElements(org.w3c.dom.Node node,
+                                java.lang.String contextPath,
+                                java.util.Map handlers,
+                                java.util.Map parameters)
+
+
This method will iterate through the DOM node's children and call the + appropriate handler for each one. +

+

+
+
+
+
Parameters:
node - the DOM node being processed
contextPath - the XPath to the DOM node being processed
handlers - a map of element name to handler objects
parameters - a scratchpad map of name value pairs
+
+
+
+ +

+mapNodeToHandlerAndHandle

+
+public static void mapNodeToHandlerAndHandle(org.w3c.dom.Node node,
+                                             java.lang.String contextPath,
+                                             java.util.Map handlers,
+                                             java.util.Map parameters)
+
+
This method will resolve any registered handler for a particular DOM + element and call the handleNode method on it. If the handlers map has a + mapping from "entity" to an instance of EntityHandler which implements + the DomNodeHandler interface then any node that looks like + + + Will be passed to the EntityHandler to process. +

+

+
+
+
+
Parameters:
node - the DOM node being processed
contextPath - the XPath to the DOM node being processed
handlers - a map of element name to handler objects
parameters - a scratchpad map of name value pairs
+
+
+
+ +

+handleNode

+
+public void handleNode(org.w3c.dom.Node node,
+                       java.lang.String contextXPath,
+                       java.util.Map handlers,
+                       java.util.Map parameters)
+
+
This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node. +

+

+
Specified by:
handleNode in interface DomNodeHandler
+
+
+
Parameters:
node - The DOM node being consumed
contextXPath - The XPath to this node
handlers - The map from element name to node handler
parameters - A map of parameters - this is often used by a handler to place + a name-value pair, the name is often an Xpath representation + of the location of the data in the DOM but handlers are free + to use whatever they like - the contextXpath is generated as + an Xpath prefix for those handlers that wish to use it.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html new file mode 100644 index 0000000000..3562f99e07 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html @@ -0,0 +1,231 @@ + + + + + + +LittleClass (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class LittleClass

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.LittleClass
+
+
+
+
public class LittleClass
extends java.lang.Object
+ +

+This class is just a convenient application class that is loaded in order to + get the application class loader. We are interested in the application class + loader as we use its getResource method to resolve XML files independantly of + where they are. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
LittleClass() + +
+           
+  + + + + + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+LittleClass

+
+public LittleClass()
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html new file mode 100644 index 0000000000..71448f7f04 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html @@ -0,0 +1,258 @@ + + + + + + +ModuleOrFragmentFileHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class ModuleOrFragmentFileHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.XMLFileActor
+      extended byorg.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler
+
+
+
All Implemented Interfaces:
FileActor
+
+
+
+
public class ModuleOrFragmentFileHandler
extends XMLFileActor
+ +

+The purpose of this class is purely to specialise the handler map to one with + a specific ComponentDomNodeHandler. +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
failed, handlers, parameters, transformerFactory
+  + + + + + + + + + + +
+Constructor Summary
ModuleOrFragmentFileHandler() + +
+           
+  + + + + + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
actOnFile, createDomFromXMLFile, getFilesActedOn, getParameter, setParameter
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ModuleOrFragmentFileHandler

+
+public ModuleOrFragmentFileHandler()
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html new file mode 100644 index 0000000000..506b804627 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html @@ -0,0 +1,311 @@ + + + + + + +ReferenceDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class ReferenceDomNodeHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
+      extended byorg.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler
+
+
+
All Implemented Interfaces:
DomNodeHandler
+
+
+
+
public class ReferenceDomNodeHandler
extends GenericDomNodeHandler
+ +

+The purpose of this class is to process a element in a + componentType file and then trigger a call to the method in ServicesGenerator + to process the interface header file +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
ELEMENT
+  + + + + + + + + + + +
+Constructor Summary
ReferenceDomNodeHandler() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidhandleNode(org.w3c.dom.Node node, + java.lang.String contextXPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node.
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ReferenceDomNodeHandler

+
+public ReferenceDomNodeHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+handleNode

+
+public void handleNode(org.w3c.dom.Node node,
+                       java.lang.String contextXPath,
+                       java.util.Map handlers,
+                       java.util.Map parameters)
+
+
Description copied from class: GenericDomNodeHandler
+
This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node. +

+

+
Specified by:
handleNode in interface DomNodeHandler
Overrides:
handleNode in class GenericDomNodeHandler
+
+
+
Parameters:
node - The DOM node being consumed
contextXPath - The XPath to this node
handlers - The map from element name to node handler
parameters - A map of parameters - this is often used by a handler to place + a name-value pair, the name is often an Xpath representation + of the location of the data in the DOM but handlers are free + to use whatever they like - the contextXpath is generated as + an Xpath prefix for those handlers that wish to use it.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html new file mode 100644 index 0000000000..08c200c9e8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html @@ -0,0 +1,344 @@ + + + + + + +Scagen (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class Scagen

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.CParsingTool
+      extended byorg.apache.tuscany.sca.cpp.tools.services.Scagen
+
+
+
+
public class Scagen
extends CParsingTool
+ +

+This is the main top level class. Its purpose is to create a + Module/FragmentFile handler visitor and pass it to a DirectoryScanner for + processing. +

+ +

+


+ +

+ + + + + + + + + + + + + + +
+Field Summary
+static java.util.SetMODULE_EXTENSIONS + +
+           
+ + + + + + + +
Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
failed, headers
+  + + + + + + + + + + +
+Constructor Summary
Scagen(java.lang.String[] args) + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+static voidmain(java.lang.String[] args) + +
+          Take a directory scanning class and create a vistor that knows how to + handle any sca.module or .fragment that the scanner comes across.
+protected  voidprintUsage() + +
+          Provide a hint to the user on how to call this class
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
checkFile, maybeCreateDirectory, preparseHeaders
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+MODULE_EXTENSIONS

+
+public static java.util.Set MODULE_EXTENSIONS
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Scagen

+
+public Scagen(java.lang.String[] args)
+       throws java.lang.Exception
+
+ +
Throws: +
java.lang.Exception
+ + + + + + + + +
+Method Detail
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
Take a directory scanning class and create a vistor that knows how to + handle any sca.module or .fragment that the scanner comes across. +

+

+
Parameters:
args - standard main args. THe values we expect in this class are + scagen -dir input_dir -output output_dir
+
+
+
+ +

+printUsage

+
+protected void printUsage()
+
+
Provide a hint to the user on how to call this class +

+

+
Overrides:
printUsage in class CParsingTool
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html new file mode 100644 index 0000000000..5970989783 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html @@ -0,0 +1,305 @@ + + + + + + +ServiceDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class ServiceDomNodeHandler

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
+      extended byorg.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler
+
+
+
All Implemented Interfaces:
DomNodeHandler
+
+
+
+
public class ServiceDomNodeHandler
extends GenericDomNodeHandler
+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
ELEMENT
+  + + + + + + + + + + +
+Constructor Summary
ServiceDomNodeHandler() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidhandleNode(org.w3c.dom.Node node, + java.lang.String contextXPath, + java.util.Map handlers, + java.util.Map parameters) + +
+          This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node.
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ServiceDomNodeHandler

+
+public ServiceDomNodeHandler()
+
+
+ + + + + + + + +
+Method Detail
+ +

+handleNode

+
+public void handleNode(org.w3c.dom.Node node,
+                       java.lang.String contextXPath,
+                       java.util.Map handlers,
+                       java.util.Map parameters)
+
+
Description copied from class: GenericDomNodeHandler
+
This method will place the attributes in this node into the parameter + map keyed by the XPath and recursively continue processing for any + sub-elements of the node. +

+

+
Specified by:
handleNode in interface DomNodeHandler
Overrides:
handleNode in class GenericDomNodeHandler
+
+
+
Parameters:
node - The DOM node being consumed
contextXPath - The XPath to this node
handlers - The map from element name to node handler
parameters - A map of parameters - this is often used by a handler to place + a name-value pair, the name is often an Xpath representation + of the location of the data in the DOM but handlers are free + to use whatever they like - the contextXpath is generated as + an Xpath prefix for those handlers that wish to use it.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html new file mode 100644 index 0000000000..ebf2ec4ac5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html @@ -0,0 +1,312 @@ + + + + + + +ServicesGenerator (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class ServicesGenerator

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.common.CParsingTool
+      extended byorg.apache.tuscany.sca.cpp.tools.services.ServicesGenerator
+
+
+
+
public class ServicesGenerator
extends CParsingTool
+ +

+This class is the main class that handles the function that parses a C++ + interface header file into a DOM that holds all the semantic information + about the interface - method names, parameters and return values. It then + uses XSLT to generate different "views" of this data plus the parameter map + from other sources that are the C++ programs for the proxy and wrapper + implementations and headers. +

+ +

+


+ +

+ + + + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
failed, headers
+  + + + + + + + + + + +
+Constructor Summary
ServicesGenerator(java.lang.String[] args) + +
+           
+  + + + + + + + + + + + +
+Method Summary
+static voidhandleInterfaceHeader(java.util.Map parameters, + boolean forReference) + +
+           
+ + + + + + + +
Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
checkFile, maybeCreateDirectory, preparseHeaders, printUsage
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+ServicesGenerator

+
+public ServicesGenerator(java.lang.String[] args)
+                  throws java.lang.Exception
+
+
+ + + + + + + + +
+Method Detail
+ +

+handleInterfaceHeader

+
+public static void handleInterfaceHeader(java.util.Map parameters,
+                                         boolean forReference)
+                                  throws java.lang.Exception
+
+
+
Parameters:
parameters -
forReference - true if we are creating a proxy for a reference (rather than + for a service) +
Throws: +
java.lang.Exception - The design is +
    +
  • handleInterfaceHeader +
  • createDOMofMethods +
  • createProxyCPPFromDom(outputDir, dom); +
  • createProxyHeaderFromDom(outputDir, dom); +
+ + plus if we are not generating for a reference element +
    +
  • createWrapperCPPFromDom(outputDir, dom); +
  • createWrapperHeaderFromDom(outputDir, dom); +
      + Each of the create.... methods calls createOutputFromDom with a different + style sheet.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html new file mode 100644 index 0000000000..67930e3ba8 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html @@ -0,0 +1,469 @@ + + + + + + +XMLFileActor (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.apache.tuscany.sca.cpp.tools.services +
+Class XMLFileActor

+
+java.lang.Object
+  extended byorg.apache.tuscany.sca.cpp.tools.services.XMLFileActor
+
+
+
All Implemented Interfaces:
FileActor
+
+
+
Direct Known Subclasses:
ComponentTypeFileHandler, ModuleOrFragmentFileHandler
+
+
+
+
public abstract class XMLFileActor
extends java.lang.Object
implements FileActor
+ +

+The purpose of this abstract class is to provide a home for the standard + processing that is involved in turning a XML file into an internal DOM. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+ booleanfailed + +
+           
+protected static java.util.Maphandlers + +
+           
+protected static java.util.Mapparameters + +
+           
+protected static javax.xml.transform.TransformerFactorytransformerFactory + +
+           
+  + + + + + + + + + + +
+Constructor Summary
XMLFileActor() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidactOnFile(java.io.File moduleXML, + java.io.File target, + int depth) + +
+          This method is the main FileActor method
+protected  org.w3c.dom.DocumentcreateDomFromXMLFile(java.io.File xmlSourceFile) + +
+          This method builds an in memory DOM from an XML file
+ intgetFilesActedOn() + +
+           
+ java.lang.ObjectgetParameter(java.lang.String name, + java.lang.Object value) + +
+          Get a parameter
+ voidsetParameter(java.lang.String name, + java.lang.Object value) + +
+          Set a parameter
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+handlers

+
+protected static java.util.Map handlers
+
+
+
+
+
+ +

+parameters

+
+protected static java.util.Map parameters
+
+
+
+
+
+ +

+failed

+
+public boolean failed
+
+
+
+
+
+ +

+transformerFactory

+
+protected static javax.xml.transform.TransformerFactory transformerFactory
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+XMLFileActor

+
+public XMLFileActor()
+
+
+ + + + + + + + +
+Method Detail
+ +

+actOnFile

+
+public void actOnFile(java.io.File moduleXML,
+                      java.io.File target,
+                      int depth)
+               throws java.lang.Exception
+
+
This method is the main FileActor method +

+

+
Specified by:
actOnFile in interface FileActor
+
+
+
Parameters:
moduleXML - the sca.module or fragment file
target - the target directory
depth - not uesed here but in the +
Throws: +
java.lang.Exception
See Also:
Here we create an initial DOM + and kick off the processing (using the handler map that has been set + up by the concrete subclass)., +interface to allow for + recursive diving into a directory structure.
+
+
+
+ +

+createDomFromXMLFile

+
+protected org.w3c.dom.Document createDomFromXMLFile(java.io.File xmlSourceFile)
+
+
This method builds an in memory DOM from an XML file +

+

+
+
+
+
Parameters:
xmlSourceFile - the XML file we are handling +
Returns:
the resulting document
+
+
+
+ +

+setParameter

+
+public void setParameter(java.lang.String name,
+                         java.lang.Object value)
+
+
Set a parameter +

+

+
+
+
+
Parameters:
name -
value -
+
+
+
+ +

+getParameter

+
+public java.lang.Object getParameter(java.lang.String name,
+                                     java.lang.Object value)
+
+
Get a parameter +

+

+
+
+
+
Parameters:
name -
value - +
Returns:
the value of the parameter
+
+
+
+ +

+getFilesActedOn

+
+public int getFilesActedOn()
+
+
+
+
+
+ +
Returns:
Returns the filesActedOn.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html new file mode 100644 index 0000000000..5b92855433 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html new file mode 100644 index 0000000000..5b7fe28bdb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html new file mode 100644 index 0000000000..2b9b52e3bc --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html new file mode 100644 index 0000000000..000ac87acc --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.DomHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.DomHandler

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.DomHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html new file mode 100644 index 0000000000..ed14ed35cd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html @@ -0,0 +1,212 @@ + + + + + + +Uses of Interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Interface
org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler

+
+ + + + + + + + + +
+Packages that use DomNodeHandler
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + +
+Uses of DomNodeHandler in org.apache.tuscany.sca.cpp.tools.services
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + +
Classes in org.apache.tuscany.sca.cpp.tools.services that implement DomNodeHandler +
+ classComponentDomNodeHandler + +
+          This class will do the required processing for the element of a + sca module or fragment file.
+ classDomHandler + +
+          The purpose of this class it to provide a generic class that can handle both + a DOM and a DOM node.
+ classGenericDomNodeHandler + +
+           
+ classReferenceDomNodeHandler + +
+          The purpose of this class is to process a element in a + componentType file and then trigger a call to the method in ServicesGenerator + to process the interface header file
+ classServiceDomNodeHandler + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html new file mode 100644 index 0000000000..b35bfde41f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html @@ -0,0 +1,204 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler

+
+ + + + + + + + + +
+Packages that use GenericDomNodeHandler
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + +
+Uses of GenericDomNodeHandler in org.apache.tuscany.sca.cpp.tools.services
+  +

+ + + + + + + + + + + + + + + + + + + + +
Subclasses of GenericDomNodeHandler in org.apache.tuscany.sca.cpp.tools.services +
+ classComponentDomNodeHandler + +
+          This class will do the required processing for the element of a + sca module or fragment file.
+ classDomHandler + +
+          The purpose of this class it to provide a generic class that can handle both + a DOM and a DOM node.
+ classReferenceDomNodeHandler + +
+          The purpose of this class is to process a element in a + componentType file and then trigger a call to the method in ServicesGenerator + to process the interface header file
+ classServiceDomNodeHandler + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html new file mode 100644 index 0000000000..a7597e3212 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.LittleClass (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.LittleClass

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.LittleClass +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html new file mode 100644 index 0000000000..4115066abd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html new file mode 100644 index 0000000000..b86f9da242 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html new file mode 100644 index 0000000000..2a212df7cf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.Scagen (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.Scagen

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.Scagen +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html new file mode 100644 index 0000000000..630cee5ec6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html new file mode 100644 index 0000000000..ecf5d60367 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html @@ -0,0 +1,138 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator

+
+No usage of org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html new file mode 100644 index 0000000000..4749bbd440 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html @@ -0,0 +1,186 @@ + + + + + + +Uses of Class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Class
org.apache.tuscany.sca.cpp.tools.services.XMLFileActor

+
+ + + + + + + + + +
+Packages that use XMLFileActor
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + +
+Uses of XMLFileActor in org.apache.tuscany.sca.cpp.tools.services
+  +

+ + + + + + + + + + + + +
Subclasses of XMLFileActor in org.apache.tuscany.sca.cpp.tools.services +
+ classComponentTypeFileHandler + +
+          The purpose of this class is to specialise the map of XML element handlers + for a XXX.componentType file that is used by the XMLFileActor
+ classModuleOrFragmentFileHandler + +
+          The purpose of this class is purely to specialise the handler map to one with + a specific ComponentDomNodeHandler.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html new file mode 100644 index 0000000000..67936195cb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html @@ -0,0 +1,65 @@ + + + + + + +org.apache.tuscany.sca.cpp.tools.services (SCA for C++ Tools) + + + + + + + + + + + +org.apache.tuscany.sca.cpp.tools.services + + + + +
+Interfaces  + +
+DomNodeHandler
+ + + + + + +
+Classes  + +
+ComponentDomNodeHandler +
+ComponentTypeFileHandler +
+DirectoryScanner +
+DomHandler +
+GenericDomNodeHandler +
+LittleClass +
+ModuleOrFragmentFileHandler +
+ReferenceDomNodeHandler +
+Scagen +
+ServiceDomNodeHandler +
+ServicesGenerator +
+XMLFileActor
+ + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html new file mode 100644 index 0000000000..7d4ef0c594 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html @@ -0,0 +1,364 @@ + + + + + + +org.apache.tuscany.sca.cpp.tools.services (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+Package org.apache.tuscany.sca.cpp.tools.services +

+
+ + +

+See: +
+          Description +

+ + + + + + + + + +
+Interface Summary
DomNodeHandler 
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
ComponentDomNodeHandlerThis class will do the required processing for the element of a + sca module or fragment file.
ComponentTypeFileHandlerThe purpose of this class is to specialise the map of XML element handlers + for a XXX.componentType file that is used by the XMLFileActor
DirectoryScanner 
DomHandlerThe purpose of this class it to provide a generic class that can handle both + a DOM and a DOM node.
GenericDomNodeHandler 
LittleClassThis class is just a convenient application class that is loaded in order to + get the application class loader.
ModuleOrFragmentFileHandlerThe purpose of this class is purely to specialise the handler map to one with + a specific ComponentDomNodeHandler.
ReferenceDomNodeHandlerThe purpose of this class is to process a element in a + componentType file and then trigger a call to the method in ServicesGenerator + to process the interface header file
ScagenThis is the main top level class.
ServiceDomNodeHandler 
ServicesGeneratorThis class is the main class that handles the function that parses a C++ + interface header file into a DOM that holds all the semantic information + about the interface - method names, parameters and return values.
XMLFileActorThe purpose of this abstract class is to provide a home for the standard + processing that is involved in turning a XML file into an internal DOM.
+  + +

+

+Package org.apache.tuscany.sca.cpp.tools.services Description +

+ +

+

+ +

Overview

+ + + +

This package contains classes that generate C++ wrappers and +proxies for C++ implementations of SCA services.

+ +

What the package does

+ +

The Scagen class main method will take in an input and +output directory name. The input directory is taken to be the SCA module root +directory.  The tool will generate the wrapper and proxy headers and methods +bodies in the output directory.

+ +

These proxies and wrappers enable the SCA for C++ runtime to +act as a conduit for SCA C++ calls in a type free manner. Client code can call +the type specific functions that are in the generated proxy classes. The call +is marshalled into a generic format and a SCA for C++ runtime function with a +standard signature is invoked. The details of the call are passed as data.

+ +

On the other end of the runtime, a generated function with a +standard signature is called, this function will inspect the data that +represents the call’s method name and call the appropriate type specific +function in the C++ implementation.

+ +

The Input Data Used

+ +

The input directory passed to the Scagen method is taken to +be the SCA module root directory. All the sca.module and .fragment files in +that directory are inspected to resolve all the <component/> elements +within them.

+ +

Each <component/> element found is inspected to see if +it has a <implementation.cpp/> element within it.

+ +

Each <implementation.cpp/> element should have a +header attribute that represents a C++ header file that contains function +prototypes for the C++ implementation of the service. An optional class +attribute can be used to select one class if more than one that is present in +the header file. The default class is the one with the same name as the header +file. The tool will verify that the implementation header contains an +appropriate class prototype.

+ + + +

The directory that contains the implementation header should +also contain a matching .componentType file for the equivalent SCA component. So +for example, a MyServiceImpl.h file would have a corresponding MyServiceImpl.componentType +file in the same directory.

+ + + +

Each componentType file is inspected for <service/> +and <reference/> elements. For each <service/> element that is +found that contains a <interface.cpp/> element within it,

+ +

the header attribute of the <interface.cpp/> is taken +as the filename of the C++ interface header for the SCA service.  This C++ +header file is opened and used as a means for specifying the SCA service +resulting in an appropriate wrapper and proxy being generated for this service +interface. Both method bodies and headers are generated in the given output +directory. The processing of a <reference/> element is the same except +that only a proxy header and implementation are generated.

+ + + + + +

Outline Design: How it Works

+ + + +

The basic approach is to scan in the XML files by first +creating a DOM document tree of them and then recursively rifling through the DOM  +with some generic code in the XMLFileActorClass by default this processing will +build up a map which maps the XPath location of attributes to their values. +Additionally subclasses can add to a “handlers map” which maps from the name of +a particular element to an object that implements the DomNodeHandler interface. +If the XMLFileActor code comes across any element that has an equivalent handler +in the handler map the objects handleNode method will be called.

+ +

Typically the DomNodeHandler’s handle node interface will +use XPath to pull out the parameters that it is interested in from the +parameters map that is being built up by the generic code.

+ +

This design was chosen as the Java level specified for the +original implementation did not have direct XPath query of XML data but it was +known that this would be available in Java 1.5 onwards. The design allows the +DOM and parameters map handling to be replaced in the future with JRE 1.5 code +with less impact on the rest of the code.

+ + + +

The processing leads to the parsing of the C++ interface +files using the org\apache\tuscany\sca\cpp\tools\common package. This results +in a Headers object

+ +

that contains a List of Signature objects, each one +representing a function prototype found in the header.

+ + + +

We are aiming to get all the semantic data we want to use +into a DOM document (this represents the model of our input data) and then use +XSLT to create the 4 different views of this data:

+ +

Proxy C++ header

+ +

Proxy C++  body

+ +

Wrapper C++ header

+ +

Wrapper C++ body

+ + + +

So we prepopulate the DOM with parameter data that comes +from the XML files and then iterate through the Signatures that are returned +from the C++ header parser transferring the useful data into the DOM.

+ + + +

We than use 4 XSLT stylesheets to generate the C++ output +files as required.

+ +
+

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html new file mode 100644 index 0000000000..adceb9d363 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html @@ -0,0 +1,162 @@ + + + + + + +org.apache.tuscany.sca.cpp.tools.services Class Hierarchy (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Hierarchy For Package org.apache.tuscany.sca.cpp.tools.services +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html new file mode 100644 index 0000000000..f35093ab2a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html @@ -0,0 +1,179 @@ + + + + + + +Uses of Package org.apache.tuscany.sca.cpp.tools.services (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Uses of Package
org.apache.tuscany.sca.cpp.tools.services

+
+ + + + + + + + + +
+Packages that use org.apache.tuscany.sca.cpp.tools.services
org.apache.tuscany.sca.cpp.tools.services
+ + 
+  +

+ + + + + + + + + + + + + + +
+Classes in org.apache.tuscany.sca.cpp.tools.services used by org.apache.tuscany.sca.cpp.tools.services
DomNodeHandler + +
+           
GenericDomNodeHandler + +
+           
XMLFileActor + +
+          The purpose of this abstract class is to provide a home for the standard + processing that is involved in turning a XML file into an internal DOM.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html new file mode 100644 index 0000000000..ac9bf75355 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html @@ -0,0 +1,46 @@ + + + + + + +Overview (SCA for C++ Tools) + + + + + + + + + + + + + + + +
+
+ + + + + +
All Classes +

+ +Packages +
+org.apache.tuscany.sca.cpp.tools.common +
+org.apache.tuscany.sca.cpp.tools.services +
+

+ +

+  + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html new file mode 100644 index 0000000000..8d79e7de28 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html @@ -0,0 +1,174 @@ + + + + + + +Overview (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +


+ +
+

+ +

SCA for C++ Tools

+ + +
+ + + + + + + + + +
+C++ Parser
org.apache.tuscany.sca.cpp.tools.common
+ +
+ +

+  + + + + + + + + +
+SCA Services Generator
org.apache.tuscany.sca.cpp.tools.services
+ +
+ +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html new file mode 100644 index 0000000000..0c3da7e516 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html @@ -0,0 +1,167 @@ + + + + + + +Class Hierarchy (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
org.apache.tuscany.sca.cpp.tools.common, org.apache.tuscany.sca.cpp.tools.services
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+
    +
  • interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
  • interface org.apache.tuscany.sca.cpp.tools.common.FileActor
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list new file mode 100644 index 0000000000..2d78f0b38b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list @@ -0,0 +1,2 @@ +org.apache.tuscany.sca.cpp.tools.common +org.apache.tuscany.sca.cpp.tools.services diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html new file mode 100644 index 0000000000..5657522fec --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html @@ -0,0 +1,37 @@ + + + + + + + (SCA for C++ Tools) + + + + + + + + + + + +
+ +
+ +
+
+The front page has been relocated.Please see: +
+          Frame version +
+          Non-frame version.
+ + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif new file mode 100644 index 0000000000..c814867a13 Binary files /dev/null and b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif differ diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html new file mode 100644 index 0000000000..75a28975e2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html @@ -0,0 +1,159 @@ + + + + + + +Serialized Form (SCA for C++ Tools) + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+

+Serialized Form

+
+
+ + + + + +
+Package org.apache.tuscany.sca.cpp.tools.common
+ +

+ + + + + +
+Class org.apache.tuscany.sca.cpp.tools.common.ParsingException extends java.lang.Exception implements Serializable
+ +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css new file mode 100644 index 0000000000..6d31fdbc7f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ +.TableRowColor { background: #FFFFFF } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java new file mode 100644 index 0000000000..448fd6dd7d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java @@ -0,0 +1,29 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase; + +/** + * This test case tests a simple Calculator service tools generation + */ +public class CalculatorTest extends TuscanyTestCase { + + public void testCalculatorModuleAndComponent() { + testModule("CalculatorModuleAndComponent", check_results); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java new file mode 100644 index 0000000000..2f1bf78921 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java @@ -0,0 +1,46 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * This is a "run this first" testcase that just tests some simple operations of + * the scagen tools it uses the + * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as + * input data. + */ +public class EnvHandlerTest extends TuscanyTestCase { + + /** + * Constructor for CustomerInfoTestOLD. + * + * @param arg0 + */ + public EnvHandlerTest(String arg0) { + super(arg0); + } + + /** + * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule + * proxy and wrapper generation. + */ + public void testEnvHandler() { + testModule("MyValueServiceModule", check_results); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java new file mode 100644 index 0000000000..1dfe302cf1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java @@ -0,0 +1,46 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * This is a "run this first" testcase that just tests some simple operations of + * the scagen tools it uses the + * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as + * input data. + */ +public class ImplClassWithNameSpaceTest extends TuscanyTestCase { + + /** + * Constructor for CustomerInfoTestOLD. + * + * @param arg0 + */ + public ImplClassWithNameSpaceTest(String arg0) { + super(arg0); + } + + /** + * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule + * proxy and wrapper generation. + */ + public void testEnvHandler() { + testModule("MyValueServiceModuleImplClassWithNamespace", check_results); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java new file mode 100644 index 0000000000..146c18fa1b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java @@ -0,0 +1,46 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * This is a "run this first" testcase that just tests some simple operations of + * the scagen tools it uses the + * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as + * input data. + */ +public class IntfClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase { + + /** + * Constructor for CustomerInfoTestOLD. + * + * @param arg0 + */ + public IntfClassWithNameSpaceButNotInClassAttrTest(String arg0) { + super(arg0); + } + + /** + * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule + * proxy and wrapper generation. + */ + public void testEnvHandler() { + testModule("MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr", check_results); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java new file mode 100644 index 0000000000..c78f8a5f93 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java @@ -0,0 +1,46 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * This is a "run this first" testcase that just tests some simple operations of + * the scagen tools it uses the + * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as + * input data. + */ +public class IntfClassWithNameSpaceTest extends TuscanyTestCase { + + /** + * Constructor for CustomerInfoTestOLD. + * + * @param arg0 + */ + public IntfClassWithNameSpaceTest(String arg0) { + super(arg0); + } + + /** + * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule + * proxy and wrapper generation. + */ + public void testEnvHandler() { + testModule("MyValueServiceModuleIntfClassWithNamespace", check_results); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java new file mode 100644 index 0000000000..4a8f8449a6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java @@ -0,0 +1,46 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * This is a "run this first" testcase that just tests some simple operations of + * the scagen tools it uses the + * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as + * input data. + */ +public class MissingModuleAndFragmentTest extends TuscanyTestCase { + + /** + * Constructor for CustomerInfoTestOLD. + * + * @param arg0 + */ + public MissingModuleAndFragmentTest(String arg0) { + super(arg0); + } + + /** + * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule + * proxy and wrapper generation. + */ + public void testEnvHandler() { + testModule("MyValueServiceModuleMissingScaModule",check_results); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java new file mode 100644 index 0000000000..9c05599286 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java @@ -0,0 +1,47 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.junit; + +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * This is a "run this first" testcase that just tests some simple operations of + * the scagen tools it uses the + * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as + * input data. + */ +public class SimplePublicPrivateProtectedTest extends TuscanyTestCase { + + /** + * Constructor for CustomerInfoTestOLD. + * + * @param arg0 + */ + public SimplePublicPrivateProtectedTest(String arg0) { + super(arg0); + } + + /** + * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule + * proxy and wrapper generation. + */ + public void testEnvHandler() { + + testModule("SimplePublicPrivateProtectedTest", check_results); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java new file mode 100644 index 0000000000..fc5c8c5653 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java @@ -0,0 +1,82 @@ +/* + * IBM Confidential + * + * OCO Source Materials + * + * + * + * (C) Copyright IBM Corp. 2005 + * + * The source code for this program is not published + * or otherwise divested of its trade secrets, + * irrespective of what has been deposited with the + * U. S. Copyright Office. + */ +package org.apache.tuscany.sca.cpp.tools.junit; + +import java.io.File; +import java.util.HashSet; +import java.util.Set; + +import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase; + +/** + * This test case will test all the modules placed in the "modules" directory + * against the results in their repectice "expected_results" folders. + */ +public class TestAllModulesTest extends TuscanyTestCase { + + String testsDir = TuscanyTestCase.junit_modules; + + Set excludes = new HashSet(); + + public TestAllModulesTest(String arg0) { + super(arg0); + excludes.add("MyValueServiceModuleMissingScaModule"); + excludes.add("CVS"); + } + + + /* main exists to allow running from the java ant task */ + public static void main(String[] args) { + TestAllModulesTest test = new TestAllModulesTest(""); + test.testAllModulesRegression(); + } + + public void testAllModulesRegression() { + File dir = new File(testsDir); + + if (dir.isDirectory()) { + System.out.println("Testing all modules under " + + dir.getAbsolutePath()); + String[] test_modules = dir.list(); + + for (int i = 0; i < test_modules.length; i++) { + File test_module = new File(testsDir, test_modules[i]); + + String module_name = null; + if (test_module.isDirectory()) { + module_name = test_module.getName(); + if (!excludes.contains(module_name.intern())) { + testModule(module_name, check_results); + System.out.println("Test of module \"" + module_name + + "\" passed."); + continue; + } else { + System.out + .println("Ignoring excluded module subdirectory \"" + + module_name + "\""); + } + } + } + + } else { + + fail("Test directory is not a directory! \r The variable org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase.root sets the location of the junit input data,\r it is currently set as " + + TuscanyTestCase.root + "\rand we expect to find a testinput\\modules directory under there."); + } + + System.out.println("testAllModules test passed."); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java new file mode 100644 index 0000000000..fb4cd4b606 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java @@ -0,0 +1,94 @@ +/* + * IBM Confidential + * + * OCO Source Materials + * + * + * + * (C) Copyright IBM Corp. 2005 + * + * The source code for this program is not published + * or otherwise divested of its trade secrets, + * irrespective of what has been deposited with the + * U. S. Copyright Office. + */ +package org.apache.tuscany.sca.cpp.tools.junit; + +import java.io.File; +import java.util.HashSet; +import java.util.Set; + +import org.apache.tuscany.sca.cpp.tools.common.Utils; +import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase; + +/** + * This test case will test all the modules placed in the "modules" directory + * against the results in their repectice "expected_results" folders. + */ +public class TestDeployAssistTool extends TuscanyTestCase { + + String testsDir = TuscanyTestCase.junit_modules; + + Set excludes = new HashSet(); + + public TestDeployAssistTool(String arg0) { + super(arg0); + excludes.add("MyValueServiceModuleMissingScaModule"); + excludes.add("CVS"); + } + + /* main exists to allow running from the test script which will + * wrap this test case and pipe the satandard output to somewhere + * for checking. + */ + + public static void main(String[] args) { + TestDeployAssistTool test = new TestDeployAssistTool(""); + test.testDeployToolNullParms(); + } + + public void testDeployTool() { + //Utils.setReportArtefacts(true); + TestAllModulesTest t = new TestAllModulesTest(""); + File dir = new File(testsDir); + + if (dir.isDirectory()) { + String[] test_modules = dir.list(); + + for (int i = 0; i < test_modules.length; i++) { + File test_module = new File(testsDir, test_modules[i]); + String module_name = null; + if (test_module.isDirectory()) { + module_name = test_module.getName(); + if (!excludes.contains(module_name.intern())) { + t.testModuleDeploy(module_name, create_results, "c:\\colin", "cp"); + } + } + System.out.println(""); + } + } + } + + public void testDeployToolNullParms() { + //Utils.setReportArtefacts(true); + TestAllModulesTest t = new TestAllModulesTest(""); + File dir = new File(testsDir); + + if (dir.isDirectory()) { + String[] test_modules = dir.list(); + + for (int i = 0; i < test_modules.length; i++) { + File test_module = new File(testsDir, test_modules[i]); + String module_name = null; + if (test_module.isDirectory()) { + module_name = test_module.getName(); + if (!excludes.contains(module_name.intern())) { + t.testModuleDeploy(module_name, create_results, null, null); + } + } + System.out.println(""); + } + } + } +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java new file mode 100644 index 0000000000..00f6868ce6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java @@ -0,0 +1,332 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.junit; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.cpp.tools.common.Options; +import org.apache.tuscany.sca.cpp.tools.services.Scagen; + +/** + * A superclass for testcases that can be used to store common functions. + */ +public class TuscanyTestCase extends TestCase { + + public static String root = "cpp\\sca\\tools\\scagen\\junit\\"; + + public static String junit_modules = root + "testinput\\modules\\"; + + public static String junit_output = root + "testoutput\\"; + + private String testcase = "TESTCASE NOT SET BY SUBCLASS"; + + String input = null; + + String output = null; + + /** + * Check the resulting files with the contents of the expected_results + * folder in the testModule method + */ + public final static boolean check_results = true; + + /** + * Create test output but do not check it (useful for setting up new + * expected test output + */ + public final static boolean create_results = false; + + /** + * + */ + public TuscanyTestCase() { + super(); + } + + /** + * @param arg0 + */ + public TuscanyTestCase(String arg0) { + super(arg0); + } + + protected void setUp() throws Exception { + super.setUp(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Tests to see if two files are the same - this is just a scratch method at + * the moment that flags up testcase output files not matching expected + * results rather than needing to be a fully robust implementation and needs + * a little further work. + * + * @param file1 + * the first file to compare + * @param file2 + * the second file to compare + * + */ + protected boolean areFilesEqual(String file1, String file2) { + + try { + FileInputStream fis1 = new java.io.FileInputStream(file1); + FileInputStream fis2 = new java.io.FileInputStream(file2); + + BufferedReader br1 = new BufferedReader(new InputStreamReader(fis1)); + BufferedReader br2 = new BufferedReader(new InputStreamReader(fis2)); + + String line1 = br1.readLine(); + String line2 = br2.readLine(); + boolean moretodo = (line1 != null) && (line2 != null); + + for (int line = 1; moretodo; line++) { + + if (line1.equals(line2)) { + + line1 = br1.readLine(); + line2 = br2.readLine(); + + } else { + + int l1i, l2i; + + if ((l1i = line1.lastIndexOf("$Id")) > 0) { + //allow CVS strings + line1 = br1.readLine(); + } + + if ((l2i = line2.lastIndexOf("$Id")) > 0) { + //allow CVS strings + line2 = br2.readLine(); + } + + if (l1i == -1 && l2i == -1) { + + // they don't match + System.out.println("file " + file1 + " and file " + + file2); + System.out.println(" don't match at line " + line); + System.out.println("1 is :" + line1); + System.out.println("2 is :" + line2); + + return false; + } + } + + moretodo = (line1 != null) && (line2 != null); + } + + System.out.println("MATCH FOR: file " + file1 + " and file " + + file2); + return true; + + } catch (Throwable t) { + t.printStackTrace(); + return true; + } + + } + + /** + * @param outputDir + */ + protected void clearDirButNotExpectedOutputSubDir(String outputDir) { + File dir = new File(outputDir); + if (dir.isDirectory()) { + String[] files = dir.list(); + for (int i = 0; i < files.length; i++) { + File child = new File(dir, files[i]); + if (child.isDirectory()) { + if (!child.getName().equals("expected_output")) { + clearDirButNotExpectedOutputSubDir(dir + .getAbsolutePath() + + File.separator + files[i]); + } + } + child.delete(); + } + + } + + } + + public void testModule(String module, boolean check) { + + Options.reset(); + setTestcase(module); + clearDirButNotExpectedOutputSubDir(output); + + String[] commandLine = new String[] { "-dir", input, "-output", output }; + try { + Scagen.main(commandLine); + } catch (Exception e) { + fail(e.getMessage()); + } + + if (check) { + checkDirWithExpected(output); + } + } + + public void testModuleDeploy(String module, boolean check, + String deployDir, String command) { + + Options.reset(); + setTestcase(module); + clearDirButNotExpectedOutputSubDir(output); + + String[] commandLine; + if (null == deployDir) { + commandLine = new String[] { "-dir", input, "-output", + output, "-deploy"}; + } else { + commandLine = new String[] { "-dir", input, "-output", + output, "-deploy", deployDir, "-command", command }; + } + try { + Scagen.main(commandLine); + } catch (Exception e) { + fail(e.getMessage()); + } + + if (check) { + checkDirWithExpected(output); + } + } + + /** + * @param outputDirName + */ + private void checkDirWithExpected(String outputDirName) { + + File actualDir = new File(outputDirName); + if (actualDir == null || !actualDir.isDirectory()) { + fail("result directory does not exist"); + } + + File expectedDir = new File(outputDirName + File.separator + + "expected_output"); + if (expectedDir == null || !actualDir.isDirectory()) { + fail("can't check results as expected directory does not exist"); + } + + //Check every file in the expected output directory is present + //in the actual directory + + String[] expectedFiles = expectedDir.list(); + + if (expectedFiles == null) { + fail("no expected results for " + expectedDir.getPath()); + } + for (int i = 0; expectedFiles != null && i < expectedFiles.length; i++) { + File expectedFile = new File(expectedDir, expectedFiles[i]); + if (expectedFile.isDirectory()) { + // we can't check subdirectories yet + // and it conveniently skips over "CVS" + } else { + File actualFile = checkFileExistsFailIfNot(actualDir, + expectedFile.getName()); + checkFileHasNoTabsAndEndsInNewline(actualDir, expectedFile + .getName()); + if (!areFilesEqual(expectedFile.getAbsolutePath(), actualFile + .getAbsolutePath())) { + fail("odd output for " + expectedFile.getPath()); + } + + } + + } + + } + + /** + * @param actualDir + * @param name + */ + private File checkFileExistsFailIfNot(File dir, String name) { + + File f = new File(dir, name); + if (f == null || !f.exists() || !f.isFile()) { + fail("Expected result file " + f + " does not exist"); + } + return f; + + } + + /** + * @param actualDir + * @param name + */ + private void checkFileHasNoTabsAndEndsInNewline(File dir, String name) { + + try { + File f = new File(dir, name); + FileInputStream fis = new FileInputStream(f); + InputStreamReader isr = new InputStreamReader(fis); + Reader br = new BufferedReader(isr); + int ch, charBeforeMinusOne = -1; + while ((ch = br.read()) > -1) { + if (ch == '\t') { + fail("found tab in output " + f.getPath()); + } + charBeforeMinusOne = ch; + } + //The last char must be newline; + if (charBeforeMinusOne != '\n') { + fail("last char in file is not a newline in " + "(char is:" + + ch + " " + dir.getName() + File.separator + name); + } + + br.close(); + } catch (IOException e) { + e.printStackTrace(); + fail("io exception in tab/newline checker for " + dir.getName() + + File.separator + name); + return; + } + + } + + /** + * @param testcase + * The testcase to set. + */ + void setTestcase(String testcase) { + this.testcase = testcase; + input = TuscanyTestCase.junit_modules + testcase; + output = TuscanyTestCase.junit_output + testcase; + } + + /** + * @return Returns the testcase. + */ + String getTestcase() { + return testcase; + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd new file mode 100644 index 0000000000..6a303b1471 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd @@ -0,0 +1,2 @@ +rm -rf out +java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output c:\hydra\out diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd new file mode 100644 index 0000000000..13834b3aae --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd @@ -0,0 +1 @@ +java -jar scagen.jar -dirX c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output c:\hydra\out diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd new file mode 100644 index 0000000000..4fa9a86b1f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd @@ -0,0 +1 @@ +java -jar scagen.jar -dir x:\not_there -output c:\hydra\irrelevant diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd new file mode 100644 index 0000000000..5e6b818ae3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd @@ -0,0 +1 @@ +java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output r:\hydra\out diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd new file mode 100644 index 0000000000..2640ed87de --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd @@ -0,0 +1 @@ +copy c:\workspaces\wid60-no-core\Hydra.sca.tools\scagen.jar . \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h new file mode 100644 index 0000000000..3ab503ef1d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h @@ -0,0 +1,32 @@ +/* + * + * 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 CALCULATOR_H +#define CALCULATOR_H + + +class Calculator { + +private: + virtual long add(long a, long b) = 0; +public: + + virtual long subtract(long a, long b) = 0; +}; + + +#endif // CALCULATOR_H diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType new file mode 100644 index 0000000000..ef0f346ba0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h new file mode 100644 index 0000000000..daa9b25627 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h @@ -0,0 +1,33 @@ +/* + * + * 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 CALCULATORIMPL_H +#define CALCULATORIMPL_H + +#include "Calculator.h" + +class CalculatorImpl : public Calculator +{ +public: + CalculatorImpl(); + virtual ~CalculatorImpl(); + virtual long add(long a, long b); + virtual long subtract(long a, long b); + +}; + +#endif // diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module new file mode 100644 index 0000000000..f74d5f690c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h new file mode 100644 index 0000000000..da74be77a6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h @@ -0,0 +1,31 @@ +/* + * + * 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 CALCULATOR_H +#define CALCULATOR_H + + +class CalculatorBack { + + + +public: + virtual long subtractBack(long a, long b) = 0; + virtual long addBack(long a, long b) = 0; +}; + + +#endif // CALCULATOR_H diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h new file mode 100644 index 0000000000..48a5ff5018 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h @@ -0,0 +1,30 @@ +/* + * + * 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 CALCULATOR_H +#define CALCULATOR_H + + +class CalculatorForward { + +public: + + virtual long subtractForward(long a, long b) = 0; + virtual long addForward(long a, long b) = 0; +}; + + +#endif // CALCULATOR_H diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module new file mode 100644 index 0000000000..b4aaa37a4c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType new file mode 100644 index 0000000000..6a5a152266 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h new file mode 100644 index 0000000000..0cacc5916c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h @@ -0,0 +1,33 @@ +/* + * + * 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 CALCULATORIMPL_H +#define CALCULATORIMPL_H + +#include "Calculator.h" + +class CalculatorBackImpl : public Calculator +{ +public: + CalculatorImpl(); + virtual ~CalculatorImpl(); + virtual long addBack(long a, long b); + virtual long subtractBack(long a, long b); + +}; + +#endif // diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType new file mode 100644 index 0000000000..9617b22aee --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h new file mode 100644 index 0000000000..f3b0467002 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h @@ -0,0 +1,32 @@ +/* + * + * 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 CALCULATORIMPL_H +#define CALCULATORIMPL_H + +#include "Calculator.h" + +class CalculatorForwardImpl : public Calculator +{ +public: + CalculatorImpl(); + virtual ~CalculatorImpl(); + virtual long addForward(long a, long b); + virtual long subtractForward(long a, long b); + +}; + +#endif // diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment new file mode 100644 index 0000000000..29fd03c399 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment @@ -0,0 +1,39 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h new file mode 100644 index 0000000000..d5e1a702c6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h @@ -0,0 +1,94 @@ +/* + * + * 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 CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: +//char (simple extra type) + virtual const char* getCustomerInformationChar(char * p1, const char* customerID ) = 0; + virtual const char* getCustomerInfoAChar(char * p1,const char*) = 0; + virtual const char* getCustomerInfoBChar(char * p1, char* customerID ) = 0; + virtual const char* getCustomerInfoCChar(char * p1, char customerID ) = 0; + virtual const char* getCustomerInfoDChar(char * p1,char) = 0; + virtual const char* getCustomerInfoEChar(char * p1 , char *) = 0; + virtual const char* getCustomerInfoFChar(char * p1, char * p1, char *customerID ) = 0; + virtual const char* getCustomerInfoGChar(char * p1, char *, char * p1,signed char *customerID ) = 0; + virtual const char* getCustomerInfoHChar(unsigned char *customerID, const char, ) = 0; + virtual const char* getCustomerInfoHChar(unsigned char *customerID, const char*) = 0; + +//long (duplicate the types) + virtual const long* getCustomerInformationLong(const long* customerID, const long* customerID ) = 0; + virtual const long* getCustomerInfoALong(const long*,const long*) = 0; + virtual const long* getCustomerInfoBLong(long* customerID, long* customerID2 ) = 0; + virtual const long* getCustomerInfoCLong(long customerID , long customerID2 ) = 0; + virtual const long* getCustomerInfoDLong(long,long) = 0; + virtual const long* getCustomerInfoELong(long *, long*) = 0; + virtual const long* getCustomerInfoFLong(long *customerID, long* customerID2 ) = 0; + virtual const long* getCustomerInfoGLong(signed long *customerID, signed long *customerID2 ) = 0; + virtual const long* getCustomerInfoHLong(signed long *customerID, signed long *customerID2 ) = 0; + +//int + virtual const int* getCustomerInformationInt(char*, const int* customerID ) = 0; + virtual const int* getCustomerInfoAInt(char*,const int*) = 0; + virtual const int* getCustomerInfoBInt(char*,int* customerID ) = 0; + virtual const int* getCustomerInfoCInt(char*,int customerID ) = 0; + virtual const int* getCustomerInfoDInt(char*,int) = 0; + virtual const int* getCustomerInfoEInt(char*,int *) = 0; + virtual const int* getCustomerInfoFInt(char*,int *customerID ) = 0; + virtual const int* getCustomerInfoGInt(char*,signed int *customerID ) = 0; + virtual const int* getCustomerInfoHInt(char*,unsigned int *customerID ) = 0; + + +//__int64 + virtual const __int64* getCustomerInformationint64(Diamond&,const __int64* customerID ) = 0; + virtual const __int64* getCustomerInfoAint64(Diamond&, const __int64*) = 0; + virtual const __int64* getCustomerInfoBint64( Diamond&, __int64* customerID ) = 0; + virtual const __int64* getCustomerInfoCint64(Diamond&,__int64 customerID ) = 0; + virtual const __int64* getCustomerInfoDint64(Diamond& myDiamond,__int64) = 0; + virtual const __int64* getCustomerInfoEint64(Diamond& myDiamond, __int64 *) = 0; + virtual const __int64* getCustomerInfoFint64(Diamond& myDiamond, __int64 *customerID ) = 0; + virtual const __int64* getCustomerInfoGint64(Diamond& myDiamond, signed __int64 *customerID ) = 0; + virtual const __int64* getCustomerInfoHint64(const Diamond& myDiamond, unsigned int64 *customerID ) = 0; + +//void + virtual const void* getCustomerInformationVoid(float& f, const __int64* customerID ) = 0; + virtual void getCustomerInfoAVoid(const float& f, const __int64*) = 0; + virtual void getCustomerInfoBVoid( ) = 0; + virtual void getCustomerInfoCVoid() = 0; + virtual void getCustomerInfoDVoid(void) = 0; + virtual char getCustomerInfoEVoid(void) = 0; + virtual char getCustomerInfoFVoid() = 0; + virtual char getCustomerInfoGVoid( void ) = 0; + +//inline + virtual inline const char * getCustomerInfoAInline(int,int,int,int, char* customer id) = 0; + inline int getCustomerInfoBInline(int*,int* f, int* g, char* customer id) = 0; + virtual inline friend const unsigned int * getCustomerInfoCInline(char* customer id) = 0; + +//tricky examples + int getCustomerInfoTrickyA(const char, const char) = 0; + int getCustomerInfoTrickyB(int myInt, int myInt) = 0; + + + + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..d39a3bdadf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h new file mode 100644 index 0000000000..546df093a3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h @@ -0,0 +1,34 @@ +/* + * + * 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 CustomerInfoImpl_h +#define CustomerInfoImpl_h + +#include "CustomerInfo.h" + + + +class CustomerInfoImpl : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment new file mode 100644 index 0000000000..fa6d101363 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment @@ -0,0 +1,39 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h new file mode 100644 index 0000000000..d3be176bfd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h @@ -0,0 +1,89 @@ +/* + * + * 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 CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: +//char + virtual const char* getCustomerInformationChar(const char* customerID ) = 0; + virtual const char* getCustomerInfoAChar(const char*) = 0; + virtual const char* getCustomerInfoBChar(char* customerID ) = 0; + virtual const char* getCustomerInfoCChar(char customerID ) = 0; + virtual const char* getCustomerInfoDChar(char) = 0; + virtual const char* getCustomerInfoEChar(char *) = 0; + virtual const char* getCustomerInfoFChar(char *customerID ) = 0; + virtual const char* getCustomerInfoGChar(signed char *customerID ) = 0; + virtual const char* getCustomerInfoHChar(unsigned char *customerID ) = 0; + +//long + virtual const long* getCustomerInformationLong(const long* customerID ) = 0; + virtual const long* getCustomerInfoALong(const long*) = 0; + virtual const long* getCustomerInfoBLong(long* customerID ) = 0; + virtual const long* getCustomerInfoCLong(long customerID ) = 0; + virtual const long* getCustomerInfoDLong(long) = 0; + virtual const long* getCustomerInfoELong(long *) = 0; + virtual const long* getCustomerInfoFLong(long *customerID ) = 0; + virtual const long* getCustomerInfoGLong(signed long *customerID ) = 0; + virtual const long* getCustomerInfoHLong(unsigned long *customerID ) = 0; + +//int + virtual const int* getCustomerInformationInt(const int* customerID ) = 0; + virtual const int* getCustomerInfoAInt(const int*) = 0; + virtual const int* getCustomerInfoBInt(int* customerID ) = 0; + virtual const int* getCustomerInfoCInt(int customerID ) = 0; + virtual const int* getCustomerInfoDInt(int) = 0; + virtual const int* getCustomerInfoEInt(int *) = 0; + virtual const int* getCustomerInfoFInt(int *customerID ) = 0; + virtual const int* getCustomerInfoGInt(signed int *customerID ) = 0; + virtual const int* getCustomerInfoHInt(unsigned int *customerID ) = 0; + + +//__int64 + virtual const __int64* getCustomerInformationint64(const __int64* customerID ) = 0; + virtual const __int64* getCustomerInfoAint64(const __int64*) = 0; + virtual const __int64* getCustomerInfoBint64(__int64* customerID ) = 0; + virtual const __int64* getCustomerInfoCint64(__int64 customerID ) = 0; + virtual const __int64* getCustomerInfoDint64(__int64) = 0; + virtual const __int64* getCustomerInfoEint64(__int64 *) = 0; + virtual const __int64* getCustomerInfoFint64(__int64 *customerID ) = 0; + virtual const __int64* getCustomerInfoGint64(signed __int64 *customerID ) = 0; + virtual const __int64* getCustomerInfoHint64(unsigned int64 *customerID ) = 0; + +//void + virtual const void* getCustomerInformationVoid(const __int64* customerID ) = 0; + virtual void getCustomerInfoAVoid(const __int64*) = 0; + virtual void getCustomerInfoBVoid( ) = 0; + virtual void getCustomerInfoCVoid() = 0; + virtual void getCustomerInfoDVoid(void) = 0; + +//inline + virtual inline const char * getCustomerInfoAInline(char* customer id) = 0; + inline int getCustomerInfoBInline(char* customer id) = 0; + virtual inline friend const unsigned int * getCustomerInfoCInline(char* customer id) = 0; + +//tricky examples + int getCustomerInfoTrickyA(const char) = 0; + int getCustomerInfoTrickyB(int myInt) = 0; + + + + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..d39a3bdadf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h new file mode 100644 index 0000000000..50d37ee4f2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h @@ -0,0 +1,43 @@ +/* + * + * 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 CustomerInfoImpl_h +#define CustomerInfoImpl_h + +#include "CustomerInfo.h" + + + +class CustomerInfoImpl : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; + +class CustomerInfoImpl2 : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation2(const char* customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment new file mode 100644 index 0000000000..491e79f5e4 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment @@ -0,0 +1,38 @@ + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h new file mode 100644 index 0000000000..7bd355b3ab --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.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 CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformation(const char* customerID) = 0; + +}; + + +class CustomerInfoSecond +{ +public: + virtual const char* getCustomerInformationSecond(const char* customerID) = 0; + +}; + + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..179af71dca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h new file mode 100644 index 0000000000..85e96bb348 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h @@ -0,0 +1,46 @@ +/* + * + * 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. + */ + + +// Class definition for the implementation + +#ifndef CustomerInfoImpl_h +#define CustomerInfoImpl_h + +#include "CustomerInfo.h" + + + +class CustomerInfoImpl : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; + +class CustomerInfoImpl2 : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation2(const char* customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h new file mode 100644 index 0000000000..a65b1f944c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.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. + */ +// MyValue.h: interface for the MyValueImpl class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef MyValue_h +#define MyValue_h +#include +using std::string; +class MyValue +{ +public: + virtual float getMyValue(const char* customerID) = 0; + virtual float getMyValueS(const string& customerID) = 0; + virtual string getCustname(string& customerID) = 0; + virtual const string& getCustnamecs(string customerID) = 0; + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType new file mode 100644 index 0000000000..df0d97a438 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp new file mode 100644 index 0000000000..f7a8171a65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp @@ -0,0 +1,38 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname(string& customerID); + virtual const string& getCustnamecs(string customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..5c8293b51e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h new file mode 100644 index 0000000000..d96115fb3f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h @@ -0,0 +1,33 @@ +/* + * + * 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 StockQuoteService_h +#define StockQuoteService_h +#include +#include "commonj/sdo/sdo.h" +using std::string; +class StockQuoteService +{ +public: + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; + +}; + +#endif // StockQuoteService_h diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module new file mode 100644 index 0000000000..565f4a74ec --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module @@ -0,0 +1,59 @@ + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment new file mode 100644 index 0000000000..5666c51a41 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment @@ -0,0 +1,38 @@ + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h new file mode 100644 index 0000000000..e41f9e8287 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h @@ -0,0 +1,37 @@ +/* + * + * 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 CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformation(const char* customerID) = 0; + +}; + + +class CustomerInfoSecond +{ +public: + virtual const char* getCustomerInformationSecond(const char* customerID) = 0; + +}; + + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..179af71dca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h new file mode 100644 index 0000000000..b1360c5994 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h @@ -0,0 +1,47 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef CustomerInfoImpl_h +#define CustomerInfoImpl_h + +#include "CustomerInfo.h" + + +/* +class CustomerInfoImpl : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; + +*/ +namespace Other { + class CustomerInfoImpl : public CustomerInfo + { + public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformationOther(const char* customerID); + + }; +} + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h new file mode 100644 index 0000000000..8b921bc2bf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.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. + */ + +// MyValue.h: interface for the MyValueImpl class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef MyValue_h +#define MyValue_h +#include +using std::string; +class MyValue +{ +public: + virtual float getMyValue(const char* customerID) = 0; + virtual float getMyValueS(const string& customerID) = 0; + virtual string getCustname(string& customerID) = 0; + virtual const string& getCustnamecs(string customerID) = 0; + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType new file mode 100644 index 0000000000..df0d97a438 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp new file mode 100644 index 0000000000..f7a8171a65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp @@ -0,0 +1,38 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname(string& customerID); + virtual const string& getCustnamecs(string customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..5c8293b51e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h new file mode 100644 index 0000000000..919b514e1a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h @@ -0,0 +1,32 @@ +/* + * + * 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 StockQuoteService_h +#define StockQuoteService_h +#include +#include "commonj/sdo/sdo.h" +using std::string; +class StockQuoteService +{ +public: + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; + +}; + +#endif // StockQuoteService_h diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module new file mode 100644 index 0000000000..565f4a74ec --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module @@ -0,0 +1,59 @@ + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h new file mode 100644 index 0000000000..503f771bb2 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h @@ -0,0 +1,39 @@ +/* + * + * 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. + */ + +// MyValue.h: interface for the MyValueImpl class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef MyValue_h +#define MyValue_h +#include +using std::string; + +namespace Other { + class MyValue + { + public: + virtual float getMyValueOther(const char* customerID) = 0; + virtual float getMyValueSOther(const string& customerID) = 0; + virtual string getCustnameOther(string& customerID) = 0; + virtual const string& getCustnamecsOther(string customerID) = 0; + } +} + + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType new file mode 100644 index 0000000000..8673c813a6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp new file mode 100644 index 0000000000..f7a8171a65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp @@ -0,0 +1,38 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname(string& customerID); + virtual const string& getCustnamecs(string customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module new file mode 100644 index 0000000000..6572621f1d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module @@ -0,0 +1,48 @@ + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h new file mode 100644 index 0000000000..ea8ebbb792 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h @@ -0,0 +1,37 @@ +/* + * + * 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. + */ + +// MyValue.h: interface for the MyValueImpl class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef MyValue_h +#define MyValue_h +#include +using std::string; + +namespace Other { + class MyValue + { + public: + virtual float getMyValueOther(const char* customerID) = 0; + virtual float getMyValueSOther(const string& customerID) = 0; + virtual string getCustnameOther(string& customerID) = 0; + virtual const string& getCustnamecsOther(string customerID) = 0; + } +} +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType new file mode 100644 index 0000000000..c8d68fba5a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp new file mode 100644 index 0000000000..f7a8171a65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp @@ -0,0 +1,38 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname(string& customerID); + virtual const string& getCustnamecs(string customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module new file mode 100644 index 0000000000..6572621f1d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module @@ -0,0 +1,48 @@ + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX new file mode 100644 index 0000000000..10c1805244 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX @@ -0,0 +1,38 @@ + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX new file mode 100644 index 0000000000..3eea80439f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX @@ -0,0 +1,60 @@ + + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment new file mode 100644 index 0000000000..491e79f5e4 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment @@ -0,0 +1,38 @@ + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h new file mode 100644 index 0000000000..7bd355b3ab --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.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 CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformation(const char* customerID) = 0; + +}; + + +class CustomerInfoSecond +{ +public: + virtual const char* getCustomerInformationSecond(const char* customerID) = 0; + +}; + + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..179af71dca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h new file mode 100644 index 0000000000..e247a9b0bb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h @@ -0,0 +1,45 @@ +/* + * + * 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. + */ + +// Class definition for the implementation + +#ifndef CustomerInfoImpl_h +#define CustomerInfoImpl_h + +#include "CustomerInfo.h" + + + +class CustomerInfoImpl : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; + +class CustomerInfoImpl2 : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h new file mode 100644 index 0000000000..a65b1f944c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.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. + */ +// MyValue.h: interface for the MyValueImpl class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef MyValue_h +#define MyValue_h +#include +using std::string; +class MyValue +{ +public: + virtual float getMyValue(const char* customerID) = 0; + virtual float getMyValueS(const string& customerID) = 0; + virtual string getCustname(string& customerID) = 0; + virtual const string& getCustnamecs(string customerID) = 0; + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType new file mode 100644 index 0000000000..df0d97a438 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp new file mode 100644 index 0000000000..f7a8171a65 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp @@ -0,0 +1,38 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname(string& customerID); + virtual const string& getCustnamecs(string customerID); + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..5c8293b51e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h new file mode 100644 index 0000000000..919b514e1a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h @@ -0,0 +1,32 @@ +/* + * + * 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 StockQuoteService_h +#define StockQuoteService_h +#include +#include "commonj/sdo/sdo.h" +using std::string; +class StockQuoteService +{ +public: + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; + +}; + +#endif // StockQuoteService_h diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module new file mode 100644 index 0000000000..565f4a74ec --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module @@ -0,0 +1,59 @@ + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment new file mode 100644 index 0000000000..687162ec2a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment @@ -0,0 +1,39 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h new file mode 100644 index 0000000000..b944d161eb --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h @@ -0,0 +1,40 @@ +/* + * + * 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 CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformationCharPublic(char * p1, const char* customerID ) = 0; + virtual const char* getCustomerInfoACharPublic(char * p1,const char*) = 0; + virtual const char* getCustomerInfoBCharPublic(char * p1, char* customerID ) = 0; + +private: + virtual const char* getCustomerInformationCharPrivate(char * p1, const char* customerID ) = 0; + virtual const char* getCustomerInfoACharPrivate(char * p1,const char*) = 0; + virtual const char* getCustomerInfoBCharPrivate(char * p1, char* customerID ) = 0; + +protected: + virtual const char* getCustomerInformationCharProtected(char * p1, const char* customerID ) = 0; + virtual const char* getCustomerInfoACharProtected(char * p1,const char*) = 0; + virtual const char* getCustomerInfoBCharProtected(char * p1, char* customerID ) = 0; + + +}; + +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType new file mode 100644 index 0000000000..179af71dca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h new file mode 100644 index 0000000000..87cac61085 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h @@ -0,0 +1,34 @@ +/* + * + * 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. + */ +// Class definition for the implementation + +#ifndef CustomerInfoImpl_h +#define CustomerInfoImpl_h + +#include "CustomerInfo.h" + + + +class CustomerInfoImpl : public CustomerInfo +{ +public: + CustomerInfoImpl(); + virtual ~CustomerInfoImpl(); + virtual const char* getCustomerInformation(const char* customerID); + +}; +#endif diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp new file mode 100644 index 0000000000..04980879e3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp @@ -0,0 +1,67 @@ +/* + * 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 "CalculatorImpl_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 + CalculatorImpl_CalculatorService_Proxy* CalculatorImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target) + { + return new CalculatorImpl_CalculatorService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CalculatorImpl_CalculatorService_Proxy_Destructor(void* proxy) + { + delete (CalculatorImpl_CalculatorService_Proxy*)proxy; + } +} + +CalculatorImpl_CalculatorService_Proxy::CalculatorImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CalculatorImpl_CalculatorService_Proxy::~CalculatorImpl_CalculatorService_Proxy() +{ + if (target) + delete target; +} + +long CalculatorImpl_CalculatorService_Proxy::subtract( long arg0, long arg1) +{ + Operation operation("subtract", 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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h new file mode 100644 index 0000000000..748c493865 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 CalculatorImpl_CalculatorService_Proxy_h +#define CalculatorImpl_CalculatorService_Proxy_h + +#include "Calculator.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CalculatorImpl_CalculatorService_Proxy : public Calculator +{ +public: + CalculatorImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CalculatorImpl_CalculatorService_Proxy(); + virtual long subtract( long a, long b); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CalculatorImpl_CalculatorService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp new file mode 100644 index 0000000000..c174fb3a47 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp @@ -0,0 +1,71 @@ +/* + * 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 "CalculatorImpl_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 + CalculatorImpl_CalculatorService_Wrapper* CalculatorImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CalculatorImpl_CalculatorService_Wrapper(target); + } +} + +CalculatorImpl_CalculatorService_Wrapper::CalculatorImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CalculatorImpl*)getImplementation(); +} + +CalculatorImpl_CalculatorService_Wrapper::~CalculatorImpl_CalculatorService_Wrapper() +{ + releaseImplementation(); +} + +void* CalculatorImpl_CalculatorService_Wrapper::newImplementation() +{ + return new CalculatorImpl; +} + +void CalculatorImpl_CalculatorService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CalculatorImpl_CalculatorService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "subtract") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + *(long*)operation.getReturnValue() = impl->subtract(p0, p1); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h new file mode 100644 index 0000000000..8856c7786c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_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 CalculatorImpl_CalculatorService_Wrapper_h +#define CalculatorImpl_CalculatorService_Wrapper_h + +#include "CalculatorImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CalculatorImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CalculatorImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CalculatorImpl_CalculatorService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CalculatorImpl* impl; +}; + +#endif // CalculatorImpl_CalculatorService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp b/sca-cpp/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/sca-cpp/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/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h b/sca-cpp/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/sca-cpp/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 + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp new file mode 100644 index 0000000000..9087c58b0f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp @@ -0,0 +1,699 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + { + return new CustomerInfoImpl_CustomerInfoService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) + { + delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; + } +} + +CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() +{ + if (target) + delete target; +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationChar( char* arg0, const char* arg1) +{ + Operation operation("getCustomerInformationChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar( char* arg0, const char* arg1) +{ + Operation operation("getCustomerInfoAChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0, char* arg1) +{ + Operation operation("getCustomerInfoBChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char* arg0, char arg1) +{ + Operation operation("getCustomerInfoCChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char* arg0, char arg1) +{ + Operation operation("getCustomerInfoDChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0, char* arg1) +{ + Operation operation("getCustomerInfoEChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0, char* arg1, char* arg2) +{ + Operation operation("getCustomerInfoFChar", 3); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + operation.setParameter(2, (void*)arg2); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( char* arg0, char* arg1, char* arg2, signed char* arg3) +{ + Operation operation("getCustomerInfoGChar", 4); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + operation.setParameter(2, (void*)arg2); + + operation.setParameter(3, (void*)arg3); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char arg1) +{ + Operation operation("getCustomerInfoHChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char* arg1) +{ + Operation operation("getCustomerInfoHChar", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0, const long* arg1) +{ + Operation operation("getCustomerInformationLong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0, const long* arg1) +{ + Operation operation("getCustomerInfoALong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0, long* arg1) +{ + Operation operation("getCustomerInfoBLong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0, long arg1) +{ + Operation operation("getCustomerInfoCLong", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0, long arg1) +{ + Operation operation("getCustomerInfoDLong", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0, long* arg1) +{ + Operation operation("getCustomerInfoELong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0, long* arg1) +{ + Operation operation("getCustomerInfoFLong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0, signed long* arg1) +{ + Operation operation("getCustomerInfoGLong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( signed long* arg0, signed long* arg1) +{ + Operation operation("getCustomerInfoHLong", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt( char* arg0, const int* arg1) +{ + Operation operation("getCustomerInformationInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt( char* arg0, const int* arg1) +{ + Operation operation("getCustomerInfoAInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( char* arg0, int* arg1) +{ + Operation operation("getCustomerInfoBInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( char* arg0, int arg1) +{ + Operation operation("getCustomerInfoCInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( char* arg0, int arg1) +{ + Operation operation("getCustomerInfoDInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( char* arg0, int* arg1) +{ + Operation operation("getCustomerInfoEInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( char* arg0, int* arg1) +{ + Operation operation("getCustomerInfoFInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( char* arg0, signed int* arg1) +{ + Operation operation("getCustomerInfoGInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( char* arg0, unsigned int* arg1) +{ + Operation operation("getCustomerInfoHInt", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64( Diamond& arg0, const __int64* arg1) +{ + Operation operation("getCustomerInformationint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64( Diamond& arg0, const __int64* arg1) +{ + Operation operation("getCustomerInfoAint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( Diamond& arg0, __int64* arg1) +{ + Operation operation("getCustomerInfoBint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( Diamond& arg0, __int64 arg1) +{ + Operation operation("getCustomerInfoCint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( Diamond& arg0, __int64 arg1) +{ + Operation operation("getCustomerInfoDint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( Diamond& arg0, __int64* arg1) +{ + Operation operation("getCustomerInfoEint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( Diamond& arg0, __int64* arg1) +{ + Operation operation("getCustomerInfoFint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( Diamond& arg0, signed __int64* arg1) +{ + Operation operation("getCustomerInfoGint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64(const Diamond& arg0, unsigned int64* arg1) +{ + Operation operation("getCustomerInfoHint64", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid( float& arg0, const __int64* arg1) +{ + Operation operation("getCustomerInformationVoid", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const void*)operation.getReturnValue(); + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const float& arg0, const __int64* arg1) +{ + Operation operation("getCustomerInfoAVoid", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return; + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid() +{ + Operation operation("getCustomerInfoBVoid", 0); + + target->invoke(operation); + return; + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid() +{ + Operation operation("getCustomerInfoCVoid", 0); + + target->invoke(operation); + return; + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid() +{ + Operation operation("getCustomerInfoDVoid", 0); + + target->invoke(operation); + return; + +} + +char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEVoid() +{ + Operation operation("getCustomerInfoEVoid", 0); + char ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFVoid() +{ + Operation operation("getCustomerInfoFVoid", 0); + char ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGVoid() +{ + Operation operation("getCustomerInfoGVoid", 0); + char ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( int arg0, int arg1, int arg2, int arg3, char* customer arg4) +{ + Operation operation("getCustomerInfoAInline", 5); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + operation.setParameter(2, (void*)&arg2); + + operation.setParameter(3, (void*)&arg3); + + operation.setParameter(4, (void*)arg4); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( int* arg0, int* arg1, int* arg2, char* customer arg3) +{ + Operation operation("getCustomerInfoBInline", 4); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + operation.setParameter(2, (void*)arg2); + + operation.setParameter(3, (void*)arg3); + + int ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0) +{ + Operation operation("getCustomerInfoCInline", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (friend const unsigned int*)operation.getReturnValue(); + +} + +int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0, const char arg1) +{ + Operation operation("getCustomerInfoTrickyA", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + int ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0, int arg1) +{ + Operation operation("getCustomerInfoTrickyB", 2); + operation.setParameter(0, (void*)&arg0); + + operation.setParameter(1, (void*)&arg1); + + int ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..47b604358a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h @@ -0,0 +1,83 @@ +/* + * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h +#define CustomerInfoImpl_CustomerInfoService_Proxy_h + +#include "/CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformationChar( char* p1, const char* customerID); + virtual const char* getCustomerInfoAChar( char* p1, const char* ); + virtual const char* getCustomerInfoBChar( char* p1, char* customerID); + virtual const char* getCustomerInfoCChar( char* p1, char customerID); + virtual const char* getCustomerInfoDChar( char* p1, char ); + virtual const char* getCustomerInfoEChar( char* p1, char* ); + virtual const char* getCustomerInfoFChar( char* p1, char* p1, char* customerID); + virtual const char* getCustomerInfoGChar( char* p1, char* , char* p1, signed char* customerID); + virtual const char* getCustomerInfoHChar( unsigned char* customerID, const char ); + virtual const char* getCustomerInfoHChar( unsigned char* customerID, const char* ); + virtual const long* getCustomerInformationLong(const long* customerID, const long* customerID); + virtual const long* getCustomerInfoALong(const long* , const long* ); + virtual const long* getCustomerInfoBLong( long* customerID, long* customerID2); + virtual const long* getCustomerInfoCLong( long customerID, long customerID2); + virtual const long* getCustomerInfoDLong( long , long ); + virtual const long* getCustomerInfoELong( long* , long* ); + virtual const long* getCustomerInfoFLong( long* customerID, long* customerID2); + virtual const long* getCustomerInfoGLong( signed long* customerID, signed long* customerID2); + virtual const long* getCustomerInfoHLong( signed long* customerID, signed long* customerID2); + virtual const int* getCustomerInformationInt( char* , const int* customerID); + virtual const int* getCustomerInfoAInt( char* , const int* ); + virtual const int* getCustomerInfoBInt( char* , int* customerID); + virtual const int* getCustomerInfoCInt( char* , int customerID); + virtual const int* getCustomerInfoDInt( char* , int ); + virtual const int* getCustomerInfoEInt( char* , int* ); + virtual const int* getCustomerInfoFInt( char* , int* customerID); + virtual const int* getCustomerInfoGInt( char* , signed int* customerID); + virtual const int* getCustomerInfoHInt( char* , unsigned int* customerID); + virtual const __int64* getCustomerInformationint64( Diamond& , const __int64* customerID); + virtual const __int64* getCustomerInfoAint64( Diamond& , const __int64* ); + virtual const __int64* getCustomerInfoBint64( Diamond& , __int64* customerID); + virtual const __int64* getCustomerInfoCint64( Diamond& , __int64 customerID); + virtual const __int64* getCustomerInfoDint64( Diamond& myDiamond, __int64 ); + virtual const __int64* getCustomerInfoEint64( Diamond& myDiamond, __int64* ); + virtual const __int64* getCustomerInfoFint64( Diamond& myDiamond, __int64* customerID); + virtual const __int64* getCustomerInfoGint64( Diamond& myDiamond, signed __int64* customerID); + virtual const __int64* getCustomerInfoHint64(const Diamond& myDiamond, unsigned int64* customerID); + virtual const void* getCustomerInformationVoid( float& f, const __int64* customerID); + virtual void getCustomerInfoAVoid(const float& f, const __int64* ); + virtual void getCustomerInfoBVoid(); + virtual void getCustomerInfoCVoid(); + virtual void getCustomerInfoDVoid( void ); + virtual char getCustomerInfoEVoid( void ); + virtual char getCustomerInfoFVoid(); + virtual char getCustomerInfoGVoid( void ); + virtual const char* getCustomerInfoAInline( int , int , int , int , char* customer id); + virtual int getCustomerInfoBInline( int* , int* f, int* g, char* customer id); + virtual friend const unsigned int* getCustomerInfoCInline( char* customer id); + virtual int getCustomerInfoTrickyA(const char , const char ); + virtual int getCustomerInfoTrickyB( int myInt, int myInt); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..51c975ec9b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,449 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl*)getImplementation(); +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformationChar") + { + char* p0 = ( char*)operation.getParameter(0); + const char* p1 = (const char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInformationChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoAChar") + { + char* p0 = ( char*)operation.getParameter(0); + const char* p1 = (const char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoAChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoBChar") + { + char* p0 = ( char*)operation.getParameter(0); + char* p1 = ( char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoBChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoCChar") + { + char* p0 = ( char*)operation.getParameter(0); + char& p1 = *( char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoCChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoDChar") + { + char* p0 = ( char*)operation.getParameter(0); + char& p1 = *( char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoDChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoEChar") + { + char* p0 = ( char*)operation.getParameter(0); + char* p1 = ( char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoEChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoFChar") + { + char* p0 = ( char*)operation.getParameter(0); + char* p1 = ( char*)operation.getParameter(1); + char* p2 = ( char*)operation.getParameter(2); + + operation.setReturnValue((void*) impl->getCustomerInfoFChar(p0, p1, p2)); + return; + } + if (operationName == "getCustomerInfoGChar") + { + char* p0 = ( char*)operation.getParameter(0); + char* p1 = ( char*)operation.getParameter(1); + char* p2 = ( char*)operation.getParameter(2); + signed char* p3 = ( signed char*)operation.getParameter(3); + + operation.setReturnValue((void*) impl->getCustomerInfoGChar(p0, p1, p2, p3)); + return; + } + if (operationName == "getCustomerInfoHChar") + { + unsigned char* p0 = ( unsigned char*)operation.getParameter(0); + const char& p1 = *(const char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoHChar(p0, p1)); + return; + } + if (operationName == "getCustomerInfoHChar") + { + unsigned char* p0 = ( unsigned char*)operation.getParameter(0); + const char* p1 = (const char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoHChar(p0, p1)); + return; + } + if (operationName == "getCustomerInformationLong") + { + const long* p0 = (const long*)operation.getParameter(0); + const long* p1 = (const long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInformationLong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoALong") + { + const long* p0 = (const long*)operation.getParameter(0); + const long* p1 = (const long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoALong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoBLong") + { + long* p0 = ( long*)operation.getParameter(0); + long* p1 = ( long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoBLong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoCLong") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoCLong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoDLong") + { + long& p0 = *( long*)operation.getParameter(0); + long& p1 = *( long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoDLong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoELong") + { + long* p0 = ( long*)operation.getParameter(0); + long* p1 = ( long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoELong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoFLong") + { + long* p0 = ( long*)operation.getParameter(0); + long* p1 = ( long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoFLong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoGLong") + { + signed long* p0 = ( signed long*)operation.getParameter(0); + signed long* p1 = ( signed long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoGLong(p0, p1)); + return; + } + if (operationName == "getCustomerInfoHLong") + { + signed long* p0 = ( signed long*)operation.getParameter(0); + signed long* p1 = ( signed long*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoHLong(p0, p1)); + return; + } + if (operationName == "getCustomerInformationInt") + { + char* p0 = ( char*)operation.getParameter(0); + const int* p1 = (const int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInformationInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoAInt") + { + char* p0 = ( char*)operation.getParameter(0); + const int* p1 = (const int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoAInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoBInt") + { + char* p0 = ( char*)operation.getParameter(0); + int* p1 = ( int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoBInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoCInt") + { + char* p0 = ( char*)operation.getParameter(0); + int& p1 = *( int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoCInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoDInt") + { + char* p0 = ( char*)operation.getParameter(0); + int& p1 = *( int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoDInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoEInt") + { + char* p0 = ( char*)operation.getParameter(0); + int* p1 = ( int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoEInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoFInt") + { + char* p0 = ( char*)operation.getParameter(0); + int* p1 = ( int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoFInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoGInt") + { + char* p0 = ( char*)operation.getParameter(0); + signed int* p1 = ( signed int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoGInt(p0, p1)); + return; + } + if (operationName == "getCustomerInfoHInt") + { + char* p0 = ( char*)operation.getParameter(0); + unsigned int* p1 = ( unsigned int*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoHInt(p0, p1)); + return; + } + if (operationName == "getCustomerInformationint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + const __int64* p1 = (const __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInformationint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoAint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + const __int64* p1 = (const __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoAint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoBint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + __int64* p1 = ( __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoBint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoCint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + __int64& p1 = *( __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoCint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoDint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + __int64& p1 = *( __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoDint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoEint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + __int64* p1 = ( __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoEint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoFint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + __int64* p1 = ( __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoFint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoGint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + signed __int64* p1 = ( signed __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoGint64(p0, p1)); + return; + } + if (operationName == "getCustomerInfoHint64") + { + Diamond& p0 = *(Diamond*)operation.getParameter(0); + unsigned int64* p1 = ( unsigned int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoHint64(p0, p1)); + return; + } + if (operationName == "getCustomerInformationVoid") + { + float& p0 = *(float*)operation.getParameter(0); + const __int64* p1 = (const __int64*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInformationVoid(p0, p1)); + return; + } + if (operationName == "getCustomerInfoAVoid") + { + float& p0 = *(float*)operation.getParameter(0); + const __int64* p1 = (const __int64*)operation.getParameter(1); + impl->getCustomerInfoAVoid(p0, p1); + return; + } + if (operationName == "getCustomerInfoBVoid") + { + impl->getCustomerInfoBVoid(); + return; + } + if (operationName == "getCustomerInfoCVoid") + { + impl->getCustomerInfoCVoid(); + return; + } + if (operationName == "getCustomerInfoDVoid") + { + impl->getCustomerInfoDVoid(); + return; + } + if (operationName == "getCustomerInfoEVoid") + { + *(char*)operation.getReturnValue() = impl->getCustomerInfoEVoid(); + return; + } + if (operationName == "getCustomerInfoFVoid") + { + *(char*)operation.getReturnValue() = impl->getCustomerInfoFVoid(); + return; + } + if (operationName == "getCustomerInfoGVoid") + { + *(char*)operation.getReturnValue() = impl->getCustomerInfoGVoid(); + return; + } + if (operationName == "getCustomerInfoAInline") + { + int& p0 = *( int*)operation.getParameter(0); + int& p1 = *( int*)operation.getParameter(1); + int& p2 = *( int*)operation.getParameter(2); + int& p3 = *( int*)operation.getParameter(3); + char* customer p4 = ( char* customer)operation.getParameter(4); + + operation.setReturnValue((void*) impl->getCustomerInfoAInline(p0, p1, p2, p3, p4)); + return; + } + if (operationName == "getCustomerInfoBInline") + { + int* p0 = ( int*)operation.getParameter(0); + int* p1 = ( int*)operation.getParameter(1); + int* p2 = ( int*)operation.getParameter(2); + char* customer p3 = ( char* customer)operation.getParameter(3); + *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0, p1, p2, p3); + return; + } + if (operationName == "getCustomerInfoCInline") + { + char* customer p0 = ( char* customer)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoCInline(p0)); + return; + } + if (operationName == "getCustomerInfoTrickyA") + { + const char& p0 = *(const char*)operation.getParameter(0); + const char& p1 = *(const char*)operation.getParameter(1); + *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0, p1); + return; + } + if (operationName == "getCustomerInfoTrickyB") + { + int& p0 = *( int*)operation.getParameter(0); + int& p1 = *( int*)operation.getParameter(1); + *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0, p1); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..778a168220 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_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 CustomerInfoImpl_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl* impl; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp new file mode 100644 index 0000000000..a033e9b11e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp @@ -0,0 +1,556 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + { + return new CustomerInfoImpl_CustomerInfoService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) + { + delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; + } +} + +CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() +{ + if (target) + delete target; +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationChar(const char* arg0) +{ + Operation operation("getCustomerInformationChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar(const char* arg0) +{ + Operation operation("getCustomerInfoAChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0) +{ + Operation operation("getCustomerInfoBChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char arg0) +{ + Operation operation("getCustomerInfoCChar", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char arg0) +{ + Operation operation("getCustomerInfoDChar", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0) +{ + Operation operation("getCustomerInfoEChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0) +{ + Operation operation("getCustomerInfoFChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( signed char* arg0) +{ + Operation operation("getCustomerInfoGChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0) +{ + Operation operation("getCustomerInfoHChar", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0) +{ + Operation operation("getCustomerInformationLong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0) +{ + Operation operation("getCustomerInfoALong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0) +{ + Operation operation("getCustomerInfoBLong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0) +{ + Operation operation("getCustomerInfoCLong", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0) +{ + Operation operation("getCustomerInfoDLong", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0) +{ + Operation operation("getCustomerInfoELong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0) +{ + Operation operation("getCustomerInfoFLong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0) +{ + Operation operation("getCustomerInfoGLong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( unsigned long* arg0) +{ + Operation operation("getCustomerInfoHLong", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const long*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt(const int* arg0) +{ + Operation operation("getCustomerInformationInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt(const int* arg0) +{ + Operation operation("getCustomerInfoAInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( int* arg0) +{ + Operation operation("getCustomerInfoBInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( int arg0) +{ + Operation operation("getCustomerInfoCInt", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( int arg0) +{ + Operation operation("getCustomerInfoDInt", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( int* arg0) +{ + Operation operation("getCustomerInfoEInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( int* arg0) +{ + Operation operation("getCustomerInfoFInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( signed int* arg0) +{ + Operation operation("getCustomerInfoGInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( unsigned int* arg0) +{ + Operation operation("getCustomerInfoHInt", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const int*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64(const __int64* arg0) +{ + Operation operation("getCustomerInformationint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64(const __int64* arg0) +{ + Operation operation("getCustomerInfoAint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( __int64* arg0) +{ + Operation operation("getCustomerInfoBint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( __int64 arg0) +{ + Operation operation("getCustomerInfoCint64", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( __int64 arg0) +{ + Operation operation("getCustomerInfoDint64", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( __int64* arg0) +{ + Operation operation("getCustomerInfoEint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( __int64* arg0) +{ + Operation operation("getCustomerInfoFint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( signed __int64* arg0) +{ + Operation operation("getCustomerInfoGint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64( unsigned int64* arg0) +{ + Operation operation("getCustomerInfoHint64", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const __int64*)operation.getReturnValue(); + +} + +const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid(const __int64* arg0) +{ + Operation operation("getCustomerInformationVoid", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const void*)operation.getReturnValue(); + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const __int64* arg0) +{ + Operation operation("getCustomerInfoAVoid", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return; + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid() +{ + Operation operation("getCustomerInfoBVoid", 0); + + target->invoke(operation); + return; + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid() +{ + Operation operation("getCustomerInfoCVoid", 0); + + target->invoke(operation); + return; + +} + +void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid() +{ + Operation operation("getCustomerInfoDVoid", 0); + + target->invoke(operation); + return; + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( char* customer arg0) +{ + Operation operation("getCustomerInfoAInline", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( char* customer arg0) +{ + Operation operation("getCustomerInfoBInline", 1); + operation.setParameter(0, (void*)arg0); + + int ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0) +{ + Operation operation("getCustomerInfoCInline", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (friend const unsigned int*)operation.getReturnValue(); + +} + +int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0) +{ + Operation operation("getCustomerInfoTrickyA", 1); + operation.setParameter(0, (void*)&arg0); + + int ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0) +{ + Operation operation("getCustomerInfoTrickyB", 1); + operation.setParameter(0, (void*)&arg0); + + int ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..f10da9c15e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h @@ -0,0 +1,79 @@ +/* + * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h +#define CustomerInfoImpl_CustomerInfoService_Proxy_h + +#include "/CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformationChar(const char* customerID); + virtual const char* getCustomerInfoAChar(const char* ); + virtual const char* getCustomerInfoBChar( char* customerID); + virtual const char* getCustomerInfoCChar( char customerID); + virtual const char* getCustomerInfoDChar( char ); + virtual const char* getCustomerInfoEChar( char* ); + virtual const char* getCustomerInfoFChar( char* customerID); + virtual const char* getCustomerInfoGChar( signed char* customerID); + virtual const char* getCustomerInfoHChar( unsigned char* customerID); + virtual const long* getCustomerInformationLong(const long* customerID); + virtual const long* getCustomerInfoALong(const long* ); + virtual const long* getCustomerInfoBLong( long* customerID); + virtual const long* getCustomerInfoCLong( long customerID); + virtual const long* getCustomerInfoDLong( long ); + virtual const long* getCustomerInfoELong( long* ); + virtual const long* getCustomerInfoFLong( long* customerID); + virtual const long* getCustomerInfoGLong( signed long* customerID); + virtual const long* getCustomerInfoHLong( unsigned long* customerID); + virtual const int* getCustomerInformationInt(const int* customerID); + virtual const int* getCustomerInfoAInt(const int* ); + virtual const int* getCustomerInfoBInt( int* customerID); + virtual const int* getCustomerInfoCInt( int customerID); + virtual const int* getCustomerInfoDInt( int ); + virtual const int* getCustomerInfoEInt( int* ); + virtual const int* getCustomerInfoFInt( int* customerID); + virtual const int* getCustomerInfoGInt( signed int* customerID); + virtual const int* getCustomerInfoHInt( unsigned int* customerID); + virtual const __int64* getCustomerInformationint64(const __int64* customerID); + virtual const __int64* getCustomerInfoAint64(const __int64* ); + virtual const __int64* getCustomerInfoBint64( __int64* customerID); + virtual const __int64* getCustomerInfoCint64( __int64 customerID); + virtual const __int64* getCustomerInfoDint64( __int64 ); + virtual const __int64* getCustomerInfoEint64( __int64* ); + virtual const __int64* getCustomerInfoFint64( __int64* customerID); + virtual const __int64* getCustomerInfoGint64( signed __int64* customerID); + virtual const __int64* getCustomerInfoHint64( unsigned int64* customerID); + virtual const void* getCustomerInformationVoid(const __int64* customerID); + virtual void getCustomerInfoAVoid(const __int64* ); + virtual void getCustomerInfoBVoid(); + virtual void getCustomerInfoCVoid(); + virtual void getCustomerInfoDVoid( void ); + virtual const char* getCustomerInfoAInline( char* customer id); + virtual int getCustomerInfoBInline( char* customer id); + virtual friend const unsigned int* getCustomerInfoCInline( char* customer id); + virtual int getCustomerInfoTrickyA(const char ); + virtual int getCustomerInfoTrickyB( int myInt); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..abf2b8ed1a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,376 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl*)getImplementation(); +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformationChar") + { + const char* p0 = (const char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformationChar(p0)); + return; + } + if (operationName == "getCustomerInfoAChar") + { + const char* p0 = (const char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoAChar(p0)); + return; + } + if (operationName == "getCustomerInfoBChar") + { + char* p0 = ( char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoBChar(p0)); + return; + } + if (operationName == "getCustomerInfoCChar") + { + char& p0 = *( char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoCChar(p0)); + return; + } + if (operationName == "getCustomerInfoDChar") + { + char& p0 = *( char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoDChar(p0)); + return; + } + if (operationName == "getCustomerInfoEChar") + { + char* p0 = ( char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoEChar(p0)); + return; + } + if (operationName == "getCustomerInfoFChar") + { + char* p0 = ( char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoFChar(p0)); + return; + } + if (operationName == "getCustomerInfoGChar") + { + signed char* p0 = ( signed char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoGChar(p0)); + return; + } + if (operationName == "getCustomerInfoHChar") + { + unsigned char* p0 = ( unsigned char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoHChar(p0)); + return; + } + if (operationName == "getCustomerInformationLong") + { + const long* p0 = (const long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformationLong(p0)); + return; + } + if (operationName == "getCustomerInfoALong") + { + const long* p0 = (const long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoALong(p0)); + return; + } + if (operationName == "getCustomerInfoBLong") + { + long* p0 = ( long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoBLong(p0)); + return; + } + if (operationName == "getCustomerInfoCLong") + { + long& p0 = *( long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoCLong(p0)); + return; + } + if (operationName == "getCustomerInfoDLong") + { + long& p0 = *( long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoDLong(p0)); + return; + } + if (operationName == "getCustomerInfoELong") + { + long* p0 = ( long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoELong(p0)); + return; + } + if (operationName == "getCustomerInfoFLong") + { + long* p0 = ( long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoFLong(p0)); + return; + } + if (operationName == "getCustomerInfoGLong") + { + signed long* p0 = ( signed long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoGLong(p0)); + return; + } + if (operationName == "getCustomerInfoHLong") + { + unsigned long* p0 = ( unsigned long*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoHLong(p0)); + return; + } + if (operationName == "getCustomerInformationInt") + { + const int* p0 = (const int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformationInt(p0)); + return; + } + if (operationName == "getCustomerInfoAInt") + { + const int* p0 = (const int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoAInt(p0)); + return; + } + if (operationName == "getCustomerInfoBInt") + { + int* p0 = ( int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoBInt(p0)); + return; + } + if (operationName == "getCustomerInfoCInt") + { + int& p0 = *( int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoCInt(p0)); + return; + } + if (operationName == "getCustomerInfoDInt") + { + int& p0 = *( int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoDInt(p0)); + return; + } + if (operationName == "getCustomerInfoEInt") + { + int* p0 = ( int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoEInt(p0)); + return; + } + if (operationName == "getCustomerInfoFInt") + { + int* p0 = ( int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoFInt(p0)); + return; + } + if (operationName == "getCustomerInfoGInt") + { + signed int* p0 = ( signed int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoGInt(p0)); + return; + } + if (operationName == "getCustomerInfoHInt") + { + unsigned int* p0 = ( unsigned int*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoHInt(p0)); + return; + } + if (operationName == "getCustomerInformationint64") + { + const __int64* p0 = (const __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformationint64(p0)); + return; + } + if (operationName == "getCustomerInfoAint64") + { + const __int64* p0 = (const __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoAint64(p0)); + return; + } + if (operationName == "getCustomerInfoBint64") + { + __int64* p0 = ( __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoBint64(p0)); + return; + } + if (operationName == "getCustomerInfoCint64") + { + __int64& p0 = *( __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoCint64(p0)); + return; + } + if (operationName == "getCustomerInfoDint64") + { + __int64& p0 = *( __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoDint64(p0)); + return; + } + if (operationName == "getCustomerInfoEint64") + { + __int64* p0 = ( __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoEint64(p0)); + return; + } + if (operationName == "getCustomerInfoFint64") + { + __int64* p0 = ( __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoFint64(p0)); + return; + } + if (operationName == "getCustomerInfoGint64") + { + signed __int64* p0 = ( signed __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoGint64(p0)); + return; + } + if (operationName == "getCustomerInfoHint64") + { + unsigned int64* p0 = ( unsigned int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoHint64(p0)); + return; + } + if (operationName == "getCustomerInformationVoid") + { + const __int64* p0 = (const __int64*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformationVoid(p0)); + return; + } + if (operationName == "getCustomerInfoAVoid") + { + const __int64* p0 = (const __int64*)operation.getParameter(0); + impl->getCustomerInfoAVoid(p0); + return; + } + if (operationName == "getCustomerInfoBVoid") + { + impl->getCustomerInfoBVoid(); + return; + } + if (operationName == "getCustomerInfoCVoid") + { + impl->getCustomerInfoCVoid(); + return; + } + if (operationName == "getCustomerInfoDVoid") + { + impl->getCustomerInfoDVoid(); + return; + } + if (operationName == "getCustomerInfoAInline") + { + char* customer p0 = ( char* customer)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoAInline(p0)); + return; + } + if (operationName == "getCustomerInfoBInline") + { + char* customer p0 = ( char* customer)operation.getParameter(0); + *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0); + return; + } + if (operationName == "getCustomerInfoCInline") + { + char* customer p0 = ( char* customer)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInfoCInline(p0)); + return; + } + if (operationName == "getCustomerInfoTrickyA") + { + const char& p0 = *(const char*)operation.getParameter(0); + *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0); + return; + } + if (operationName == "getCustomerInfoTrickyB") + { + int& p0 = *( int*)operation.getParameter(0); + *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..778a168220 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_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 CustomerInfoImpl_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl* impl; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp new file mode 100644 index 0000000000..e1950f17a6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "CustomerInfoImpl2_CustomerInfoService_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 + CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + { + return new CustomerInfoImpl2_CustomerInfoService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CustomerInfoImpl2_CustomerInfoService_Proxy_Destructor(void* proxy) + { + delete (CustomerInfoImpl2_CustomerInfoService_Proxy*)proxy; + } +} + +CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CustomerInfoImpl2_CustomerInfoService_Proxy::~CustomerInfoImpl2_CustomerInfoService_Proxy() +{ + if (target) + delete target; +} + +const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..03fe3e3b93 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 CustomerInfoImpl2_CustomerInfoService_Proxy_h +#define CustomerInfoImpl2_CustomerInfoService_Proxy_h + +#include "/CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl2_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl2_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl2_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..2d5f502b08 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,71 @@ +/* + * 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 "CustomerInfoImpl2_CustomerInfoService_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 + CustomerInfoImpl2_CustomerInfoService_Wrapper* CustomerInfoImpl2_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl2_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl2*)getImplementation(); +} + +CustomerInfoImpl2_CustomerInfoService_Wrapper::~CustomerInfoImpl2_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl2_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl2; +} + +void CustomerInfoImpl2_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformation") + { + const char* p0 = (const char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformation(p0)); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..7f7cb13a6b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_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 CustomerInfoImpl2_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl2_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl2_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl2* impl; +}; + +#endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp new file mode 100644 index 0000000000..c83eb661ca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp @@ -0,0 +1,100 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_MyValueService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_MyValueService_Proxy*)proxy; + } +} + +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() +{ + if (target) + delete target; +} + +float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) +{ + Operation operation("getMyValue", 1); + operation.setParameter(0, (void*)arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) +{ + Operation operation("getMyValueS", 1); + operation.setParameter(0, (void*)&arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) +{ + Operation operation("getCustname", 1); + operation.setParameter(0, (void*)&arg0); + + string ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) +{ + Operation operation("getCustnamecs", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return *(const string*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h new file mode 100644 index 0000000000..38f22384b0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h @@ -0,0 +1,37 @@ +/* + * 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 MyValueImpl_MyValueService_Proxy_h +#define MyValueImpl_MyValueService_Proxy_h + +#include "MyValue.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_MyValueService_Proxy : public MyValue +{ +public: + MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_MyValueService_Proxy(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname( string& customerID); + virtual const string& getCustnamecs( string customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_MyValueService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp new file mode 100644 index 0000000000..d9337c9341 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp @@ -0,0 +1,89 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new MyValueImpl_MyValueService_Wrapper(target); + } +} + +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (MyValueImpl*)getImplementation(); +} + +MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() +{ + releaseImplementation(); +} + +void* MyValueImpl_MyValueService_Wrapper::newImplementation() +{ + return new MyValueImpl; +} + +void MyValueImpl_MyValueService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getMyValue") + { + const char* p0 = (const char*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValue(p0); + return; + } + if (operationName == "getMyValueS") + { + string& p0 = *(string*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueS(p0); + return; + } + if (operationName == "getCustname") + { + string& p0 = *(string*)operation.getParameter(0); + *(string*)operation.getReturnValue() = impl->getCustname(p0); + return; + } + if (operationName == "getCustnamecs") + { + string& p0 = *( string*)operation.getParameter(0); + const string& ret = impl->getCustnamecs(p0); + operation.setReturnValue((void*)&ret); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h new file mode 100644 index 0000000000..2f5da06e30 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_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 MyValueImpl_MyValueService_Wrapper_h +#define MyValueImpl_MyValueService_Wrapper_h + +#include "MyValueImpl.hpp" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); + virtual ~MyValueImpl_MyValueService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + MyValueImpl* impl; +}; + +#endif // MyValueImpl_MyValueService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp new file mode 100644 index 0000000000..7625556203 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "MyValueImpl_customerInfo_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 + MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_customerInfo_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_customerInfo_Proxy*)proxy; + } +} + +MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() +{ + if (target) + delete target; +} + +const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h new file mode 100644 index 0000000000..cc60ef5005 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_customerInfo_Proxy_h +#define MyValueImpl_customerInfo_Proxy_h + +#include "CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_customerInfo_Proxy : public CustomerInfo +{ +public: + MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_customerInfo_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_customerInfo_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp new file mode 100644 index 0000000000..14b37fa4bd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp @@ -0,0 +1,66 @@ +/* + * 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 "MyValueImpl_stockQuote_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 + MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_stockQuote_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_stockQuote_Proxy*)proxy; + } +} + +MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() +{ + if (target) + delete target; +} + +commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) +{ + Operation operation("GetStockQuotes", 1); + operation.setParameter(0, (void*)&arg0); + + commonj::sdo::DataObjectPtr ret = 0; + operation.setReturnValue((void*)&ret); + + target->invoke(operation); + return ret; + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..850bc3861c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp new file mode 100644 index 0000000000..aaf2115547 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + { + return new CustomerInfoImpl_CustomerInfoService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) + { + delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; + } +} + +CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() +{ + if (target) + delete target; +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..3739cd72d1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h +#define CustomerInfoImpl_CustomerInfoService_Proxy_h + +#include "/CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..d1fb6073c9 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,71 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl*)getImplementation(); +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformation") + { + const char* p0 = (const char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformation(p0)); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..778a168220 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_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 CustomerInfoImpl_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl* impl; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp new file mode 100644 index 0000000000..c83eb661ca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp @@ -0,0 +1,100 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_MyValueService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_MyValueService_Proxy*)proxy; + } +} + +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() +{ + if (target) + delete target; +} + +float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) +{ + Operation operation("getMyValue", 1); + operation.setParameter(0, (void*)arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) +{ + Operation operation("getMyValueS", 1); + operation.setParameter(0, (void*)&arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) +{ + Operation operation("getCustname", 1); + operation.setParameter(0, (void*)&arg0); + + string ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) +{ + Operation operation("getCustnamecs", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return *(const string*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h new file mode 100644 index 0000000000..38f22384b0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h @@ -0,0 +1,37 @@ +/* + * 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 MyValueImpl_MyValueService_Proxy_h +#define MyValueImpl_MyValueService_Proxy_h + +#include "MyValue.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_MyValueService_Proxy : public MyValue +{ +public: + MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_MyValueService_Proxy(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname( string& customerID); + virtual const string& getCustnamecs( string customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_MyValueService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp new file mode 100644 index 0000000000..d9337c9341 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp @@ -0,0 +1,89 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new MyValueImpl_MyValueService_Wrapper(target); + } +} + +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (MyValueImpl*)getImplementation(); +} + +MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() +{ + releaseImplementation(); +} + +void* MyValueImpl_MyValueService_Wrapper::newImplementation() +{ + return new MyValueImpl; +} + +void MyValueImpl_MyValueService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getMyValue") + { + const char* p0 = (const char*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValue(p0); + return; + } + if (operationName == "getMyValueS") + { + string& p0 = *(string*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueS(p0); + return; + } + if (operationName == "getCustname") + { + string& p0 = *(string*)operation.getParameter(0); + *(string*)operation.getReturnValue() = impl->getCustname(p0); + return; + } + if (operationName == "getCustnamecs") + { + string& p0 = *( string*)operation.getParameter(0); + const string& ret = impl->getCustnamecs(p0); + operation.setReturnValue((void*)&ret); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h new file mode 100644 index 0000000000..2f5da06e30 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_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 MyValueImpl_MyValueService_Wrapper_h +#define MyValueImpl_MyValueService_Wrapper_h + +#include "MyValueImpl.hpp" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); + virtual ~MyValueImpl_MyValueService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + MyValueImpl* impl; +}; + +#endif // MyValueImpl_MyValueService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp new file mode 100644 index 0000000000..7625556203 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "MyValueImpl_customerInfo_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 + MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_customerInfo_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_customerInfo_Proxy*)proxy; + } +} + +MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() +{ + if (target) + delete target; +} + +const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h new file mode 100644 index 0000000000..cc60ef5005 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_customerInfo_Proxy_h +#define MyValueImpl_customerInfo_Proxy_h + +#include "CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_customerInfo_Proxy : public CustomerInfo +{ +public: + MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_customerInfo_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_customerInfo_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp new file mode 100644 index 0000000000..14b37fa4bd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp @@ -0,0 +1,66 @@ +/* + * 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 "MyValueImpl_stockQuote_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 + MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_stockQuote_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_stockQuote_Proxy*)proxy; + } +} + +MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() +{ + if (target) + delete target; +} + +commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) +{ + Operation operation("GetStockQuotes", 1); + operation.setParameter(0, (void*)&arg0); + + commonj::sdo::DataObjectPtr ret = 0; + operation.setReturnValue((void*)&ret); + + target->invoke(operation); + return ret; + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..850bc3861c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp new file mode 100644 index 0000000000..5e5a85a7c5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp @@ -0,0 +1,100 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_MyValueService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_MyValueService_Proxy*)proxy; + } +} + +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() +{ + if (target) + delete target; +} + +float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0) +{ + Operation operation("getMyValueOther", 1); + operation.setParameter(0, (void*)arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) +{ + Operation operation("getMyValueSOther", 1); + operation.setParameter(0, (void*)&arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) +{ + Operation operation("getCustnameOther", 1); + operation.setParameter(0, (void*)&arg0); + + string ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) +{ + Operation operation("getCustnamecsOther", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return *(const string*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h new file mode 100644 index 0000000000..19f4e9c89a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h @@ -0,0 +1,37 @@ +/* + * 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 MyValueImpl_MyValueService_Proxy_h +#define MyValueImpl_MyValueService_Proxy_h + +#include "MyValue.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_MyValueService_Proxy : public Other::MyValue +{ +public: + MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_MyValueService_Proxy(); + virtual float getMyValueOther(const char* customerID); + virtual float getMyValueSOther(const string& customerID); + virtual string getCustnameOther( string& customerID); + virtual const string& getCustnamecsOther( string customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_MyValueService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp new file mode 100644 index 0000000000..7a5e40e9ea --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp @@ -0,0 +1,89 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new MyValueImpl_MyValueService_Wrapper(target); + } +} + +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (MyValueImpl*)getImplementation(); +} + +MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() +{ + releaseImplementation(); +} + +void* MyValueImpl_MyValueService_Wrapper::newImplementation() +{ + return new MyValueImpl; +} + +void MyValueImpl_MyValueService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getMyValueOther") + { + const char* p0 = (const char*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + return; + } + if (operationName == "getMyValueSOther") + { + string& p0 = *(string*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + return; + } + if (operationName == "getCustnameOther") + { + string& p0 = *(string*)operation.getParameter(0); + *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + return; + } + if (operationName == "getCustnamecsOther") + { + string& p0 = *( string*)operation.getParameter(0); + const string& ret = impl->getCustnamecsOther(p0); + operation.setReturnValue((void*)&ret); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h new file mode 100644 index 0000000000..2f5da06e30 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_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 MyValueImpl_MyValueService_Wrapper_h +#define MyValueImpl_MyValueService_Wrapper_h + +#include "MyValueImpl.hpp" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); + virtual ~MyValueImpl_MyValueService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + MyValueImpl* impl; +}; + +#endif // MyValueImpl_MyValueService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp new file mode 100644 index 0000000000..5e5a85a7c5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp @@ -0,0 +1,100 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_MyValueService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_MyValueService_Proxy*)proxy; + } +} + +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() +{ + if (target) + delete target; +} + +float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0) +{ + Operation operation("getMyValueOther", 1); + operation.setParameter(0, (void*)arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) +{ + Operation operation("getMyValueSOther", 1); + operation.setParameter(0, (void*)&arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) +{ + Operation operation("getCustnameOther", 1); + operation.setParameter(0, (void*)&arg0); + + string ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) +{ + Operation operation("getCustnamecsOther", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return *(const string*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h new file mode 100644 index 0000000000..19f4e9c89a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h @@ -0,0 +1,37 @@ +/* + * 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 MyValueImpl_MyValueService_Proxy_h +#define MyValueImpl_MyValueService_Proxy_h + +#include "MyValue.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_MyValueService_Proxy : public Other::MyValue +{ +public: + MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_MyValueService_Proxy(); + virtual float getMyValueOther(const char* customerID); + virtual float getMyValueSOther(const string& customerID); + virtual string getCustnameOther( string& customerID); + virtual const string& getCustnamecsOther( string customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_MyValueService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp new file mode 100644 index 0000000000..7a5e40e9ea --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp @@ -0,0 +1,89 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new MyValueImpl_MyValueService_Wrapper(target); + } +} + +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (MyValueImpl*)getImplementation(); +} + +MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() +{ + releaseImplementation(); +} + +void* MyValueImpl_MyValueService_Wrapper::newImplementation() +{ + return new MyValueImpl; +} + +void MyValueImpl_MyValueService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getMyValueOther") + { + const char* p0 = (const char*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); + return; + } + if (operationName == "getMyValueSOther") + { + string& p0 = *(string*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); + return; + } + if (operationName == "getCustnameOther") + { + string& p0 = *(string*)operation.getParameter(0); + *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); + return; + } + if (operationName == "getCustnamecsOther") + { + string& p0 = *( string*)operation.getParameter(0); + const string& ret = impl->getCustnamecsOther(p0); + operation.setReturnValue((void*)&ret); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h new file mode 100644 index 0000000000..2f5da06e30 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_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 MyValueImpl_MyValueService_Wrapper_h +#define MyValueImpl_MyValueService_Wrapper_h + +#include "MyValueImpl.hpp" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); + virtual ~MyValueImpl_MyValueService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + MyValueImpl* impl; +}; + +#endif // MyValueImpl_MyValueService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp new file mode 100644 index 0000000000..e1950f17a6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "CustomerInfoImpl2_CustomerInfoService_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 + CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + { + return new CustomerInfoImpl2_CustomerInfoService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CustomerInfoImpl2_CustomerInfoService_Proxy_Destructor(void* proxy) + { + delete (CustomerInfoImpl2_CustomerInfoService_Proxy*)proxy; + } +} + +CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CustomerInfoImpl2_CustomerInfoService_Proxy::~CustomerInfoImpl2_CustomerInfoService_Proxy() +{ + if (target) + delete target; +} + +const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..03fe3e3b93 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 CustomerInfoImpl2_CustomerInfoService_Proxy_h +#define CustomerInfoImpl2_CustomerInfoService_Proxy_h + +#include "/CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl2_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl2_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl2_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..2d5f502b08 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,71 @@ +/* + * 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 "CustomerInfoImpl2_CustomerInfoService_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 + CustomerInfoImpl2_CustomerInfoService_Wrapper* CustomerInfoImpl2_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl2_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl2*)getImplementation(); +} + +CustomerInfoImpl2_CustomerInfoService_Wrapper::~CustomerInfoImpl2_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl2_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl2; +} + +void CustomerInfoImpl2_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformation") + { + const char* p0 = (const char*)operation.getParameter(0); + + operation.setReturnValue((void*) impl->getCustomerInformation(p0)); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..7f7cb13a6b --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_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 CustomerInfoImpl2_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl2_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl2_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl2* impl; +}; + +#endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp new file mode 100644 index 0000000000..c83eb661ca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp @@ -0,0 +1,100 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_MyValueService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_MyValueService_Proxy*)proxy; + } +} + +MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() +{ + if (target) + delete target; +} + +float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) +{ + Operation operation("getMyValue", 1); + operation.setParameter(0, (void*)arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) +{ + Operation operation("getMyValueS", 1); + operation.setParameter(0, (void*)&arg0); + + float ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) +{ + Operation operation("getCustname", 1); + operation.setParameter(0, (void*)&arg0); + + string ret; + operation.setReturnValue((void*)&ret); + target->invoke(operation); + return ret; + +} + +const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) +{ + Operation operation("getCustnamecs", 1); + operation.setParameter(0, (void*)&arg0); + + + target->invoke(operation); + return *(const string*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h new file mode 100644 index 0000000000..38f22384b0 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h @@ -0,0 +1,37 @@ +/* + * 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 MyValueImpl_MyValueService_Proxy_h +#define MyValueImpl_MyValueService_Proxy_h + +#include "MyValue.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_MyValueService_Proxy : public MyValue +{ +public: + MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_MyValueService_Proxy(); + virtual float getMyValue(const char* customerID); + virtual float getMyValueS(const string& customerID); + virtual string getCustname( string& customerID); + virtual const string& getCustnamecs( string customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_MyValueService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp new file mode 100644 index 0000000000..d9337c9341 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp @@ -0,0 +1,89 @@ +/* + * 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 "MyValueImpl_MyValueService_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 + MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new MyValueImpl_MyValueService_Wrapper(target); + } +} + +MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (MyValueImpl*)getImplementation(); +} + +MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() +{ + releaseImplementation(); +} + +void* MyValueImpl_MyValueService_Wrapper::newImplementation() +{ + return new MyValueImpl; +} + +void MyValueImpl_MyValueService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getMyValue") + { + const char* p0 = (const char*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValue(p0); + return; + } + if (operationName == "getMyValueS") + { + string& p0 = *(string*)operation.getParameter(0); + *(float*)operation.getReturnValue() = impl->getMyValueS(p0); + return; + } + if (operationName == "getCustname") + { + string& p0 = *(string*)operation.getParameter(0); + *(string*)operation.getReturnValue() = impl->getCustname(p0); + return; + } + if (operationName == "getCustnamecs") + { + string& p0 = *( string*)operation.getParameter(0); + const string& ret = impl->getCustnamecs(p0); + operation.setReturnValue((void*)&ret); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h new file mode 100644 index 0000000000..2f5da06e30 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_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 MyValueImpl_MyValueService_Wrapper_h +#define MyValueImpl_MyValueService_Wrapper_h + +#include "MyValueImpl.hpp" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); + virtual ~MyValueImpl_MyValueService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + MyValueImpl* impl; +}; + +#endif // MyValueImpl_MyValueService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp new file mode 100644 index 0000000000..7625556203 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp @@ -0,0 +1,64 @@ +/* + * 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 "MyValueImpl_customerInfo_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 + MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_customerInfo_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_customerInfo_Proxy*)proxy; + } +} + +MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() +{ + if (target) + delete target; +} + +const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) +{ + Operation operation("getCustomerInformation", 1); + operation.setParameter(0, (void*)arg0); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h new file mode 100644 index 0000000000..cc60ef5005 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_customerInfo_Proxy_h +#define MyValueImpl_customerInfo_Proxy_h + +#include "CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_customerInfo_Proxy : public CustomerInfo +{ +public: + MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_customerInfo_Proxy(); + virtual const char* getCustomerInformation(const char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_customerInfo_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp new file mode 100644 index 0000000000..14b37fa4bd --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp @@ -0,0 +1,66 @@ +/* + * 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 "MyValueImpl_stockQuote_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 + MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) + { + return new MyValueImpl_stockQuote_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) + { + delete (MyValueImpl_stockQuote_Proxy*)proxy; + } +} + +MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() +{ + if (target) + delete target; +} + +commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) +{ + Operation operation("GetStockQuotes", 1); + operation.setParameter(0, (void*)&arg0); + + commonj::sdo::DataObjectPtr ret = 0; + operation.setReturnValue((void*)&ret); + + target->invoke(operation); + return ret; + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h new file mode 100644 index 0000000000..850bc3861c --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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 MyValueImpl_stockQuote_Proxy_h +#define MyValueImpl_stockQuote_Proxy_h + +#include "StockQuoteService.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class MyValueImpl_stockQuote_Proxy : public StockQuoteService +{ +public: + MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~MyValueImpl_stockQuote_Proxy(); + virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // MyValueImpl_stockQuote_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp new file mode 100644 index 0000000000..fae8534537 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp @@ -0,0 +1,92 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) + { + return new CustomerInfoImpl_CustomerInfoService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) + { + delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; + } +} + +CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() +{ + if (target) + delete target; +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationCharPublic( char* arg0, const char* arg1) +{ + Operation operation("getCustomerInformationCharPublic", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoACharPublic( char* arg0, const char* arg1) +{ + Operation operation("getCustomerInfoACharPublic", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + +const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBCharPublic( char* arg0, char* arg1) +{ + Operation operation("getCustomerInfoBCharPublic", 2); + operation.setParameter(0, (void*)arg0); + + operation.setParameter(1, (void*)arg1); + + + target->invoke(operation); + return (const char*)operation.getReturnValue(); + +} + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h new file mode 100644 index 0000000000..ea4c69e376 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.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 CustomerInfoImpl_CustomerInfoService_Proxy_h +#define CustomerInfoImpl_CustomerInfoService_Proxy_h + +#include "/CustomerInfo.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo +{ +public: + CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); + virtual const char* getCustomerInformationCharPublic( char* p1, const char* customerID); + virtual const char* getCustomerInfoACharPublic( char* p1, const char* ); + virtual const char* getCustomerInfoBCharPublic( char* p1, char* customerID); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp new file mode 100644 index 0000000000..70a1e8cbd1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp @@ -0,0 +1,88 @@ +/* + * 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 "CustomerInfoImpl_CustomerInfoService_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 + CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); + } +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (CustomerInfoImpl*)getImplementation(); +} + +CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() +{ + releaseImplementation(); +} + +void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() +{ + return new CustomerInfoImpl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "getCustomerInformationCharPublic") + { + char* p0 = ( char*)operation.getParameter(0); + const char* p1 = (const char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInformationCharPublic(p0, p1)); + return; + } + if (operationName == "getCustomerInfoACharPublic") + { + char* p0 = ( char*)operation.getParameter(0); + const char* p1 = (const char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoACharPublic(p0, p1)); + return; + } + if (operationName == "getCustomerInfoBCharPublic") + { + char* p0 = ( char*)operation.getParameter(0); + char* p1 = ( char*)operation.getParameter(1); + + operation.setReturnValue((void*) impl->getCustomerInfoBCharPublic(p0, p1)); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h new file mode 100644 index 0000000000..778a168220 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_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 CustomerInfoImpl_CustomerInfoService_Wrapper_h +#define CustomerInfoImpl_CustomerInfoService_Wrapper_h + +#include "CustomerInfoImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); + virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + CustomerInfoImpl* impl; +}; + +#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt new file mode 100644 index 0000000000..d99c666c6a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt @@ -0,0 +1,4 @@ +Place a junit.jar file (not shipped as part of Tuscany) +in this directory to get the scagen build.xml Ant build +file to find it and Junit classes (without setting the +property "junit.jar.folder". diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.cmd b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.cmd new file mode 100644 index 0000000000..b222ce2f9f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.cmd @@ -0,0 +1 @@ +@java -jar %~d0%~p0scagen.jar %* diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.sh b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.sh new file mode 100755 index 0000000000..23d6dedc47 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/scagen.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# 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. + +java -jar scagen.jar -dir $2 -output $4 \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java new file mode 100644 index 0000000000..65b1e2f6fa --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java @@ -0,0 +1,90 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ + +package org.apache.tuscany.sca.cpp.tools.common; + +/** + * A snippet of C or C++ source code. If this snippet ends with a return + * statement, this body part also contains the return value. + */ +public class BodyPart { + public final static int TRAILING = 0; + + public final static int RETURN = 1; + + public final static int CATCH = 2; + + private String codeFragment; + + private String returnValue = null; + + private Parameter caughtValue = null; + + private int type; + + BodyPart(String cf) { + codeFragment = cf; + type = TRAILING; + } + + BodyPart(String cf, String rv) { + codeFragment = cf; + if (null != rv && !Utils.isSpace(rv)) { + type = RETURN; + returnValue = rv; + } else + type = TRAILING; + } + + BodyPart(String cf, Parameter cv) { + codeFragment = cf; + caughtValue = cv; + type = CATCH; + } + + public String getCodeFragment() { + return codeFragment; + } + + public boolean isTrailing() { + return TRAILING == type; + } + + public boolean isReturn() { + return RETURN == type; + } + + public boolean isCatch() { + return CATCH == type; + } + + public String getReturnValue() { + if (returnValue != null) + return returnValue.trim(); + else + return null; + } + + public Parameter getCaughtValue() { + return caughtValue; + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java new file mode 100644 index 0000000000..6846bb4096 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java @@ -0,0 +1,119 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; + +/** + * The superclass of tools that parse C/C++ code. This CParsingTool provides + * some useful common methods. + */ +public class CParsingTool { + protected boolean failed = false; + + protected Headers headers = new Headers(); + + protected CParsingTool(String[] args) throws Exception { + String text = new String(); + for (int i = 0; i < args.length; i++) + text += args[i] + " "; + Utils.outputDebugString(text); + + Options.set(args); + String config = (String) Options.getOption("-config"); + if (null != config) + Configuration.initialise(config); + } + + /** + * Read in any include files before the main processing of the tool is done. + * This constructs the Headers. + */ + protected Headers preparseHeaders(String option) throws Exception { + Headers headers = new Headers(); + Object o = Options.getOption(option); + if (null != o) { + Utils.outputDebugString("Pre-parsing headers..."); + List includeList; + if (o instanceof List) + includeList = (List) o; + else { + includeList = new ArrayList(); + includeList.add(o); + } + Iterator it = includeList.iterator(); + while (it.hasNext()) { + File include = new File((String) it.next()); + if (!include.isDirectory()) + Utils.rude("Bad include directory " + include); + + DirectoryTree tree = new DirectoryTree(headers, new HashSet( + Arrays.asList(new Object[] { "hpp", "h" }))); + tree.walkTree(include, null, 0); + } + Utils.outputDebugString("Parsing files..."); + } + + return headers; + } + + /** + * Checks the source directory looks good. + */ + protected File checkFile(String option) throws Exception { + String name = (String) Options.getOption(option); + if (null == name) { + printUsage(); + System.exit(-1); + } + + File file = new File(name); + if (!file.isFile() && !file.isDirectory()) + Utils.rude("Bad file or directory " + file); + return file; + } + + /** + * Checks the target directory and creates it if it doesn't already exist. + */ + protected File maybeCreateDirectory(String option) throws Exception { + String name = (String) Options.getOption(option); + if (null == name) { + printUsage(); + System.exit(-1); + } + + File file = new File(name); + if (!file.exists() && !file.mkdir()) + Utils.screenMessage("Failed to create directory " + file); + return file; + } + + protected void printUsage() { + System.out.println("usage: ??"); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java new file mode 100644 index 0000000000..1a900ff711 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java @@ -0,0 +1,126 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Encapsulates the tool's configuration file + */ +public class Configuration { + private static Set files = new HashSet(); + + private static Set classes = new HashSet(); + + private static Set methods = new HashSet(); + + private static Set macros = new HashSet(); + + private static Set defines = new HashSet(); + + private static Set attributes = new HashSet(); + + private static Map others = new HashMap(); + + /** + * No one creates an instance of this class. + */ + private Configuration() { + } + + /** + * Reads in the configuration file + */ + public static void initialise(String filename) throws Exception { + File file = new File(filename); + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + String line = br.readLine(); + for (int lineno = 1; null != line; lineno++, line = br.readLine()) { + // Ignore lines starting with a # (comments) and blank lines + if (line.startsWith("#")) + continue; + boolean blank = true; + for (int i = 0; i < line.length() && blank; i++) + if (!Character.isWhitespace(line.charAt(i))) + blank = false; + if (blank) + continue; + + int equals = line.indexOf("="); + if (-1 == equals) + Utils.rude("Bad line in configuration file " + filename + + " lineno " + lineno); + String key = line.substring(0, equals).trim(); + String value = line.substring(equals + 1).trim(); + if ("excludefile".equals(key)) { + files.add(value); + } else if ("excludeclass".equals(key)) { + classes.add(value); + } else if ("excludemethod".equals(key)) { + methods.add(value); + } else if ("macro".equals(key)) { + macros.add(value); + } else if ("define".equals(key)) { + defines.add(value); + } else if ("attribute".equals(key)) { + attributes.add(value); + } else { + others.put(key, value); + } + } + } + + public static boolean fileExcluded(String s) { + return files.contains(s); + } + + public static boolean classExcluded(String s) { + return classes.contains(s); + } + + public static boolean methodExcluded(String className, String method) { + return methods.contains(className + "::" + method); + } + + public static boolean isMacro(String s) { + return macros.contains(s); + } + + public static boolean isDefine(String s) { + return defines.contains(s); + } + + public static boolean isAttribute(String s) { + return attributes.contains(s); + } + + public static String getConfigured(String key) { + return (String) others.get(key); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java new file mode 100644 index 0000000000..a4f1ca9a21 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java @@ -0,0 +1,100 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.File; +import java.util.Set; +import java.util.StringTokenizer; + +public class DirectoryTree { + private FileActor actor; + + private Set extensions; + + public DirectoryTree(FileActor actor, Set extensions) { + this.actor = actor; + this.extensions = extensions; + } + + /** + * Starts adding trace into the given file. If the given file is a directory + * then this the starting directory and all code beneath and in this + * directory will be given trace. + * + * @param source - + * either the starting directory or one file to add trace to. + */ + public void walkTree(File source, File target, int depth) throws Exception { + depth++; + boolean noTarget = (null == target); + + if (!source.canRead()) + Utils.rude("Cannot read from source directory " + source); + if (!noTarget && !target.canWrite()) + Utils.rude("Cannot write to target directory " + target); + + if (source.isDirectory()) { + File[] filesInDirectory = source.listFiles(); + for (int i = 0; i < filesInDirectory.length; i++) { + File file = filesInDirectory[i]; + String name = file.getName(); + int dot = name.lastIndexOf('.'); + String ext = null; + if (-1 != dot) + ext = name.substring(dot + 1); + + if (file.isDirectory()) { + File newTarget = null; + if (!noTarget) { + StringTokenizer st = new StringTokenizer( + file.getPath(), "\\/"); + String newdir = null; + while (st.hasMoreTokens()) + newdir = st.nextToken(); + String targetName = maybeAppendSeparator(target + .toString()); + newTarget = new File(targetName + newdir); + if (!newTarget.mkdir()) + Utils.rude("Failed to create target directory " + + newTarget); + } + + // recurse + walkTree(file, newTarget, depth); + } else if (file.isFile() + && (extensions == null || (!file.isHidden() && extensions + .contains(ext)))) { + // this is a file and we need to add trace into it ! + actor.actOnFile(file, target, depth); + } + } + } else { + actor.actOnFile(source, target, depth); + } + } + + public static String maybeAppendSeparator(String name) { + if (!name.endsWith("/") && !name.endsWith("\\")) + name += "/"; + return name; + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java new file mode 100644 index 0000000000..fc1c8ec5c3 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java @@ -0,0 +1,32 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.File; + +/** + * DirectoryTree calls this interface to allow implementations of this interface + * to act on a file in the directory tree. + */ +public interface FileActor { + public void actOnFile(File source, File target, int depth) throws Exception; +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java new file mode 100644 index 0000000000..e629751ea4 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java @@ -0,0 +1,75 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ + +package org.apache.tuscany.sca.cpp.tools.common; + +/** + * A piece of C++ source code + */ +public class FilePart { + public final static int UNKNOWN = 0; + + public final static int COMMENT = 1; + + public final static int METHOD = 2; + + public final static int FIELD = 3; + + public final static int BEGINSCOPE = 4; + + public final static int ENDSCOPE = 5; + + public final static int DIRECTIVE = 6; + + public final static int WHITESPACE = 7; + + public final static int MACRO = 8; + + public final static int CLASSATTRIBUTE = 9; + + public final static int ENUM = 10; + + public final static int PROTOTYPE = 11; + + public final static int TYPEDEF = 12; + + protected String cppsource; + + protected int type; + + FilePart(String s, int type) { + cppsource = s; + this.type = type; + } + + public int getType() { + return type; + } + + int length() { + return cppsource.length(); + } + + public String toString() { + return cppsource; + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java new file mode 100644 index 0000000000..8deba2401d --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java @@ -0,0 +1,162 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class Headers implements FileActor { + private ArrayList instanceMethods = new ArrayList(); + + private ArrayList staticMethods = new ArrayList(); + + private ArrayList allMethods = new ArrayList(); + + private ArrayList classNames = new ArrayList(); + + private boolean failed = false; + + public void actOnFile(File header, File ignored, int depth) + throws Exception { + if (Configuration.fileExcluded(header.getName())) { + Utils.outputDebugString("excluding " + header + "..."); + return; + } + + Utils.outputDebugString("pre-parsing " + header + "..."); + FileReader fr = null; + try { + fr = new FileReader(header); + } catch (FileNotFoundException fnfe) { + throw fnfe; + } + BufferedReader inputFile = new BufferedReader(fr); + + try { + InputCppSourceCode code = new InputCppSourceCode(inputFile, header + .getName()); + Iterator it = code.getPartIterator(); + while (it.hasNext()) { + FilePart fp = (FilePart) (it.next()); + if (fp.getType() != FilePart.PROTOTYPE) + continue; + PrototypePart pp = (PrototypePart) fp; + String className = pp.className(); + if (null == className) + continue; + String trimClassName = className; + if (className.endsWith("::")) + trimClassName = className.substring(0, + className.length() - 2); + if (!classNames.contains(trimClassName)) + classNames.add(trimClassName); + + Signature sign = new Signature(fp.toString()); + sign.setClassName(className); + //Tuscany + sign.setScope(pp.getSignature().getScope()); + sign.setNamespace(pp.getSignature().getNamespace()); + + // "Clean" the signature by stripping off attributes, + // semicolons, etc + Signature cleaned = new Signature(sign.toStringWithoutAttrs()); + //Tuscany - problem + cleaned.setClassName(className); + cleaned.setScope(pp.getSignature().getScope()); + cleaned.setNamespace(pp.getSignature().getNamespace()); + //Tuscany - end of problem + + + if (-1 == sign.getAttributes().indexOf("static")) + instanceMethods.add(cleaned); + else + staticMethods.add(cleaned); + } + } catch (ParsingException pe) { + failed = true; + } + + inputFile.close(); + allMethods.addAll(staticMethods); + allMethods.addAll(instanceMethods); + } + + public boolean failed() { + return failed; + } + + public boolean isInstanceMethod(Signature sign) { + Iterator it = instanceMethods.iterator(); + while (it.hasNext()) { + Signature s = (Signature) it.next(); + if (s.equals(sign)) + return true; + } + return false; + } + + public boolean isStaticMethod(Signature sign) { + Iterator it = staticMethods.iterator(); + while (it.hasNext()) { + Signature s = (Signature) it.next(); + if (s.equals(sign)) + return true; + } + return false; + } + + public List getMethods(String method) { + ArrayList list = new ArrayList(); + if (null == method) + return list; + + Iterator it = allMethods.iterator(); + while (it.hasNext()) { + Signature s = (Signature) it.next(); + if (method.equals(s.getMethodName())) + list.add(s); + } + return list; + } + + /** + * Tuscany change - a method to get all the method signatures at once + */ + public List getAllMethods() { + ArrayList list = new ArrayList(); + Iterator it = allMethods.iterator(); + while (it.hasNext()) { + Signature s = (Signature) it.next(); + list.add(s); + } + return list; + } + + public boolean isClassName(String text) { + return classNames.contains(text); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java new file mode 100644 index 0000000000..ae6a646eaf --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java @@ -0,0 +1,412 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.BufferedReader; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.StringTokenizer; + +public class InputCppSourceCode { + + private ArrayList parts = new ArrayList(); + + private String name; + + public InputCppSourceCode(BufferedReader br, String name) throws Exception { + this.name = name; + + String s = null; + StringBuffer buff = new StringBuffer(); + for (int i = 1;; i++) { + try { + s = br.readLine(); + } catch (Exception e) { + System.err.println("Ignoring exception thrown parsing file " + + name + " line number " + i); + e.printStackTrace(); + break; + } + if (s == null) + break; + buff.append(s + "\n"); + } + String str = buff.toString(); + + // TODO: When checking for rest.startsWith("struct") should + // check the next letter after struct is not alphanumeric otherwise + // we'll get false matches on a function called structify() for + // instance. Also applies to enum, union, public, typedef, etc + + String rest, text = ""; + int scopedepth = 0; + String scope = "public"; + String currentClass = null; + String currentNamespace = null; + for (int idx = 0; idx < str.length(); /* No idx++ */ + ) { + rest = str.substring(idx); + if (Character.isWhitespace(rest.charAt(0))) { + int ridx = 0; + while (ridx < rest.length() + && Character.isWhitespace(rest.charAt(ridx))) + ridx++; + text = rest.substring(0, ridx); + FilePart fp = new FilePart(text, FilePart.WHITESPACE); + parts.add(fp); + idx += ridx; + + } else if (rest.startsWith("/*")) { + int ridx = rest.indexOf("*/"); // Don't use Utils here + text = str.substring(idx, idx + ridx + 2); + FilePart fp = new FilePart(text, FilePart.COMMENT); + parts.add(fp); + idx += text.length(); + + } else if (rest.startsWith("//")) { + text = str.substring(idx, idx + rest.indexOf("\n")); + FilePart fp = new FilePart(text, FilePart.COMMENT); + parts.add(fp); + idx += text.length(); + + } else if (rest.startsWith("#")) { + int ridx = rest.indexOf("\n"); + char c = rest.charAt(ridx - 1); + while (-1 != ridx && '\\' == c) { + String rest2 = rest.substring(ridx + 1); + ridx += rest2.indexOf("\n") + 1; + c = rest.charAt(ridx - 1); + } + text = str.substring(idx, idx + ridx); + FilePart fp = new FilePart(text, FilePart.DIRECTIVE); + parts.add(fp); + idx += text.length(); + + } else if (rest.startsWith("}")) { + if (scopedepth <= 0) //Tuscany need to increase scopedepth for + // namespaces? + Utils.rude("Braces do not match", name, lineNo(str, idx), + rest.substring(0, rest.indexOf("\n"))); + else + scopedepth--; + // TODO: better checking that this brace really ends the class + if (0 == scopedepth) + currentClass = null; + scope = "public"; + parts.add(new FilePart("}", FilePart.ENDSCOPE)); + idx++; + + } else if (rest.startsWith(";")) { + parts.add(new FilePart(";", FilePart.FIELD)); + idx++; + + } else if (!Character.isLetter(rest.charAt(0)) + && '~' != rest.charAt(0) && '_' != rest.charAt(0)) { + Utils.rude("Lines must start with a letter ", name, lineNo(str, + idx), rest.substring(0, rest.indexOf("\n"))); + + } else if (MacroPart.isAMacro(rest)) { + MacroPart mp = MacroPart.create(rest); + parts.add(mp); + idx += mp.length(); + + } else if (beginsScope(rest)) { + + //Tuscany a namespace comes in here + scopedepth++; + text = rest.substring(0, Utils.indexOf(rest, "{") + 1); + FilePart fp = new FilePart(text, FilePart.BEGINSCOPE); + parts.add(fp); + idx += text.length(); + if (Utils.startsWith(text, "class")) { + // TODO: cope with comments here + // TODO: split out classes into a ClassPart + StringTokenizer st = new StringTokenizer(text, + Utils.whitespace + ":"); + st.nextToken(); // step over "class" + while (st.hasMoreTokens()) { + String word = st.nextToken(); + if (Configuration.isAttribute(word)) + continue; + currentClass = word; + break; + } + } + + //Tuscany + if (Utils.startsWith(text, "namespace")) { + // TODO: cope with comments here + StringTokenizer st = new StringTokenizer(text, + Utils.whitespace + "{"); + st.nextToken(); // step over "namespace" + String word = ""; + while (st.hasMoreTokens()) { + word = st.nextToken(); + if (word.equals("{")) { + break; + } + + } + currentNamespace = word; + //We have not got to the class yet + //so will need ot deal with the namespace + //when we do + } + // Tuscany end + + } else if (isEnumOrUnion(rest)) { + int ridx = Utils.findMatching(rest, '{', '}') + 1; + String rest2 = rest.substring(ridx); + ridx = idx + ridx + Utils.indexOf(rest2, ';') + 1; + text = str.substring(idx, ridx); + FilePart fp = new FilePart(text, FilePart.ENUM); + parts.add(fp); + idx += text.length(); + + } else if (scopedepth > 0 + && (rest.startsWith("public") + || rest.startsWith("protected") || rest + .startsWith("private"))) { + int colon = rest.indexOf(":"); + if (-1 == colon) + Utils.rude("No colon found after public or private ", name, + lineNo(str, idx), rest.substring(0, rest + .indexOf("\n"))); + scope = str.substring(idx, idx + colon); + text = str.substring(idx, idx + colon + 1); + FilePart fp = new FilePart(text, FilePart.CLASSATTRIBUTE); + parts.add(fp); + idx += text.length(); + + } else if (Utils.startsWith(rest, "typedef")) { + int semicolon = Utils.indexOf(rest, ';'); + int brace = Utils.indexOf(rest, '{'); + + if (-1 == semicolon) + Utils.rude("No semicolon found after typedef", name, + lineNo(str, idx), rest.substring(0, rest + .indexOf("\n"))); + + if (-1 == brace || semicolon < brace) { + // Simple typedef + text = str.substring(idx, idx + semicolon + 1); + } else { + // Typedef of a struct, etc + int endbrace = Utils.findMatching(rest, '{', '}'); + String rest2 = rest.substring(endbrace); + semicolon = Utils.indexOf(rest2, ';'); + text = str.substring(idx, idx + endbrace + semicolon + 1); + } + FilePart fp = new FilePart(text, FilePart.TYPEDEF); + parts.add(fp); + idx += text.length(); + + } else { + if (isMethod(rest)) { + + int brace = Utils.indexOf(rest, '{'); + Signature signature = new Signature(str.substring(idx, idx + + brace)); + if (signature.failed()) + Utils.rude("Signature parsing failed", name, lineNo( + str, idx), signature.getOriginal()); + if (null != currentClass + && null == signature.getClassName()) + signature.setClassName(currentClass); + signature.setScope(scope); + signature.setNamespace(currentNamespace); + + String body = rest.substring(brace); + int endBrace = Utils.findMatching(body, '{', '}'); + body = body.substring(0, endBrace + 1); + int endIdx = idx + signature.originalLength() + + body.length(); + text = str.substring(idx, endIdx); + MethodPart mp = new MethodPart(text, signature, body); + parts.add(mp); + idx += text.length(); + + } else if (isField(rest)) { + int semicolon = Utils.indexOf(rest, ';'); + text = str.substring(idx, idx + semicolon + 1); + FilePart fp = new FilePart(text, FilePart.FIELD); + parts.add(fp); + idx += text.length(); + + } else if (isPrototype(rest)) { + int semicolon = Utils.indexOf(rest, ';'); + text = str.substring(idx, idx + semicolon + 1); + PrototypePart pp = new PrototypePart(text, currentClass, currentNamespace); + pp.setScope(scope); + parts.add(pp); + idx += text.length(); + + } else { + //TODO other file parts here - not sure if there are any + // others? + Utils.rude("Unrecognised file part", name, + lineNo(str, idx), rest.substring(0, rest + .indexOf("\n"))); + } // end if + } // end if + } // end for + } + + public Iterator getPartIterator() { + return parts.iterator(); + } + + private int lineNo(String s, int idx) { + int n = 0; + for (int i = 0; i < idx && i < s.length(); i++) + if ('\n' == s.charAt(i)) + n++; + return n; + } + + /** + * Find out whether we are defining a class, struct or extern "C" which may + * contain function implementations. These will have braces which begin a + * new scope. Ignore function prototypes that return a struct. struct mystr { + * int f1; }; struct mystr func(); struct mystr func() { struct mystr a; + * return a; } + */ + private static boolean beginsScope(String s) throws ParsingException { + if (isMethod(s)) + return false; + + int brace = Utils.indexOf(s, '{'); + int semicolon = Utils.indexOf(s, ';'); + + // Return false for class prototypes, but true for class definitions. + if (Utils.startsWith(s, "class")) { + if (-1 == brace) + return false; + if (-1 == semicolon) + return true; + return brace < semicolon; + } + + if (Utils.startsWith(s, "struct")) { + if (-1 == brace || -1 == semicolon) + return false; + return brace < semicolon; + } + + //Tuscany handle namespace for prototypes + //in a similar way to "class" + if (Utils.startsWith(s, "namespace")) { + if (-1 == brace || -1 == semicolon) + return false; + return brace < semicolon; + } + + return startsWithExternScope(s); + } + + /** + * There are 4 types of extern ... extern int field; extern int func(); + * extern "C" int func() { return 2; } extern "C" { int func() { return 2; } } + * This method should return true only for the last of these three examples + * since only the last one creates a new scope using braces. + */ + private static boolean startsWithExternScope(String s) + throws ParsingException { + if (!s.startsWith("extern")) + return false; + + int brace = Utils.indexOf(s, '{'); + int semicolon = Utils.indexOf(s, ';'); + int bracket = Utils.indexOf(s, '('); + + if (-1 == brace) + return false; + return (-1 == semicolon || brace < semicolon) + && (-1 == bracket || brace < bracket); + } + + /** + * Find out whether we are defining an enum or union which will contain + * braces. Ignore function prototypes that return an enum or union. enum + * colour { red, blue }; enum colour func(); enum colour func() { return + * colour.red; } + */ + private static boolean isEnumOrUnion(String s) throws ParsingException { + if ((!Utils.startsWith(s, "enum") && !Utils.startsWith(s, "union")) + || isMethod(s)) + return false; + + int brace = Utils.indexOf(s, '{'); + int semicolon = Utils.indexOf(s, ';'); + return -1 != brace && (-1 == semicolon || brace < semicolon); + } + + /** + * Rules to recognise fields and methods... + * + * Fields must contain a semicolon Methods may or may not contain a + * semicolon Prototypes must contain a semicolon Fields may or may not + * contain a brace (array initialisers do) Methods must contain a brace + * Prototypes must not contain a brace Fields may or may not contain a + * bracket (casts do) Methods must contain a bracket Prototypes must contain + * a bracket + * + * It's a method if it contains a bracket and then a brace before the first + * semicolon (if there is a semicolon). It's a prototype if it's not a + * method and it contains brackets before a semicolon. It's a field if it's + * not a method or a prototype and it contains a semicolon. If it's not a + * field, a method or a prototype and we haven't recognised it previously + * then it's an error. + */ + private static boolean isMethod(String s) throws ParsingException { + int semicolon = Utils.indexOf(s, ';'); + int brace = Utils.indexOf(s, '{'); + int bracket = Utils.indexOf(s, '('); + + return (-1 != bracket && -1 != brace && bracket < brace && (-1 == semicolon || brace < semicolon)); + } + + private static boolean isPrototype(String s) throws ParsingException { + int semicolon = Utils.indexOf(s, ';'); + int bracket = Utils.indexOf(s, '('); + return !isMethod(s) && -1 != semicolon && -1 != bracket + && bracket < semicolon; + } + + private static boolean isField(String s) throws ParsingException { + int semicolon = Utils.indexOf(s, ';'); + return !isMethod(s) && !isPrototype(s) && -1 != semicolon; + } + + public String getName() { + return name; + } + + public String toString() { + StringBuffer text = new StringBuffer(); + for (int i = 0; i < parts.size(); i++) { + text.append(((FilePart) (parts.get(i))).toString()); + } + return text.toString(); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java new file mode 100644 index 0000000000..813de0ff56 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java @@ -0,0 +1,82 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ + +/* + * A C or C++ macro as it is used in the source code + */ +package org.apache.tuscany.sca.cpp.tools.common; + +class MacroPart extends FilePart { + /** + * Factory method to create a MacroPart. + * + * @param s + * unparsed source code which may start with a define or macro. + */ + static MacroPart create(String s) { + String orig = getOriginalText(s); + if (null == orig) + return null; + return new MacroPart(orig); + } + + MacroPart(String s) { + super(s, FilePart.MACRO); + } + + /** + * @param s + * unparsed source code which may start with a define or macro. + * @return all of s up to the end of the define or macro. + */ + private static String getOriginalText(String s) { + String name = getName(s); + int len = name.length(); + if (null == name) + return null; + else if (Configuration.isDefine(name)) { + return s.substring(0, len); + } else if (Configuration.isMacro(name)) { + String rest = s.substring(len); + len += Utils.findMatching(rest, '(', ')'); + return s.substring(0, len + 1); + } else + return null; + } + + static boolean isAMacro(String s) { + if (s == null || 0 == s.length()) + return false; + String name = getName(s); + return Configuration.isMacro(name) || Configuration.isDefine(name); + } + + private static String getName(String s) { + int i; + for (i = 0; i < s.length(); i++) + if (!Character.isLetterOrDigit(s.charAt(i)) && '_' != s.charAt(i)) + break; + if (s.length() == i) + return null; + return s.substring(0, i); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java new file mode 100644 index 0000000000..facebe84ef --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java @@ -0,0 +1,128 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.util.ArrayList; + +/** + * A C or C++ method from a piece of source code. The method has a signature and + * a body (the bit between the braces). + */ +public class MethodPart extends FilePart { + private Signature signature; + + private String body; + + MethodPart(String s, Signature signature, String body) { + super(s, METHOD); + this.signature = signature; + this.body = body; + } + + public Signature getSignature() { + return signature; + } + + public String getOriginalSignature() { + return signature.getOriginal(); + } + + /** + * Returns the method body as code snippets, each ending with a place where + * a trace statement belongs. The end of the first code snippet is where the + * entry trace should go. The end of every other snippet is a return from + * the method. + */ + public BodyPart[] getBodyParts() throws ParsingException { + String b = body; // Don't alter field member + if (b.startsWith("{")) + b = b.substring(1); + + // Add in trace exit at all the return statements in the method. + ArrayList al = new ArrayList(); + int idxR = Utils.indexOf(b, "return"); + int idxC = Utils.indexOf(b, "catch"); + while (-1 != idxR || -1 != idxC) { + if (-1 == idxC || (-1 != idxR && idxR < idxC)) { + String frag = b.substring(0, idxR); + String rest = b.substring(idxR + "return".length()); + + int semicolon = Utils.indexOf(rest, ';'); + if (-1 == semicolon) + Utils.rude("Missing semicolon in " + signature); + String retVal = rest.substring(0, semicolon); + BodyPart bp = new BodyPart(frag, retVal); + al.add(bp); + b = b.substring(idxR + "return".length() + retVal.length() + 1); + } else { + String frag = b.substring(0, idxC); + String rest = b.substring(idxC); + + int brace = Utils.indexOf(rest, "{"); + if (-1 == brace) + Utils.rude("Missing open brace in " + signature); + Signature signature = new Signature(rest.substring(0, brace)); + frag = frag + rest.substring(0, brace + 1); + BodyPart bp = new BodyPart(frag, signature.getParameters()[0]); + al.add(bp); + b = rest.substring(brace + 1); + } + idxR = Utils.indexOf(b, "return"); + idxC = Utils.indexOf(b, "catch"); + } + + // Add in trace exit before the last } if there are no returns in + // the method or there is code after the last return and the method + // returns void. + // int f1(){try{return f2();}catch(Exception& e){throw;}} + // has code after the last return but having a traceexit before the + // last brace wouldn't compile since the method returns an int. We + // cope with this by only adding in a traceexit before the last brace + // if the method returns void. That may mean we add in an unreachable + // traceexit which may give a compiler warning, but that should be + // benign. + // + // TODO: Not quite good enough for + // void f(int a){if(a){printf("a");}else{printf("!a");return;}} + // as a trace exit is needed before the last } in case a>0 but + // void f(int a){if(a){printf("a");return;}else{printf("!a");return;}} + // would give compiler warnings about unreachable code if a trace + // exit is added before the last brace. This could be tricky to fix. + if ((0 == al.size() || -1 != Utils.indexOf(b, ';')) + && null == signature.getReturnType().getType()) { + + int last = b.lastIndexOf('}'); + if (-1 == last) + Utils.rude("Missing end brace in " + signature); + String b2 = b.substring(0, last); + al.add(new BodyPart(b2)); + b = b.substring(last); + } + + // The final body part is the last } + al.add(new BodyPart(b)); + + BodyPart[] bps = new BodyPart[al.size()]; + System.arraycopy(al.toArray(), 0, bps, 0, al.size()); + return bps; + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java new file mode 100644 index 0000000000..dc9d941849 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java @@ -0,0 +1,159 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + * + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Command line options passed to a tool's main program. All command line + * options should begin with a dash "-". Some command line options take a value + * which is the next parameter after the option. Others do not. + */ +public class Options { + static HashMap pairs = new HashMap(); + + static List values = new ArrayList(); + + /** + * No one constructs this class. + */ + private Options() { + } + + public static void reset() { + pairs = new HashMap(); + values = new ArrayList(); + } + + /** + * Initialises the options based on the args passed to main + */ + public static void set(String args[]) { + for (int i = 0; i < args.length; i++) { + if (args[i].startsWith("-")) { + if ((i + 1 <= args.length - 1) && // next one is testable + !args[i + 1].startsWith("-") // and it starts with a "-" + ) { + String key = args[i]; + Object pairValue = pairs.get(key); + if (null == pairValue) { + pairs.put(args[i], args[i + 1]); + } else if (pairValue instanceof String) { + List l = new ArrayList(); + l.add(pairValue); + l.add(args[i + 1]); + pairs.put(key, l); + } else if (pairValue instanceof List) { + ((List) pairValue).add(args[i + 1]); + } + i++; // Step over value for this key + } else + values.add(args[i]); + } + } + } + + public static Object getOption(String key) { + return pairs.get(key); + } + + static boolean isOptionSet(String key) { + return values.contains(key) || null!=pairs.get(key); + } + + /** + * This option will cause scagen to print out messages + * about the artefacts it is processing + * @return + */ + public static boolean verbose() { + return isOptionSet("-verbose"); + } + + /** + * This option will cause scagen to print out some + * basic internal log type messages + * @return + */ + public static boolean debug() { + return isOptionSet("-debug"); + } + + /** + * This option will cause scagen to print out some + * text that can be used or pasted into a command + * file to copy all the relevant artefacts from + * where they are found or generated to a specific + * deployment location + * + * @return + */ + public static boolean deploy() { + return isOptionSet("-deploy"); + } + + /** + * This option will prevent scagen from actually writing out + * the generated files. It is useful if used in conjunction + * with the "-deploy" option. + * @return + */ + public static boolean noGenerate() { + return isOptionSet("-nogenerate"); + } + + /** + * This option is useful only when used in conjunction with + * the "-deploy" option. It changes the output to be more like the + * source code of a command script to copy the files to a + * specific place. + * @return + */ + public static boolean outputCommand() { + return isOptionSet("-outputCommand"); + } + + /** + * This option is useful only when used in conjunction with + * the "-deploy" option. It changes the output to be a simple + * list of artefacts. It has no effect if the "-outputCommand" + * option is set. + * + * @return + */ + public static boolean list() { + return isOptionSet("-list"); + } + + /** + * This option is maintained for compatibility with the + * original package source. It is not used by new scagen code. + * + * @return + */ + public static boolean quiet() { + return isOptionSet("-quiet"); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java new file mode 100644 index 0000000000..3f4b3e971e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java @@ -0,0 +1,211 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + * + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * A parameter from a method signature. The parameter is the datatype plus its + * name but not its value. + */ +public class Parameter { + private ArrayList type = new ArrayList(); + + private String name = null; + + private boolean failed = false; + + /** + * Defaults to a parameter in a parameter list so it HAS a parameter name in + * it + */ + Parameter(List parts) { + this(parts, false); + } + + /** + * A parameter which is a return type does not have a parameter name. + * Parameters in a parameter list do have parameter names embedded in them + */ + Parameter(List parts, boolean isRetType) { + if (parts == null || parts.size() == 0) + return; + + // Tuscany: The original code below from apache axis blocks int + // getCustomer(long) + // i.e. no spaces in parameter list. + // We do not need to deal with "..." as parameters to SCS methods. + // + // if (!isRetType && parts.size() == 1) { + // if ("...".equals(parts.get(0))) { + // type.add("..."); + // name = ""; + // } else if (!"void".equals(parts.get(0))) + // failed = true; // Seems like bad C++ code here + // return; + // } + + if (isRetType) { + Iterator it = parts.iterator(); + while (it.hasNext()) + type.add(it.next()); + + // Some methods return have void on their signature and others + // have nothing. So to make them both the same, if a method + // doesn't return anything make type null. + // TODO: This assumption is wrong - methods that return nothing + // default to returning an int! + if (1 == type.size() && "void".equals(type.get(0))) + type = new ArrayList(); + + } else { + // Cope with array subscripts [] after the name + int arrIdx = -1; + for (int i = 0; i < parts.size(); i++) { + String tok = (String) parts.get(i); + if ("[".equals(tok)) { + arrIdx = i; + break; + } + } + + // Find the name + int nameIdx = parts.size() - 1; + if (-1 != arrIdx) + nameIdx = arrIdx - 1; + + // Even in real method declarations, parameters may not have a name + boolean noName = false; + name = (String) parts.get(nameIdx); + // Tuscany: The original code below from apache axis + // was updated to work with signatures of + // the form fn(int) a non-named, no-space, parameter list. + // if (Utils.cPrimitives.contains(name) || + // Utils.cTypeQualifiers.contains(name) ) + // + if (Utils.cPrimitives.contains(name) + || Utils.cTypeQualifiers.contains(name) + || parts.size() == 1) + noName = true; + + if (noName) { + name = null; + for (int i = 0; i < parts.size(); i++) + type.add(parts.get(i)); + } else { + // Construct the type + for (int i = 0; i < nameIdx; i++) + type.add(parts.get(i)); + + if (-1 != arrIdx) + for (int i = arrIdx; i < parts.size(); i++) + type.add(parts.get(i)); + } + } + } + + public boolean failed() { + return failed; + } + + public String getType() { + String s = null; + Iterator it = type.iterator(); + while (it.hasNext()) { + String next = (String) it.next(); + if (null == s) + s = next; + else if ("*".equals(next) || "&".equals(next)) + s += next; + else + s += " " + next; + } + return s; + } + + public String getTypeWithoutConst() { + String s = null; + Iterator it = type.iterator(); + while (it.hasNext()) { + String next = (String) it.next(); + if ("const".equals(next)) + continue; + else if (null == s) + s = next; + else if ("*".equals(next) || "&".equals(next)) + s += next; + else + s += " " + next; + } + return s; + } + + public String getName() { + return name; + } + + public boolean isVoid() { + return 0 == type.size(); + } + + public boolean isDotDotDot() { + return 1 == type.size() && "...".equals(type.get(0)); + } + + /** + * For two parameters to match their types must match or both be null, but + * the parameters names don't have to match. Just because a parameter is + * called something different in a header file as in the the source file + * doesn't mean it's a different parameter. + */ + public boolean equals(Object o) { + if (null == o || !(o instanceof Parameter)) + return false; + Parameter that = (Parameter) o; + if (type.size() != that.type.size()) + return false; + for (int i = 0; i < type.size(); i++) { + String s1 = (String) type.get(i); + String s2 = (String) that.type.get(i); + if (!Utils.safeEquals(s1, s2)) + return false; + } + return true; + } + + public String toString() { + if (0 == type.size()) + return "void"; + if (null == name) + return getType(); + return getType() + " " + name; + } + + public Iterator iterator() { + if (null == type) + return null; + return type.iterator(); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java new file mode 100644 index 0000000000..3f140c0f9f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java @@ -0,0 +1,42 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + * + */ +package org.apache.tuscany.sca.cpp.tools.common; + +public class ParsingException extends Exception { + + public ParsingException() { + super(); + } + + public ParsingException(String message) { + super(message); + } + + public ParsingException(String message, Throwable cause) { + super(message, cause); + } + + public ParsingException(Throwable cause) { + super(cause); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java new file mode 100644 index 0000000000..64ed2e9542 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java @@ -0,0 +1,51 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + * + */ +package org.apache.tuscany.sca.cpp.tools.common; + +/** + * A function prototype in an include file and possibly in a class definition. + */ +public class PrototypePart extends FilePart { + private Signature signature; + + public PrototypePart(String s, String className, String namespace) { + super(s, PROTOTYPE); + signature = new Signature(s); + if (null != className) + signature.setClassName(className); + if (null != namespace && namespace.length()>0) + signature.setNamespace(namespace); + } + + String className() { + return signature.getClassName(); + } + + public Signature getSignature() { + return signature; + } + + public void setScope(String scope) { + signature.setScope(scope); + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java new file mode 100644 index 0000000000..3650839cab --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java @@ -0,0 +1,501 @@ +/* + * + * 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. + */ + +/* + * Branched from the original class that was also contributed to the + * org.apache.axis.tools.common package. + * + */ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +/** + * A C or C++ method signature with the ability to parse it. TODO: properly + * support variable length argument lists using "..." TODO: passing or returning + * function pointers (hopefully not needed) TODO: Cope with ~ Classname() + */ +public class Signature { + private String originalText; + + private String attributes; + + private String className = null; + + private String namespace = null; + + private String methodName = null; + + private Parameter returnType = null; + + private Parameter[] params = null; + + private String trailingAttributes; + + private String scope = "public"; + + private boolean failed = false; + + private boolean traceable = true; + + private final static Set knownAttrs = new HashSet(Arrays + .asList(new Object[] { "public", "private", "extern", "\"C\"", + "virtual", "static", "inline" })); + + private final static Set specialOperators = new HashSet( + Arrays.asList(new Object[] { "(", ")", "*", ",", "&", "]", "[", + "=", "~" })); + + /** + * Takes an unparsed signature string and parses it. + * + * TODO: Should optionally pass in the className here in case it's an inline + * method implementation inside the class{}. Just so the className comes out + * in the trace. + */ + Signature(String s) { + originalText = s; + + try { + List tokens = tokenise(s); + + ArrayList alAttrs = new ArrayList(); + ArrayList alName = new ArrayList(); + ArrayList alParms = new ArrayList(); + ArrayList alTrailAttrs = new ArrayList(); + ArrayList alInits = new ArrayList(); + if (!splitUp(tokens, alAttrs, alName, alParms, alTrailAttrs, + alInits)) { + failed = true; + return; + } + + parseAttributes(alAttrs); + parseNameAndRetType(alName); + parseParameters(alParms); + parseTrailingAttributes(alTrailAttrs); + + // Ignore any tokens after the ) since these are (hopefully) + // constructor initialisers + + traceable = !Configuration.methodExcluded(className, methodName); + } catch (NullPointerException npe) { + failed = true; + traceable = false; + } + } + + /** + * Parse the signature into tokens. This removes whitespace and comments and + * separates out "*", ",", "(", ")", "&", "[" and "]". + */ + private static List tokenise(String s) { + ArrayList tokens = new ArrayList(); + String tok = null; + boolean space = true; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (Character.isWhitespace(c)) { + space = true; + continue; + } + if (space) { + if (tok != null) + tokens.add(tok); + tok = "" + c; + } else + tok += c; + space = false; + + if (tok.endsWith("/*")) { + String sub = s.substring(i); + int endcomm = sub.indexOf("*/"); + if (endcomm == -1) + break; + i += endcomm + 1; + if (tok.equals("/*")) + tok = ""; + else + tok = tok.substring(0, tok.length() - 2); + continue; + } + + if (tok.endsWith("//")) { + String sub = s.substring(i); + int endcomm = sub.indexOf("\n"); + if (endcomm == -1) + break; + i += endcomm; + if (tok.equals("//")) + tok = ""; + else + tok = tok.substring(0, tok.length() - 1); + continue; + } + + if (tok.endsWith("::")) + space = true; + + String sc = "" + c; + if (specialOperators.contains(sc)) { + if (!tok.equals(sc)) { + tokens.add(tok.substring(0, tok.length() - 1)); + tok = sc; + } + space = true; + } + } + tokens.add(tok); + return tokens; + } + + /** + * Split up a tokenised method signature into a list of attributes, a list + * of name and return type tokens, a list of parameter tokens and a list of + * initialiser tokens. + */ + private static boolean splitUp(List tokens, List attrs, List nameAndRet, + List parms, List trailAttrs, List inits) { + + // nameStart points to the start of the return type if there is one + // else the start of the method name + int nameStart; + for (nameStart = 0; nameStart < tokens.size(); nameStart++) { + String tok = (String) (tokens.get(nameStart)); + if (!knownAttrs.contains(tok) && !Configuration.isAttribute(tok)) + break; + } + if (nameStart == tokens.size()) + return false; + + // initStart points to the initialisers, or thrown exceptions after + // the parameter list. throw is a keyword so we can safely search for + // it. + int initStart = tokens.size(); + for (int i = nameStart; i < tokens.size(); i++) { + String tok = (String) tokens.get(i); + if ((tok.startsWith(":") && !tok.startsWith("::")) + || "throw".equals(tok)) + initStart = i; + } + + int parmEnd; + for (parmEnd = initStart - 1; parmEnd > nameStart; parmEnd--) + if (")".equals(tokens.get(parmEnd))) + break; + if (parmEnd == nameStart) + return false; + + int parmStart = parmEnd; + for (parmStart = parmEnd; parmStart > nameStart; parmStart--) + if ("(".equals(tokens.get(parmStart))) + break; + + for (int i = 0; i < tokens.size(); i++) { + Object tok = tokens.get(i); + if (i < nameStart || Configuration.isAttribute((String) tok)) + attrs.add(tok); + else if (i < parmStart) + nameAndRet.add(tok); + else if (i <= parmEnd) + parms.add(tok); + else if (i < initStart) + trailAttrs.add(tok); + else + inits.add(tok); + } + return true; + } + + private void parseAttributes(List list) { + attributes = new String(); + Iterator it = list.iterator(); + while (it.hasNext()) { + if (attributes.length() > 0) + attributes += " "; + String next = (String) it.next(); + + //Tuscancy + //the scope is not present in the attributes + //but is set later in the InputCppSource contructor + if ("public".equals(next) || "protected".equals(next) + || "private".equals(next)) + scope = next; + attributes += next; + } + } + + private void parseNameAndRetType(List list) { + int size = list.size(); + int idx; + // "operator" is a key word so if it's present we know we're + // dealing with operator overloading. The operator that's been + // overloaded might have been split up into multiple tokens. + for (idx = 0; idx < size; idx++) + if ("operator".equals(list.get(idx))) + break; + + if (idx < size) { + methodName = ""; + for (int i = idx; i < size; i++) + methodName += (String) list.get(i); + } else { // No operator overloading + methodName = "" + list.get(size - 1); + idx = size - 1; + } + + // If it's a destructor, the "~" will be split out into a separate + // token, so add it onto the methodName here. + if (idx > 0 && "~".equals(list.get(idx - 1))) { + methodName = "~" + methodName; + idx--; + } + + // The class name comes before the method name + while (idx > 0 && ((String) list.get(idx - 1)).endsWith("::")) { + if (null == className) + className = (String) list.get(idx - 1); + else + className = (String) list.get(idx - 1) + className; + idx--; + } + + // Whatever's left before the classname/methodname must be the + // return type + ArrayList retParm = new ArrayList(); + for (int i = 0; i < idx; i++) + retParm.add(list.get(i)); + + returnType = new Parameter(retParm, true); + } + + /** + * Constructs the parameter list + */ + private void parseParameters(List list) { + ArrayList alParams = new ArrayList(); + Iterator it = list.iterator(); + String token = (String) it.next(); // step over the ( + while (it.hasNext() && !")".equals(token)) { + token = (String) it.next(); + + int template = 0; // Depth of template scope + boolean foundEquals = false; + // Ignore default value for an optional parameter + ArrayList parm = new ArrayList(); + while (!token.equals(")") && (!token.equals(",") || template > 0)) { + if (token.equals("=")) + foundEquals = true; + if (!foundEquals) + parm.add(token); + if (contains(token, "<")) + template++; + if (contains(token, ">")) + template--; + token = (String) it.next(); + } + + // No parameters so break out + if (token.equals(")") && 0 == parm.size()) + break; + + Parameter p = new Parameter(parm); + if (p.failed()) { + failed = true; + return; + } + + // Copes with void func(void) + if (!p.isVoid()) + alParams.add(p); + } + + int size = alParams.size(); + if (size > 0) { + params = new Parameter[size]; + System.arraycopy(alParams.toArray(), 0, params, 0, size); + } + } + + private void parseTrailingAttributes(List list) { + trailingAttributes = new String(); + Iterator it = list.iterator(); + while (it.hasNext()) { + if (trailingAttributes.length() > 0) + trailingAttributes += " "; + trailingAttributes += (String) it.next(); + } + } + + public String getOriginal() { + return originalText; + } + + public int originalLength() { + return originalText.length(); + } + + public boolean failed() { + return failed; + } + + public String getAttributes() { + return attributes; + } + + public String getClassName() { + return className; + } + + /** + * @param namespace The namespace to set. + */ + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + /** + * @return Returns the namespace. + */ + public String getNamespace() { + return namespace; + } + + public String getTrimClassName() { + return trimClassName(className); + } + + public String getMethodName() { + return methodName; + } + + public Parameter getReturnType() { + return returnType; + } + + public Parameter[] getParameters() { + return params; + } + + public boolean isConstructor() { + return className != null && methodName != null + && trimClassName(className).equals(methodName); + } + + public boolean isDestructor() { + return className != null && methodName != null + && methodName.startsWith("~") + && methodName.endsWith(trimClassName(className)); + } + + private static String trimClassName(String name) { + if (name.endsWith("::")) + return name.substring(0, name.length() - 2); + return name; + } + + void setClassName(String className) { + if (null == className) + return; + if (!className.endsWith("::")) + className += "::"; + this.className = className; + } + + public String getScope() { + return scope; + } + + /** + * Sets the scope, but only if the scope is not set by an explicit attribute + * in the signature. + */ + public void setScope(String scope) { + if (-1 == attributes.indexOf(this.scope)) + this.scope = scope; + } + + /** + * Should this method be traced? + */ + public boolean traceable() { + return traceable; + } + + private static boolean contains(String src, String tgt) { + if (src == null || tgt == null) + return false; + if (-1 == src.indexOf(tgt)) + return false; + return true; + } + + public boolean equals(Object obj) { + if (null == obj || !(obj instanceof Signature)) + return false; + Signature that = (Signature) obj; + if (!Utils.safeEquals(className, that.className)) + return false; + if (!Utils.safeEquals(methodName, that.methodName)) + return false; + if (!Utils.safeEquals(returnType, that.returnType)) + return false; + if (null == params && null == that.params) + return true; + if (null != params && null == that.params) + return false; + if (null == params && null != that.params) + return false; + if (params.length != that.params.length) + return false; + for (int i = 0; i < params.length; i++) + if (!Utils.safeEquals(params[i], that.params[i])) + return false; + return true; + } + + public String toStringWithoutAttrs() { + String s = new String(); + if (returnType != null) + s += returnType + " "; + if (className != null) + s += className; + s += methodName + "("; + for (int i = 0; params != null && i < params.length; i++) { + if (i > 0) + s += ", "; + s += params[i].toString(); + } + s += ")"; + return s; + } + + public String toString() { + String s = attributes; + if (attributes.length() > 0) + s += " "; + s += toStringWithoutAttrs(); + if (trailingAttributes.length() > 0) + s += " " + trailingAttributes; + return s; + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java new file mode 100644 index 0000000000..5bd80fc37a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java @@ -0,0 +1,543 @@ +/* +* +* 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. +*/ + +/* +* Branched from the original class that was also contributed to the +* org.apache.axis.tools.common package. +* +*/ +package org.apache.tuscany.sca.cpp.tools.common; + +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +//Apache Common Logging +//import org.apache.commons.logging.Log; +//import org.apache.commons.logging.LogFactory; + +/** +* Static utility methods. Some of these methods are similar to the methods on +* java.lang.String except they are aware of C/C++ comments and string literals. +* +* TODO: Many of these methods would perform better using StringBuffer not +* String +*/ +public final class Utils { + // All the C primitive data types + public final static Set cPrimitives = new HashSet(Arrays + .asList(new Object[] { "void", "byte", "char", "unsigned", + "signed", "int", "short", "long", "double", "float", + "struct", "class", "enum", "union" })); + + // All the qualifiers that can affect C types + public final static Set cTypeQualifiers = new HashSet( + Arrays.asList(new Object[] { "(", ")", "*", ",", "&", "]", "[", + "const" })); + + public final static String whitespace = " \t\r\n"; + + //private static Log log = LogFactory.getLog(CLASS.class); + + /** + * Never instantiate this class + */ + private Utils() { + } + + /** + * Is this string all whitespace? + */ + static boolean isSpace(String s) { + for (int i = 0; i < s.length(); i++) + if (!Character.isWhitespace(s.charAt(i))) + return false; + return true; + } + + // TODO look for other trailing chars like { (because of class{) + static boolean startsWith(String source, String target) { + if (source == null || target == null) + return false; + if (!source.startsWith(target)) + return false; + if (source.length() == target.length()) + return true; + if (Character.isWhitespace(source.charAt(target.length()))) + return true; + return false; + } + + /** + * Performs a C-aware version of String.indexOf(char) in that it skips + * characters in string literals and comments. + */ + static int indexOf(String s, char c) throws ParsingException { + if ('"' == c) + rude("Utils.indexOf cannot be passed quotes"); + + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) == c) + return i; + + i = skip(s.substring(i), i); + if (-1 == i) + return -1; + } + return -1; + } + + /** + * Performs a C-aware version of String.indexOf(String) in that it skips + * characters in string literals and comments and makes sure that the target + * string is not embedded in a longer word. + */ + static int indexOf(String s, String t) { + char t0 = t.charAt(0); + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) == t0 + && s.substring(i).startsWith(t) + && (0 == i || !Character.isLetterOrDigit(s.charAt(i - 1))) + && (s.length() == (i + t.length()) || !Character + .isLetterOrDigit(s.charAt(i + t.length())))) + return i; + + i = skip(s.substring(i), i); + if (-1 == i) + return -1; + } + return -1; + } + + /** + * Matches braces or quotes and is C-aware. It skips characters in string + * literals and comments. + */ + static int findMatching(String s, char c1, char c2) { + int depth = 0; + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) == c1) + depth++; + else if (s.charAt(i) == c2) { + depth--; + if (depth == 0) + return i; + } else { + i = skip(s.substring(i), i); + if (-1 == i) + return -1; + } + } + return -1; + } + + /** + * Failed to parse the source code for some reason. This method prints out a + * suitably rude message, and then what? I haven't quite decided yet. + * + * TODO: Do something sensible here like throw an Exception which will give + * up on this file completely and tidy up the output file. It may be just + * too dangerous to try to carry on. But we need to fail in such a way that + * the build system knows that we've failed for this file and can build this + * file without trace. + */ + public static void rude(String reason, String filename, int lineno, + String codefragment) throws ParsingException { + + String text = "Bad C++ code!! "; + if (reason != null) + text += reason; + if (filename != null) + text += " " + filename + " lineno=" + lineno; + if (codefragment != null) + text += " <" + codefragment + ">"; + System.err.println(text); + throw new ParsingException(); + } + + /** + * This method reports an error level problem + * + * @param reason + * why we have an error level problem + */ + public static void rude(String reason) throws ParsingException { + // Apache commons logging + // log.error(Object line, null); + // or for now.... + rude(reason, null, 0, null); + } + + /** + * This method reports an error level problem + * + * @param reason + * why we have an error level problem + */ + public static void screenMessage(String msg) { + // Apache commons logging + // log.error(Object line, null); + // or for now.... + System.out.println(msg); + } + + /** + * Escapes special characters like " so that they can be output in a C + * string literal. Also removes newlines, since C string literals can't be + * split over lines. + */ + String pretty(String s) { + StringBuffer sb = new StringBuffer(s); + for (int i = 0; i < sb.length(); i++) + switch (sb.charAt(i)) { + case '"': + sb = sb.insert(i, '\\'); + i++; + break; + case '\n': + sb = sb.deleteCharAt(i); + i--; + break; + } + return sb.toString(); + } + + private static boolean startsWithComment(String s) { + if (null == s || s.length() < 2) + return false; + if (s.startsWith("//")) + return true; + if (s.startsWith("/*")) + return true; + return false; + } + + private static int endOfComment(String s) { + int idx; + if (s.startsWith("//")) + idx = s.indexOf("\n"); + else { + idx = s.indexOf("*/"); + if (-1 != idx) + idx++; // Step over */ + } + return idx; + } + + private static boolean startsWithStringLiteral(String s) { + if (null == s || s.length() < 1) + return false; + if (s.startsWith("\"") || s.startsWith("'")) + return true; + return false; + } + + private static int endOfStringLiteral(String s) { + boolean escape = false; + char c0 = s.charAt(0); + for (int i = 1; i < s.length(); i++) { + if (!escape && s.charAt(i) == c0) + return i; + + // \" or \' does not end the literal + if ('\\' == s.charAt(i)) + // Escaping a \ should switch escape off so \\' does end + // the literal + escape = !escape; + else + escape = false; + } + return -1; + } + + /** + * If the String s starts with a string literal or a comment, return i plus + * the index of the end of the literal or comment. String literals are + * enclosed in " or ' and comments start with /* or //. + */ + private static int skip(String s, int i) { + int j = 0; + if (startsWithStringLiteral(s)) { + j = endOfStringLiteral(s); + if (-1 == j) + return -1; + } else if (startsWithComment(s)) { + j = endOfComment(s); + if (-1 == j) + return -1; + } + return i + j; + } + + /** + * A better method than .equals() because it doesn't NullPointerException + * when one of the parameters is null. + */ + public static boolean safeEquals(Object o1, Object o2) { + if (null == o1 && null == o2) + return true; + if (null == o1 && null != o2) + return false; + if (null != o1 && null == o2) + return false; + return o1.equals(o2); + } + + public static void outputDebugString(String line) { + if (!Options.quiet()) { + if (Options.debug()) + // Apache commons logging + // log.debug(Object line, null); + // or for now + System.out.println(line); + } + } + + /** + * This static method allows different parts of the code to inform about + * significant events. Code interested in specific types of event can + * register a listener against that type (not written yet) + * + * @param eventType + * An int type enum indicating the type of event. + * @param message + * A message that can be output to the user. + */ + public static final int EVENT_TYPE_XML_ITEM_PARSED = 1; + + public static final int EVENT_TYPE_FILE_PARSED = 2; + + public static final int EVENT_TYPE_FILE_CREATE = 3; + + public static final int VERBOSE_LIMIT = 1024; + + public static final int DEPLOYMENT_ARTEFACT = VERBOSE_LIMIT; + + public static final int DEPLOYMENT_ARTEFACT_ENCOUNTERED = DEPLOYMENT_ARTEFACT + 1; + + public static final int DEPLOYMENT_ARTEFACT_GENERATED = DEPLOYMENT_ARTEFACT + 2; + + public static final int DEPLOYMENT_INPUT_DIRECTORY = DEPLOYMENT_ARTEFACT + 3; + + public static final int DEPLOYMENT_OUTPUT_DIRECTORY = DEPLOYMENT_ARTEFACT + 4; + + private static boolean reportArtefacts = false; + + /** + * An easily callable method to allow tracking/reposting of events in scagen + * and other tools. + * + * @param eventType + * used for classifying event + * @param message + * a user readable message + */ + public static void postEvent(int eventType, String message) { + if (Options.verbose() && eventType < VERBOSE_LIMIT) { + screenMessage(message); + } + + if ((eventType & DEPLOYMENT_ARTEFACT) > 0) { + reportArtefact(message, eventType); + } + + } + + /** + * @param message + * The user message + * @param eventType + * The type of event (input or output). This is used to determine + * if the path name of the file starts with the MODULE_ROOT + * directory or the given output directory as the one of these + * prefixes is removed from the path name in order to give the + * new (destination) path relative to the new module root + * + * + */ + + static String scagenInputDir = "MODULE_ROOT"; + + static String scagenOutputDir = "SCAGEN_OUTPUT"; + + static String newModuleRoot = "NEW_MODULE_ROOT"; + + static String generatedDirName = "$sourceDir1"; + + private static void reportArtefact(String message, int eventType) { + + if (Utils.isReportArtefacts()) { + + // Changing the value of the variable below will alter the output of + // the + // deploy assist strings: + // true will result in a "copy source NEW_MODULE_ROOT\dest" output + // and + // false will result in a "inputDir c:\fred" + // "outputDir c:\bob" + // "input c:\fred\sca.module" + // "output c:\bob\proxy.h" type output + String command = null; + + try { + newModuleRoot = (String) Options.getOption("-deploy"); + command = (String) Options.getOption("-command"); + } catch (Exception e) { + // let it default + } + + if (null == newModuleRoot) { + newModuleRoot = "DEPLOY_MODULE_ROOT"; + } + + if (null == command) { + command = "copy"; + } + + if (Options.outputCommand()) { + + String tail = message; + switch (eventType) { + case DEPLOYMENT_ARTEFACT_ENCOUNTERED: + if (message.startsWith(scagenInputDir)) { + tail = message.substring(scagenInputDir.length()); + } + + String dest = joinPathElements(newModuleRoot, tail); + + System.out.println(command + " " + platformSlashes(message) + + " " + platformSlashes(dest)); + break; + + case DEPLOYMENT_ARTEFACT_GENERATED: + if (message.startsWith(scagenOutputDir)) { + tail = message.substring(scagenOutputDir.length()); + } + + dest = joinPathElements(newModuleRoot, tail); + System.out.println(command + " " + platformSlashes(message) + + " " + platformSlashes(dest)); + break; + case DEPLOYMENT_INPUT_DIRECTORY: + scagenInputDir = message; + //System.out.println("inputDir " + message); + break; + case DEPLOYMENT_OUTPUT_DIRECTORY: + scagenOutputDir = message; + //System.out.println("outputDir " + message); + break; + default: + break; + } + + } else { + + if (Options.list()) { + switch (eventType) { + case DEPLOYMENT_ARTEFACT_ENCOUNTERED: + case DEPLOYMENT_ARTEFACT_GENERATED: + System.out.println(platformSlashes(message)); + break; + case DEPLOYMENT_INPUT_DIRECTORY: + case DEPLOYMENT_OUTPUT_DIRECTORY: + default: + break; + } + } else { + switch (eventType) { + case DEPLOYMENT_ARTEFACT_ENCOUNTERED: + //TODO make efficient + System.out.println("$sourceDir1" + + platformSlashes(message.substring(scagenInputDir.length()))); + break; + case DEPLOYMENT_ARTEFACT_GENERATED: + //TODO make efficient + System.out.println(generatedDirName + + platformSlashes(message.substring(scagenOutputDir.length()))); + break; + case DEPLOYMENT_INPUT_DIRECTORY: + scagenInputDir = platformSlashes(message); + System.out.println("sourceDir1=" + scagenInputDir); + break; + case DEPLOYMENT_OUTPUT_DIRECTORY: + scagenOutputDir = platformSlashes(message); + if (!scagenInputDir.equals(scagenOutputDir)) { + generatedDirName = "$sourceDir2"; + System.out.println("sourceDir2=" + scagenOutputDir); + } else { + //generatedDirName = "sourceDir1"; + } + break; + default: + break; + } + } + } + } + } + + /** + * @param tail + * @param tail + * @return + */ + public static String joinPathElements(String root, String tail) { + String separator; + // Stick in a "/" (File.separator) if required. + if ((tail.substring(0, 1).equals("/") || newModuleRoot.substring( + root.length() - 1, root.length()).equals("/")) + || (tail.substring(0, 1).equals("\\") || root.substring( + root.length() - 1, root.length()).equals("\\")) + + ) { + separator = ""; + } else { + separator = File.separator; + } + String dest = newModuleRoot + separator + tail; + return dest; + } + + /** + * @param reportArtefacts + * The reportArtefacts to set. + */ + public static void setReportArtefacts(boolean reportArtefacts) { + Utils.reportArtefacts = reportArtefacts; + } + + /** + * @return Returns the reportArtefacts. + */ + private static boolean isReportArtefacts() { + return reportArtefacts; + } + + private static String platformSlashes(String path) { + if (null == path) { + return path; + } + // We need a double level of \\ escapes if the slashes are + // this way round. + String separatorForRegex = File.separator + .replaceAll("\\\\", "\\\\\\\\"); + return path.replaceAll("[/\\\\]+", separatorForRegex); + + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html new file mode 100644 index 0000000000..c86184f441 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html @@ -0,0 +1,39 @@ + + + +Design documentation for org\apache\tuscany\sca\cpp\tools\common + + + + +
+ +

Overview

+ +This package can be used to reflect across C++ source code. It can produce +a network of descriptive objects describing C++ Headers, Signatures, Parameters and so +on that it finds in a given location of the file system. +Each of the descriptive objects has a set of getters that return either +the descriptive child objects, or for primitives, the string that represents the actual +value such as "int" or "myFunction". +

+There are also various utility methods that help with navigating the information, for example the Signature +class has an isConstructor method. The API Javadoc contains further details of these. +

+The package can scan a directory using a file mask to identify what types +of files are to be scanned. In this application we are interested only +in the function prototypes in the C++ header files. +

+The implementation was originated using some java code that was also +contributed to the Apache org.apache.axis.tools.common package. Care +has been taken that the original code was not sourced via Apache. If +this project is adopted by Apache then it is very possible that this +package could be merged with or made obsolete by org.apache.axis.tools.common +and because of this the design and interfaces have been preserved from +the original code as much as possible. + +

+

+ + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java new file mode 100644 index 0000000000..ea27e33d09 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java @@ -0,0 +1,352 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.apache.tuscany.sca.cpp.tools.common.Headers; +import org.apache.tuscany.sca.cpp.tools.common.Signature; +import org.apache.tuscany.sca.cpp.tools.common.Utils; +import org.w3c.dom.Node; + +/** + * This class will do the required processing for the element of a + * sca module or fragment file. + */ +public class ComponentDomNodeHandler extends GenericDomNodeHandler { + + /** + * This method will do the "normal" processing and then trigger a call to + * processComponentNode. + * + * @param node + * the node being processed + * @param contextXPath + * the XPath to the node + * @param handlers + * the map pf element names to DomNodeHandlers + * @param parameters + * a map of XPaths to parameters values found so far + */ + + public void handleNode(Node node, String contextXPath, Map handlers, + Map parameters) { + + // Pick up attrs and the interface.cpp child elements + super.handleNode(node, contextXPath, handlers, parameters); + + try { + //OK now go and create the wrapper and proxy for the service + processComponentNode(contextXPath, parameters); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + /** + * This method basically moved from the text names of things to operating on + * the actual Files. It will also verify or work out the correct class name + * for the implmentation and complain if this does match at least one + * potential service method in the class. + * + * @param contextXPath + * used to pull the correct values from the parameters map (as + * there can be multiple implementation.cpp elelements in there). + * @param parameters + * a map of XPath keys to attribute values + * @throws Exception + */ + private void processComponentNode(String contextXPath, Map parameters) + throws Exception { + + String implHeader = (String) parameters.get(contextXPath + + "/implementation.cpp/@header"); + String implClass = (String) parameters.get(contextXPath + + "/implementation.cpp/@class"); + + File moduleOrFragmentFile = (File) parameters + .get("moduleOrFragmentFile"); + File implHeaderFile = null; + if (null != moduleOrFragmentFile) { + File dir = moduleOrFragmentFile.getParentFile(); + implHeaderFile = new File(dir, implHeader); + } else { + throw new InternalError( + "Internal error: sca.module or fragment file not present in interal parameters"); + } + + try { + String resolvedImplClassName = getClassName(implHeaderFile, + implClass); + + // Check or retrieve the impl Class name. + if (null == resolvedImplClassName) { + try { + //A class attribute was set but there were no methods of + // the + // class in the header + System.out + .println("Classname given (" + + implClass + + ") does not match any header file method's classes in file: " + + implHeaderFile.getCanonicalPath()); + } catch (IOException e) { + System.out + .println("Classname given (" + + implClass + + ") does not match any header file method's classes in file: " + + implHeaderFile.getAbsolutePath()); + } + return; + } else { + File target = (File) parameters.get("targetFile"); + // go into the .componentType file and generate the cpp + processComponentTypeFile(implHeaderFile, target, + resolvedImplClassName); + + } + } catch (Exception e) { + String compName = (String) parameters + .get("/moduleFragment/component/@name"); + Utils + .screenMessage("Problem interpreting header or class attributes in " + + compName + + " component, in " + + moduleOrFragmentFile.getPath() + " file"); + System.exit(-2); + } + + } + + /** + * The purpose of this method is to move from the DOM parameters to dealing + * with the actual Files involved. It is from this method that we kick off + * the processing of the componentType file. + * + * @param header + * the implementation header + * @param target + * the directory for the output + * @param implClass + * @throws Exception + */ + private void processComponentTypeFile(File header, File target, + String implClass) throws Exception { + + // The componentType files should be in the same dir as the Impl + // header... + if (header == null || target == null) { + return; + } + + File componentTypeDirectory = header.getParentFile(); + String headerFileName = header.getName(); + String componentTypeName = headerFileName.substring(0, headerFileName + .lastIndexOf(".")); + + File componentTypeFile = new File(componentTypeDirectory, + componentTypeName + ".componentType"); + + ComponentTypeFileHandler ctParser = new ComponentTypeFileHandler(); + + // The implClass is used in the generated wrapper code so we need to + // store + // it so we can tunnel through the standard actOnFile signature. + + int namespaceEnd = -1; + if (null != implClass) { + namespaceEnd = implClass.lastIndexOf("::"); + } + + String namespace = null; + + if (-1 != namespaceEnd) { + namespace = implClass.substring(0, namespaceEnd); + ctParser.setParameter("namespace", namespace); + implClass = implClass.substring(namespaceEnd + 2); + } + + if (implClass != null) { + ctParser.setParameter("implClass", implClass); + } + + try { + ctParser.handleComponentTypeFile(componentTypeFile, target); + } catch (Exception e) { + Utils + .screenMessage("There has been a problem parsing the componentType file: " + + componentTypeFile.getCanonicalPath()); + Utils.screenMessage(" the reported errors is " + + e.getLocalizedMessage()); + Utils.screenMessage(" and the java exception stack is below."); + e.printStackTrace(); + throw e; + } + } + + /** + * The resolve and check the classname of the service. If we have an + * implementation class name we have to check that there is: at least one + * (non-private, non constructor or finalizer) method of that class in the + * header If there is no implementation class then we will return the class + * of the first non-private/constructor/finalizer method we find. + * + * @param header + * @param implementationCppClass + * @return + * @throws Exception + */ + private String getClassName(File header, String implementationCppClass) + throws Exception { + String methodClassName = null; + List methods = null; + + if (null == header) { + return null; + } + + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, header + .getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, + "Scagen processing C++ implementation header " + + header.getAbsolutePath()); + + try { + Headers headers = new Headers(); + + headers.actOnFile(header, null, 1); + + methods = headers.getAllMethods(); + + } catch (FileNotFoundException fnfe) { + String path; + try { + path = header.getCanonicalPath(); + } catch (IOException e1) { + path = header.getPath(); + } + Utils.screenMessage("The header file: " + path + + " referenced cannot be found."); + throw fnfe; + } catch (Exception e) { + String path = header.getPath(); + Utils.screenMessage("The header file: " + path + + " referenced is not valid. Reason given is " + + e.getLocalizedMessage()); + throw e; + } + + // We need at least some methods + if (null == methods) { + return null; + } + + // We need at least one service method of to do anything + methods = trimMethodsOfPrivatesConstructorsAndDestrutors(methods); + if (null == methods || methods.size() == 0) { + return null; + } + + // If the user specifies an implementation class then we need at + // least one service method of that class + if (implementationCppClass != null) { + methods = filterMethodsToOneClass(methods, implementationCppClass); + + if (null == methods || methods.size() == 0) { + return null; + } else { + // There was at least one method of the correct type + return implementationCppClass; + } + } else { + // Implementation class is null so we return the classname of the + // first service method + return ((Signature) methods.get(0)).getTrimClassName(); + } + } + + /** + * Filter the mthods supplied to only ones fo the supplied class. + * + * @param methods + * the list of methods + * @param implementationCppClass + * the class we wish + * @return a list of methods of the correct class + */ + private List filterMethodsToOneClass(List methods, + String implementationCppClass) { + + if (null == methods) { + return null; + } + + if (null == implementationCppClass + || implementationCppClass.length() == 0) { + return null; + } + + for (Iterator iter = methods.listIterator(); iter.hasNext();) { + Signature method = (Signature) iter.next(); + + String className = method.getTrimClassName(); + String namespace = method.getNamespace(); + + if (namespace != null && namespace.length() > 0) { + className = namespace + "::" + className; + } + + if (!implementationCppClass.equals(className)) { + iter.remove(); + } + } + + return methods; + + } + + /** + * This method removes contructor and destructor methods from the list. + * + * @param methods + * the list of methods + * @return + */ + private List trimMethodsOfPrivatesConstructorsAndDestrutors(List methods) { + + if (null == methods) { + return null; + } + + for (Iterator iter = methods.listIterator(); iter.hasNext();) { + Signature method = (Signature) iter.next(); + + if (method.isConstructor() || method.isDestructor()) { + iter.remove(); + } + } + + return methods; + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java new file mode 100644 index 0000000000..0ee9b97138 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java @@ -0,0 +1,124 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; + +import org.apache.tuscany.sca.cpp.tools.common.FileActor; +import org.apache.tuscany.sca.cpp.tools.common.Utils; + +/** + * The purpose of this class is to specialise the map of XML element handlers + * for a XXX.componentType file that is used by the XMLFileActor + */ +public class ComponentTypeFileHandler extends XMLFileActor { + + static { + // We set up a map for each element type we wish to handle + // this alows the XML handling code to be generic and type free + // while the handlers don't have to do mcuh XML handling. + + GenericDomNodeHandler gdnh = new GenericDomNodeHandler(); + handlers.put("componentType", gdnh); + handlers.put("interface.cpp", gdnh); + + ServiceDomNodeHandler sdnh = new ServiceDomNodeHandler(); + handlers.put("service", sdnh); + + ReferenceDomNodeHandler rdnh = new ReferenceDomNodeHandler(); + handlers.put("reference", rdnh); + } + + /** + * This method just exists to add the default starting depth of 1 to the + * underlying actOnFile interface + * + * @param componentTypeXML + * @param target + * @throws Exception + */ + public void handleComponentTypeFile(File componentTypeXML, File target) + throws Exception { + // We have already set up the XML element handlers. + actOnFile(componentTypeXML, target, 1); + // We need do no more, the service and reference handlers + // ServiceDomNodeHandler and ReferenceDomNodeHandler + // will take appropriate action. + } + + /** + * This method is the main FileActor method + * + * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM + * and kick off the processing (using the handler map that has been set + * up by the concrete subclass). + * + * @param moduleXML + * the sca.module or fragment file + * @param target + * the target directory + * @param depth + * not uesed here but in the + * @see FileActor#actOnFile(File, File, int) interface to allow for + * recursive diving into a directory structure. + */ + public void actOnFile(File fileXML, File target, int depth) + throws Exception { + + if (null == fileXML || null == target) { + return; + } + + parameters.put("componentTypeFile", fileXML); + + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, fileXML.getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, "Scagen processing SCA componentType file " + fileXML.getAbsolutePath()); + + super.actOnFile(fileXML, target, depth); + + } + + /** + * @return an error message - usually over-ridden. + */ + protected String getContextMessage() { + + String module = ((File) parameters.get("moduleOrFragmentFile")).getPath(); + if (null == module) { + module = "unknown"; + } + + String component = (String) parameters.get("/module/component/@name"); + if (null == component) { + component = (String) parameters + .get("/moduleFragment/component/@name"); + } + if (null == component) { + module = "unknown"; + } + + String msg = "when processing module " + module; + + msg = msg + + "\nin this module file, the component \"" + + component + + "\" has an implementation.cpp element with a header attribute \nwhere the C++ header can be found but it has no matching .componentType file present in\nthe same directory as the header."; + + return msg; + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java new file mode 100644 index 0000000000..1ff4504fff --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java @@ -0,0 +1,87 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; +import java.util.Set; + +import org.apache.tuscany.sca.cpp.tools.common.FileActor; +import org.apache.tuscany.sca.cpp.tools.common.Utils; + +public class DirectoryScanner { + private FileActor actor; + + private Set actOnTheseFileExtensions; + + public DirectoryScanner(FileActor actor, Set extensions) { + this.actor = actor; + this.actOnTheseFileExtensions = extensions; + } + + /** + * + * @param source + * The module root directory + * @param target + * The directory that will hold the generated output + * @param depth + * The depth from the initial starting point, not significant for + * the Scagen tool as we are only interested in the module root + * directory but present due to the FileActor actOnFile interface + * method. This code is pulled from the code in the CParsingTool + * class and further work is needed to remove the duplication. + * Tnterface has been left unchanged as we hope to reconverge the + * parser here with the original one once the changes are fed + * back into the original code. + * @throws Exception + */ + public void walkTree(File source, File target, int depth) throws Exception { + depth++; + boolean noTarget = (null == target); + + if (!source.canRead()) + Utils.rude("Cannot read from source directory " + source); + if (!noTarget && !target.canWrite()) + Utils.rude("Cannot write to target directory " + target); + + if (source.isDirectory()) { + File[] filesInDirectory = source.listFiles(); + for (int i = 0; i < filesInDirectory.length; i++) { + File file = filesInDirectory[i]; + String name = file.getName(); + int dot = name.lastIndexOf('.'); + String ext = null; + if (-1 != dot) { + ext = name.substring(dot + 1); + } + + if (file.isFile() + && (actOnTheseFileExtensions == null || (!file + .isHidden() && actOnTheseFileExtensions + .contains(ext)))) { + // this is a file we need to act on! + actor.actOnFile(file, target, depth); + } + } + } else { + return; // Do not act on single files for now we expect a module + // root directory + // and the "main" class checks its parameters to ensure this is so. + } + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java new file mode 100644 index 0000000000..2ca4c7c881 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java @@ -0,0 +1,77 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.util.Map; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * The purpose of this class it to provide a generic class that can handle both + * a DOM and a DOM node. + * + */ +public class DomHandler extends GenericDomNodeHandler { + /** + * This method will run through the initial level of the DOM using the + * handlers map + * + * @param dom + * the document being consumed + * @param handlers + * the map from element name to node handler + * @param parameters + * a map of parameters - this is often used by a handler to place + * a name-value pair, the name is often an Xpath representation + * of the location of the data in the DOM but handlers are free + * to use whatever they like - the contextXpath is generated as + * an Xpath prefix for those handlers that wish to use it. + */ + public static void handleDom(Document dom, Map handlers, Map parameters) { + if (dom != null) { + NodeList childNodes = dom.getChildNodes(); + for (int i = 0; i < childNodes.getLength(); i++) { + Node childNode = childNodes.item(i); + mapNodeToHandlerAndHandle(childNode, "/" + + childNode.getNodeName(), handlers, parameters); + } + } + } + + /** + * + * @param node + * The DOM node being consumed + * @param contextXPath + * The XPath to this node + * @param handlers + * The map from element name to node handler + * @param parameters + * A map of parameters - this is often used by a handler to place + * a name-value pair, the name is often an Xpath representation + * of the location of the data in the DOM but handlers are free + * to use whatever they like - the contextXpath is generated as + * an Xpath prefix for those handlers that wish to use it. + */ + public void handleNode(Node node, String contextXPath, Map handlers, + Map parameters) { + mapNodeToHandlerAndHandle(node, contextXPath, handlers, parameters); + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java new file mode 100644 index 0000000000..00942bd9ca --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java @@ -0,0 +1,40 @@ +/* +* +* 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. +*/ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.util.Map; + +import org.w3c.dom.Node; + +public interface DomNodeHandler { + + public static int ELEMENT = 1; + /** + * An interface for classes that can process DOM nodes. + * + * @param node the DOM node being consumed + * @param contextXPath the XPath to this node + * @param handlers The map from element name to node handler + * @param parameters A map of parameters - this is often used by a handler to place + * a name-value pair, the name is often an Xpath like representation of the + * location of the data in the DOM but handlers are free to use whatever + * they like - the contextXpath is generated as an Xpath prefix for those + * handlers that wish to use it. + */ + void handleNode( Node node, String contextXPath, Map handlers, Map parameters ); + +} diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java new file mode 100644 index 0000000000..3f9fb359f5 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java @@ -0,0 +1,214 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.Map.Entry; + +import org.apache.tuscany.sca.cpp.tools.common.Utils; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * + * + * + * + */ +public class GenericDomNodeHandler implements DomNodeHandler { + /** + * This method parses the DOM attributes into name value pairs in the + * parameter map each valued keyed by its XPath. + * + * @param node + * the DOM node being processed + * @param contextPath + * the XPath to the DOM node being processed + * @param parameters + * a scratchpad map of name value pairs + */ + public void transferAttrsToParameters(Node node, String contextPath, + Map parameters) { + + if (node == null || contextPath == null || parameters == null) + return; + + NamedNodeMap attrs = node.getAttributes(); + if (attrs != null) { + for (int i = 0; i < attrs.getLength(); i++) { + Node attr = attrs.item(i); + parameters.put(contextPath + "/" + "@" + attr.getNodeName(), + attr.getNodeValue()); + + // Report the dll name to the deployment tool if required. + if ("dll".equals(attr.getNodeName())) { + //This is a path relative to the module root. + //so we need to add it in. + File mod = (File) parameters.get("moduleOrFragmentFile"); + if (null != mod) { + String separatorForRegex = File.separator.replaceAll( + "\\\\", "\\\\\\\\"); + + String end = attr.getNodeValue().replaceAll("[/\\\\]+", + separatorForRegex); + + if (!end.startsWith(File.separator)) { + end = File.separator + end; + } + + String fullPath = mod.getParentFile().getAbsolutePath() + + end; + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, + fullPath); + } + + } + + } + } + return; + } + + /** + * This method will iterate through the DOM node's children and call the + * appropriate handler for each one. + * + * @param node + * the DOM node being processed + * @param contextPath + * the XPath to the DOM node being processed + * @param handlers + * a map of element name to handler objects + * @param parameters + * a scratchpad map of name value pairs + */ + public void handleChildElements(Node node, String contextPath, + Map handlers, Map parameters) { + + if (node == null || contextPath == null) + return; + + NodeList children = node.getChildNodes(); + if (children != null) { + for (int i = 0; i < children.getLength(); i++) { + Node child = children.item(i); + mapNodeToHandlerAndHandle(child, contextPath + "/" + + child.getNodeName(), handlers, parameters); + } + } + return; + } + + /** + * This method will resolve any registered handler for a particular DOM + * element and call the handleNode method on it. If the handlers map has a + * mapping from "entity" to an instance of EntityHandler which implements + * the DomNodeHandler interface then any node that looks like + * + * + * Will be passed to the EntityHandler to process. + * + * @param node + * the DOM node being processed + * @param contextPath + * the XPath to the DOM node being processed + * @param handlers + * a map of element name to handler objects + * @param parameters + * a scratchpad map of name value pairs + */ + public static void mapNodeToHandlerAndHandle(Node node, String contextPath, + Map handlers, Map parameters) { + if (node != null && node.getNodeType() == DomNodeHandler.ELEMENT) { + String nodeName = node.getNodeName(); + if (nodeName != null && nodeName.length() > 0) { + DomNodeHandler handler = (DomNodeHandler) handlers + .get(nodeName); + if (handler != null) { + handler.handleNode(node, contextPath, handlers, parameters); + } + } + } + } + + /** + * This method will place the attributes in this node into the parameter map + * keyed by the XPath and recursively continue processing for any + * sub-elements of the node. + * + * @param node + * The DOM node being consumed + * @param contextXPath + * The XPath to this node + * @param handlers + * The map from element name to node handler + * @param parameters + * A map of parameters - this is often used by a handler to place + * a name-value pair, the name is often an Xpath representation + * of the location of the data in the DOM but handlers are free + * to use whatever they like - the contextXpath is generated as + * an Xpath prefix for those handlers that wish to use it. + */ + public void handleNode(Node node, String contextXPath, Map handlers, + Map parameters) { + + clearParametersAtThisXPath(contextXPath, parameters); + transferAttrsToParameters(node, contextXPath, parameters); + handleChildElements(node, contextXPath, handlers, parameters); + } + + /** + * @param contextXPath + * @param parameters + */ + private void clearParametersAtThisXPath(String contextXPath, Map parameters) { + + // TODO: Slow but works, improve parameters mechanism overall + // to make this unecessary + if (contextXPath == null || parameters == null) { + return; + } + + // We want to clear both /moduleFragment and /module + // subtrees when we come across the root of either.. + if (contextXPath.equals("/moduleFragment")) { + //clear both this and "module" + contextXPath = "/module"; + } + + Set parms = parameters.entrySet(); + if (null != parms) { + Iterator iter = parms.iterator(); + Map.Entry item = null; + String thisKey; + + while (iter.hasNext()) { + item = (Entry) iter.next(); + thisKey = (String) item.getKey(); + if (thisKey.startsWith(contextXPath)) { + //System.out.println(" removing " + thisKey + " for " + + // item.getValue().toString() + " against " + contextXPath); + iter.remove(); + } + } + } + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java new file mode 100644 index 0000000000..699abf7a08 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java @@ -0,0 +1,27 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +/** + * This class is just a convenient application class that is loaded in order to + * get the application class loader. We are interested in the application class + * loader as we use its getResource method to resolve XML files independantly of + * where they are. + */ +public class LittleClass { + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java new file mode 100644 index 0000000000..3bd8129401 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java @@ -0,0 +1,85 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; + +import org.apache.tuscany.sca.cpp.tools.common.FileActor; +import org.apache.tuscany.sca.cpp.tools.common.Utils; + +/** + * The purpose of this class is purely to specialise the handler map to one with + * a specific ComponentDomNodeHandler. + */ +public class ModuleOrFragmentFileHandler extends XMLFileActor { + + static { + + GenericDomNodeHandler gdnh = new GenericDomNodeHandler(); + + /* + * We use a specific Component node handler in order to be able to + * process multiple components in the same XML file + */ + ComponentDomNodeHandler componentdnh = new ComponentDomNodeHandler(); + handlers.put("component", componentdnh); + + /* + * We are interested inthe elements below but they only need standard + * processing + */ + handlers.put("module", gdnh); + handlers.put("moduleFragment", gdnh); + handlers.put("implementation.cpp", gdnh); + } + + /** + * This method is the main FileActor method + * + * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM + * and kick off the processing (using the handler map that has been set + * up by the concrete subclass). + * + * @param moduleXML + * the sca.module or fragment file + * @param target + * the target directory + * @param depth + * not uesed here but in the + * @see FileActor#actOnFile(File, File, int) interface to allow for + * recursive diving into a directory structure. + */ + public void actOnFile(File moduleXML, File target, int depth) + throws Exception { + + if (null == moduleXML || null == target) { + return; + } + + parameters.put("moduleOrFragmentFile", moduleXML); + + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, moduleXML + .getAbsolutePath()); + + Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, + "Scagen processing SCA module file " + + moduleXML.getAbsolutePath()); + + super.actOnFile(moduleXML, target, depth); + + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java new file mode 100644 index 0000000000..a490d184d1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java @@ -0,0 +1,67 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.util.Map; + +import org.apache.tuscany.sca.cpp.tools.common.Options; +import org.w3c.dom.Node; + +/** + * The purpose of this class is to process a element in a + * componentType file and then trigger a call to the method in ServicesGenerator + * to process the interface header file + */ +public class ReferenceDomNodeHandler extends GenericDomNodeHandler { + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.cpp.services.DomNodeHandler#handleNode(org.w3c.dom.Node, + * java.lang.String, java.util.Map, java.util.Map) + */ + public void handleNode(Node node, String contextXPath, Map handlers, + Map parameters) { + + // Pick up attrs and children + super.handleNode(node, contextXPath, handlers, parameters); + + //OK we know we are handling a reference + //now go and create the wrapper and proxy for it + createProxyForReference(parameters); + + } + + /** + * This method is really just an adapter that adapts the -dir Option to a + * value int he parameters map for "module_root" + * + * @param parameters + * the map of name-value parameters. + */ + private void createProxyForReference(Map parameters) { + try { + String mr = (String) Options.getOption("-dir"); + parameters.put("module_root", mr); + ServicesGenerator.handleInterfaceHeader(parameters, true); + + } catch (Exception e) { + e.printStackTrace(); + } + + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java new file mode 100644 index 0000000000..a6f6f58644 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java @@ -0,0 +1,170 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import org.apache.tuscany.sca.cpp.tools.common.CParsingTool; +import org.apache.tuscany.sca.cpp.tools.common.Options; +import org.apache.tuscany.sca.cpp.tools.common.Utils; + +/** + * This is the main top level class. Its purpose is to create a + * Module/FragmentFile handler visitor and pass it to a DirectoryScanner for + * processing. + */ +public class Scagen extends CParsingTool { + + public static Set MODULE_EXTENSIONS = new HashSet(Arrays + .asList(new Object[] { "module", "fragment" })); + + /** + * @throws Exception + * + */ + public Scagen(String[] args) throws Exception { + super(args); + } + + /** + * Take a directory scanning class and create a vistor that knows how to + * handle any sca.module or .fragment that the scanner comes across. + * + * @param args + * standard main args. THe values we expect in this class are + * scagen -dir input_dir -output output_dir + * + */ + public static void main(String[] args) { + boolean failed = false; + try { + Scagen env = new Scagen(args); + ModuleOrFragmentFileHandler module_handler = new ModuleOrFragmentFileHandler(); + + // Check and access the input SCA module directory + String name = (String) Options.getOption("-dir"); + if (null == name) { + Utils + .screenMessage("Please provide a SCA module directory name as a \"-dir\" option."); + env.printUsage(); + System.exit(-1); + } + File source = new File(name); + if (!source.isFile() && !source.isDirectory()) { + Utils + .screenMessage("The SCA module directory provided as the \"-dir\" option cannot be accessed,"); + Utils.screenMessage("the option given was: " + source); + env.printUsage(); + System.exit(-1); + } + + String deployDir = null; + try { + deployDir = (String) Options.getOption("-deploy"); + if (null != deployDir || Options.deploy()) { + Utils.setReportArtefacts(true); + } + } catch (Exception e) { + // let it default to null + } + + Utils.postEvent(Utils.DEPLOYMENT_INPUT_DIRECTORY, source + .getAbsolutePath()); + + // We check the -output option here as we wish to + // reuse the env.maybeCreateDirectory method + // unchanged from the original that went into axis and it will do a + // System.exit if there is no matching Option + String outputDirName = (String) Options.getOption("-output"); + if (null == outputDirName) { + Utils + .screenMessage("Please provide an output directory name for the generated files as a \"-output\" option."); + env.printUsage(); + System.exit(-1); + } + + File outputDir = new File(outputDirName); + + // Check we can create the output directory + if (outputDir == null || !outputDir.exists() && !outputDir.mkdir()) { + Utils.screenMessage("Failed to create output directory: " + + outputDirName); + env.printUsage(); + System.exit(-1); + } + + Utils.postEvent(Utils.DEPLOYMENT_OUTPUT_DIRECTORY, outputDir + .getAbsolutePath()); + + DirectoryScanner scanner = new DirectoryScanner(module_handler, + MODULE_EXTENSIONS); + scanner.walkTree(source, outputDir, 1); + + if (0 == module_handler.getFilesActedOn()) { + Utils + .screenMessage("No SCA module or fragment files were found in: " + + source); + } + + failed = module_handler.failed; + + } catch (Exception exception) { + Utils + .screenMessage("Unexpected error occurred while runnning the Scagen tool. The Java exception is below."); + exception.printStackTrace(); + failed = true; + } + + if (failed) { + Utils + .outputDebugString("Finished! (but encountered problems parsing modules)"); + System.exit(-2); + } + + Utils.outputDebugString("Finished!"); + } + + /** + * Provide a hint to the user on how to call this class + */ + protected void printUsage() { + System.out + .println("usage: Java Scagen -dir -output [-verbose] [-deploy ] [-nogenerate] [-outputCommand] [-command ]"); + System.out + .println(" -dir : the SCA module root directory"); + System.out + .println(" -output : a directory to put the generated output into"); + System.out.println(" [-verbose]: report on what scagen is doing"); + System.out + .println(" [-deploy ]: output text to help in deploying the module's artefacts"); + System.out + .println(" [-command ]: a string that is injected into the deploy text"); + System.out + .println(" [-list]: change the deploy output text to a simple list of artefacts"); + System.out + .println(" [-outputCommand]: change the deploy output text to command text format"); + System.out + .println(" output is of form \"copy_cmd file1 file1\""); + System.out + .println(" [-nogenerate]: do not generate proxies and wrappers"); + + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java new file mode 100644 index 0000000000..79b74c0450 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java @@ -0,0 +1,62 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.util.Map; + +import org.apache.tuscany.sca.cpp.tools.common.Options; +import org.w3c.dom.Node; + +public class ServiceDomNodeHandler extends GenericDomNodeHandler { + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.cpp.services.DomNodeHandler#handleNode(org.w3c.dom.Node, + * java.lang.String, java.util.Map, java.util.Map) + */ + public void handleNode(Node node, String contextXPath, Map handlers, + Map parameters) { + + // Pick up attrs and the interface.cpp child elements + super.handleNode(node, contextXPath, handlers, parameters); + + //OK now go and create the wrapper and proxy for the service + createWrapperAndProxyForService(parameters); + + } + + /** + * This method will generate the wrapper and proxy C++ and header files for + * the service. + * + * @param parameters + * a map of name-value parameters + */ + private void createWrapperAndProxyForService(Map parameters) { + + try { + String mr = (String) Options.getOption("-dir"); + parameters.put("module_root", mr); + ServicesGenerator.handleInterfaceHeader(parameters, false); + + } catch (Exception e) { + e.printStackTrace(); + } + + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java new file mode 100644 index 0000000000..6442b76992 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java @@ -0,0 +1,802 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.apache.tuscany.sca.cpp.tools.common.CParsingTool; +import org.apache.tuscany.sca.cpp.tools.common.Headers; +import org.apache.tuscany.sca.cpp.tools.common.Options; +import org.apache.tuscany.sca.cpp.tools.common.Parameter; +import org.apache.tuscany.sca.cpp.tools.common.Signature; +import org.apache.tuscany.sca.cpp.tools.common.Utils; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Text; + +/** + * This class is the main class that handles the function that parses a C++ + * interface header file into a DOM that holds all the semantic information + * about the interface - method names, parameters and return values. It then + * uses XSLT to generate different "views" of this data plus the parameter map + * from other sources that are the C++ programs for the proxy and wrapper + * implementations and headers. + */ +public class ServicesGenerator extends CParsingTool { + + private static final String OPERATION_NAME_ATTR = "operationNameAttr"; + + private static final String HEADER_NAME_ATTR = "headerNameAttr"; + + private static final String SCA_OPERATION = "scaOperation"; + + private static final String SCA_SERVICE = "scaService"; + + private static final String SCA_OPERATION_RETURN_TYPE = "scaOperationReturnType"; + + private static final String SCA_OPERATION_PARAMETER = "scaOperationParameter"; + + private static final String SCA_OPERATION_PARAMETER_NAME_ATTR = "scaOperationParameterNameAttr"; + + private static final String SCA_OPERATION_PARAMETER_CONST_ATTR = "scaOperationParameterConstAttr"; + + private static final String SCA_INTERFACE_NAME_ATTR = "scaInterfaceNameAttr"; + + private static final String CPP_HEADER = "cppHeader"; + + private static boolean TESTING = true; + + private static TransformerFactory txmf = null; + + private static ServicesGenerator instance = null; + + public ServicesGenerator(String[] args) throws Exception { + super(args); + txmf = TransformerFactory.newInstance(); + } + + /** + * + * @param parameters + * @param forReference + * true if we are creating a proxy for a reference (rather than + * for a service) + * @throws Exception + * + * The design is + *
    + *
  • handleInterfaceHeader + *
  • createDOMofMethods + *
  • createProxyCPPFromDom(outputDir, dom); + *
  • createProxyHeaderFromDom(outputDir, dom); + *
+ * + * plus if we are not generating for a reference element + *
    + *
  • createWrapperCPPFromDom(outputDir, dom); + *
  • createWrapperHeaderFromDom(outputDir, dom); + *
      + * Each of the create.... methods calls createOutputFromDom with a different + * style sheet. + * + */ + public static void handleInterfaceHeader(Map parameters, + boolean forReference) throws Exception { + boolean failed = false; + + String type = null; + if (forReference) { + type = "reference"; + } else { + type = "service"; + } + String interfaceHeaderFilename = (String) parameters + .get("/componentType/" + type + "/interface.cpp/@header"); + + String componentTypeFileHeaderName = interfaceHeaderFilename; + + String sca_module_root = (String) Options.getOption("-dir"); + parameters.put("module_root", sca_module_root); + + if (sca_module_root != null && interfaceHeaderFilename != null + && interfaceHeaderFilename.length() > 0) { + String separator; + // Stick in a "/" (File.separator) if required. + if ((interfaceHeaderFilename.substring(0, 1).equals("/") || sca_module_root + .substring(sca_module_root.length() - 1, + sca_module_root.length()).equals("/")) + || (interfaceHeaderFilename.substring(0, 1).equals("\\") || sca_module_root + .substring(sca_module_root.length() - 1, + sca_module_root.length()).equals("\\")) + + ) { + separator = ""; + } else { + separator = File.separator; + } + interfaceHeaderFilename = sca_module_root + separator + + interfaceHeaderFilename; + } + + File outputDir = (File) parameters.get("targetDirectoryFile"); + + String[] args = new String[] { "-source", interfaceHeaderFilename, + "-target", outputDir.getPath() }; + ServicesGenerator gen = new ServicesGenerator(args); + File file; + try { + if (null == interfaceHeaderFilename) { + gen.printUsage(); + System.exit(-1); + } + + file = new File(interfaceHeaderFilename); + if (!file.isFile()) { + if (file.isDirectory()) { + Utils + .rude("This tool works at the header file level and not for directories like " + + file); + } + Utils.rude("Bad file or directory " + file); + } + File source = file; + if (!outputDir.exists() && !outputDir.mkdir()) + Utils.rude("Failed to create directory " + outputDir); + + // The class below is the one that will go through the header + // file(s) + Headers headers = new Headers(); + + if (null != interfaceHeaderFilename) { + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, file + .getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, + "Scagen processing C++ interface header " + + file.getAbsolutePath()); + headers.actOnFile(file, outputDir, 1); + Utils.outputDebugString("Parsing files..."); + } + + String nameOfSorR = null; + String referenceName = null; + String serviceName = null; + + if (forReference) { + + Object rn = parameters.get("/componentType/reference/@name"); + + if (rn instanceof String) { + referenceName = (String) rn; + nameOfSorR = referenceName; + } + } else { + + Object sn = parameters.get("/componentType/service/@name"); + + if (sn instanceof String) { + serviceName = (String) sn; + nameOfSorR = serviceName; + } + } + + String moduleXmlFileHeader = null; + String moduleXmlFileHeaderNoExt = null; + Object moduleh = parameters + .get("/module/component/implementation.cpp/@header"); + + if (moduleh == null) { + moduleh = parameters + .get("/moduleFragment/component/implementation.cpp/@header"); + } + + if (moduleh instanceof String) { + File f = new File((String) moduleh); + moduleXmlFileHeader = (String) moduleh; + + String fname = f.getName(); + moduleXmlFileHeaderNoExt = fname.substring(0, fname + .lastIndexOf('.')); + + } + + String implClassNameAttrFromModuleFile = (String) parameters + .get("implClass"); + + String interfaceClassNameAttrFromComponentTypeFile; + if (forReference) { + interfaceClassNameAttrFromComponentTypeFile = (String) parameters + .get("/componentType/reference/interface.cpp/@class"); + } else { + interfaceClassNameAttrFromComponentTypeFile = (String) parameters + .get("/componentType/service/interface.cpp/@class"); + } + + List methods = headers.getAllMethods(); + + // Pull out one of the methods' namespace attributes. + String intfNamespace = null; + if (methods.size() > 0) { + Signature method = (Signature) methods.get(0); + intfNamespace = method.getNamespace(); + } + + if (interfaceClassNameAttrFromComponentTypeFile != null) { + methods = filterToPublicMethodsOfGivenClass(methods, + interfaceClassNameAttrFromComponentTypeFile, true); + } else { + //We want to filter to methods of the class whose + //name matches the header file name. + // String intfClassName = (String) parameters.get("intfClass"); + // + String headerFileBase = file.getName().replaceAll( + "\\.h|\\.hpp|\\.h++", ""); + + methods = filterToPublicMethodsOfGivenClass(methods, + headerFileBase, false); + } + + Document dom = createDOMofMethods(methods, source, serviceName, + referenceName, nameOfSorR, null, + componentTypeFileHeaderName, moduleXmlFileHeader, + moduleXmlFileHeaderNoExt, intfNamespace, + interfaceClassNameAttrFromComponentTypeFile, + implClassNameAttrFromModuleFile); + + createProxyCPPFromDom(outputDir, dom); + createProxyHeaderFromDom(outputDir, dom); + + if (!forReference) { + createWrapperCPPFromDom(outputDir, dom); + createWrapperHeaderFromDom(outputDir, dom); + } + + } catch (Exception exception) { + exception.printStackTrace(); + failed = true; + } + + if (failed) { + Utils.outputDebugString("Finished! (but encountered problems)"); + System.exit(-2); + } + } + + /** + * This methods takes a list of methods and filters them to only contain the + * public methods of the given class + * + * @param methods + * a list of methods + * @param className + * we will return a list of only this classes methods from the + * methods parameter + * @param attrSpecified + * if the user does not specify one we ignore namespaces + * @return + */ + private static List filterToPublicMethodsOfGivenClass(List methods, + String className, boolean useNamespace) { + if (methods != null && className != null && className.length() > 0) { + for (Iterator iter = methods.listIterator(); iter.hasNext();) { + Signature method = (Signature) iter.next(); + String scope = method.getScope(); + String sig = method.getOriginal(); + String namespace = method.getNamespace(); + + String qualifiedClassName; + if (useNamespace && null != namespace && 0 < namespace.length()) { + qualifiedClassName = namespace + "::" + + method.getTrimClassName(); + } else { + qualifiedClassName = method.getTrimClassName(); + } + + // If we are not public or the classname does not match + // remove... + if (!qualifiedClassName.equals(className) + || -1 == scope.indexOf("public")) { + iter.remove(); + } + } + } + return methods; + } + + /** + * Use an XSLT transformation to create a Proxy "view" of the DOM + * information + * + * @param outputDir + * where to put the C++ + * @param dom + * the DOM of semantic method information + * @throws TransformerException + */ + private static void createProxyCPPFromDom(File outputDir, Document dom) + throws TransformerException { + + //Create the Filename from the Service Name in the DOM + if (dom == null) { + return; + } + + String serviceOrReferenceName = "noSorRNameDefined"; + + String implClass = "nomoduleXmlFileHeaderDefined"; + + Element topNode = dom.getDocumentElement(); + if (null != topNode) { + Attr attr = topNode.getAttributeNode("nameOfSorR"); + if (attr != null) { + serviceOrReferenceName = attr.getNodeValue(); + } + + attr = topNode.getAttributeNode("implClass"); + if (attr != null) { + implClass = attr.getNodeValue(); + } + } + + File proxyCPP = new File(outputDir, implClass + "_" + + serviceOrReferenceName + "_Proxy.cpp"); + if (null != proxyCPP) { + + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, proxyCPP + .getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, + "Scagen creating SCA for C++ proxy implementation " + + proxyCPP.getAbsolutePath()); + } + + createOutputFromDom(dom, proxyCPP, + "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl"); + + } + + /** + * Use an XSLT transformation to create a Wrapper "view" of the DOM + * information + * + * @param outputDir + * where to put the C++ + * @param dom + * the DOM of semantic method information + * @throws TransformerException + */ + private static void createWrapperCPPFromDom(File outputDir, Document dom) + throws TransformerException { + + //Create the Filename from the Service Name in the DOM + if (dom == null) { + return; + } + + String serviceName = "noServiceDefined"; + + String implClass = "nomoduleXmlFileHeaderDefined"; + + Element topNode = dom.getDocumentElement(); + if (null != topNode) { + Attr attr = topNode.getAttributeNode("serviceName"); + if (attr != null) { + serviceName = attr.getNodeValue(); + } + + attr = topNode.getAttributeNode("implClass"); + if (attr != null) { + implClass = attr.getNodeValue(); + } + } + + File wrapperCPP = new File(outputDir, implClass + "_" + serviceName + + "_Wrapper.cpp"); + if (null != wrapperCPP) { + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, wrapperCPP + .getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, + "Scagen creating SCA for C++ wrapper implementation " + + wrapperCPP.getAbsolutePath()); + } + createOutputFromDom(dom, wrapperCPP, + "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl"); + + } + + /** + * Use an XSLT transformation to create a Proxy header "view" of the DOM + * information + * + * @param outputDir + * where to put the C++ + * @param dom + * the DOM of sematic method information + * @throws TransformerException + */ + private static void createProxyHeaderFromDom(File outputDir, Document dom) + throws TransformerException { + + //Create the Filename from the Service Name in the DOM + if (dom == null) { + return; + } + + String serviceOrReferenceName = "noServiceDefined"; + String intfClass = "noInterfaceClassNameOrDefaultDefined"; + String implClass = "noImplementationClassOrDefaultDefined"; + + Element topNode = dom.getDocumentElement(); + if (null != topNode) { + Attr attr = topNode.getAttributeNode("nameOfSorR"); + if (attr != null) { + serviceOrReferenceName = attr.getNodeValue(); + } + attr = topNode.getAttributeNode("intfClass"); + if (attr != null) { + intfClass = attr.getNodeValue(); + } + attr = topNode.getAttributeNode("implClass"); + if (attr != null) { + implClass = attr.getNodeValue(); + } + } + + File proxyHeader = new File(outputDir, implClass + "_" + + serviceOrReferenceName + "_Proxy.h"); + if (null != proxyHeader) { + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, proxyHeader + .getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, + "Scagen creating SCA for C++ proxy header " + + proxyHeader.getAbsolutePath()); + } + + createOutputFromDom(dom, proxyHeader, + "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl"); + + } + + /** + * Use an XSLT transformation to create a Wrapper header "view" of the DOM + * information + * + * @param outputDir + * where to put the C++ + * @param dom + * the DOM of sematic method information + * @throws TransformerException + */ + private static void createWrapperHeaderFromDom(File outputDir, Document dom) + throws TransformerException { + + //Create the Filename from the Service Name in the DOM + if (dom == null) { + return; + } + + String serviceName = "noServiceDefined"; + + String implClass = "nomoduleXmlFileHeaderDefined"; + + Element topNode = dom.getDocumentElement(); + if (null != topNode) { + Attr attr = topNode.getAttributeNode("serviceName"); + if (attr != null) { + serviceName = attr.getNodeValue(); + } + + attr = topNode.getAttributeNode("implClass"); + if (attr != null) { + implClass = attr.getNodeValue(); + } + } + + File wrapperHeader = new File(outputDir, implClass + "_" + serviceName + + "_Wrapper.h"); + + if (null != wrapperHeader) { + Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, wrapperHeader + .getAbsolutePath()); + Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, + "Scagen creating SCA for C++ wrapper header " + + wrapperHeader.getAbsolutePath()); + } + createOutputFromDom(dom, wrapperHeader, + "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl"); + + } + + /** + * This method will return a class loader that can see the resources that + * are parts of "this" package. + */ + private static ClassLoader getALoader() { + + LittleClass lc; + try { + lc = new LittleClass(); + return lc.getClass().getClassLoader(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * This method will generically process the DOM using a stylesheet passed + * in. + * + * @param dom + * the source of data (the model) + * @param outputFile + * where to put the result + * @param xslTransformationFileName + * the xsl file containing the "view" + * @throws TransformerException + */ + private static void createOutputFromDom(Document dom, File outputFile, + String xslTransformationFileName) throws TransformerException { + + if(Options.noGenerate()){ + return; + } + + InputStream stream = getALoader().getResourceAsStream( + xslTransformationFileName); + StreamSource ss = new StreamSource(stream); + StreamResult out = new StreamResult(outputFile); + try { + Transformer xslt = txmf.newTransformer(ss); + + // Unless a width is set, there will be only line breaks but no + // indentation. + // The IBM JDK and the Sun JDK don't agree on the property name, + // so we set them both. + // + try { + xslt.setOutputProperty( + "{http://xml.apache.org/xalan}indent-amount", "2"); + } catch (Throwable t) { + //OK to ignore this, depends on XSLT engine and one will fail + } + try { + xslt.setOutputProperty( + "{http://xml.apache.org/xslt}indent-amount", "2"); + } catch (Throwable t) { + //OK to ignore this, depends on XSLT engine and one will fail + } + + DOMSource from = new DOMSource(dom); + + xslt.transform(from, out); + + } catch (TransformerConfigurationException e) { + e.printStackTrace(); + throw (e); + } catch (TransformerException e) { + e.printStackTrace(); + throw (e); + } finally { + try { + stream.close(); + } catch (IOException e1) { + // unlikely but if + // we can't close it, we can't close it + } + } + + } + + //TODO clear up the parameter list below to make it smaller if + // possible + /** + * This method will create A DOM containing all the semantic information + * that it can extract from a C++ header file. + * + * @param methods + * a list of methods that are going into the DOM + * @param source + * the header file the methods came from + * @param serviceName + * the name of the service + * @referenceName the name of the reference + * @nameOfSorR the non null one of the two parameters above + * @headerClassName the name of the header class + * @param moduleXmlFileImplHeaderNameWithPathAndExt + * the source filename + * @param moduleXmlFileHeaderNoExtorPath + * the shortname of the source file + * @param implClass + * the implementation class + * @param intfClass + * the interface we are turning into a service + * @return + */ + private static Document createDOMofMethods(List methods, File source, + String serviceName, String referenceName, String nameOfSorR, + String headerClassName, + String componentTypeXmlFileIntfHeaderNameWithPathAndExt, + String moduleXmlFileImplHeaderNameWithPathAndExt, + String moduleXmlFileHeaderNoExtorPath, String intfNamespace, + String intfClass, String implClass) { + + if (methods == null) { + return null; + } + + // Create a DOM of the methods + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + Document document = null; + try { + DocumentBuilder builder = factory.newDocumentBuilder(); + document = builder.newDocument(); + + Element root = (Element) document.createElement(CPP_HEADER); + + root.setAttribute(HEADER_NAME_ATTR, source.getPath()); + + document.appendChild(root); + + Element intf = (Element) document.createElement(SCA_SERVICE); + root.appendChild(intf); + + // Go through all the signatures we have collected... + Signature s = null; + for (Iterator iter = methods.iterator(); iter.hasNext();) { + s = (Signature) iter.next(); + + // Each signature is an operation + Element op = document.createElement(SCA_OPERATION); + op.setAttribute(OPERATION_NAME_ATTR, s.getMethodName()); + intf.appendChild(op); + + Parameter[] parms = s.getParameters(); + if (parms != null) { + + for (int i = 0; i < parms.length; i++) { + Element parm = (Element) document + .createElement(SCA_OPERATION_PARAMETER); + String type_string = parms[i].getTypeWithoutConst() + .toString(); + + type_string = type_string.replaceAll(":: ", "::"); + + Text text = document.createTextNode(type_string); + parm.appendChild(text); + parm.setAttribute(SCA_OPERATION_PARAMETER_NAME_ATTR, + parms[i].getName()); + + if (parms[i].getTypeWithoutConst().intern() != parms[i] + .getType().intern()) { + parm.setAttribute( + SCA_OPERATION_PARAMETER_CONST_ATTR, "true"); + } + + op.appendChild(parm); + // TO DO only really stores the value + // unsafely/temporarily + // which is fine while we handle everything at the + // end of parsing the "leaf" that represents that actual + // interface/service but the below will cause the second + // service + // processed to overwite the first one in the DOM. I we + // wish + // to do some overall processing at the end we will have + // to + // use a better more XPath like key that varies by + // instance + // of the service. + intf.setAttribute(SCA_INTERFACE_NAME_ATTR, s + .getTrimClassName()); + } + } + + Element rc = document.createElement(SCA_OPERATION_RETURN_TYPE); + rc.appendChild(document.createTextNode(s.getReturnType() + .toString().replaceAll(":: ", "::"))); + op.appendChild(rc); + + root.appendChild(intf); + } + + // Set the name of the Service + // here, if we are not passed one we use + // the classname from the last header function signature... + if (serviceName == null && s != null) { + serviceName = s.getTrimClassName(); + } + + // this is used for the proxy file name but we need to + // use the reference name if this is pulled in due to it + // being a reference!!! + if (serviceName != null) + root.setAttribute("serviceName", serviceName); + if (referenceName != null) + root.setAttribute("referenceName", referenceName); + if (nameOfSorR != null) + root.setAttribute("nameOfSorR", nameOfSorR); + + if (implClass != null) { + root.setAttribute("implClass", implClass); + } else { + root.setAttribute("implClass", moduleXmlFileHeaderNoExtorPath); + } + + // default class name to the name of the header... + if (headerClassName == null && source != null) { + headerClassName = source.getName().replaceAll( + "\\.h|\\.hpp|\\.h++", ""); + } + root.setAttribute("headerClassName", headerClassName); + + if (null == intfClass) { + intfClass = headerClassName; + } + + if (null != intfNamespace) { + root.setAttribute("namespace", intfNamespace); + if (null != intfClass && !intfClass.startsWith(intfNamespace)) { + intfClass = intfNamespace + "::" + intfClass; + } + } + + root.setAttribute("intfClass", intfClass); + + if (componentTypeXmlFileIntfHeaderNameWithPathAndExt == null) { + componentTypeXmlFileIntfHeaderNameWithPathAndExt = "componentTypeHeader"; + } + root.setAttribute("componentTypeHeader", + componentTypeXmlFileIntfHeaderNameWithPathAndExt); + + if (moduleXmlFileImplHeaderNameWithPathAndExt == null) { + moduleXmlFileImplHeaderNameWithPathAndExt = "moduleXmlFileImplHeader"; + } + root.setAttribute("moduleXmlFileHeader", + moduleXmlFileImplHeaderNameWithPathAndExt); + + if (moduleXmlFileHeaderNoExtorPath == null) { + moduleXmlFileHeaderNoExtorPath = "moduleXmlFileHeaderNoExt"; + } + root.setAttribute("moduleXmlFileHeaderNoExt", + moduleXmlFileHeaderNoExtorPath); + + } catch (ParserConfigurationException pce) { + // Parser with specified options can't be built + pce.printStackTrace(); + } + + return document; + + } + +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java new file mode 100644 index 0000000000..047e1ab3f1 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java @@ -0,0 +1,202 @@ +/* + * + * 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. + */ +package org.apache.tuscany.sca.cpp.tools.services; + +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMResult; +import javax.xml.transform.dom.DOMSource; + +import org.apache.tuscany.sca.cpp.tools.common.FileActor; +import org.apache.tuscany.sca.cpp.tools.common.Utils; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +/** + * The purpose of this abstract class is to provide a home for the standard + * processing that is involved in turning a XML file into an internal DOM. + */ +public abstract class XMLFileActor implements FileActor { + + protected static Map handlers = new HashMap(); + + protected static Map parameters = new HashMap(); + + public boolean failed; + + private int filesActedOn=0; + + protected static TransformerFactory transformerFactory = TransformerFactory + .newInstance(); + + /** + * This method is the main FileActor method + * + * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM + * and kick off the processing (using the handler map that has been set + * up by the concrete subclass). + * + * @param moduleXML + * the sca.module or fragment file + * @param target + * the target directory + * @param depth + * not uesed here but in the + * @see FileActor#actOnFile(File, File, int) interface to allow for + * recursive diving into a directory structure. + */ + public void actOnFile(File moduleXML, File target, int depth) + throws Exception { + + if (null == moduleXML || null == target) { + return; + } + + filesActedOn++; + + parameters.put("sourceFile", moduleXML); + parameters.put("targetFile", target); + + if (transformerFactory.getFeature(DOMSource.FEATURE) + && transformerFactory.getFeature(DOMResult.FEATURE)) { + Document dom = createDomFromXMLFile(moduleXML); + if (dom != null) { + parameters.put("targetDirectoryFile", target); + DomHandler.handleDom(dom, handlers, parameters); + } + } + } + + /** + * This method builds an in memory DOM from an XML file + * + * @param xmlSourceFile + * the XML file we are handling + * @return the resulting document + */ + protected Document createDomFromXMLFile(File xmlSourceFile) { + Document dom = null; + DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); + //We do not validate via f.setValidating(true); + f.setNamespaceAware(true); + + try { + DocumentBuilder parser = f.newDocumentBuilder(); + dom = parser.parse(xmlSourceFile); + } catch (SAXException sxe) { + String path; + try { + path = xmlSourceFile.getCanonicalPath(); + } catch (IOException e) { + path = xmlSourceFile.getPath(); + } + Utils.screenMessage("There has been a SAXException of type " + + sxe.getLocalizedMessage()); + if (null != xmlSourceFile) { + Utils.screenMessage(" when processing file " + path); + } else { + Utils.screenMessage(" as the input file is null."); + } + +// Leave for possible future debug option +// Utils.screenMessage(" The returned Java exception is below."); +// if (sxe.getException() != null) +// sxe.getException().printStackTrace(); +// else +// sxe.printStackTrace(); + } catch (ParserConfigurationException pce) { + String path; + try { + path = xmlSourceFile.getCanonicalPath(); + } catch (IOException e) { + path = xmlSourceFile.getPath(); + } + Utils + .screenMessage("There has been a ParserConfigurationException of type " + + pce.getLocalizedMessage()); + if (null != xmlSourceFile) { + Utils.screenMessage(" when processing file " + path); + } else { + Utils.screenMessage(" as the input file is null."); + } + +// Leave for possible future debug option +// Utils.screenMessage(" The returned Java exception is below."); +// pce.printStackTrace(); + + } catch (IOException ioe) { + String path; + try { + path = xmlSourceFile.getCanonicalPath(); + } catch (IOException e) { + path = xmlSourceFile.getPath(); + } + + Utils.screenMessage("Unable to open file " + path); + Utils.screenMessage(this.getContextMessage()); + + + + } + + return dom; + } + + /** + * @return an error message - usually over-ridden. + */ + private String getContextMessage() { + return "Check the file exists and can be read."; + } + + /** + * Set a parameter + * + * @param name + * @param value + */ + public void setParameter(String name, Object value) { + parameters.put(name, value); + } + + /** + * Get a parameter + * + * @param name + * @param value + * @return the value of the parameter + */ + public Object getParameter(String name, Object value) { + return parameters.get(name); + } + + + + /** + * @return Returns the filesActedOn. + */ + public int getFilesActedOn() { + return filesActedOn; + } +} \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html new file mode 100644 index 0000000000..316e4cd56e --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html @@ -0,0 +1,140 @@ + + + +Design documentation for org\apache\tuscany\sca\cpp\tools\services + + + + +
      + +

      Overview

      + + + +

      This package contains classes that generate C++ wrappers and +proxies for C++ implementations of SCA services.

      + +

      What the package does

      + +

      The Scagen class main method will take in an input and +output directory name. The input directory is taken to be the SCA module root +directory.  The tool will generate the wrapper and proxy headers and methods +bodies in the output directory.

      + +

      These proxies and wrappers enable the SCA for C++ runtime to +act as a conduit for SCA C++ calls in a type free manner. Client code can call +the type specific functions that are in the generated proxy classes. The call +is marshalled into a generic format and a SCA for C++ runtime function with a +standard signature is invoked. The details of the call are passed as data.

      + +

      On the other end of the runtime, a generated function with a +standard signature is called, this function will inspect the data that +represents the call’s method name and call the appropriate type specific +function in the C++ implementation.

      + +

      The Input Data Used

      + +

      The input directory passed to the Scagen method is taken to +be the SCA module root directory. All the sca.module and .fragment files in +that directory are inspected to resolve all the <component/> elements +within them.

      + +

      Each <component/> element found is inspected to see if +it has a <implementation.cpp/> element within it.

      + +

      Each <implementation.cpp/> element should have a +header attribute that represents a C++ header file that contains function +prototypes for the C++ implementation of the service. An optional class +attribute can be used to select one class if more than one that is present in +the header file. The default class is the one with the same name as the header +file. The tool will verify that the implementation header contains an +appropriate class prototype.

      + + + +

      The directory that contains the implementation header should +also contain a matching .componentType file for the equivalent SCA component. So +for example, a MyServiceImpl.h file would have a corresponding MyServiceImpl.componentType +file in the same directory.

      + + + +

      Each componentType file is inspected for <service/> +and <reference/> elements. For each <service/> element that is +found that contains a <interface.cpp/> element within it,

      + +

      the header attribute of the <interface.cpp/> is taken +as the filename of the C++ interface header for the SCA service.  This C++ +header file is opened and used as a means for specifying the SCA service +resulting in an appropriate wrapper and proxy being generated for this service +interface. Both method bodies and headers are generated in the given output +directory. The processing of a <reference/> element is the same except +that only a proxy header and implementation are generated.

      + + + + + +

      Outline Design: How it Works

      + + + +

      The basic approach is to scan in the XML files by first +creating a DOM document tree of them and then recursively rifling through the DOM  +with some generic code in the XMLFileActorClass by default this processing will +build up a map which maps the XPath location of attributes to their values. +Additionally subclasses can add to a “handlers map” which maps from the name of +a particular element to an object that implements the DomNodeHandler interface. +If the XMLFileActor code comes across any element that has an equivalent handler +in the handler map the objects handleNode method will be called.

      + +

      Typically the DomNodeHandler’s handle node interface will +use XPath to pull out the parameters that it is interested in from the +parameters map that is being built up by the generic code.

      + +

      This design was chosen as the Java level specified for the +original implementation did not have direct XPath query of XML data but it was +known that this would be available in Java 1.5 onwards. The design allows the +DOM and parameters map handling to be replaced in the future with JRE 1.5 code +with less impact on the rest of the code.

      + + + +

      The processing leads to the parsing of the C++ interface +files using the org\apache\tuscany\sca\cpp\tools\common package. This results +in a Headers object

      + +

      that contains a List of Signature objects, each one +representing a function prototype found in the header.

      + + + +

      We are aiming to get all the semantic data we want to use +into a DOM document (this represents the model of our input data) and then use +XSLT to create the 4 different views of this data:

      + +

      Proxy C++ header

      + +

      Proxy C++  body

      + +

      Wrapper C++ header

      + +

      Wrapper C++ body

      + + + +

      So we prepopulate the DOM with parameter data that comes +from the XML files and then iterate through the Signatures that are returned +from the C++ header parser transferring the useful data into the DOM.

      + + + +

      We than use 4 XSLT stylesheets to generate the C++ output +files as required.

      + +
      + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl new file mode 100644 index 0000000000..bc98f3a970 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl @@ -0,0 +1,398 @@ + + + + + + + + + + + + + + + + + + +/* + * 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 "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + + + + + + + + + + _ + + _Proxy + + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + +* + +_Factory(ServiceWrapper* target) + { + return new (target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void + +_Destructor(void* proxy) + { + delete (*)proxy; + } +} + + +::(ServiceWrapper* targ) : target(targ) +{ +} + +::~() +{ + if (target) + delete target; +} + + + + + + + + + + + + _ + + _Proxy + +#include " + +.h" + + + + + + + + + + + _ + + _Proxy + + + + + + + +:: +( + +) +{ + + +} + + + + + + +) +{ + + +} + + + + + + + + + + + const + + + + + ) +{ + + +} + + + + , + + + + + + + + + + + + + + + +0 + + + + + + + + Operation operation(" + + ", + + ); + + + + + + + + + + target->invoke(operation); + + + + + + + + + + Operation operation(" + + ", + + ); + + + + target->invoke(operation); + + + + + + + + + + + + return; + + + + + + + return *(*)operation.getReturnValue(); + + + + return ()operation.getReturnValue(); + + + + return ret; + + + + return ret; + + + + + + + + + + + + return; + + + + + + + return *(*)operation.getReturnValue(); + + + + return ()operation.getReturnValue(); + + + + return ret; + + + + return ret; + + + + + + + + + + + + + + + + + + + + + commonj::sdo::DataObjectPtr ret = 0; + operation.setReturnValue((void*)&ret); + + + + + + ret; + + operation.setReturnValue((void*)&ret); + + + + + + + + + + + + + + + + + + + + commonj::sdo::DataObjectPtr ret = 0; + operation.setReturnValue((void*)&ret); + + + + + + ret; + + operation.setReturnValue((void*)&ret); + + + + + + + + + + + + + operation.setParameter(, (void*) +& + +); + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl new file mode 100644 index 0000000000..3df2f83d53 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + +/* + * 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 _h + + + + #define _h + + + + + + + + + + #include "" + + + + #include "tuscany/sca/core/ServiceWrapper.h" + + + + + + + + + + +class + + : public + +{ +public: + (tuscany::sca::ServiceWrapper*); + + virtual ~(); + + + +private: + tuscany::sca::ServiceWrapper* target; +}; + + + + + + + +#endif // _h + + + + + + + + + + + + + + + virtual + + +( + + + + + + + + const + + + + + + + , + + + +); + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl new file mode 100644 index 0000000000..912df6cf03 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + +/* + * 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 "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + + + + + + + + + + + + + + + _ + + _Wrapper + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + +* + +_Factory(tuscany::sca::model::Service* target) + { + return new (target); + } +} + + +::(Service* target) : ComponentServiceWrapper(target) +{ + impl = (*)getImplementation(); +} + + +::~() +{ + releaseImplementation(); +} + +void* +::newImplementation() +{ + return new ; +} + +void +::deleteImplementation() +{ + delete impl; +} + +void ::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + + + + + throw ServiceRuntimeException("Invalid operation"); + +} + + + + + + _ + + _Wrapper + +#include " + +.h" + + + + + + + + + if (operationName == " + +") + { + + + + } + + + + + + + + + + + + + + + + + + return; + + + + + + + + + + + + + + + + p = *( + *)operation.getParameter(); + + + + const + p = ( + const + + )operation.getParameter(); + + + + DataObjectPtr& p = *(DataObjectPtr*)operation.getParameter(); + + + const & p = *( + const + + *)operation.getParameter(); + + + + + + + + + + + + + + + ; + + + ret = ; + + operation.setReturnValue((void*)&ret); + + + + operation.setReturnValue((void*) ); + + + *(DataObjectPtr*)operation.getReturnValue() = ; + + + *(*)operation.getReturnValue() = ; + + + + + + impl->( + + + + + + + + + +) + + + +p + + + + , + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl new file mode 100644 index 0000000000..72dc1fc5a6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + +/* + * 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 _h + + + + #define _h + + + + + + + + + + #include "" + + + + #include "tuscany/sca/core/ComponentServiceWrapper.h" + + + + + + + + + + +class + + : public tuscany::sca::ComponentServiceWrapper +{ +public: + (tuscany::sca::model::Service* target); + + virtual ~(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); + +private: + + * impl; +}; + + + + + + + +#endif // _h + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/readme.txt b/sca-cpp/tags/cpp-sca-20060405/xsd/readme.txt new file mode 100644 index 0000000000..7252f56a11 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/readme.txt @@ -0,0 +1,2 @@ +The XSDs describing the SCA model + diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd new file mode 100644 index 0000000000..293c63e83a --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd new file mode 100644 index 0000000000..95052a52aa --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-core.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-core.xsd new file mode 100644 index 0000000000..48fac92913 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-core.xsd @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd new file mode 100644 index 0000000000..970549176f --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd new file mode 100644 index 0000000000..7745b4ffb7 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd new file mode 100644 index 0000000000..dd286afef6 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd new file mode 100644 index 0000000000..a1955a2795 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd new file mode 100644 index 0000000000..e857a77d84 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/sca.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/sca.xsd new file mode 100644 index 0000000000..619c38aaac --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/sca.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/tags/cpp-sca-20060405/xsd/tuscany.xsd b/sca-cpp/tags/cpp-sca-20060405/xsd/tuscany.xsd new file mode 100644 index 0000000000..335db42475 --- /dev/null +++ b/sca-cpp/tags/cpp-sca-20060405/xsd/tuscany.xsd @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-sca-20060405/AUTHORS b/tags/cpp-sca-20060405/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-sca-20060405/COPYING b/tags/cpp-sca-20060405/COPYING deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-sca-20060405/COPYING +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. - diff --git a/tags/cpp-sca-20060405/ChangeLog b/tags/cpp-sca-20060405/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-sca-20060405/Developers Guide.txt b/tags/cpp-sca-20060405/Developers Guide.txt deleted file mode 100644 index 96b0476174..0000000000 --- a/tags/cpp-sca-20060405/Developers Guide.txt +++ /dev/null @@ -1,346 +0,0 @@ -Tuscany SCA For C++ Developers Guide -==================================== - -Contents: - Developing Services in C++ - Running C++ Services - - -See cpp/build.txt in the parent directory or the cpp/sca/INSTALL file -for build instructions. - -Building the tools ------------------- - -NOTE: this is built and installed by the build step above. - -Currently, there is only one tool: "scagen". It can be built using the -ant build script at \tuscany\cpp\sca\tools\scagen\build.xml. -The default target "all" will build the java jars, documentation, -scripts and a zip file of the whole thing. This is all the ant -build tasks apart from "test" which runs all the junit tests. - -The ant build script can be altered to add the junit tests to the -default target. Replace the line - - - -The "test" task was not included in "all" as it requires a -junit jar file to run. This jar is available here: -http://www.junit.org/index.htm testing has been done with -Junit version 3.8.1. - -Running the scagen tool ------------------------ - -The scagen tool user interface is quite basic in this initial release. -It can be run from the scagen.jar file using "java -jar scagen.jar" -or from small scripts - scagen.cmd for Windows and scagen.sh for Unix. -The parameters are: - -dir - -output - -e.g. - scagen -dir c:\mymodules\module1 -output c:\mymodules\bld\module1 - -What scagen does ----------------- - -The input directory passed to the scagen tools as -the -dir parameter method is taken to be the SCA -module root directory. All the sca.module and .fragment -files in that directory are inspected to resolve all -the elements within them. - -Each element found is inspected -to see if it has a element within it. - -Each element should have a -header attribute that represents a C++ header file -that contains function prototypes for the C++ -implementation of the service. An optional class -attribute can be used to select one class if more than -one that is present in the header file. The default -class is the one with the same name as the header file. -The tool will verify that the implementation header -contains an appropriate class prototype. - -The directory that contains the implementation header -should also contain a matching .componentType file for -the equivalent SCA component. So for example, a -MyServiceImpl.h file would have a corresponding -MyServiceImpl.componentType file in the same directory. - -Each componentType file is inspected for -and elements. For each element -that is found that contains a element -within it, - -the header attribute of the is taken -as the filename of the C++ interface header for the -SCA service. This C++ header file is opened and used -as a means for specifying the SCA service resulting -in an appropriate wrapper and proxy being generated -for this service interface. Both method bodies and h -eaders are generated in the given output directory. -The processing of a element is the same -except that only a proxy header and implementation -re generated. - - -Getting started with the code ------------------------------ - -The following is a list of tasks that are performed by the scagen tool -for each task we will describe technically how it is accomplished and -the location of the code that can be inspected/changed to alter the -behaviour. - -Here are the tasks listed, below is a paragraph for each one: - - o (Overall structure of the code) - o Walking the input directory - o Scanning the .module and .fragment files - o finding the C++ implementation headers - o finding/checking the classname in the C++ implementation headers - o find the matching .componentTemplate files - o going into the componentTemplate files to extract the interface header filenames - o going into the interface header files and parsing them to extract the method signatures - into a network of objects we can inspect. - o taking all the meta data stored as objects and building a DOM for XSLT processing - o using XSLT to produce a proxy header - o using XSLT to produce a proxy implementation - o using XSLT to produce a wrapper header - o using XSLT to produce a wrapper implementation - - -Overall structure of the code ------------------------------ - -There are two packages org.apache.tuscany.sca.cpp.tools.common and -org.apache.tuscany.sca.cpp.tools.services. The ...common package is -taken from some existing code that was also contributed to axis that -was used to parse C++ code and do various tasks like insert trace. -This code was repackaged and shipped as a tuscany package but there -has been a desire not to change it significantly from the equivalent -org.apache.axis.tools.common package to leave the door open for -future convergence. - -Where the ...common package has been amended (for example to cope with -namespaces better or the provision of an Options.reset method to reset a static -variable and enable the tuscany junit tests to run independently) these -have been flagged with a "Tuscany" comment. The ...common package basically -provides two functions - 1) the ability to go into a directory (see DirectoryTree.java) -and process files that fit a particular filter (e.g. "*.hpp") by passing them to -implementer of the FileActor Interface (see the classes "Headers" for the -actor that processes C++ headers and "XMLFileActor" for the file actor that -processes the .componentType and sca.module/fragment files.) - -The ...services package contains the majority of code written afresh for the -scagen tool including the subclasses of XMLFileActor (see ComponentTypeFileHandler.java -and ModuleOrFragmentFileHandler.java) that are the classes that tie this -package to the ...common package and which are called by the -DirectoryTree walker. - -Walking the module root input directory ---------------------------------------- - -The main method of the scagen class creates an instance of -"DirectoryScanner" and registers with it a file handler of -type "ModuleOrFragmentFileHandler" for all files that end -in ".module" or ".fragment". On calling the "walkTree" method -on the scanner it will in turn call the actOnFile method on the -ModuleOrFragmentFileHandler for appropriate files. - -Scanning the .module and .fragment files ----------------------------------------- - -The scanning of these files by the respective "ModuleOrFragmentFileHandler" -and "ComponentTypeFileHandler" is mostly handled by the superclass -"XMLFileActor". This class will recursively goes through the whole -XML file and considers the name of the XML element it finds. -"XMLFileActor" contains a map of element names to element handlers -that will "flatten out" the structure of the XML file "above" the -level of node we are interested in. - -So for example the ComponentTypeFile handler sets up the handlers -map as follows: - - GenericDomNodeHandler gdnh = new GenericDomNodeHandler(); - handlers.put("componentType", gdnh); - handlers.put("interface.cpp", gdnh); - ServiceDomNodeHandler sdnh = new ServiceDomNodeHandler(); - handlers.put("service", sdnh); - - ReferenceDomNodeHandler rdnh = new ReferenceDomNodeHandler(); - handlers.put("reference", rdnh); - -The majority of processing done by these DomNOdeHandlers is to -place the attributes and values discovered into another map that -maps an (static version of) the XPath of a value to the value itself. -So for example "/componentType/service/interface.cpp/@header" might contain -the current ("root to here") value of the header attribute of the current -interface. - -Particular handlers for the "leaves" of this tree -such as ServiceDomNodeHandler and ReferenceDomNodeHandler -can then consume these values from the map without having -to be concerned with the actual names of things, -like the service name, appearing in the key. It should be -understood though that there are multiple values placed in the map -for one "key" as the processing works its way through the -XML tree. For example the processing of a second component will -overlay its data over the same keys as the first component. -(After "wiping" the appropriate subtree.) - -Finding the C++ implementation headers --------------------------------------- - -The "/module/component/implementation.cpp/@header" and -is used to key into the name of the implementation header -and this is opened directly and passed to the -actOnFileMethod of a Headers object from the ...common package -bypassing the DirectoryScanner code. The path is relative to -the given (-dir option) module root directory. - -Finding/checking the classname in the C++ implementation headers ------------------------------------------------------------------ - -This implementation header is not used to define the -methods of the SCA service but rather is opened to check - any given implementation.cpp/@class attribute -(or find out the name of the implementation class -in the header if this is not specified in the XML. This -is done using the same method that later parses the interface -C++ headers into java objects - we just them inspect the -class attribute of the "Signature" objects that represent the methods -we find in the header. - -Find the matching .componentType files ------------------------------------------- - -By SCA convention we go to the same directory as the implementation -files and look for the XXX.componentType files with the same name. -A instance of the ComponentDOMNodeHandler handles the data in the -Component Element and pre-creates a ComponentTypeFileHandler that -will eventually be called to process the .componentType file. This -object receives a number of "setParameter" calls to poke into it -matadata that is available prior/outside the the actual .componentType -file it will read. - -Go into the componentType files to extract the interface header filenames ------------------------------------------------------------------------------ - -We open up the .componentTemplateFiles with exactly the same -mechanism as we read the sca.module/fragment file (by creating -a DOM and descending through it this time using a ComponentTypeFileHandler that it -has had various data values ( e.g. the implementation class and namespace used later) -poked into it. The ComponentTypeFileHandler itself has individual -handlers for the service and reference XML/DOM element/nodes -that is comes across (ServiceDomNodeHandler and ReferenceDomNodeHandler -respectively). Each these handlers will pull out the name of -a C++ interface header and use it to resolve the interface of the -SCA Service. - -Parsing the interface header files for signatures -------------------------------------------------- - -The Service/Reference DOM Node hander both call the - ServicesGenerator.handleInterfaceHeader(parameters, true); -method, the second parameter is used to differentiate -the call source as we don't need wrapper files for -SCA references (just proxies). - -The ServicesGenerator uses the Headers file actor from -the ...common package to create a List of Signature -objects that describe the interface methods in the C++ -header. - -Take all the meta data stored as objects and build a DOM --------------------------------------------------------- -We now have a List of Signature objects and a map that -represents the flattened information that we have pulled -from the XML files in the ServiceGenerator class. -We call a "createDOMofMethods" method -to consolidate all this information into one DOM -(this task should be split into more than one method as the -signature/parameter list of the method is too large). - -Use XSLT to produce the output files (Proxy/Wrapper headers and Implementations) --------------------------------------------------------------------------------- - -The ServicesGenerator.handleInterfaceHeader(parameters, forReference); -method closes of with the code: - - createProxyCPPFromDom(outputDir, dom); - createProxyHeaderFromDom(outputDir, dom); - - if (!forReference) { - createWrapperCPPFromDom(outputDir, dom); - createWrapperHeaderFromDom(outputDir, dom); - } - - -Each of the create methods sets up the output -file name and a different XSLT transform and calls -"createOutputFromDom" to transform/filter the data in the -"model" that is held in our DOM of the data to a particular -"view" as expressed in the C++ output file. - -The four XSLT style sheets are in rough order of the output -file and this corresponds very roughly to a depth first descent -of the DOM tree so, for example, we could have in a stylesheet: - -... - void* - ::newImplementation() - { - return new (target); - } - -which would be output as: - - void* MyClassImpl_MyClass_Proxy::newImplementation() - { - return new MyClassImpl(target) - } - -given appropriate valies for $class and "../@implClass" and -$class might be defined to be: -xsl:variable name="clazz"> - - _ - - _Proxy - - -giving "MyClassImpl_MyClass_Proxy" - -The stylesheets can be found in the xsl subdirectory of the -org.apache.tuscany.sca.cpp.tools.services package. - -Unit Testing Scagen Code Changes --------------------------------- - -The junit unit test - /tuscany/cpp/sca/tools/scagen/ - junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java - -will dynamically look for all the subdirectores of the directory -path given by TuscanyTestCase.junit_modules and run the scagen -tool on them as if they were modules roots. - -By convention an "expected_output" directory is located -(see the CVS tree or the test program) and the actual -and expected results compared. This testcase is thus a -good first/basic regression test for any changes. - -New test cases can thus be added without having to write -any new junit java code by by creating new SCA modules and -the associated expected Scagen output - perhaps by using the tool -initially and checking the output is satisfactory before copying -it to the expected output directory at: - -/tuscany/cpp/sca/tools/scagen/junit/testoutput//expected_output -where input data is taken from -/tuscany/cpp/sca/tools/scagen/junit/testinput/modules/ diff --git a/tags/cpp-sca-20060405/INSTALL b/tags/cpp-sca-20060405/INSTALL deleted file mode 100644 index 196c78c22a..0000000000 --- a/tags/cpp-sca-20060405/INSTALL +++ /dev/null @@ -1,13 +0,0 @@ -Building Tuscany SCA on Linux. -============================== - -1. Extract the source to a folder. - -2. You need to set the following environment variable to point to tuscany sdo - TUSCANY_SDOCPP - -3. You need to set the following environment variable to point to Axis-c installation: - AXISCPP_DEPLOY - -4. Build the source - ./build.sh diff --git a/tags/cpp-sca-20060405/LICENSE b/tags/cpp-sca-20060405/LICENSE deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-sca-20060405/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. - diff --git a/tags/cpp-sca-20060405/Makefile.am b/tags/cpp-sca-20060405/Makefile.am deleted file mode 100644 index 943bcc3797..0000000000 --- a/tags/cpp-sca-20060405/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = runtime samples diff --git a/tags/cpp-sca-20060405/NEWS b/tags/cpp-sca-20060405/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-sca-20060405/README b/tags/cpp-sca-20060405/README deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-sca-20060405/autogen.sh b/tags/cpp-sca-20060405/autogen.sh deleted file mode 100755 index d40a2eb9d4..0000000000 --- a/tags/cpp-sca-20060405/autogen.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -for i in libtoolize aclocal autoconf autoheader -do - echo -n "Running $i..." - $i || exit 1 - echo 'done.' -done - -echo -n 'Running automake...' -automake --add-missing -echo 'done.' -exit 0 - diff --git a/tags/cpp-sca-20060405/build.sh b/tags/cpp-sca-20060405/build.sh deleted file mode 100755 index 217569303a..0000000000 --- a/tags/cpp-sca-20060405/build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -# 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. - -TUSCANY_SCACPP_HOME=`pwd` - -if [ x$AXISCPP_DEPLOY = x ]; then -echo "AXISCPP_DEPLOY not set" -exit; -fi -echo "Using Axis C++ installed at $AXISCPP_DEPLOY" - -if [ x$XERCES_DEPLOY = x ]; then -echo "XERCES_DEPLOY not set" -exit; -fi -echo "Using Xerces C++ installed at $XERCES_DEPLOY" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -# Build tools first as they will be used to generate cpp code -cd $TUSCANY_SCACPP_HOME/tools/scagen -ant -chmod a+x $TUSCANY_SCACPP_HOME/bin/scagen.sh - -cd $TUSCANY_SCACPP_HOME -./autogen.sh -./configure --prefix=${TUSCANY_SCACPP_HOME} -make -make install diff --git a/tags/cpp-sca-20060405/configure.ac b/tags/cpp-sca-20060405/configure.ac deleted file mode 100644 index 8316b09828..0000000000 --- a/tags/cpp-sca-20060405/configure.ac +++ /dev/null @@ -1,57 +0,0 @@ -dnl run autogen.sh to generate the configure script. - -AC_PREREQ(2.59) -AC_INIT(tuscany_sca, 1.0.0) -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_LIBTOOL - -# Checks for libraries. - -# Checks for header files. -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_CHECK_HEADERS([inttypes.h stdlib.h string.h sys/time.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_C_INLINE - -# Checks for library functions. -AC_FUNC_CLOSEDIR_VOID -AC_FUNC_STAT -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([getcwd putenv strdup]) - -AC_CONFIG_FILES([Makefile - runtime/Makefile - runtime/core/Makefile - runtime/core/src/Makefile - runtime/axis_binding/Makefile - runtime/axis_binding/handler/Makefile - runtime/axis_binding/handler/src/Makefile - runtime/axis_binding/wrapper/Makefile - runtime/axis_binding/wrapper/src/Makefile - runtime/core/test/Makefile - runtime/core/test/CustomerInfo/Makefile - runtime/core/test/MyValue/Makefile - runtime/core/test/src/Makefile - samples/Makefile - samples/MyValue/Makefile - samples/MyValue/MyValueModule/Makefile - samples/MyValue/MyValueModule/CustomerInfo/Makefile - samples/MyValue/MyValueModule/MyValue/Makefile - samples/MyValue/Client/Makefile - ]) -AC_OUTPUT - diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw deleted file mode 100644 index 81e97ea3fb..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.dsw +++ /dev/null @@ -1,113 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "tuscany_sca"=.\tuscany_sca\tuscany_sca.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "tuscany_sca_axis_handler"=.\tuscany_sca_axis_handler\tuscany_sca_axis_handler.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_axis_wrapper"=.\tuscany_sca_axis_wrapper\tuscany_sca_axis_wrapper.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_axis_handler - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_test"=.\tuscany_sca_test\tuscany_sca_test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_test_CustomerInfo - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_test_MyValue - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_test_CustomerInfo"=.\tuscany_sca_test_CustomerInfo\tuscany_sca_test_CustomerInfo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_test_MyValue"=.\tuscany_sca_test_MyValue\tuscany_sca_test_MyValue.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb deleted file mode 100644 index 907058086b..0000000000 Binary files a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.ncb and /dev/null differ diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt deleted file mode 100644 index 1fc90712e5..0000000000 Binary files a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca.opt and /dev/null differ diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt deleted file mode 100644 index 3dbf56c29e..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/Build Instructions.txt +++ /dev/null @@ -1,32 +0,0 @@ -Tuscanny SCA Build Instructions -=============================== - -1) Set the environment variable TUSCANY_SDOCPP to the path of an SDO driver - -2) Set the environment variable AXISCPP to the path of Axis for C++ - -NOTE: The environment variables must be set BEFORE launching Visual Studio - -3) Build->Rebuild All - -The output for the build will be in tuscany\cpp\sca\include, lib and bin - -To run the test from a command prompt: - -1) Set the environment variable TUSCANY_SCACPP to the location of the built SCA - (...tuscany\cpp\sca) - -2) Add %TUSCANY_SCACPP%\lib and %TUSCANY_SDOCPP%\lib to the PATH - (ensure required libraries for SDO are also on the path. e.g. libxml2) - -3) Set the environment variable TUSCANY_SCACPP_SYSTEM_ROOT to the test system folder - (%TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\testSCASystem) - -4) Set the environment variable TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1 - -5) cd %TUSCANY_SCACPP%\projects\tuscany_sca\tuscany_sca_test\Debug - -6) tuscany_sca_test - -NOTE: To run the test from the workspace the environment variables must be set - BEFORE launching Visual Studio diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp deleted file mode 100644 index 669784184a..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp +++ /dev/null @@ -1,520 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=tuscany_sca - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca.mak" CFG="tuscany_sca - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tuscany_sca - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /machine:I386 /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=del ..\..\..\bin\tuscany_sca.* del ..\..\..\lib\*.lib copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\include\osoa\sca copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\include\tuscany\sca\core copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\include\tuscany\sca\model copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\include\tuscany\sca\util copy Release\tuscany_sca.dll ..\..\..\bin copy Release\tuscany_sca.lib ..\..\..\lib copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\include\tuscany\sca\ws -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=del ..\..\..\bin\tuscany_sca.* del ..\..\..\lib\*.lib copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\include\osoa\sca copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\include\tuscany\sca\core copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\include\tuscany\sca\model copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\include\tuscany\sca\util copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\include\tuscany\sca\ws copy Debug\tuscany_sca.dll ..\..\..\bin copy Debug\tuscany_sca.pdb ..\..\..\bin copy Debug\tuscany_sca.lib ..\..\..\lib -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca - Win32 Release" -# Name "tuscany_sca - Win32 Debug" -# Begin Group "osoa/sca" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\export.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\SCA.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\sca.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.h -# End Source File -# End Group -# Begin Group "tuscany/sca" - -# PROP Default_Filter "" -# Begin Group "core" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.h -# End Source File -# End Group -# Begin Group "model" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.h -# End Source File -# End Group -# Begin Group "util" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Exceptions.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logging.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.h -# End Source File -# End Group -# Begin Group "ws" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\SDOStub.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\SDOStub.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\WSServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\WSServiceWrapper.h -# End Source File -# End Group -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\xsd\sca-binding-sca.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-binding-webservice.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-core.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-implementation-cpp.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-implementation-java.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-interface-cpp.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-interface-java.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-interface-wsdl.xsd" -# End Source File -# Begin Source File - -SOURCE=..\..\..\xsd\sca.xsd -# End Source File -# Begin Source File - -SOURCE=..\..\..\xsd\tuscany.xsd -# End Source File -# End Group -# Begin Source File - -SOURCE=".\Build Instructions.txt" -# End Source File -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp deleted file mode 100644 index 2918310756..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_handler/tuscany_sca_axis_handler.dsp +++ /dev/null @@ -1,121 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_axis_handler" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=tuscany_sca_axis_handler - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_axis_handler.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_axis_handler.mak" CFG="tuscany_sca_axis_handler - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_axis_handler - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_axis_handler - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tuscany_sca_axis_handler - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /machine:I386 /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=copy Release\tuscany_sca_axis_handler.dll ..\..\..\bin copy Release\tuscany_sca_axis_handler.lib ..\..\..\lib -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_axis_handler - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_HANDLER_EXPORTS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=copy Debug\tuscany_sca_axis_handler.dll ..\..\..\bin copy Debug\tuscany_sca_axis_handler.pdb ..\..\..\bin copy Debug\tuscany_sca_axis_handler.lib ..\..\..\lib -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_axis_handler - Win32 Release" -# Name "tuscany_sca_axis_handler - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\runtime\axis_binding\handler\src\SCAWSHandler.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\axis_binding\handler\src\SCAWSHandler.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp deleted file mode 100644 index b8290f3176..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_axis_wrapper/tuscany_sca_axis_wrapper.dsp +++ /dev/null @@ -1,121 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_axis_wrapper" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=tuscany_sca_axis_wrapper - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_axis_wrapper.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_axis_wrapper.mak" CFG="tuscany_sca_axis_wrapper - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_axis_wrapper - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_axis_wrapper - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tuscany_sca_axis_wrapper - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_WRAPPER_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_AXIS_SCA_EXPORTS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /machine:I386 /libpath:".\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" /libpath:"..\..\..\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=copy Release\tuscany_sca_axis_wrapper.dll ..\..\..\bin copy Release\tuscany_sca_axis_wrapper.lib ..\..\..\lib -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_axis_wrapper - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_AXIS_WRAPPER_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXISCPP)/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_AXIS_SCA_EXPORTS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib AxisClient.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXISCPP)\lib\axis" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=copy Debug\tuscany_sca_axis_wrapper.dll ..\..\..\bin copy Debug\tuscany_sca_axis_wrapper.pdb ..\..\..\bin copy Debug\tuscany_sca_axis_wrapper.lib ..\..\..\lib -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_axis_wrapper - Win32 Release" -# Name "tuscany_sca_axis_wrapper - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\runtime\axis_binding\wrapper\src\SCAWSWrapper.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\axis_binding\wrapper\src\SCAWSWrapper.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment deleted file mode 100644 index c2c521ed96..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType deleted file mode 100644 index 48651b63fe..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType deleted file mode 100644 index ace4154966..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl deleted file mode 100644 index 4917cde583..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config deleted file mode 100644 index 7fee074333..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module deleted file mode 100644 index e94a8ef795..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem deleted file mode 100644 index 1b32bf8a93..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp deleted file mode 100644 index 909b2b22f8..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp +++ /dev/null @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tuscany_sca_test - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_test.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_test.mak" CFG="tuscany_sca_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tuscany_sca_test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tuscany_sca_test - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=copy ..\tuscany_sca_test_MyValue\Release\MyValue.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Release\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=copy ..\tuscany_sca_test_MyValue\Debug\MyValue.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_MyValue\Debug\MyValue.pdb testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.pdb testSCASystem\modules\MyValueServiceModule -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_test - Win32 Release" -# Name "tuscany_sca_test - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\src\TestSCA.cpp -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp deleted file mode 100644 index 465eae5e72..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp +++ /dev/null @@ -1,133 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_test_CustomerInfo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=tuscany_sca_test_CustomerInfo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_test_CustomerInfo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_test_CustomerInfo.mak" CFG="tuscany_sca_test_CustomerInfo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /out:"Release/CustomerInfo.dll" /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" - -!ELSEIF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /out:"Debug/CustomerInfo.dll" /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_test_CustomerInfo - Win32 Release" -# Name "tuscany_sca_test_CustomerInfo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp b/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp deleted file mode 100644 index 36798c24da..0000000000 --- a/tags/cpp-sca-20060405/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp +++ /dev/null @@ -1,153 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_test_MyValue" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=tuscany_sca_test_MyValue - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_test_MyValue.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tuscany_sca_test_MyValue.mak" CFG="tuscany_sca_test_MyValue - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_test_MyValue - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_test_MyValue - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /out:"Release/MyValue.dll" /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" - -!ELSEIF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /out:"Debug/MyValue.dll" /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_test_MyValue - Win32 Release" -# Name "tuscany_sca_test_MyValue - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\MyValue\StockQuoteService.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/readme.txt b/tags/cpp-sca-20060405/readme.txt deleted file mode 100644 index 146bef5f26..0000000000 --- a/tags/cpp-sca-20060405/readme.txt +++ /dev/null @@ -1,37 +0,0 @@ -Tuscany SCA C++ -=============== - -Tuscany SCA C++ provides a runtime implementation for the Service Component -Architecture 0.9 specification, written in C++ and will currently support C++ -component implementation types. This is not yet a complete implementation and -known restrictions are described below. - -Supported SCA Assembly Model features - * All features are supported unless listed under the known restrictions - below. See SCA Assembly Model specification. - -Supported language bindings - * Component implementations written in C++. See SCA Client and - Implementation Model specification. - * Component interfaces described by C++ classes. See SCA Client and - Implementation Model specification. - -Supported external service and entry point bindings - * The web service binding is supported. This implementation will support - web services which using document literal SOAP bindings conforming to the - WS-I basic profile (rpc/encoded is not supported). - -Known restrictions - * Subsystem wiring, entry points and external services are not supported. - * Remotable services that will be bound to the web service binding must have - an interface with a single input parameter which is an SDO DataObjectPtr, - and a single return type which is an SDO DataObjectPtr. - * Local service interfaces cannot use overloaded operations (the SCA - specification limits remote service interfaces to not using overloaded - operations). - * Only component properties with simple types are supported. - * Each WSDL definition for a web service binding must be in a single WSDL - document. - * No load time validation of the deployed SCA application (run time validation - only). - * No metadata API. diff --git a/tags/cpp-sca-20060405/runtime/Makefile.am b/tags/cpp-sca-20060405/runtime/Makefile.am deleted file mode 100644 index caacfcdef5..0000000000 --- a/tags/cpp-sca-20060405/runtime/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = core axis_binding diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am b/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am deleted file mode 100644 index f7eaa50485..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = handler wrapper diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am b/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am deleted file mode 100644 index 956b824d5c..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = src - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild deleted file mode 100644 index 55590cf0c8..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtbuild +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project deleted file mode 100644 index a2718eca4f..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sca_axis_handler - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 1023be0afa..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Feb 16 14:40:27 GMT 2006 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.2106566379=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.221779505=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.2106566379=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.221779505=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.2106566379=\n\n -environment/project/cdt.managedbuild.config.gnu.so.release.221779505=\n\n diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am deleted file mode 100644 index 6054ec7b31..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -lib_LTLIBRARIES = libtuscany_sca_axis_handler.la - -libtuscany_sca_axis_handler_la_SOURCES = SCAWSHandler.cpp - -libtuscany_sca_axis_handler_la_LIBADD = -lstdc++ - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${AXISCPP_DEPLOY}/include - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp deleted file mode 100644 index ed57c0677e..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date$ */ - -#include "SCAWSHandler.h" -#include -#include - -AXIS_CPP_NAMESPACE_USE -using std::string; - -/** Construct an SCAWSHandler. - */ -SCAWSHandler::SCAWSHandler() -{ - return; -} - -/** Destruct an SCAWSHandler. - */ -SCAWSHandler::~SCAWSHandler() -{ -} - - -/** Perform any necessary initialization. - */ -int SCAWSHandler::init() -{ - return AXIS_SUCCESS; -} - -/** Perform any necessary finalization. - */ -int SCAWSHandler::fini() -{ - return AXIS_SUCCESS; -} - -/** Get the SCA specific properties that were set in the deployment - * descriptor (server.wsdd) and set them into the MessageData where - * they can be retrieved by the SCAWSWrapper to invoke the correct - * SCA Entry Point. - * @param pvIMsg - pointer to IMessageData - * - * @see SCAWSWrapper - */ -int SCAWSHandler::invoke(void *pvIMsg) -{ - IMessageData *pIMsg = (IMessageData*) pvIMsg; - - if(pIMsg->isPastPivot()) - { - // This is a response. - } - else - { - // This is a request - - // - // Get the SCA specific properties from the handler. - // - - // NOTE: WE CANNOT MAKE THE SIMPLE 'GETOPTION' CALLS BECAUSE THE - // STD::MAP CODE WILL CAUSE AN ACCESS VIOLATION IN AXISSERVER.DLL. - // THE GETOPTION METHOD IN HANDLER.HPP NEEDS TO BE MOVED INTO - // AXISSERVER.DLL AND BE EXPORTED. - //const string& strTargetNamespace = getOption("targetNamespace"); - //const string& strSCAEntryPoint = getOption("scaEntryPoint"); - - // HACK - // BECAUSE WE CANNOT MAKE ANY MAP CALLS THAT REQUIRE PARAMETERS AND - // CANNOT SEEM TO ITERATE OVER THE MAP IN A FOR LOOP EITHER WITHOUT - // TRAPPING, WE RESORT TO READING THE FIRST AND LAST PROPERTIES. - // THIS IS ACCEPTABLE AS A WORKAROUND FOR NOW BECAUSE WE ONLY - // HAVE TWO PROPERTIES. - string strName; - string strValue; - // Read the first property in the map and set its name and value - // into the IMessageData. - map::const_iterator it = m_pOption->begin(); - strName = (*it).first; - strValue = (*it).second; - pIMsg->setProperty(strName.c_str(), strValue.c_str()); - // Read the last property in the map and set its name and value - // into the IMessageData. - map::const_reverse_iterator itr = m_pOption->rbegin(); - strName = (*itr).first; - strValue = (*itr).second; - pIMsg->setProperty(strName.c_str(), strValue.c_str()); - // END HACK - } - - return AXIS_SUCCESS; -} - -/** Handle Faults. - */ -void SCAWSHandler::onFault(void *pvIMsg) -{ - -} - -// -// These functions are exported from the SCAWSHandler DLL and are called by the Axis Engine -// to create/destroy instances of the SCAWSHandler class. -// -extern "C" -{ -STORAGE_CLASS_INFO -int GetClassInstance(BasicHandler **inst) -{ - *inst = new BasicHandler(); - - SCAWSHandler* pSCAWSHandler = new SCAWSHandler(); - (*inst)->_functions = 0; - if (pSCAWSHandler) - { - (*inst)->_object = pSCAWSHandler; - return pSCAWSHandler->init(); - } - - return AXIS_FAIL; -} - -STORAGE_CLASS_INFO -int DestroyInstance(BasicHandler *inst) -{ - if (inst) - { - Handler* pH = static_cast(inst->_object); - pH->fini(); - delete pH; - delete inst; - return AXIS_SUCCESS; - } - return AXIS_FAIL; -} -} // extern "C" diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h b/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h deleted file mode 100644 index 3f0c576921..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/handler/src/SCAWSHandler.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#if !defined(SCAWSHANDLER_H_INCLUDED) -#define SCAWSHANDLER_H_INCLUDED - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include - -/** The SCAWSHandler class is an Axis Handler that retrieves properties set - * in the deployment descriptor (server.wsdd) and sets them into the - * MessageData for use by the SCAWSWrapper which invokes SCA Entry Points. - * - * @see SCAWSWrapper - */ -AXIS_CPP_NAMESPACE_USE - -class SCAWSHandler : public Handler -{ - public: - /** Construct an SCAWSHandler. - */ - SCAWSHandler(void); - - /** Destruct an SCAWSHandler. - */ - virtual ~SCAWSHandler(void); - - // Axis WrapperClassHandler interface. - - /** Perform an necessary initialization. - */ - int AXISCALL init(); - - /** Perform any necessary finalization. - */ - int AXISCALL fini(); - - /** Get the SCA specific properties that were set in the deployment - * descriptor (server.wsdd) and set them into the MessageData where - * they can be retrieved by the SCAWSWrapper to invoke the correct - * SCA Entry Point. - * @param pvIMsg - pointer to IMessageData - * - * @see SCAWSWrapper - */ - int AXISCALL invoke(void* pvIMsg); - - /** Handle Faults. - */ - void AXISCALL onFault(void* pvIMsg); - - private: - -}; - - -#endif // !defined(SCAWSHANDLER_H_INCLUDED) - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am deleted file mode 100644 index af437a64d6..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild deleted file mode 100644 index cad284f534..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtbuild +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project deleted file mode 100644 index 526e05b5c0..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sca_axis_wrapper - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 263f7d68d6..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Feb 16 14:46:12 GMT 2006 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.928824798=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.417732635=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.928824798=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.417732635=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.928824798=\n\n\n\n -environment/project/cdt.managedbuild.config.gnu.so.release.417732635=\n\n\n\n diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp deleted file mode 100755 index d23689ad9d..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) - * This file contains implementations of the Exception class of the web service. - */ - -#include "AxisServiceException.h" - -#include - -AxisServiceException::AxisServiceException() -{ -/* This only serves the purpose of indicating that the - * service has thrown an excpetion - */ - m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; - processException(m_iExceptionCode); -} - -AxisServiceException::AxisServiceException(ISoapFault* pFault) -{ - m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; - m_pISoapFault = pFault; - processException(pFault);} - -AxisServiceException::AxisServiceException(int iExceptionCode) -{ - - m_iExceptionCode = iExceptionCode; - processException (iExceptionCode); -} - -AxisServiceException::AxisServiceException(exception* e) -{ - processException (e); -} - -AxisServiceException::AxisServiceException(exception* e,int iExceptionCode) -{ - - processException (e, iExceptionCode); -} - -AxisServiceException::AxisServiceException(string sMessage) -{ - m_sMessage =sMessage; -} - -AxisServiceException::~AxisServiceException() throw () -{ - m_sMessage =""; -} - -void AxisServiceException:: processException(exception* e, int iExceptionCode) -{ - m_sMessage = getMessage (e) + getMessage (iExceptionCode); -} - -void AxisServiceException::processException (ISoapFault* pFault) -{ - /*User can do something like deserializing the struct into a string*/ -} - -void AxisServiceException::processException(exception* e) -{ - m_sMessage = getMessage (e); -} - -void AxisServiceException::processException(int iExceptionCode) -{ - m_sMessage = getMessage (iExceptionCode); -} - -const string AxisServiceException::getMessage (exception* objException) -{ - string sMessage = objException->what(); - return sMessage; -} - -const string AxisServiceException::getMessage (int iExceptionCode) -{ - string sMessage; - switch(iExceptionCode) - { - case AXISC_SERVICE_THROWN_EXCEPTION: - sMessage = "The service has thrown an exception. see details"; - break; - default: - sMessage = "Unknown Exception has occured in the service"; - } -return sMessage; -} - -const char* AxisServiceException::what() throw () -{ - return m_sMessage.c_str (); -} - -const int AxisServiceException::getExceptionCode(){ - return m_iExceptionCode; -} - -const ISoapFault* AxisServiceException::getFault(){ - return m_pISoapFault; -} - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h deleted file mode 100755 index 7684740b88..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/AxisServiceException.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) - * This file contains an Exception class of the web service. - */ - -#if !defined(__AXISSERVICEEXCEPTION_EXCEPTION_H__INCLUDED_) -#define __AXISSERVICEEXCEPTION_EXCEPTION_H__INCLUDED_ - -#include -#include -#include -#include - -using namespace std; -AXIS_CPP_NAMESPACE_USE - -class AxisServiceException: public AxisException -{ -public: - STORAGE_CLASS_INFO AxisServiceException(); - STORAGE_CLASS_INFO AxisServiceException(ISoapFault* pFault); - STORAGE_CLASS_INFO AxisServiceException(int iExceptionCode); - STORAGE_CLASS_INFO AxisServiceException(exception* e); - STORAGE_CLASS_INFO AxisServiceException(exception* e, int iExceptionCode); - STORAGE_CLASS_INFO AxisServiceException(string sMessage); - STORAGE_CLASS_INFO virtual ~AxisServiceException() throw(); - STORAGE_CLASS_INFO const char* what() throw(); - STORAGE_CLASS_INFO const int getExceptionCode(); - STORAGE_CLASS_INFO const string getMessage(exception* e); - STORAGE_CLASS_INFO const string getMessage(int iExceptionCode); - STORAGE_CLASS_INFO const ISoapFault* getFault(); - -private: - void processException(exception* e); - void processException(ISoapFault* pFault); - void processException(exception* e, int iExceptionCode); - void processException(int iExceptionCode); - string m_sMessage; - int m_iExceptionCode; - ISoapFault* m_pISoapFault; - -}; - -#endif /* !defined(__AXISSERVICEEXCEPTION_EXCEPTION_H__INCLUDED_)*/ diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am deleted file mode 100644 index ec6e6eccdf..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -lib_LTLIBRARIES = libtuscany_sca_axis_wrapper.la - -libtuscany_sca_axis_wrapper_la_SOURCES = SCAWSWrapper.cpp AxisServiceException.cpp - -libtuscany_sca_axis_wrapper_la_LIBADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -lxml2 -lstdc++ \ - -L${AXISCPP_DEPLOY}/lib -laxis_client - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXISCPP_DEPLOY}/include - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp deleted file mode 100644 index 57f3f40148..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "SCAWSWrapper.h" - -#include "commonj/sdo/SDO.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/core/SCAEntryPoint.h" - -#include "axis/GDefine.h" -#include "AxisServiceException.h" - - -using namespace std; -using namespace commonj::sdo; -using namespace tuscany::sca; -AXIS_CPP_NAMESPACE_USE; - -/** Construct an SCAWSWrapper. - */ -SCAWSWrapper::SCAWSWrapper() -{ -} - -/** Destruct an SCAWSWrapper. - */ -SCAWSWrapper::~SCAWSWrapper() -{ -} - - -// -// Implementation of WrapperClassHandler interface -// - -/** Perform any necessary initialization. - */ -int SCAWSWrapper::init() -{ - return AXIS_SUCCESS; -} - -/** Perform an necessary finalization. - */ -int SCAWSWrapper::fini() -{ - return AXIS_SUCCESS; -} - -/** Invoke a web service operation. The invoke method expects SCA specific - * properties to have been set into the MessageData by the SCAWSHandler. - * Using those properties, the wrapper will invoke the correct SCA Entry - * Point. - * @param pMsg - pointer to IMessageData. - * - * @see SCAWSHandler - */ -int SCAWSWrapper::invoke(void *pMsg) -{ - - IMessageData *pIMsg = (IMessageData*)pMsg; - const AxisChar *operationName = pIMsg->getOperationName(); - - int axisReturn = invokeService(pIMsg, operationName); - return axisReturn; -} - -/** Handle Faults. - */ -void SCAWSWrapper::onFault(void *pMsg) -{ -} - - -// Invoke an operation on an SCA Entry Point. -int SCAWSWrapper::invokeService(IMessageData *pIMsg, - const AxisChar *operationName) -{ - int axisReturn = AXIS_SUCCESS; - - // Get the SoapSerializer. - IWrapperSoapSerializer* pIWSSZ; - pIMsg->getSoapSerializer(&pIWSSZ); - if (!pIWSSZ) - { - return AXIS_FAIL; - } - - // Get the SoapDeSerializer. - IWrapperSoapDeSerializer* pIWSDZ; - pIMsg->getSoapDeSerializer(&pIWSDZ); - if (!pIWSDZ) - { - return AXIS_FAIL; - } - - // Target Namespace was set into the MessageData by the SCAWSHandler. - const AxisChar *targetNamespace = (const AxisChar *)pIMsg->getProperty("targetNamespace"); - - // Make sure we have the correct message. - if (AXIS_SUCCESS != pIWSDZ->checkMessageBody(operationName, targetNamespace)) - { - return AXIS_FAIL; - } - - try - { - // - // Create the SCA EntryPoint - // - const AxisChar *scaEntryPointName = (const AxisChar *)pIMsg->getProperty("scaEntryPoint"); - SCAEntryPoint entrypoint(scaEntryPointName); - - // Get the DataFactory which has Types loaded from WSDLs - DataFactoryPtr dataFactory = entrypoint.getDataFactory(); - - // - // Get the Soap body and create an SDO request object from it. - // - AnyType *soapAny = pIWSDZ->getAnyObject(); - - // The Doc Literal soap message does not include the root element (operation name) when - // we use getAnyObject. Axis calls this element the 'soap method' but there is no - // 'getSoapMethod' method on the deserializer - we need to wrap the soap body with an - // element named for the operation name. - - string soapBody("<"); - soapBody.append(operationName); - soapBody.append(" "); - soapBody.append("xmlns"); - soapBody.append("=\""); - soapBody.append(targetNamespace); - soapBody.append("\">"); - for (int i=0; i < soapAny->_size ; i++) - { - // The soap body is stored in the _array member of AnyType. - soapBody.append(soapAny->_array[i]); - } - soapBody.append(""); - - // - // Create the SDO request object from the soap body. - // - XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(dataFactory); - XMLDocumentPtr xmlDoc = xmlHelper->load(soapBody.c_str(), targetNamespace); - DataObjectPtr requestSDO = xmlDoc->getRootDataObject(); - - // - // Invoke the operation on the SCA EntryPoint. - // - DataObjectPtr responseSDO = entrypoint.invoke(operationName, requestSDO); - - // - // Serialize the responseSDO into a SOAP response. - // - // Get the name of the response SDO. The entry point was invoked using an - // SDOStub and the stub makes sure that the response includes the root - // element (operation response name). - - const Type &responseType = responseSDO->getType(); - const char *operationResponseName = responseType.getName(); - - // Get the first child of the root element - this is the soap body - // to return in the response. The body will be wrapped with the root - // element (operation response name) when we call the Axis method - // 'createSoapmMethod'. - DataObjectPtr soapBodySDO = responseSDO->getDataObject((unsigned int)0); - const Type& soapBodyType = soapBodySDO->getType(); - const char *soapBodyName = soapBodyType.getName(); - // Convert the soap body DataObject into XML. - XMLDocumentPtr responseDoc = xmlHelper->createDocument(soapBodySDO, - targetNamespace, - soapBodyName); - responseDoc->setXMLDeclaration(false); - char *responseXML = xmlHelper->save(responseDoc); - - // - // Serialize the response - // - // Wrap the soap body with the root element (operation response name). - pIWSSZ->createSoapMethod(operationResponseName, targetNamespace); - // Add the XML response document (soap body) as an AnyType. - AnyType *soapAnyResponse = new AnyType(); - soapAnyResponse->_size = 1; - soapAnyResponse->_array = new char*[1]; - soapAnyResponse->_array[0] = strdup(responseXML); - - pIWSSZ->addOutputAnyObject(soapAnyResponse); - - } - catch(ServiceRuntimeException e) - { - - // Throw a useful fault - string faultCode = string("Server.TuscanySCA.") + string(e.getEClassName()); - string faultString = string(e.getEClassName()) + string(":") + string (e.getMessageText()); - - pIWSSZ->createSoapFault("ServiceRuntimeException","tempURI", faultCode.c_str(), faultString.c_str()); - throw AxisServiceException(); - } - catch(SDORuntimeException e) - { - // Throw a useful fault - string faultCode = string("Server.TuscanySDO.") + string(e.getEClassName()); - string faultString = string(e.getEClassName()) + string(":") + string (e.getMessageText()); - - pIWSSZ->createSoapFault("SDORuntimeException","tempURI", faultCode.c_str(), faultString.c_str()); - throw AxisServiceException(); - } - - - return axisReturn; -} - -// -// These functions are exported from the SCAWSWrapper DLL and are called by the Axis Engine -// to create/destroy instances of the service wrapper class. -// -extern "C" -{ -STORAGE_CLASS_INFO -int GetClassInstance(BasicHandler **inst) -{ - *inst = new BasicHandler(); - WrapperClassHandler* pWCH = new SCAWSWrapper(); - (*inst)->_functions = 0; - if (pWCH) - { - (*inst)->_object = pWCH; - return pWCH->init(); - } - return AXIS_FAIL; -} -STORAGE_CLASS_INFO -int DestroyInstance(BasicHandler *inst) -{ - if (inst) - { - WrapperClassHandler* pWCH = reinterpret_cast(inst); - pWCH->fini(); - delete pWCH; - delete inst; - return AXIS_SUCCESS; - } - return AXIS_FAIL; -} -} // extern "C" - - - diff --git a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h b/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h deleted file mode 100644 index 474c39977f..0000000000 --- a/tags/cpp-sca-20060405/runtime/axis_binding/wrapper/src/SCAWSWrapper.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#if !defined(SCAWSWRAPPER_H_INCLUDED) -#define SCAWSWRAPPER_H_INCLUDED - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "osoa/sca/export.h" -#include -#include -#include -#include -#include - - -AXIS_CPP_NAMESPACE_USE - -/** The SCAWSWrapper class is an Axis WrapperClassHandler that acts as a generic service wrapper for - * invoking services using the SCARuntime. Any services defined in the deployment descriptor (server.wsdd) - * with will be invoked by the SCAWSWrapper. - * The service must also be configured with a handler (SCAWSHandler) that sets SCA specific properties - * from the deployment descriptor into the MessageData that is passed to the wrapper's invoke method. - * The SCAWSWrapper uses the properties to configure an SCA Entry Point and invoke the requested operation - * on the service. - * - * Example: - * - * - * - * - * - * - * - * - * - * - * - * - * - * @see SCAWSHandler - */ -class SCAWSWrapper : public WrapperClassHandler -{ - public: - - /** Construct an SCAWSWrapper. - */ - SCAWSWrapper(); - - /** Destruct an SCAWSWrapper. - */ - virtual ~SCAWSWrapper(); - - // - // Axis WrapperClassHandler interface. - // - - /** Perform any necessary initialization. - */ - int AXISCALL init(); - - /** Perform any necessary finalization. - */ - int AXISCALL fini(); - - /** Invoke a web service operation. The invoke method expects SCA specific - * properties to have been set into the MessageData by the SCAWSHandler. - * Using those properties, the wrapper will invoke the correct SCA Entry - * Point. - * @param pMsg - pointer to IMessageData. - * - * @see SCAWSHandler - */ - int AXISCALL invoke(void* pMsg); - - /** Handle Faults. - */ - void AXISCALL onFault(void* pMsg); - - /** Binding Style: Document Literal. - */ - AXIS_BINDING_STYLE AXISCALL getBindingStyle() { return DOC_LITERAL; }; - - private: - - // Invoke an SCA Entry Point and return an SDO object as a result. - int invokeService(IMessageData *pIMsg, - const AxisChar *operationName); -}; - -#endif // !defined(SCAWSWRAPPER_H_INCLUDED) diff --git a/tags/cpp-sca-20060405/runtime/core/Makefile.am b/tags/cpp-sca-20060405/runtime/core/Makefile.am deleted file mode 100644 index b4b5bc3097..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src test diff --git a/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild b/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild deleted file mode 100644 index 60990b3bc1..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/.cdtbuild +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/src/.cdtproject b/tags/cpp-sca-20060405/runtime/core/src/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/src/.project b/tags/cpp-sca-20060405/runtime/core/src/.project deleted file mode 100644 index 86fb4b8663..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sca - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 0e5a987932..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Feb 16 12:50:21 GMT 2006 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.1559343291=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1621584437=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.1559343291=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1621584437=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.1559343291=\n\n\n\n -environment/project/cdt.managedbuild.config.gnu.so.release.1621584437=\n\n\n\n diff --git a/tags/cpp-sca-20060405/runtime/core/src/Makefile.am b/tags/cpp-sca-20060405/runtime/core/src/Makefile.am deleted file mode 100644 index a09444250c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/Makefile.am +++ /dev/null @@ -1,103 +0,0 @@ -lib_LTLIBRARIES = libtuscany_sca.la - -nobase_include_HEADERS = \ -osoa/sca/ComponentContext.h \ -osoa/sca/ComponentContextImpl.h \ -osoa/sca/export.h \ -osoa/sca/ModuleContext.h \ -osoa/sca/ModuleContextImpl.h \ -osoa/sca/sca.h \ -osoa/sca/ServiceList.h \ -osoa/sca/ServiceRuntimeException.h \ -tuscany/sca/core/ComponentServiceWrapper.h \ -tuscany/sca/core/ExternalServiceWrapper.h \ -tuscany/sca/core/Operation.h \ -tuscany/sca/core/SCAEntryPoint.h \ -tuscany/sca/core/SCARuntime.h \ -tuscany/sca/core/ServiceProxy.h \ -tuscany/sca/core/ServiceWrapper.h \ -tuscany/sca/model/Binding.h \ -tuscany/sca/model/Component.h \ -tuscany/sca/model/CPPImplementation.h \ -tuscany/sca/model/CPPInterface.h \ -tuscany/sca/model/EntryPoint.h \ -tuscany/sca/model/ExternalService.h \ -tuscany/sca/model/Implementation.h \ -tuscany/sca/model/Interface.h \ -tuscany/sca/model/ModelLoader.h \ -tuscany/sca/model/Module.h \ -tuscany/sca/model/Service.h \ -tuscany/sca/model/ServiceReference.h \ -tuscany/sca/model/Subsystem.h \ -tuscany/sca/model/System.h \ -tuscany/sca/model/Wire.h \ -tuscany/sca/model/WireTarget.h \ -tuscany/sca/model/WSBinding.h \ -tuscany/sca/model/Wsdl.h \ -tuscany/sca/model/WsdlOperation.h \ -tuscany/sca/util/DefaultLogWriter.h \ -tuscany/sca/util/Exceptions.h \ -tuscany/sca/util/File.h \ -tuscany/sca/util/FileLogWriter.h \ -tuscany/sca/util/Library.h \ -tuscany/sca/util/Logger.h \ -tuscany/sca/util/Logging.h \ -tuscany/sca/util/LogWriter.h \ -tuscany/sca/util/Utils.h \ -tuscany/sca/ws/SDOStub.h \ -tuscany/sca/ws/WSServiceWrapper.h - - -libtuscany_sca_la_SOURCES = \ -osoa/sca/ComponentContext.cpp \ -osoa/sca/ComponentContextImpl.cpp \ -osoa/sca/ModuleContext.cpp \ -osoa/sca/ModuleContextImpl.cpp \ -osoa/sca/SCA.cpp \ -osoa/sca/ServiceList.cpp \ -osoa/sca/ServiceRuntimeException.cpp \ -tuscany/sca/util/DefaultLogWriter.cpp \ -tuscany/sca/util/File.cpp \ -tuscany/sca/util/FileLogWriter.cpp \ -tuscany/sca/util/Library.cpp \ -tuscany/sca/util/Logger.cpp \ -tuscany/sca/util/LogWriter.cpp \ -tuscany/sca/util/Utils.cpp \ -tuscany/sca/model/Binding.cpp \ -tuscany/sca/model/Component.cpp \ -tuscany/sca/model/CPPImplementation.cpp \ -tuscany/sca/model/CPPInterface.cpp \ -tuscany/sca/model/EntryPoint.cpp \ -tuscany/sca/model/ExternalService.cpp \ -tuscany/sca/model/Implementation.cpp \ -tuscany/sca/model/Interface.cpp \ -tuscany/sca/model/ModelLoader.cpp \ -tuscany/sca/model/Module.cpp \ -tuscany/sca/model/Service.cpp \ -tuscany/sca/model/ServiceReference.cpp \ -tuscany/sca/model/Subsystem.cpp \ -tuscany/sca/model/System.cpp \ -tuscany/sca/model/Wire.cpp \ -tuscany/sca/model/WireTarget.cpp \ -tuscany/sca/model/WSBinding.cpp \ -tuscany/sca/model/Wsdl.cpp \ -tuscany/sca/model/WsdlOperation.cpp \ -tuscany/sca/core/ComponentServiceWrapper.cpp \ -tuscany/sca/core/ExternalServiceWrapper.cpp \ -tuscany/sca/core/Operation.cpp \ -tuscany/sca/core/SCAEntryPoint.cpp \ -tuscany/sca/core/SCARuntime.cpp \ -tuscany/sca/core/ServiceProxy.cpp \ -tuscany/sca/core/ServiceWrapper.cpp \ -tuscany/sca/ws/SDOStub.cpp \ -tuscany/sca/ws/WSServiceWrapper.cpp - -libtuscany_sca_la_LIBADD = -lstdc++ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ - -L${AXISCPP_DEPLOY}/lib -laxis_client - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXISCPP_DEPLOY}/include - diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp deleted file mode 100644 index 73c3ed2e36..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "osoa/sca/ComponentContext.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "osoa/sca/ComponentContextImpl.h" -#include "tuscany/sca/core/SCARuntime.h" - -using namespace tuscany::sca; - -namespace osoa -{ - namespace sca - { - - // ======================================================= - // getCurrent: create a context from the current component - // ======================================================= - ComponentContext ComponentContext::getCurrent() - { - LOGENTRY(1, "ComponentContext::getCurrent"); - Component* component = SCARuntime::getInstance()->getCurrentComponent(); - if (!component) - { - throw ComponentContextException("No current component"); - } - ComponentContextImpl* cci = new ComponentContextImpl(component); - LOGEXIT(1, "ComponentContext::constructor"); - return ComponentContext(cci); - } - - // =========== - // Constructor - // =========== - ComponentContext::ComponentContext(ComponentContextImpl* implementation) - : impl(implementation) - { - LOGENTRY(1, "ComponentContext::constructor"); - LOGEXIT(1, "ComponentContext::constructor"); - } - - // ========== - // Destructor - // ========== - ComponentContext::~ComponentContext() - { - LOGENTRY(1, "ComponentContext::destructor"); - delete impl; - LOGEXIT(1, "ComponentContext::destructor"); - } - - // =================================== - // Copy constructor: create a new impl - // =================================== - ComponentContext::ComponentContext(const ComponentContext& ctx) - { - impl = new ComponentContextImpl(impl->getComponent()); - } - - // ============================= - // operator= : create a new impl - // ============================= - ComponentContext& ComponentContext::operator=(const ComponentContext& ctx) - { - if (this != &ctx) - { - impl = new ComponentContextImpl(impl->getComponent()); - } - return *this; - } - - // ========== - // getService - // ========== - void* ComponentContext::getService(const char* referenceName) - { - LOGENTRY(1, "ComponentContext::getService"); - void* service = impl->getService(referenceName); - LOGEXIT(1, "ComponentContext::getService"); - return service; - } - - // =========== - // getServices - // =========== - ServiceList ComponentContext::getServices(const char* referenceName) - { - return impl->getServices(referenceName); - } - - // ============ - // getProperties - // ============= - DataObjectPtr ComponentContext::getProperties() - { - LOGENTRY(1, "ComponentContext::getProperties"); - DataObjectPtr properties = impl->getProperties(); - LOGEXIT(1, "ComponentContext::getProperties"); - return properties; - } - - // ============ - // getDataFactory - // ============= - DataFactoryPtr ComponentContext::getDataFactory() - { - LOGENTRY(1, "ComponentContext::getDataFactory"); - DataFactoryPtr dataFactory = impl->getDataFactory(); - LOGEXIT(1, "ComponentContext::getDataFactory"); - return dataFactory; - } - - - } // End namespace sca -} // End namespace osoa diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h deleted file mode 100644 index 10d334a936..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContext.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef osoa_sca_componentcontext_h -#define osoa_sca_componentcontext_h - -#include "osoa/sca/export.h" -#include "osoa/sca/ServiceList.h" -#include "commonj/sdo/SDO.h" -namespace osoa -{ - namespace sca - { - class ComponentContextImpl; - - /** - * An SCA component implementation uses the ComponentContext class to - * retrieve information about the configured SCA component. - */ - class SCA_API ComponentContext - { - - public: - /** - * Return a new ComponentContext for the current Component. - */ - static ComponentContext getCurrent(); - - /** - * Resolve a reference name into a single configured service. - * If the component's reference is wired to more than one service - * then theis method will return an exception. - * @param referenceName The reference to be resolved. This must match - * the name of a reference configured in the component type file for - * this component. - */ - void* getService(const char* referenceName); - - /** - * Resolve a reference name into a list of configured services. - * @param referenceName The reference to be resolved. This must match - * the name of a reference configured in the component type file for - * this component. - */ - ServiceList getServices(const char* referenceName); - - /** - * Get the configured properties for the component. - * @return A data object representing all the properties that - * are configured for this component. - */ - commonj::sdo::DataObjectPtr getProperties(); - - /** - * Get an SDO data factory which will allow the component to - * create data objects for all the types configured for this - * component. - * @return A data factory to be used by the component to create - * new data objects. - */ - commonj::sdo::DataFactoryPtr getDataFactory(); - - /** - * Destructor - */ - virtual ~ComponentContext(); - - - ComponentContext(const ComponentContext&); - ComponentContext& operator=(const ComponentContext&); - - private: - /** - * Constructor to create an interface class from the contained - * implementation. - * @param implementation the actual implementation class - */ - ComponentContext(ComponentContextImpl* implementation); - - /** - * Pointer to the class which provides the actual implementation. - */ - ComponentContextImpl* impl; - - }; - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_componentcontext_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp deleted file mode 100644 index 436e44d5e1..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.cpp +++ /dev/null @@ -1,270 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "osoa/sca/ComponentContextImpl.h" -#include "tuscany/sca/model/WireTarget.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" -#include "tuscany/sca/core/ExternalServiceWrapper.h" -#include "tuscany/sca/model/CPPImplementation.h" -#include "tuscany/sca/model/Module.h" - -using namespace tuscany::sca; -using namespace tuscany::sca::model; - -namespace osoa -{ - namespace sca - { - // =========== - // Constructor - // =========== - ComponentContextImpl::ComponentContextImpl(Component* comp) - : component(comp) - { - LOGENTRY(1, "ComponentContextImpl::constructor"); - LOGEXIT(1, "ComponentContextImpl::constructor"); - } - - // ========== - // Destructor - // ========== - ComponentContextImpl::~ComponentContextImpl() - { - // -------------------------------------------- - // Delete the proxies served up by this context - // -------------------------------------------- - for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++) - { - delete (ServiceProxy*)*iter; - } - } - - - // ========================================================================== - // getServices: return a list of Proxies for services wired to this reference - // ========================================================================== - ServiceList ComponentContextImpl::getServices(const char* referenceName) - { - LOGENTRY(1, "ComponentContextImpl::getServices"); - - string message; - - // -------------------------------------------------------------- - // locate reference in the current component and determine target - // -------------------------------------------------------------- - ServiceReference* serviceReference = component->findReference(referenceName); - if (!serviceReference) - { - message = "Reference not defined: "; - message = message + referenceName; - throw ServiceNotFoundException(message.c_str()); - } - - // Get the target services from the ServiceReference - const ServiceReference::TARGETS& targets = serviceReference->getTargets(); - - // -------------------- - // Validate the request - // -------------------- - switch (serviceReference->getMultiplicity()) - { - case ServiceReference::ONE_MANY: - case ServiceReference::ONE_ONE: - { - if (targets.size() == 0) - { - message = "Reference "; - message = message + referenceName + " not wired"; - throw ServiceNotFoundException(message.c_str()); - } - } - default: - { - } - } // end switch - - // ------------------------------ - // Create a proxy for each target - // ------------------------------ - ServiceList services(targets.size()); - for (ServiceReference::TARGETS::const_iterator iter = targets.begin(); - iter!=targets.end(); - iter++) - { - services.addService(getServiceProxy(serviceReference, *iter)); - } - - return services; - - } // End getServices() - - - // =================================================================== - // getService: return a Proxy for the services wired to this reference - // =================================================================== - void* ComponentContextImpl::getService(const char* referenceName) - { - LOGENTRY(1, "ComponentContextImpl::getService"); - - string message; - - // -------------------------------------------------------------- - // locate reference in the current component and determine target - // -------------------------------------------------------------- - ServiceReference* serviceReference = component->findReference(referenceName); - if (!serviceReference) - { - message = "Reference not defined: "; - message = message + referenceName; - throw ServiceNotFoundException(message.c_str()); - } - - // Get the target service from the ServiceReference - const ServiceReference::TARGETS& targets = serviceReference->getTargets(); - - // -------------------- - // Validate the request - // -------------------- - switch (serviceReference->getMultiplicity()) - { - case ServiceReference::ZERO_MANY: - case ServiceReference::ONE_MANY: - { - message = "getService() called for reference with multiplicity >1 :"; - message = message + referenceName; - throw ServiceNotFoundException(message.c_str()); - } - case ServiceReference::ONE_ONE: - { - if (targets.size() == 0) - { - message = "Reference "; - message = message + referenceName + " not wired"; - throw ServiceNotFoundException(message.c_str()); - } - } - default: - { - } - } // end switch - - // Return the proxy - return getServiceProxy(serviceReference, *targets.begin()); - - } // End getService() - - - // ================================================================== - // getServiceProxy: Create and return an instance of the ServiceProxy - // ================================================================== - void* ComponentContextImpl::getServiceProxy( - ServiceReference* serviceReference, - WireTarget* target) - { - // ----------------------------------- - // Get a ServiceWrapper for the target - // ----------------------------------- - ServiceWrapper* serviceWrapper = getServiceWrapper(target); - - // ------------------------------ - // Get a Proxy for this reference - // ------------------------------ - try - { - ServiceProxy* serviceProxy = new ServiceProxy(component, serviceReference->getName(), serviceWrapper); - void* service = serviceProxy->getProxy(); - // service MUST be set here or an exception will have been thrown - proxies.push_back(serviceProxy); - return service; - } - catch (ServiceRuntimeException&) - { - delete serviceWrapper; - throw ; - } - } - - - // ====================================================================== - // getServiceWrapper: Create and return an instance of the ServiceWrapper - // ====================================================================== - ServiceWrapper* ComponentContextImpl::getServiceWrapper(WireTarget* target) - { - // ------------------------- - // Determine type of Service - // ------------------------- - switch (target->getServiceType()) - { - case WireTarget::ExternalServiceType: - { - // ---------------- - // External Service - // ---------------- - return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target); - } - - case WireTarget::ComponentServiceType: - { - // ----------------- - // Component Service - // ----------------- - return ComponentServiceWrapper::createServiceWrapper((Service*)target); - } - - default: - { - string message = "Undefined wire target type for : "; - message = message + target->getName(); - throw ServiceNotFoundException(message.c_str()); - } - } // end switch - } - - - - // ============================================== - // getProperties: return the component properties - // ============================================== - DataObjectPtr ComponentContextImpl::getProperties() - { - LOGENTRY(1, "ComponentContextImpl::getProperties"); - DataObjectPtr properties = component->getProperties(); - - LOGEXIT(1, "ComponentContextImpl::getProperties"); - return properties; - } - - // ============================================== - // getDataFactory: return the data factory for the module in which - // this component resides - // ============================================== - DataFactoryPtr ComponentContextImpl::getDataFactory() - { - LOGENTRY(1, "ComponentContextImpl::getProperties"); - DataFactoryPtr dataFactory = component->getModule()->getDataFactory(); - - LOGEXIT(1, "ComponentContextImpl::getDataFactory"); - return dataFactory; - } - - - } // End namespace sca -} // End namespace osoa diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h deleted file mode 100644 index bd3a0d106a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ComponentContextImpl.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef osoa_sca_componentcontextimpl_h -#define osoa_sca_componentcontextimpl_h - -#include "osoa/sca/ServiceList.h" - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/model/Service.h" - -using namespace tuscany::sca; -using namespace tuscany::sca::model; - -namespace osoa -{ - namespace sca - { - /** - * Contains the actual implementation of a ComponentContext interface. - */ - class ComponentContextImpl - { - - public: - /** - * Constructor that takes a Component which represents the runtime - * model for this context. - */ - ComponentContextImpl(Component* component); - - /** - * Default constructor. - */ - virtual ~ComponentContextImpl(); - - /** - * See ComponentContext. - */ - void* getService(const char* referenceName); - - /** - * See ComponentContext. - */ - ServiceList getServices(const char* referenceName); - - /** - * See ComponentContext. - */ - DataObjectPtr getProperties(); - - /** - * See ComponentContext. - */ - commonj::sdo::DataFactoryPtr getDataFactory(); - - /** - * Returns the contained Component. - * @return The Component to which this context refers. - */ - Component* getComponent() {return component;} - - private: - ComponentContextImpl(const ComponentContextImpl&); - ComponentContextImpl& operator=(const ComponentContextImpl&); - - /** - * Pointer to the runtime model Component to which this - * context refers. - */ - Component* component; - - /** - * Helper method to return a proxy to a service. - * @param serviceReference The source reference. - * @param target The target to which this source reference is wired. - * @return A pointer to an object which can be cast to the business - * class representing the target. - */ - void* getServiceProxy( - ServiceReference* serviceReference, - WireTarget* target); - - /** - * Helper method to return a wrapper for a target service. - * @param target The target for which this wrapper is to be created. - * @return The service wrapper. - */ - ServiceWrapper* getServiceWrapper(WireTarget* target); - - - typedef vector PROXIES; - /** - * A vector of the proxies created by this ComponentContext. The - * proxies will be destroyed when the ComponentContext is destroyed. - */ - PROXIES proxies; - }; - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_componentcontextimpl_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp deleted file mode 100644 index 93e36b297f..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "osoa/sca/ModuleContext.h" -#include "tuscany/sca/util/Logging.h" -#include "osoa/sca/ModuleContextImpl.h" -#include "tuscany/sca/core/SCARuntime.h" - -using namespace tuscany::sca; - -namespace osoa -{ - namespace sca - { - // =========== - // Constructor - // =========== - ModuleContext::ModuleContext(ModuleContextImpl* implementation) - : impl(implementation) - { - } - - // =================================== - // Copy constructor: create a new impl - // =================================== - ModuleContext::ModuleContext(const ModuleContext& ctx) - { - impl = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule()); - } - - // ============================= - // operator= : create a new impl - // ============================= - ModuleContext& ModuleContext::operator=(const ModuleContext& ctx) - { - if (this != &ctx) - { - impl = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule()); - } - return *this; - } - - // ========== - // Destructor - // ========== - ModuleContext::~ModuleContext() - { - LOGENTRY(1, "ModuleContext::destructor"); - delete impl; - LOGEXIT(1, "ModuleContext::destructor"); - } - - // ==================================================== - // getCurrent: create a context from the current module - // ==================================================== - ModuleContext ModuleContext::getCurrent() - { - LOGENTRY(1, "ModuleContext::getCurrent"); - ModuleContextImpl* mci = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule()); - LOGEXIT(1, "ModuleContext::getCurrent"); - return ModuleContext(mci); - } - - // ============= - // locateService - // ============= - void* ModuleContext::locateService(const char* serviceName) - { - LOGENTRY(1, "ModuleContext::locateService"); - void* sp = impl->locateService(serviceName); - LOGEXIT(1, "ModuleContext::locateService"); - return sp; - } - - - } // End namespace sca -} // End namespace osoa diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h deleted file mode 100644 index 7aacb00123..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContext.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef osoa_sca_modulecontext_h -#define osoa_sca_modulecontext_h - -#include "osoa/sca/export.h" - -namespace osoa -{ - namespace sca - { - class ModuleContextImpl; - - /** - * An SCA component implementation, or a non-SCA client, uses the - * ModuleContext class to retrieve information about the configured - * SCA module. - */ - class SCA_API ModuleContext - { - - public: - /** - * Return a new ModuleContext for the current Component. - */ - static ModuleContext getCurrent(); - - /** - * Resolve a service name into a single component service. - * @param serviceName The name of the service in the form - * "component name"/"service name". The service name is - * optional in the component has one service. - * @return A pointer to an object which can be cast to the - * business interface of the target service. - */ - void* locateService(const char* serviceName); - - /** - * Destructor. - */ - virtual ~ModuleContext(); - - ModuleContext(const ModuleContext&); - ModuleContext& operator=(const ModuleContext&); - - private: - /** - * Constructor to create an interface class from the contained - * implementation. - * @param implementation The actual implementation class. - */ - ModuleContext(ModuleContextImpl* implementation); - - /** - * Pointer to the class which provides the actual implementation. - */ - ModuleContextImpl* impl; - - }; - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_modulecontext_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp deleted file mode 100644 index 4d96ee336d..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/CPPImplementation.h" -#include "osoa/sca/ModuleContextImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -using namespace tuscany::sca; -using namespace tuscany::sca::model; - -namespace osoa -{ - namespace sca - { - // =========== - // Constructor - // =========== - ModuleContextImpl::ModuleContextImpl(Module* mod) - : module(mod) - { - } - - // ========== - // Destructor - // ========== - ModuleContextImpl::~ModuleContextImpl() - { - // -------------------------------------------- - // Delete the proxies served up by this context - // -------------------------------------------- - for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++) - { - delete (ServiceProxy*)*iter; - } - } - - // =========================================================================== - // locateService: return a proxy connected to a wrapper for the target service - // =========================================================================== - void* ModuleContextImpl::locateService(const char* serviceName) - { - LOGENTRY(1, "ModuleContextImpl::locateService"); - - - // ---------------------------- - // Locate the component service - // ---------------------------- - Service* service = module->findComponentService(serviceName); - string msg; - if (!service) - { - msg = "Service not found: "; - msg = msg + serviceName; - throw ServiceNotFoundException(msg.c_str()); - } - - // ------------------------- - // Create the ServiceWrapper - // ------------------------- - ComponentServiceWrapper* serviceWrapper = ComponentServiceWrapper::createServiceWrapper(service); - - // ---------------------------- - // Get a Proxy for this service - // ---------------------------- - try - { - ServiceProxy* serviceProxy = new ServiceProxy(service->getComponent(), service->getName(), serviceWrapper); - proxies.push_back(serviceProxy); - LOGEXIT(1, "ModuleContextImpl::locateService"); - return serviceProxy->getProxy(); - } - catch (ServiceRuntimeException&) - { - delete serviceWrapper; - throw ; - } - - } - - - - } // End namespace sca -} // End namespace osoa diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h deleted file mode 100644 index 5950313a06..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ModuleContextImpl.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef osoa_sca_modulecontextimpl_h -#define osoa_sca_modulecontextimpl_h -#include "tuscany/sca/model/Module.h" -#include "tuscany/sca/core/ServiceProxy.h" - -namespace osoa -{ - namespace sca - { - /** - * Contains the actual implementation of a ModuleContext interface. - */ - class ModuleContextImpl - { - - public: - /** - * Constructor that takes a Module which represents the runtime - * model for this context. - */ - ModuleContextImpl(tuscany::sca::model::Module* module); - - /** - * See ModuleContext#locateService. - */ - void* locateService(const char* serviceName); - - /** - * Destructor. - */ - virtual ~ModuleContextImpl(); - private: - ModuleContextImpl(const ModuleContextImpl&); - ModuleContextImpl& operator=(const ModuleContextImpl&); - - /** - * Pointer to the runtime model Module object to which this - * context refers. - */ - tuscany::sca::model::Module* module; - - typedef vector PROXIES; - /** - * Vector of proxies created from calls to the locateService - * method. - */ - PROXIES proxies; - }; - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_modulecontextimpl_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp deleted file mode 100644 index bcca254028..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/SCA.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev: $ $Date: $ */ - -#include "osoa/sca/sca.h" - diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp deleted file mode 100644 index ba2b418a7c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/ServiceList.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "osoa/sca/ServiceList.h" - -#include "osoa/sca/ServiceRuntimeException.h" - -namespace osoa -{ - namespace sca - { - // =========== - // Constructor - // =========== - ServiceList::ServiceList(unsigned int numTargets) - : maxServices(numTargets), numServices(0) - { - services = new void*[numTargets]; - } - - // ========================================== - // Copy comstructor: create new service array - // ========================================== - ServiceList::ServiceList(const ServiceList& sl) - : maxServices(sl.maxServices), numServices(sl.numServices) - { - services = new void*[maxServices]; - for (unsigned int i=0; i - -namespace osoa -{ - namespace sca - { - - /** - * Top level exception to represent all the exceptions that may be - * thrown by an SCA runtime implementation. - */ - class SCA_API ServiceRuntimeException - { - public: - /** - * Represents the possible severity levels for an exception. - */ - enum severity_level - { - Normal, - Warning, - Error, - Severe - }; - - /** - * Constructor. - * @param name Class name of the exception. - * @param sev Severity level. - * @param msg_text Detailed description of the exception. - */ - ServiceRuntimeException( - const char *name="ServiceRuntimeException", - severity_level sev=Severe, - const char* msg_text=""); - - ServiceRuntimeException(const ServiceRuntimeException& c); - - // Destructor - virtual ~ServiceRuntimeException(); - - /** - * Return class name of this exception. - */ - const char* getEClassName() const; - - /** - * Return severity. - */ - severity_level getSeverity() const; - - /** - * Return message text associated with exception. - */ - const char* getMessageText() const; - - /* - * Return file name where the exception was raised. - */ - const char* getFileName() const; - - /** - * Return line number where the exception was raised. - */ - unsigned long getLineNumber() const; - - /** - * Return function name where the exception was raised. - */ - const char* getFunctionName() const; - - /** - * Set the exception severity. - */ - void setSeverity(severity_level sev); - - /** - * Set the message text associated with exception. - */ - void setMessageText(const char* msg_text); - - /** - * Set the location where the exception was raised. - * @param file Name of the file. - * @param line Line number in the file. - * @param function Name of the function. - */ - void setLocation(const char* file, - unsigned long line, - const char* function=""); - - /** - * Append exception details to ostream. - */ - virtual std::ostream& PrintSelf(std::ostream &os) const; - - /** - * Operator to send exceptions details to a stream. - */ - SCA_API friend std::ostream& operator<< (std::ostream &os, const ServiceRuntimeException &except); - protected: - - private: - /** - * Class name of the exception. - */ - char* class_name; - - /** - * Severity level of the exception. - */ - severity_level severity; - - /** - * Description of the exception. - */ - char* message_text; // Description of exception - - /** - * Location where the exception was thrown or handled and thrown. - */ - class location - { - public: - char* file; // File name (from __FILE__) - unsigned long line; // Line number (from __LINE__) - char* function; // Function name - }; - - - enum {num_locations=5}; - /** - * Array of locations where the exception has been handled and thrown. - */ - location locations[num_locations]; - - /** - * The current location (index into ServiceRuntimeException#location). - */ - int location_set; - - - }; // End ServiceRuntimeException class definition - - - /** - * A remotable service is currently unavailable. It is possible that a retry - * may resolve this exception. - */ - class SCA_API ServiceUnavailableException: public ServiceRuntimeException - { - public: - ServiceUnavailableException(const char* serviceName) - : ServiceRuntimeException("ServiceUnavailableException", Warning, - serviceName) - { - } - private: - }; // End ServiceUnavailableException class definition - - - /** - * The target of a wire cannot be found, or the reference has not been - * configured. - */ - class ServiceNotFoundException: public ServiceRuntimeException - { - public: - ServiceNotFoundException(const char* msg) - : ServiceRuntimeException("ServiceNotFoundException", Error, - msg) - { - } - private: - }; // End ServiceNotFoundException class definition - - - /** - * There is no current component (for example, if a non-SCA component - * tries to get the current ComponentContext). - */ - class ComponentContextException: public ServiceRuntimeException - { - public: - ComponentContextException(const char* msg) - : ServiceRuntimeException("ComponentContextException", Error, - msg) - { - } - private: - }; // End ComponentContextException class definition - - /** - * Unable to find the specified entry point in the module. - */ - class EntryPointNotFoundException: public ServiceRuntimeException - { - public: - EntryPointNotFoundException(const char* msg) - : ServiceRuntimeException("EntryPointNotFoundException", Error, - msg) - { - } - private: - }; // End EntryPointNotFoundException class definition - - - - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_serviceruntimeexception_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h deleted file mode 100644 index 6ef7960284..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/export.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef osoa_sca_export_h -#define osoa_sca_export_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) - -#ifdef SCA_EXPORTS -#define SCA_API __declspec(dllexport) -#else -#define SCA_API __declspec(dllimport) -#endif - -#else -#include -#include -#include -#define SCA_API -#endif - -#endif // osoa_sca_export_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h b/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h deleted file mode 100644 index 528bd91c4a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/osoa/sca/sca.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef osoa_sca_sca_h -#define osoa_sca_sca_h - -#include "osoa/sca/export.h" -#include "osoa/sca/ModuleContext.h" -#include "osoa/sca/ComponentContext.h" -#include "osoa/sca/ServiceList.h" -#include "osoa/sca/ServiceRuntimeException.h" - -#endif // osoa_sca_sca_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp deleted file mode 100644 index 9db068a2ff..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/CPPImplementation.h" -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - // =================== - // Static data members - // =================== - void* ComponentServiceWrapper::staticImpl = 0; - - // =========== - // Constructor - // =========== - ComponentServiceWrapper::ComponentServiceWrapper(Service* target) - : ServiceWrapper(target), service(target) - { - LOGENTRY(1,"ComponentServiceWrapper::constructor"); - if (target->getServiceType() != WireTarget::ComponentServiceType) - { - throw ServiceRuntimeException("ComponentServiceWrapper: target is not a component service"); - } - - component = target->getComponent(); - interf = (CPPInterface*)target->getInterface(); - - remotable = interf->getRemotable(); - - - LOGEXIT(1,"ComponentServiceWrapper::constructor"); - - } - - // ========== - // Destructor - // ========== - ComponentServiceWrapper::~ComponentServiceWrapper() - { - LOGENTRY(1,"ComponentServiceWrapper::destructor"); - LOGEXIT(1,"ComponentServiceWrapper::destructor"); - } - - - // ====================================================================== - // getImplementation: get an implementation for this scope - // ====================================================================== - void* ComponentServiceWrapper::getImplementation() - { - CPPInterface::SCOPE scope = interf->getScope(); - if (scope == CPPInterface::MODULE) - { - if (!staticImpl) - { - staticImpl = newImplementation(); - } - return staticImpl; - } - else // (scope == CPPInterface::STATELESS) - { - return newImplementation(); - } - } - - // ====================================================================== - // releaseImplementation: release the implementation for this scope - // ====================================================================== - void ComponentServiceWrapper::releaseImplementation() - { - CPPInterface::SCOPE scope = interf->getScope(); - if (scope == CPPInterface::STATELESS) - { - deleteImplementation(); - } - } - - // ====================================================================== - // invoke: wrapper call to service with setting the component context - // ====================================================================== - void ComponentServiceWrapper::invoke(Operation& operation) - { - - SCARuntime* runtime = SCARuntime::getInstance(); - runtime->setCurrentComponent(component); - - try - { - invokeService(operation); - } - catch (...) - { - runtime->unsetCurrentComponent(); - throw; - } - runtime->unsetCurrentComponent(); - - } - - void ComponentServiceWrapper::setLibrary(Library* lib) - { - wrapperLibrary = lib; - } - - // ====================================================================== - // createServiceWrapper: create a wrapper for the target ComponentService - // ====================================================================== - ComponentServiceWrapper* ComponentServiceWrapper::createServiceWrapper(Service* service) - { - string msg; - ComponentServiceWrapper* serviceWrapper = 0; - - // ----------------------------------------------- - // Get the implementation for the target component - // ----------------------------------------------- - Component* targetComponent = service->getComponent(); - Implementation* impl = targetComponent->getImplementation(); - if (!impl) - { - msg = "Component " + targetComponent->getName() + " has no implementation defined"; - throw ServiceNotFoundException(msg.c_str()); - } - - // TODO: This only handle CPP implementation for now - if (impl->getImplementationType() == Implementation::CPP) - { - // ---------------------------------------------------- - // Get implementation dll name and wrapper factory name - // ---------------------------------------------------- - string dllName = ((CPPImplementation*)impl)->getDll(); - string wrapperFactoryName = ((CPPImplementation*)impl)->getHeaderStub() - + "_" + service->getName() + "_Wrapper_Factory"; - - // ------------ - // Load the dll - // ------------ - string fullDllName = targetComponent->getModule()->getRoot() + "/" + dllName; - typedef ComponentServiceWrapper* (* WRAPPERFACTORY) (Service*); - Library* wrapperLib = new Library(fullDllName); - - // ------------------------- - // Locate the factory method - // ------------------------- - WRAPPERFACTORY wrapperFactory = (WRAPPERFACTORY)wrapperLib->getSymbol(wrapperFactoryName); - if (!wrapperFactory) - { - LOGERROR_2(1, "ComponentServiceWrapper::createServiceWrapper: Unable to locate %s in library %s", - wrapperFactoryName.c_str(), fullDllName.c_str()); - msg = "Unable to locate " + wrapperFactoryName + " in library " + fullDllName; - throw ServiceNotFoundException(msg.c_str()); - } - - // ------------------------------------- - // Now create an instance of the wrapper - // ------------------------------------- - serviceWrapper = wrapperFactory(service); - if (!serviceWrapper) - { - LOGERROR_2(1, "ComponentServiceWrapper::createServiceWrapper: Factory method %s in library %s returned null", - wrapperFactoryName.c_str(), fullDllName.c_str()); - msg = "Factory method " + wrapperFactoryName + " in library " + fullDllName + " returned null"; - throw ServiceNotFoundException(msg.c_str()); - } - serviceWrapper->setLibrary(wrapperLib); - } - else - { - // ---------------------- - // Non CPP Implementation - // ---------------------- - msg = "Unsupported implementation type for service: " + service->getName(); - throw ServiceNotFoundException(msg.c_str()); - } - - return serviceWrapper; - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h deleted file mode 100644 index 3a5e990bf0..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_componentservicewrapper_h -#define tuscany_sca_core_componentservicewrapper_h - -#include "osoa/sca/export.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/CPPInterface.h" -#include "tuscany/sca/util/Library.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - /** - * Wraps the service on a component implementation. - * This abstract class is extended by generated code which provides - * the implementation of some of the methods. - * An instance of this class wraps the actual component implementation which - * has been written by a developer of an SCA application. - */ - class ComponentServiceWrapper : public ServiceWrapper - { - public: - /** - * Factory method to create a new ComponentServiceWrapper for a given target - * service. This method will provide all the loading of dlls required to - * create the target component. - * @param target The service on the component for which this wrapper is to be - * created. - * @return A wrapper that references the given target. - */ - static SCA_API ComponentServiceWrapper* createServiceWrapper(Service* target); - - /** - * Constructor. - * @param target The component service to which this wrapper refers. - */ - SCA_API ComponentServiceWrapper(Service* target); - - /** - * Destructor. - */ - SCA_API virtual ~ComponentServiceWrapper(); - - /** - * All business method calls to the target component go through the invoke method. - * @param operation The details of the method, paramaters and return value for the - * business method to be called on the target component. - */ - SCA_API virtual void invoke(Operation& operation); - - /** - * Return the loaded shared library for the target component. - */ - Library* getLibrary() {return wrapperLibrary;} - protected: - /** - * Delegated method to invoke the correct method on the target component. - * Implemented by the subtype. - */ - SCA_API virtual void invokeService(Operation& operation) = 0; - - /** - * Delegated method to create a new component implementation. - * Implemented by the subtype. - * @return A pointer to an instance of the component implementation class. - */ - SCA_API virtual void* newImplementation() = 0; - - /** - * Delegated method to delete the current instance of the component - * implementation. - * Implemented by the subtype. - */ - SCA_API virtual void deleteImplementation() = 0; - - /** - * Return the current instance of the component implementation. - * @return A pointer to an instance of the component implementation class. - */ - SCA_API virtual void* getImplementation(); - - /** - * Indicates that the current instance of the component implementation - * has been finished with. - * Will call ComponentServiceWrapper#deleteImplementation if the - * implementation is stateless (so that a new instance is returned - * for each call). - */ - SCA_API virtual void releaseImplementation(); - - private: - /** - * Holds an implementation instance if the scope is set to module. - */ - static void* staticImpl; - - /** - * The component to which this wrapper refers. - */ - Component* component; - - /** - * The service on the component to which this wrapper refers. - */ - Service* service; - - /** - * A pointer to the interface which the service exposes. - */ - CPPInterface* interf; - - /** - * Set to true if the service is remotable. - */ - bool remotable; - - /** - * Pointer to the loaded library which contains the component - * implementation. - */ - Library* wrapperLibrary; - - /** - * Set the loaded library which contains the component - * implementation. - * @param lib The library. - */ - void setLibrary(Library* lib); - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_componentservicewrapper_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp deleted file mode 100644 index 2838bbe4d4..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/ExternalServiceWrapper.h" -#include - -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" - -#include "tuscany/sca/ws/WSServiceWrapper.h" -using tuscany::sca::ws::WSServiceWrapper; - -using namespace osoa::sca; - - -namespace tuscany -{ - namespace sca - { - - ////////////////////////////////////////////////////////////////////// - // Construction/Destruction - ////////////////////////////////////////////////////////////////////// - - ExternalServiceWrapper::ExternalServiceWrapper(tuscany::sca::model::WireTarget* target) - : ServiceWrapper(target) - { - LOGENTRY(1,"ExternalServiceWrapper::constructor"); - if (target->getServiceType() != WireTarget::ExternalServiceType) - { - throw ServiceRuntimeException("ExternalServiceWrapper: target is not an ExternalService"); - } - - LOGEXIT(1,"ExternalServiceWrapper::constructor"); - - } - - ExternalServiceWrapper::~ExternalServiceWrapper() - { - LOGENTRY(1,"ExternalServiceWrapper::destructor"); - LOGEXIT(1,"ExternalServiceWrapper::destructor"); - } - - // ====================================================================== - // createServiceWrapper: create a wrapper for the target ExternalService - // ====================================================================== - ExternalServiceWrapper* ExternalServiceWrapper::createServiceWrapper(ExternalService* service) - { - string msg; - ExternalServiceWrapper* serviceWrapper = 0; - - // ----------------------------------------------- - // Get the binding for the target component - // ----------------------------------------------- - Binding* targetBinding = service->getBinding(); - if (!targetBinding) - { - msg = "External service " + service->getName() + " has no binding defined"; - throw ServiceNotFoundException(msg.c_str()); - } - - // TODO: This only handles ws implementation for now - if (targetBinding->getBindingType() == Binding::WS) - { - // ------------------------------------- - // Create an instance of the wrapper - // ------------------------------------- - serviceWrapper = new WSServiceWrapper(service); - - } - else - { - // ---------------------- - // Non WS Binding - // ---------------------- - msg = "Unsupported binding type for externalService: " + service->getName(); - throw ServiceNotFoundException(msg.c_str()); - } - - return serviceWrapper; - } - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h deleted file mode 100644 index b2dcfb3a6b..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_externalservicewrapper_h -#define tuscany_sca_core_externalservicewrapper_h - -#include "osoa/sca/export.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/ExternalService.h" -using tuscany::sca::model::ExternalService; - -namespace tuscany -{ - namespace sca - { - - /** - * Wraps an SCA external service so that it can be called by a - * proxy. - * This abstract class will be extended by a class which supports - * a specific external service binding (for example, the web services binding). - */ - class SCA_API ExternalServiceWrapper : public ServiceWrapper - { - public: - /** - * Factory method to create a new ExternaServiceWrapper for a given - * external service described in the SCA module. - */ - static ExternalServiceWrapper* createServiceWrapper(ExternalService* service); - - /** - * Constructor. - * @param target The target external service for which this wrapper is to be - * created. - * @return A wrapper that references the given target. - */ - ExternalServiceWrapper(tuscany::sca::model::WireTarget* target); - - /** - * Destructor. - */ - virtual ~ExternalServiceWrapper(); - - /** - * Return the external service (in the runtime model) that is wrapped by - * the instance of this class. - */ - virtual ExternalService* getExternalService() {return (ExternalService*)getTarget();}; - - /** - * All business method calls to the external service go through the invoke method. - * This is a delegated method which will be implemented by the subclass. - * @param operation The details of the method, paramaters and return value for the - * business method to be called on the external service. - */ - virtual void invoke(Operation& operation) = 0; - private: - - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_externalservicewrapper_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp deleted file mode 100644 index ea9dfdb15a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/Operation.h" -#include - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" - - - -namespace tuscany -{ - namespace sca - { - // =========== - // Constructor - // =========== - Operation::Operation(const char* operationName, unsigned int numParameters) - : name(operationName), nparms(numParameters) - { - LOGENTRY(1,"Operation::constructor"); - - parameters = new void*[nparms]; - - LOGEXIT(1,"Operation::constructor"); - } - - // ========== - // Destructor - // ========== - Operation::~Operation() - { - LOGENTRY(1,"Operation::destructor"); - LOGEXIT(1,"Operation::destructor"); - } - - - // ============================================== - // getParameter: return parameter at position pos - // ============================================== - void* Operation::getParameter(unsigned int pos) - { - if (pos < nparms) - { - return parameters[pos]; - } - - return 0; - } - - // =========================================== - // setParameter: set parameter at position pos - // =========================================== - void Operation::setParameter(unsigned int pos, void* parm) - { - if (pos < nparms) - { - parameters[pos] = parm; - } - } - - // ==================================== - // setReturnValue: set the return value - // ==================================== - void Operation::setReturnValue(void* val) - { - returnType = val; - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h deleted file mode 100644 index 9e080363aa..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/Operation.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_operation_h -#define tuscany_sca_core_operation_h -#include "osoa/sca/export.h" - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - /** - * Holds the details of a single invocation of a business method. - * This class is used to pass the parameters and operation name from the - * client to a service. It will also hold the return value on the - * return from the business method. - */ - class Operation - { - public: - /** - * Create a new operation. - * @param operationName The method name of the business method to be invoked. - * @param numParameters The number of parameters to be passed. - */ - SCA_API Operation(const char* operationName, unsigned int numParameters); - - /** - * Destructor. - */ - SCA_API virtual ~Operation(); - - /** - * Return the operation name. - * @return The name of the operation. - */ - SCA_API const char* getName() {return name;} - - /** - * Set a parameter on the operation. - * @param pos The position of the parameter in the parameter list. - * @param parm Pointer to the parameter to be passed. - */ - SCA_API void setParameter(unsigned int pos, void* parm); - - /** - * Get a parameter from the operation. - * @param pos The position of the parameter in the parameter list. - * @return Pointer to the paramter at the given postion. Should be - * cast to the appropriate type. - */ - SCA_API void* getParameter(unsigned int pos); - - /** - * Get the return value on the operation. - * Normally the client - * would set the return value and the service will get this - * return value pointer and set the return value. - * @return Pointer to the return type. - */ - SCA_API void* getReturnValue() {return returnType;} - - /** - * Set the return value on the operation. - * Normally the client - * would set the return value pointer so that the service can - * return a value - * @param valPtr Pointer to the return type. - */ - SCA_API void setReturnValue(void* valPtr); - - private: - /** - * Operation name (method name). - */ - const char* name; - - /** - * Number of paramaters passed for this operation. - */ - unsigned int nparms; - - /** - * Pointer to the array of parameters. - */ - void** parameters; - - /** - * The return value. - */ - void* returnType; - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_operation_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp deleted file mode 100644 index a505ba9636..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/SCAEntryPoint.h" - -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" -#include "tuscany/sca/core/ExternalServiceWrapper.h" -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - // =========== - // Constructor - // =========== - SCAEntryPoint::SCAEntryPoint(const char* epName) - : subsystem(0), entrypoint(0), module(0) - { - LOGENTRY(1,"SCAEntryPoint::constructor"); - string message; - - // initialize the system if necessary - System* system = SCARuntime::getInstance()->getSystem(); - - string subsystemName; - string entrypointName; - - Utils::tokeniseUri(epName, subsystemName, entrypointName); - - // -------------------- - // locate the Subsystem - // -------------------- - subsystem = system->findSubsystem(subsystemName); - if (!subsystem) - { - throw EntryPointNotFoundException(epName); - } - - // --------------------- - // locate the EntryPoint - // --------------------- - entrypoint = subsystem->findEntryPoint(entrypointName); - if (entrypoint) - { - // found Subsystem EntryPoint - throw EntryPointNotFoundException("Subsystem EntryPoint not yet supported"); - } - else - { - // ----------------------------------- - // locate the EntryPoint in the Module - // ----------------------------------- - string moduleComponentName; - Utils::tokeniseUri(entrypointName, moduleComponentName, entrypointName); - module = subsystem->findModuleByComponentName(moduleComponentName); - if (module) - { - dataFactory = module->getDataFactory(); - entrypoint = module->findEntryPoint(entrypointName); - } - } - - if (!entrypoint) - { - throw EntryPointNotFoundException(epName); - } - - // --------------------------------- - // Get Wrappers for each wire target - // --------------------------------- - - // Get the target services from the EntryPoint - const EntryPoint::TARGETS& targets = entrypoint->getTargets(); - - // -------------------- - // Validate the request - // -------------------- - switch (entrypoint->getMultiplicity()) - { - case EntryPoint::ONE_MANY: - case EntryPoint::ONE_ONE: - { - if (targets.size() == 0) - { - message = "EntryPoint " + entrypoint->getName() + " not wired"; - throw ServiceNotFoundException(message.c_str()); - } - } - default: - { - } - } // end switch - - for (EntryPoint::TARGETS::const_iterator iter = targets.begin(); - iter!=targets.end(); - iter++) - { - ServiceWrapper* service = getServiceWrapper(*iter); - if (service) - { - services.push_back(service); - } - } - - LOGEXIT(1,"SCAEntryPoint::constructor"); - } - - // ========== - // Destructor - // ========== - SCAEntryPoint::~SCAEntryPoint() - { - LOGENTRY(1,"SCAEntryPoint::destructor"); - - // Delete any ServiceWrappers - for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++) - { - delete (*iter); - } - LOGEXIT(1,"SCAEntryPoint::destructor"); - } - - - // ====================================================================== - // invoke: - // ====================================================================== - SCA_API DataObjectPtr SCAEntryPoint::invoke(const char* operationName, DataObjectPtr inDataObject) - { - string message; - - // -------------------- - // Validate the request - // -------------------- - if (services.size() == 0) - { - message = "EntryPoint " + entrypoint->getName() + " not wired"; - throw ServiceNotFoundException(message.c_str()); - } - - // ------------------- - // Invoke each target - // ------------------- - Operation operation(operationName, 1); - operation.setParameter(0, &inDataObject); - DataObjectPtr ret; - operation.setReturnValue((void *)&ret); - - for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++) - { - (*iter)->invoke(operation); - } - - return ret; - } - - - // ====================================================================== - // getServiceWrapper: Create and return an instance of the ServiceWrapper - // ====================================================================== - ServiceWrapper* SCAEntryPoint::getServiceWrapper(WireTarget* target) - { - // ------------------------- - // Determine type of Service - // ------------------------- - switch (target->getServiceType()) - { - case WireTarget::ExternalServiceType: - { - // ---------------- - // External Service - // ---------------- - return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target); - } - - case WireTarget::ComponentServiceType: - { - // ----------------- - // Component Service - // ----------------- - return ComponentServiceWrapper::createServiceWrapper((Service*)target); - } - - default: - { - string message = "Undefined wire target type for : "; - message = message + target->getName(); - throw ServiceNotFoundException(message.c_str()); - } - } // end switch - } - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h deleted file mode 100644 index 34c9f3e0d8..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_scaentrypoint_h -#define tuscany_sca_core_scaentrypoint_h - -#include "osoa/sca/export.h" - -#include -using std::vector; -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/WireTarget.h" -#include "tuscany/sca/model/Subsystem.h" -#include "tuscany/sca/model/EntryPoint.h" -#include "tuscany/sca/model/Module.h" -using namespace tuscany::sca::model; -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; -using commonj::sdo::DataFactoryPtr; - -namespace tuscany -{ - namespace sca - { - /** - * A runtime class which is used by external bindings to provide the entry - * point into the SCA runtime. An entry point will be defined in an SCA - * module, and a binding class will be provided to service the - * communication between the external binding (e.g. for web services the - * SOAP/HTTP communication) and the SCA runtime. The binding class will - * use SCAEntryPoint to call into the SCA runtime. - */ - class SCAEntryPoint - { - public: - /** - * Constructor to create a new instance which will be associated with - * a given entry point in an SCA module. - * @param entryPointName The qualified name of the entry point in an - * SCA module. It is of the form - * "subsystem name"/"module component name"/"entry point name". - */ - SCA_API SCAEntryPoint(const char* entryPointName); - - /** - * Destructor. - */ - SCA_API virtual ~SCAEntryPoint(); - - /** - * Invokes an operation on the component to which the SCA entry point - * is wired in the SCA module. - * Note that the operation must take a single data object as a parameter, and - * the return is a single data object. - * @param operationName Name of the operation. - * @param inDataObject The parameter for the operation. - * @return The data object which holds the result of the operation. - */ - SCA_API virtual DataObjectPtr invoke(const char* operationName, DataObjectPtr inDataObject); - - /** - * Returns a SDO data factory from which all the types associated with the entry point - * and module can be created. - */ - SCA_API DataFactoryPtr getDataFactory() {return dataFactory;} - - protected: - - private: - /** - * The subsystem in which this entry point is found. - */ - Subsystem* subsystem; - - /** - * The entry point in the module. - */ - EntryPoint* entrypoint; - - /** - * The module component in the subsystem. - */ - Module* module; - - /** - * Cached data factory which has all the types defined for the module in which - * this entry point is found. - */ - DataFactoryPtr dataFactory; - - typedef vector SERVICES; - /** - * Vector of all the service wrappers created for this entry point. - * Used to destroy the wrappers when this class is destroyed. - */ - SERVICES services; - - /** - * Creates and returns the service wrapper for a given target. - * @param target The target of the wire for which a service wrapper is - * to be created. - * @return A service wrapper to be used for invoking the target implementation. - */ - ServiceWrapper* getServiceWrapper(WireTarget* target); - - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_scaentrypoint_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp deleted file mode 100644 index deca72c378..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.cpp +++ /dev/null @@ -1,288 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" - -#include "tuscany/sca/model/System.h" -#include "tuscany/sca/model/Subsystem.h" -#include "tuscany/sca/model/ModelLoader.h" - -#if defined(WIN32) || defined (_WINDOWS) -#include -#endif - -namespace tuscany -{ - namespace sca - { - /** - * Environment variable names - */ - static const char* TUSCANY_SCACPP = "TUSCANY_SCACPP"; - static const char* TUSCANY_SCACPP_SYSTEM_ROOT = "TUSCANY_SCACPP_SYSTEM_ROOT"; - static const char* TUSCANY_SCACPP_DEFAULT_MODULE = "TUSCANY_SCACPP_DEFAULT_MODULE"; - - - // ========================================================== - // Initialize static class member to not pointing at anything - // ========================================================== - SCARuntime* SCARuntime::instance = 0; - - - // =================================================================== - // Constructor for the SCARuntime class. This will be a singleton that - // holds all the information about the current runtime. - // =================================================================== - SCARuntime::SCARuntime() : system(new System()), defaultModule(0) - { - LOGENTRY(1, "SCARuntime::constructor"); - - // Locate the SCA install root - char* root = 0; - root = getenv(TUSCANY_SCACPP); - if (root == 0) - { - string msg = TUSCANY_SCACPP; - msg += " environment variable not set"; - throw SystemConfigurationException(msg.c_str()); - } - else - { - SCARoot = root; - } - - LOGEXIT(1, "SCARuntime::constructor"); - } - - // ============================================================= - // Get the instance of the runtime, creates it if does not exist - // static method - // ============================================================= - SCARuntime* SCARuntime::getInstance() - { - LOGENTRY(1, "SCARuntime::getInstance"); - - if (instance == NULL) - { - instance = new SCARuntime(); - - // Load the runtime - // Get root from environment variable TUSCANY_SCACPP_SYSTEM_ROOT - char* systemRoot = getenv(TUSCANY_SCACPP_SYSTEM_ROOT); - if (systemRoot == 0) - { - string msg = TUSCANY_SCACPP_SYSTEM_ROOT; - msg += " environment variable not set"; - throw SystemConfigurationException(msg.c_str()); - } - instance->load(systemRoot); - } - - LOGEXIT(1, "SCARuntime::getInstance"); - - return instance; - - } - - // ====================================== - // Load up all the details of the runtime - // ====================================== - void SCARuntime::load(const char *configurationRoot) - { - LOGENTRY(1, "SCARuntime::load"); - std::string root = configurationRoot; - - LOGINFO_1(2,"configuration root: %s", configurationRoot); - - ModelLoader loader(system); - // Load details of the module - loader.load(configurationRoot); - - LOGEXIT(1, "SCARuntime::load"); - } - - - // =================================== - // Return the top of the runtime model - // =================================== - System* SCARuntime::getSystem() - { - return system; - } - - - // =================================================== - // setCurrentComponent: push component for this thread - // =================================================== - void SCARuntime::setCurrentComponent(Component* component) - { - -#if defined(WIN32) || defined (_WINDOWS) - DWORD currentThreadId = GetCurrentThreadId(); -#else - pthread_t currentThreadId = pthread_self(); -#endif - COMPONENTS_MAP::iterator iter = components.find(currentThreadId); - if (iter == components.end()) - { - components[currentThreadId] = COMPONENT_STACK(); - iter = components.find(currentThreadId); - } - - COMPONENT_STACK& compStack = iter->second; - compStack.push(component); - } - - - // ==================================================== - // unsetCurrentComponent: pop component for this thread - // ==================================================== - Component* SCARuntime::unsetCurrentComponent() - { -#if defined(WIN32) || defined (_WINDOWS) - DWORD currentThreadId = GetCurrentThreadId(); -#else - pthread_t currentThreadId = pthread_self(); -#endif - - COMPONENTS_MAP::iterator iter = components.find(currentThreadId); - if (iter != components.end()) - { - COMPONENT_STACK& compStack = iter->second; - if (compStack.size() > 0) - { - Component* component = compStack.top(); - compStack.pop(); - return component; - } - } - - return 0; - } - - // ============================================================= - // getCurrentComponent: return current component for this thread - // ============================================================= - Component* SCARuntime::getCurrentComponent() - { -#if defined(WIN32) || defined (_WINDOWS) - DWORD currentThreadId = GetCurrentThreadId(); -#else - pthread_t currentThreadId = pthread_self(); -#endif - - COMPONENTS_MAP::iterator iter = components.find(currentThreadId); - if (iter == components.end()) - { - components[currentThreadId] = COMPONENT_STACK(); - iter = components.find(currentThreadId); - } - - COMPONENT_STACK& compStack = iter->second; - if (compStack.size() > 0) - { - return compStack.top(); - } - else - { - return 0; - } - - } - - - // =========================================== - // getCurrentModule: return the current module - // =========================================== - Module* SCARuntime::getCurrentModule() - { - // --------------------------------------------- - // Get module from current component if possible - // --------------------------------------------- - Component* comp = getCurrentComponent(); - if (comp != 0) - { - return comp->getModule(); - } - - // ---------------------- - // Get the default Module - // ---------------------- - string message; - if (!defaultModule) - { - // ------------------------------------------- - // Get the default module from the environment - // ------------------------------------------- - const char* defMod = getenv(TUSCANY_SCACPP_DEFAULT_MODULE); - if (!defMod) - { - message = TUSCANY_SCACPP_DEFAULT_MODULE; - message += " environment variable not set"; - throw SystemConfigurationException(message.c_str()); - } - - string subsystemName, moduleName; - Utils::tokeniseUri(defMod, subsystemName, moduleName); - - // --------------------------- - // Subsystem must be specified - // --------------------------- - Subsystem* subsystem = system->findSubsystem(subsystemName); - if (!subsystem) - { - message = "Default subsystem \'" + subsystemName + "\' not found"; - throw SystemConfigurationException(message.c_str()); - } - - // -------------------------------------------------------------------------- - // If module is not specified then get the default module for this subsystem. - // This will be the ONLY module for this subsystem - // -------------------------------------------------------------------------- - if (moduleName == "") - { - defaultModule = subsystem->getDefaultModule(); - if (!defaultModule) - { - message = "Default module not found for subsystem \'" + subsystemName + "\'"; - throw SystemConfigurationException(message.c_str()); - } - } - else - { - // ----------------------------- - // get the named ModuleComponent - // ----------------------------- - defaultModule = subsystem->findModuleByComponentName(moduleName); - if (!defaultModule) - { - message = "Default module \'" + moduleName + "\' not found in subsystem \'" + subsystemName +"\'"; - throw SystemConfigurationException(message.c_str()); - } - } - } - return defaultModule; - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h deleted file mode 100644 index 42deb85751..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/SCARuntime.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_scaruntime_h -#define tuscany_sca_core_scaruntime_h - -#include "osoa/sca/export.h" - -#include "osoa/sca/ComponentContext.h" -using osoa::sca::ComponentContext; - -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/System.h" -using namespace tuscany::sca::model; - -#if defined(WIN32) || defined (_WINDOWS) -#include -#else -#include -#endif - -#include -#include -#include -using namespace std; - -namespace tuscany -{ - namespace sca - { - - /** - * A singleton which represents the executing SCA runtime. - */ - class SCARuntime { - public: - /** - * Get the single instance. - * @return The single instance of the runtime. - */ - SCA_API static SCARuntime* getInstance(); - - /** - * Set the current component for the current thread. - * @param component The current component. - */ - SCA_API void setCurrentComponent(Component* component); - - /** - * Remove the current component from this thread, and return - * to the previous component (if there was one). - * @return The previous component. - */ - SCA_API Component* unsetCurrentComponent(); - - /** - * Get a pointer to the configured SCA system which this - * SCA runtime represents. - * The rest of the SCA configuration can be navigated from - * the System. - * @return The configured SCA system. - */ - System* getSystem(); - - /** - * The directory in which the Tuscany runtime has been installed. - */ - const string& getInstallRoot() {return SCARoot;} - - /** - * Return the current component for this thread. - * @return The current component for this thread. - */ - Component* getCurrentComponent(); - - /** - * Get the current module. The current module will either - * be the module in which the current component for this thread - * is defined, or it will be the default module if there is no current - * component. There will not be a current component if a client of - * the SCA runtime is making a call into the SCA runtime. - */ - Module* getCurrentModule(); - - private: - /** - * Default constructor is private to prevent more than one instance. - */ - SCARuntime(); - - /** - * Load the SCA configuration from the scdl files (sca.module, - * *.fragment, etc). - * This will create the runtime model from which the SCA runtime - * will operate. - * @param configurationRoot The path to the configuration of the - * SCA runtime. Under this root will be the subsystems and modules - * directories. - */ - void load(const char* configurationRoot); - - /** - * The single instance of this class. - */ - static SCARuntime* instance; - - /** - * Pointer to the top of the runtime model. - */ - System* system; - - /** - * The installed path of the Tuscany runtime. - */ - string SCARoot; - - /** - * Get the default module set for this runtime. - * @return The default module. - */ - Module* getDefaultModule() {return defaultModule;} - - /** - * The default module set for this runtime. - */ - Module* defaultModule; - - - typedef stack COMPONENT_STACK; -#if defined(WIN32) || defined (_WINDOWS) - typedef map COMPONENTS_MAP; -#else - typedef map COMPONENTS_MAP; -#endif - - /** - * A map of threads to components. - */ - COMPONENTS_MAP components; - }; - - - } // End namespace sca -} // End namespace tuscany - - - - -#endif // tuscany_sca_core_scaruntime_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp deleted file mode 100644 index ef2f2744eb..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/ServiceProxy.h" - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/CPPImplementation.h" - -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - // ============================ - // Constructor: Create a proxy - // ============================ - ServiceProxy::ServiceProxy(Component* component, const string& name, ServiceWrapper* target) - { - LOGENTRY(1,"ServiceProxy::constructor"); - string msg; - - // ---------------------- - // Get the implementation - // ---------------------- - Implementation* impl = component->getImplementation(); - if (!impl) - { - msg = "Component " + component->getName() + " has no implementation defined"; - throw ServiceNotFoundException(msg.c_str()); - } - - // TODO: This only handle CPP implementation for now - if (impl->getImplementationType() == Implementation::CPP) - { - // ---------------------------------------------------- - // Get implementation dll name and service factory name - // ---------------------------------------------------- - string dllName = ((CPPImplementation*)impl)->getDll(); - string headerStub = ((CPPImplementation*)impl)->getHeaderStub(); - - string fullDllName = component->getModule()->getRoot() + "/" + dllName; - string proxyFactoryName = headerStub + "_" + name + "_Proxy_Factory"; - string proxyDestructorName = headerStub + "_" + name + "_Proxy_Destructor"; - typedef void* (* PROXYFACTORY) (ServiceWrapper*); - - // ------------ - // Load the dll - // ------------ - proxyLibrary = Library(fullDllName); - - // ------------------------- - // Locate the factory method - // ------------------------- - PROXYFACTORY proxyFactory = (PROXYFACTORY)proxyLibrary.getSymbol(proxyFactoryName); - if (!proxyFactory) - { - LOGERROR_2(1, "ComponentContextImpl::getServiceProxy: Unable to locate %s in library %s", - proxyFactoryName.c_str(), fullDllName.c_str()); - msg = "Unable to locate " + proxyFactoryName + " in library " + fullDllName; - throw ServiceNotFoundException(msg.c_str()); - } - - // ----------------------------------- - // Now create an instance of the proxy - // ----------------------------------- - proxy = proxyFactory(target); - if (!proxy) - { - LOGERROR_2(1, "ComponentContextImpl::getServiceProxy: Factory method %s in library %s returned null", - proxyFactoryName.c_str(), fullDllName.c_str()); - msg = "Factory method " + proxyFactoryName + " in library " + fullDllName + " returned null"; - throw ServiceNotFoundException(msg.c_str()); - } - - // ------------------------- - // Get the destructor method - // ------------------------- - destructor = (PROXYDESTRUCTOR)proxyLibrary.getSymbol(proxyDestructorName); - } - - LOGEXIT(1,"ServiceProxy::constructor"); - - } - - // ========== - // Destructor - // ========== - ServiceProxy::~ServiceProxy() - { - LOGENTRY(1,"ServiceProxy::destructor"); - - // Delete the proxy - if (destructor) - { - destructor(proxy); - } - LOGEXIT(1,"ServiceProxy::destructor"); - } - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h deleted file mode 100644 index 073b379cd7..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceProxy.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_serviceproxy_h -#define tuscany_sca_core_serviceproxy_h - -#include "osoa/sca/export.h" - -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/util/Library.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - /** - * Holds a proxy for a given component and reference. - * The proxy which is held inside a ServiceProxy will be specific to the component - * and reference and will have been code generated and be contained in a dll - * created by a developer of an SCA application. - */ - class ServiceProxy - { - public: - /** - * Create a new service proxy for a given component and reference name. The - * create proxy will contain a pointer to the target ServiceWrapper. - * @param component The component for which this proxy will be created (the - * source component). - * @param name The name of the reference on the component. - * @param target The wrapper of the component which is wired to this component and - * reference. - */ - ServiceProxy(Component* component, const string& name, ServiceWrapper* target); - - /** - * Destructor. - */ - virtual ~ServiceProxy(); - - /** - * Return an instance of the proxy created for this particular component and reference. - * @return The proxy. - */ - void* getProxy() {return proxy;} - - - private: - /** - * Holds the instance of the code generated proxy. - */ - void* proxy; - - typedef void (* PROXYDESTRUCTOR) (void*); - - /** - * A function pointer to the destructor of the proxy. - */ - PROXYDESTRUCTOR destructor; - - /** - * The library which contains the code for the proxy. - */ - Library proxyLibrary; - - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_serviceproxy_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp deleted file mode 100644 index 5936f526f1..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/core/ServiceWrapper.h" -#include - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" - - - -namespace tuscany -{ - namespace sca - { - - // =========== - // Constructor - // =========== - ServiceWrapper::ServiceWrapper(WireTarget* targ) - : target(targ) - { - LOGENTRY(1,"ServiceWrapper::constructor"); - - LOGEXIT(1,"ServiceWrapper::constructor"); - - } - - // ========== - // Destructor - // ========== - ServiceWrapper::~ServiceWrapper() - { - LOGENTRY(1,"ServiceWrapper::destructor"); - LOGEXIT(1,"ServiceWrapper::destructor"); - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h deleted file mode 100644 index 21c162d77f..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/core/ServiceWrapper.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_core_servicewrapper_h -#define tuscany_sca_core_servicewrapper_h - -#include "osoa/sca/export.h" - -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/WireTarget.h" -using tuscany::sca::model::WireTarget; - -namespace tuscany -{ - namespace sca - { - /** - * An abstract class that wraps a component implementation or an external - * service. - */ - class SCA_API ServiceWrapper - { - public: - /** - * Constructor. - * @param target The service wrapper wraps the target of a wire. - */ - ServiceWrapper(WireTarget* target); - - /** - * Destructor. - */ - virtual ~ServiceWrapper(); - - /** - * Get the target represented by this wrapper. - * @return The target represented by this wrapper. - */ - virtual WireTarget* getTarget() {return target;} - - /** - * All business method calls on the target service are performed through - * this invoke method. - * @param operation The details of the method, paramaters and return value for the - * business method to be called on the target service. - */ - virtual void invoke(Operation& operation) = 0; - private: - /** - * The target represented by this wrapper. - */ - WireTarget* target; - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_servicewrapper_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp deleted file mode 100644 index c312d7a077..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/Binding.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Binding::Binding(const string& uri) : uri(uri) - { - } - - Binding::~Binding() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h deleted file mode 100644 index ff97990dc6..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Binding.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_binding_h -#define tuscany_sca_model_binding_h -#include -using std::string; - - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about the binding for EntryPoint and ExternalService. An - * abstract class which will be extended by classes that hold specific - * information for each type of binding. - */ - class Binding - { - - public: - /** - * Supported binding types. - */ - enum Type - { - WS, - SCA - }; - - /** - * Constructor to create a new binding. - * @param uri The uri specified in the scdl file. - */ - Binding(const string& uri); - - /** - * Destructor. - */ - virtual ~Binding(); - - /** - * Return the enumerated type of binding. - * @return The type of the binding (see Binding#Type). - */ - virtual Type getBindingType() = 0; - - /** - * Return the uri of the binding. - * @return The uri of the binding. - */ - string getUri() {return uri;}; - - private: - /** - * The uri of the binding. - */ - string uri; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_binding_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp deleted file mode 100644 index 7212e777b1..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/CPPImplementation.h" -#include "tuscany/sca/util/Utils.h" - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - CPPImplementation::CPPImplementation(const string& dllName, const string& head, const string& classN) - : dll(dllName), header(head), className(classN) - { - // Separate any path element - Utils::rTokeniseString("/", head, headerPath, headerStub); - if (headerPath != "") - { - headerPath += "/"; - } - - // Determine the header stub name - string tmp; - Utils::rTokeniseString(".h", headerStub, headerStub, tmp); - } - - CPPImplementation::~CPPImplementation() - { - } - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h deleted file mode 100644 index 0294649af7..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPImplementation.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_cppimplementation_h -#define tuscany_sca_model_cppimplementation_h -#include "tuscany/sca/model/Implementation.h" - -#include -using std::map; -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Holds informatio about an SCA implementation written in C++ - */ - class CPPImplementation : public Implementation - { - - public: - /** - * Constructor. - * @param dllName Name of the shared library. - * @param header Name of the header file that contains the class declaring the - * implementation class. - * @param className Name of the class in the header file (could be a blank string - * if this is not specified). - */ - CPPImplementation(const string& dllName, const string& header, const string& className); - - /** - * Destructor - */ - virtual ~CPPImplementation(); - - /** - * Return the implementation type. - * @return Always returns CPP. - */ - virtual Type getImplementationType() {return CPP;} - - /** - * Returns the name of the shared library. - * @return The name of the shared library. - */ - const string& getDll() {return dll;} - - /** - * Get the name of the header file. - * @return Name of the header file. - */ - const string& getHeader() {return header;} - - /** - * Get the header file name without the extension. - * @return The name of the header file without any extension. - */ - const string& getHeaderStub() {return headerStub;} - - /** - * Get the header path. - * @return The pathe element of the header. - */ - const string& getHeaderPath() {return headerPath;} - - /** - * Get the name of the class. - * @return The class name if specified. - */ - const string& getClass() {return className;} - private: - /** - * Name of the shared library. - */ - string dll; - - /** - * Name of the header file describing the interface. - */ - string header; - - /** - * Name of the header file without the extension. - */ - string headerStub; - - /** - * Path element of the header. - */ - string headerPath; - - /** - * Name of the class in the header file declaring the implementation. - * May be an empty string if not set in the SCDL file. - */ - string className; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_cppimplementation_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp deleted file mode 100644 index 015b54c259..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/CPPInterface.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - CPPInterface::CPPInterface( - const string& head, - const string& classN, - const string& scop, - bool remote) - : header(head), className(classN), remotable(remote) - { - string::size_type dot = header.rfind(".h"); // this will also find .hpp - if (dot != string::npos) - { - headerStub = header.substr(0, dot); - } - else - { - headerStub = header; - } - - if (scop == "module") - { - scope = MODULE; - } - else - { - scope = STATELESS; - } - } - - CPPInterface::~CPPInterface() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h deleted file mode 100644 index 7b37b1892e..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/CPPInterface.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_cppinterface_h -#define tuscany_sca_model_cppinterface_h - -#include "tuscany/sca/model/Interface.h" - - -#include -using std::map; -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Holds information about an interface described using a C++ - * header file. - */ - class CPPInterface : public Interface - { - - public: - /** - * Constuctor. - * @param header Name of the header file containing the class that - * describes the interface. - * @param className Name of the class in the header file that - * describes the interface. - * @param scope The scope of the interface (stateless or module). - * @param remotable True if the interface is remotable. - */ - CPPInterface( - const string& header, - const string& className, - const string& scope, - bool remotable); - - /** - * Destructor. - */ - virtual ~CPPInterface(); - - /** - * Return the type of the interface. - * @return Always returns CPP. - */ - virtual Type getInterfaceType() {return CPP;} - - /** - * Get the name of the header file. - * @return The name of the header file containing the definition of the - * interface. - */ - const string& getHeader() {return header;} - - /** - * Return the name of the header file without the extension. - * @return Header file name without any extension. - */ - const string& getHeaderStub() {return headerStub;} - - /** - * Get the name of the class. - * @return The name of the class defining the interface. - */ - const string& getClass() {return className;} - - /** - * Scope of interface. - */ - enum SCOPE - { - MODULE, - STATELESS - }; - - /** - * Get the scope of the interface. - * @return The scope of the interface. - */ - SCOPE getScope() {return scope;} - - /** - * Return whether the interface is remotable or local. - * @return True if the interface is remotable, otherwise false. - */ - bool getRemotable() {return remotable;} - - private: - /** - * Name of the header file containing the definition of the interface. - */ - string header; - - /** - * Name of the header file without the extension. - */ - string headerStub; - - /** - * Name of the class in the header file. - */ - string className; - - /** - * Scope of the interface. - */ - SCOPE scope; - - /** - * Remotable interface or not. - */ - bool remotable; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_cppinterface_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp deleted file mode 100644 index 3e52591b3d..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -// Component.cpp : Represent a loaded Component -// -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Component.h" - -using namespace commonj::sdo; - -namespace tuscany -{ - namespace sca - { - namespace model - { - // Constructor - Component::Component(const std::string& componentName, Module* module) - : name(componentName), containingModule(module), implementation(0) - { - LOGENTRY(1, "Component::constructor"); - LOGINFO_1(3, "Component::constructor: Component name: %s", name.c_str()); - LOGEXIT(1, "Component::constructor"); - } - - Component::~Component() - { - } - - Service* Component::addService(const std::string& serviceName) - { - Service* service = new Service(serviceName, this); - services[serviceName] = service; - return service; - } - - Service* Component::findService(const std::string& serviceName) - { - // If serviceName is null then return the ONLY service - if (serviceName == "" - && services.size() == 1) - { - return services.begin()->second; - } - else - { - return services[serviceName]; - } - } - - ServiceReference* Component::findReference(const std::string& referenceName) - { - return references[referenceName]; - } - - ServiceReference* Component::addReference(const std::string& referenceName) - { - ServiceReference* serviceReference = references[referenceName]; - if (!serviceReference) - { - references[referenceName] = new ServiceReference(referenceName); - } - return references[referenceName]; - } - - void Component::setImplementation(Implementation* impl) - { - implementation = impl; - } - - void Component::addProperty(const string& name, - const string& type, - bool many, - bool required, - const char* defaultValue) - { - // Create a Type in the Properties dataFactory - DataFactoryPtr factory = getPropertyDataFactory(); - - string typeUri, typeName; - Utils::tokeniseQName(type, typeUri, typeName); - - if (typeUri == "http://www.w3.org/2001/XMLSchema") - { - typeUri = Type::SDOTypeNamespaceURI; - if (typeName == "string") - { - typeName = "String"; - } - else if (typeName == "anyType") - { - typeName = "DataObject"; - } - else if (typeName == "int") - { - typeName = "Integer"; - } - else if (typeName == "integer") - { - typeName = "Integer"; - } - else if (typeName == "negativeInteger") - { - typeName = "Integer"; - } - else if (typeName == "nonNegativeInteger") - { - typeName = "Integer"; - } - else if (typeName == "positiveInteger") - { - typeName = "Integer"; - } - else if (typeName == "nonPositiveInteger") - { - typeName = "Integer"; - } - else if (typeName == "unsignedLong") - { - typeName = "Integer"; - } - else if (typeName == "unsignedShort") - { - typeName = "Integer"; - } - else if (typeName == "unsignedInt") - { - typeName = "Long"; - } - else if (typeName == "long") - { - typeName = "Long"; - } - else if (typeName == "double") - { - typeName = "Double"; - } - else if (typeName == "short") - { - typeName = "Short"; - } - else if (typeName == "unsignedByte") - { - typeName = "Short"; - } - else if (typeName == "float") - { - typeName = "Float"; - } - else if (typeName == "boolean") - { - typeName = "Boolean"; - } - else if (typeName == "byte") - { - typeName = "Byte"; - } - else if (typeName == "base64Binary") - { - typeName = "Bytes"; - } - else if (typeName == "hexBinary") - { - typeName = "Bytes"; - } - else if (typeName == "anyURI") - { - typeName = "URI"; - } - else if (typeName == "QName") - { - typeName = "URI"; - } - else - { - // Default unknown xs: types to string?? - typeName = "String"; - } - } - else - { - // It's not an XML type - } - - - factory->addPropertyToType( - "org/osoa/sca", - "Properties", - name.c_str(), - typeUri.c_str(), - typeName.c_str(), - many, - false, - true); - - // Set the default - - - // Add to list of required properties - if (required) - { - } - } - - DataFactoryPtr Component::getPropertyDataFactory() - { - if (!propertyFactory) - { - propertyFactory = DataFactory::getDataFactory(); - // Add the root type - propertyFactory->addType("org/osoa/sca", "Properties", false, false, false, false); - } - return propertyFactory; - } - - DataObjectPtr Component::getProperties() - { - if (!properties) - { - properties = getPropertyDataFactory()->create("org/osoa/sca", "Properties"); - } - return properties; - } - - void Component::addProperties(DataObjectPtr values) - { - if (!values) - { - return; - } - - DataObjectPtr props = getProperties(); - - PropertyList pl = values->getInstanceProperties(); - for (int i=0; i < pl.size(); i++) - { - if (!values->isSet(i)) - { - continue; - } - - // Add the property value to the component to be resolved later - string propName = pl[i].getName(); - - // Get the property's type - try - { - const Property& propProperty = props->getProperty(pl[i].getName()); - const Type& propType = propProperty.getType(); - - DataObjectList& proplist = values->getList(pl[i]); - for (int proplistI=0; proplistIgetList(pl[i]); - dol.append(proplist.getCString(proplistI)); - } - else - { - props->setCString(pl[i], proplist.getCString(proplistI)); - } - } - else - { - // Create a new instance of the DO - // iterate over properties setting each one - } - } - } - catch (SDOPropertyNotFoundException&) - { - // Configuration error: property is not defined - string message = "Undefined property: " + propName; - throw SystemConfigurationException(message.c_str()); - } - - } - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h deleted file mode 100644 index f40690c859..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Component.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_component_h -#define tuscany_sca_model_component_h - -#include -using std::string; - -#include - -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Implementation.h" -#include "tuscany/sca/model/ServiceReference.h" - -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; -using commonj::sdo::DataFactoryPtr; - -namespace tuscany -{ - namespace sca - { - namespace model - { - - class Module; - - /** - * Information about an SCA component. - */ - class Component - { - public: - /** - * Constructor - * @param name The name of the component. - * @param module The module containing this component. - */ - Component(const std::string& name, Module* module); - - /** - * Destructor. - */ - virtual ~Component(); - - /** - * Returns the name of the component. - * @return The name of the component. - */ - const string& getName() {return name;} - - /** - * Get the module containing this component. - * @return The containing module. - */ - Module* getModule() {return containingModule;} - - /** - * Add a new service to this component. - * @param serviceName The name of the service to add. - * @return The newly added service. - */ - Service* addService(const std::string& serviceName); - - /** - * Find an existing service on this component. - * @param serviceName The name of the service to find. - * If the serviceName is the zero length string then if there is - * only one service it will be returned. - * @return The found service, or 0 if not found. - */ - Service* findService(const std::string& serviceName); - - /** - * Add a new reference to this component. - * @param referenceName The name of the reference to add. - * @return The newly added reference. - */ - ServiceReference* addReference(const std::string& referenceName); - - /** - * Find an existing reference on this component. - * @param referenceName The name of the reference to find. - * @return The found reference, or 0 if not found. - */ - ServiceReference* findReference(const std::string& referenceName); - - /** - * Set the details of the implementation of this component. - * @param impl The details of the implementation. - */ - void setImplementation(Implementation* impl); - - /** - * Returns the details of the implementation of this component. - * @return The details of the implementation. - */ - Implementation* getImplementation() {return implementation;} - - /** - * Add a new property to this component. Properties are - * added one at a time. The property definitions come from the component - * type file. - * @param name The name of the property. - * @param type The full name of the type (including uri and local name). - * @param many True if this is a many valued property. - * @param required True if this property must have a value set. - * @param defaultValue The default value if the property does not have a - * value set. - */ - void addProperty(const string& name, - const string& type, - bool many, - bool required, - const char* defaultValue = 0); - - /** - * Add the property values to the properties defined on this - * component. The values will come from the sca.module file. - * @param properties A data object representing all the values set - * for this component. - */ - void addProperties(DataObjectPtr properties); - - /** - * Returns a data object from which all the properties and their - * values can be accessed. - * @return A data object holding the property values. - */ - DataObjectPtr getProperties(); - private: - /** - * Name of the component. - */ - string name; - - /** - * Module containing this component for navigating up the tree. - */ - Module* containingModule; - - /** - * Information about the implementation of this component. - */ - Implementation* implementation; - - typedef std::map SERVICE_MAP; - /** - * Map of all the services defined on this component. - */ - SERVICE_MAP services; - - typedef std::map REFERENCE_MAP; - /** - * Map of all the references defined on this component. - */ - REFERENCE_MAP references; - - /** - * SDO data factory which has all the property types defined from - * the component type file - */ - DataFactoryPtr propertyFactory; - - /** - * Return the SDO data factory which has the property types defined - * in it. - * @return The data factory. - */ - DataFactoryPtr getPropertyDataFactory(); - - /** - * The properties and their values for this component. - */ - DataObjectPtr properties; - - }; - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_component_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp deleted file mode 100644 index 3ca0f8cc5e..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/EntryPoint.h" -#include "tuscany/sca/util/Exceptions.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - EntryPoint::EntryPoint(const std::string& epName) - : name(epName) - { - LOGENTRY(1, "EntryPoint::constructor"); - LOGERROR_1(0, "EntryPoint::constructor: EntryPoint name: %s", name.c_str()); - LOGEXIT(1, "EntryPoint::constructor"); - } - - EntryPoint::~EntryPoint() - { - } - - void EntryPoint::addTarget(WireTarget* targ) - { - if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE) - { - if (targets.size() > 0) - { - // throw exception - string message = "Duplicate wire for reference: " + name; - throw SystemConfigurationException(message.c_str()); - } - } - - // TODO - must be remotable - - targets.push_back(targ); - } - - void EntryPoint::setMultiplicity(const std::string& multip) - { - if (multip == "0..1") - { - multiplicity = ZERO_ONE; - } - else if (multip == "1..1") - { - multiplicity = ONE_ONE; - } - else if (multip == "0..n") - { - multiplicity = ZERO_MANY; - } - else if (multip == "1..n") - { - multiplicity = ONE_MANY; - } - else - { - string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name; - throw SystemConfigurationException(msg.c_str()); - } - } - - void EntryPoint::setInterface(Interface* interf) - { - iface = interf; - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h deleted file mode 100644 index f6e4b485f9..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/EntryPoint.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_entrypoint_h -#define tuscany_sca_model_entrypoint_h - -#include -using std::string; -#include -using std::vector; - -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/model/WireTarget.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Represents the information about an entry point. - */ - class EntryPoint - { - - public: - /** - * Constructor. - * @param name The name of the entry point. - */ - EntryPoint(const std::string& name); - - /** - * Destructor. - */ - virtual ~EntryPoint(); - - /** - * Return the name of the entry point. - * @return The name of the entry point. - */ - const string& getName() {return name;} - - /** - * How many wires can be wired from this entry point. - */ - enum Multiplicity - { - ZERO_ONE, - ONE_ONE, - ZERO_MANY, - ONE_MANY - }; - - /** - * Set the multiplicity of this entry point. - * @param multiplicity One of 0..1, 1..1, 0..n, 1..n - */ - void setMultiplicity(const std::string& multiplicity); - - /** - * Return the multiplicity of this entry point (how - * many wires can be wired from this entry point). - * @return The multiplicity. - */ - Multiplicity getMultiplicity() {return multiplicity;} - - /** - * Set the interface describing this entry point. - * @param iface The interface. - */ - void setInterface(Interface* iface); - - /** - * Get the interface describing this entry point. Use - * Interface#getType to find out the type of interface - * describing this entry point. - * @return iface The interface. - */ - Interface* getInterface() {return iface;} - - /** - * Add a target to the entry point. - * @param target Add a target (derived from a wire) to - * the entry point. - */ - void addTarget(WireTarget* target); - typedef vector TARGETS; - - /** - * Get a vector of targets added to this entry point. - */ - const TARGETS& getTargets() {return targets;} - private: - /** - * Name of the entry point. - */ - string name; - - /** - * The interface describing this entry point. - */ - Interface* iface; - - /** - * The multiplicity of this entry point.. - */ - Multiplicity multiplicity; - - /** - * The vector of targets added to this entry point. - */ - TARGETS targets; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_entrypoint_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp deleted file mode 100644 index c0e3afc682..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/ExternalService.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - ExternalService::ExternalService(const std::string& serviceName, Module *module) - : WireTarget(serviceName), containingModule(module) - { - LOGENTRY(1, "ExternalService::constructor"); - LOGERROR_1(0, "ExternalService::constructor: ExternalService name: %s", getName().c_str()); - LOGEXIT(1, "ExternalService::constructor"); - } - - ExternalService::~ExternalService() - { - delete binding; - } - - void ExternalService::setBinding(Binding* bind) - { - binding = bind; - } - - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h deleted file mode 100644 index fe9640d1b8..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ExternalService.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_externalservice_h -#define tuscany_sca_model_externalservice_h - -#include - -#include "tuscany/sca/model/WireTarget.h" -#include "tuscany/sca/model/Binding.h" - -namespace tuscany -{ - namespace sca - { - - namespace model - { - class Module; - - /** - * Information about an external service. - */ - class ExternalService : public WireTarget - { - public: - /** - * Constructor. - * @param name The name of the external service. - * @param module The module containing this external service. - */ - ExternalService(const std::string& name, Module *module); - - /** - * Destructor. - */ - virtual ~ExternalService(); - - /** - * Return the type of service. - * @return Always returns ExternalServiceType - */ - virtual Type getServiceType() {return ExternalServiceType;} - - /** - * Set the binding for this external service. - * @param binding The binding to set. - */ - virtual void setBinding(Binding* binding); - - /** - * Get the binding set for this external service. - * @return The binding. - */ - virtual Binding* getBinding() {return binding;}; - - /** - * Get the module containing this external service. - * @return The containing module. - */ - Module* getContainingModule() {return containingModule;}; - - private: - /** - * The binding for this external service. - */ - Binding* binding; - - /** - * The module containing this external service. - */ - Module* containingModule; - - - }; - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_externalservice_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp deleted file mode 100644 index 9703d1bab3..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/Implementation.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Implementation::Implementation() - { - } - - Implementation::~Implementation() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h deleted file mode 100644 index 17414c359b..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Implementation.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_implementation_h -#define tuscany_sca_model_implementation_h - -#include - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Abstract class representing information about an implementation - * of a component. The subtypes will hold information specific to - * the type of implementation. - */ - class Implementation - { - - public: - /** - * Supported types of implementation. - */ - enum Type - { - CPP, - JAVA - }; - - Implementation(); - virtual ~Implementation(); - - /** - * Return the type of the implementation. - * @return Will depend on the subtype. - */ - virtual Type getImplementationType() = 0; - - private: - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_implementation_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp deleted file mode 100644 index 9e0aa45889..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/Interface.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Interface::Interface() - { - } - - Interface::~Interface() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h deleted file mode 100644 index 24bb43224b..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Interface.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_interface_h -#define tuscany_sca_model_interface_h - -#include - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about an interface. Subtypes will hold information - * specific to a type of interface. - */ - class Interface - { - - public: - /** - * The supported types of interface. - */ - enum Type - { - CPP, - JAVA - }; - - Interface(); - virtual ~Interface(); - - /** - * Returns the type of the interface. - * @return Will depend on the subtype. - */ - virtual Type getInterfaceType() = 0; - - private: - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_interface_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp deleted file mode 100644 index 751bbe0c9c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.cpp +++ /dev/null @@ -1,1555 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "osoa/sca/export.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/ModelLoader.h" -#include "tuscany/sca/model/CPPImplementation.h" -#include "tuscany/sca/model/CPPInterface.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/WSBinding.h" - - -using namespace commonj::sdo; - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - // =========== - // Constructor - // =========== - ModelLoader::ModelLoader(System* system) : system(system) - { - LOGENTRY(1, "ModelLoader::constructor"); - - - LOGEXIT(1, "ModelLoader::constructor"); - } - - // ========== - // Destructor - // ========== - ModelLoader::~ModelLoader() - { - } - - // ========================================================= - // load: Load the runtime model from the deployed xml files - // This class has the responsibility for translating from - // the SCA scdl files to the SCA runtime's in memory model. - // ========================================================= - void ModelLoader::load(const char* configurationRoot) - { - LOGENTRY(1, "ModelLoader::load"); - LOGINFO_1(2,"configuration root: %s", configurationRoot); - - // The configuration root path will point to a directory structure: - // root/ - // The sca.subsystem files can be located anywhere under this directory - // structure. - loadSubsystems(configurationRoot); - - // sca.module files represent the root of a module, and can occur anywhere - // under the directory structure - loadModules(configurationRoot); - - system->resolveWires(); - LOGEXIT(1, "ModelLoader::load"); - } - - // ======================================================================== - // loadSubsystems: - // Load all the subsystems from any directory below the configuration root. - // Translate the subsystem information to the runtime information - // ======================================================================== - void ModelLoader::loadSubsystems(const char* configurationRoot) - { - // Get all the sca.subsystem files in the module - LOGENTRY(1, "ModelLoader::loadSubsystems"); - Files files(configurationRoot, "sca.subsystem", true); - for (unsigned int i=0; i < files.size(); i++) - { - loadSubsystemFile(files[i]); - } - LOGEXIT(1, "ModelLoader::loadSubsystems"); - } - - - // ===================================================================== - // loadSubsystemFile: - // This method is called for each sca.subsystem file found in the module - // folder structure - // ===================================================================== - void ModelLoader::loadSubsystemFile(const File& file) - { - LOGENTRY(1, "ModelLoader::loadSubsystemFile"); - LOGINFO_1(2, "subsystem filename: %s", file.getFileName().c_str()); - - try - { - string filename = file.getDirectory() + "/" + file.getFileName(); - XMLDocumentPtr subsystemFile = getXMLHelper()->loadFile(filename.c_str()); - if (subsystemFile->getRootDataObject() == 0) - { - LOGERROR_1(0, "ModelLoader::loadSubsystemFile: Unable to load file: %s", filename.c_str()); - } - else - { - //Utils::printDO(subsystemFile->getRootDataObject()); - mapSubsystem(subsystemFile->getRootDataObject()); - } - } catch (SDORuntimeException ex) - { - LOGERROR_1(0, "ModelLoader::loadSubsytemFile: Exception caught: %s", ex.getMessageText()); - } - - LOGEXIT(1, "ModelLoader::loadSubsystemFile"); - } - - // =============== - // mapSubsystem: - // =============== - void ModelLoader::mapSubsystem(DataObjectPtr root) - { - LOGENTRY(1, "ModelLoader::mapSubsystem"); - - LOGINFO_1(2, "ModelLoader::mapSubsystem: Loaded subsystem: %s", root->getCString("name")); - - Subsystem* subsystem; - subsystem = system->addSubsystem(root->getCString("name")); - - DataObjectList& Modules = root->getList("moduleComponent"); - LOGINFO_1(2, "ModelLoader::mapSubsystem: number of module components: %d", Modules.size()); - - // Iterate over module components - for (int i=0; iaddModuleComponent(Modules[i]->getCString("name"), Modules[i]->getCString("module")); - } - - - /// @todo Add external services and entry points - - - LOGEXIT(1, "ModelLoader::mapSubsystem"); - } - - - // ===================================================================== - // loadModules: - // Load all the modules from any directory below the configuration root. - // Translate the module information to the runtime information - // ===================================================================== - void ModelLoader::loadModules(const char* configurationRoot) - { - // Get all the sca.module files in the module - LOGENTRY(1, "ModelLoader::loadModules"); - Files files(configurationRoot, "sca.module", true); - for (unsigned int i=0; i < files.size(); i++) - { - loadModuleFile(files[i]); - } - LOGEXIT(1, "ModelLoader::loadModules"); - } - - - // ==================================================================== - // loadModuleFile: - // This method is called for each sca.module file found in the module - // folder structure - // The location of this module file will indicate the root of a module - // ==================================================================== - void ModelLoader::loadModuleFile(const File& file) - { - LOGENTRY(1, "ModelLoader::loadModuleFile"); - LOGINFO_1(2, "module filename: %s", file.getFileName().c_str()); - - try - { - string filename = file.getDirectory() + "/" + file.getFileName(); - - XMLDocumentPtr moduleFile = getXMLHelper()->loadFile(filename.c_str()); - if (moduleFile->getRootDataObject() == 0) - { - LOGERROR_1(0, "ModelLoader::loadModuleFile: Unable to load file: %s", filename.c_str()); - } - else - { - string moduleName = moduleFile->getRootDataObject()->getCString("name"); - mapModule(moduleName, moduleFile->getRootDataObject(), file.getDirectory()); - - // -------------------------------------------------------------- - // Load any module Fragments in the same folder as the sca.module - // -------------------------------------------------------------- - Files files(file.getDirectory(), "*.fragment", false); - for (unsigned int i=0; i < files.size(); i++) - { - filename = file.getDirectory() + "/" + files[i].getFileName(); - moduleFile = getXMLHelper()->loadFile(filename.c_str()); - if (moduleFile->getRootDataObject() == 0) - { - LOGERROR_1(0, "ModelLoader::loadModuleFile: Unable to load file: %s", filename.c_str()); - } - else - { - mapModule(moduleName, moduleFile->getRootDataObject(), file.getDirectory()); - } - } - - // Load the xsd types and wsdl files in the module - loadModuleConfig(file.getDirectory(), moduleName); - } - - } catch (SDORuntimeException ex) - { - LOGERROR_1(0, "ModelLoader::loadModuleFile: Exception caught: %s", ex.getMessageText()); - } - - LOGEXIT(1, "ModelLoader::loadModuleFile"); - } - - // =========== - // mapModule - // =========== - void ModelLoader::mapModule(const string& moduleName, DataObjectPtr root, string moduleRootDir) - { - LOGENTRY(1, "ModelLoader::mapModule"); - - LOGINFO_2(2, "ModelLoader::mapModule: Loading module: %s, root Dir: %s", moduleName.c_str(), moduleRootDir.c_str()); - - // Find the ModuleComponent(s) that refer to this module. If a ModuleComponent does not refer to this - // module then ignore it - MODULE_LIST moduleList = system->findModules(moduleName); - MODULE_LIST::iterator moduleIter; - - for (moduleIter = moduleList.begin(); - moduleIter != moduleList.end(); - moduleIter++ ) - { - LOGINFO_1(2, "ModelLoader::mapModule: Loading module details for module component: %s", (*moduleIter)->getName().c_str()); - - string message; // for exceptions - // Set module root - (*moduleIter)->setRoot(moduleRootDir); - - // ---------------------------- - // Add components to the module - // ---------------------------- - DataObjectList& componentList = root->getList("component"); - int i; - for (i=0; i < componentList.size(); i++) - { - addComponent(*moduleIter, componentList[i]); - } - - // ------------ - // Entry points - // ------------ - DataObjectList& entryPointList = root->getList("entryPoint"); - for (i=0; i < entryPointList.size(); i++) - { - addEntryPoint(*moduleIter, entryPointList[i]); - } - - - // ----------------- - // External services - // ----------------- - DataObjectList& externalServiceList = root->getList("externalService"); - for (i=0; i < externalServiceList.size(); i++) - { - addExternalService(*moduleIter, externalServiceList[i]); - } - - // ----- - // Wires - // ----- - DataObjectList& wireList = root->getList("wire"); - for (int l=0; l < wireList.size(); l++) - { - string source = wireList[l]->getCString("sourceUri"); - string target = wireList[l]->getCString("targetUri"); - (*moduleIter)->addWire(source, target); - } - - } - - LOGEXIT(1, "ModelLoader::mapModule"); - } - - // ================================= - // addComponent: - // ================================= - void ModelLoader::addComponent(Module* module, DataObjectPtr componentDO) - { - Component* component = module->addComponent(componentDO->getCString("name")); - - string message; - - // ------------------- - // Implementation type - // ------------------- - DataObjectPtr impl = componentDO->getDataObject("implementation"); - if (!impl) - { - message = "No implementation for component: "; - message = message + componentDO->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - // Determine the type - string componentTypeName; - string componentTypePath; - string implType = impl->getType().getName(); - if (implType == "CPPImplementation") - { - string dll = impl->getCString("dll"); - string header = impl->getCString("header"); - string className = impl->getCString("class"); - CPPImplementation* cppImpl = new CPPImplementation(dll, header, className); - componentTypePath = cppImpl->getHeaderPath(); - componentTypeName = cppImpl->getHeaderStub(); - component->setImplementation(cppImpl); - - } - else if (implType == "JavaImplementation") - { - } - - // ----------------------- - // Load the .componentType - // ----------------------- - string typeFileName = module->getRoot() + "/" + componentTypePath + componentTypeName + ".componentType"; - try - { - XMLDocumentPtr componentTypeFile = getXMLHelper()->loadFile(typeFileName.c_str()); - if (componentTypeFile->getRootDataObject() == 0) - { - LOGERROR_1(0, "ModelLoader::mapModule: Unable to load file: %s", typeFileName.c_str()); - } - else - { - //Utils::printDO(componentTypeFile->getRootDataObject()); - //commonj::sdo::SDOUtils::printDataObject(componentTypeFile->getRootDataObject()); - addServices(component, componentTypeFile->getRootDataObject()); - addReferences(component, componentTypeFile->getRootDataObject()); - addProperties(component, componentTypeFile->getRootDataObject()); - } - } catch (SDORuntimeException& ex) - { - LOGERROR_1(0, "ModelLoader::mapModule: Exception caught: %s", ex.getMessageText()); - throw SystemConfigurationException(ex.getMessageText()); - } - - // ---------- - // Properties - // ---------- - DataObjectPtr props = componentDO->getDataObject("properties"); - component->addProperties(props); - - // ---------- - // References - // ---------- - DataObjectPtr refs = componentDO->getDataObject("references"); - if (refs) - { - PropertyList pl = refs->getInstanceProperties(); - for (int refI=0; refI < pl.size(); refI++) - { - // ---------------------------------------------------------- - // Add the reference to the module wires to be resolved later - // ---------------------------------------------------------- - string refName = pl[refI].getName(); - if (!component->findReference(pl[refI].getName())) - { - // Configuration error: reference is not defined - message = "Undefined reference: " + refName; - throw SystemConfigurationException(message.c_str()); - } - - string src = component->getName() + "/" + refName; - DataObjectList& reflist = refs->getList(pl[refI]); - for (int refslistI=0; refslistIaddWire(src, targ); - } - } - } - } - - - // ===================================================================== - // addServices: add the services from the componentType to the component - // ===================================================================== - void ModelLoader::addServices(Component* component, DataObjectPtr componentType) - { - DataObjectList& services = componentType->getList("service"); - for (int i=0; iaddService(services[i]->getCString("name")); - service->setInterface(getInterface(services[i])); - } - } - - // =================================================== - // addReferences: add the references to the component - // =================================================== - void ModelLoader::addReferences(Component* component, DataObjectPtr componentType) - { - DataObjectList& refs = componentType->getList("reference"); - for (int i=0; iaddReference(refs[i]->getCString("name")); - string multiplicity = "1..1"; - if (refs[i]->isSet("multiplicity")) - { - multiplicity = refs[i]->getCString("multiplicity"); - } - serviceRef->setMultiplicity(multiplicity); - serviceRef->setInterface(getInterface(refs[i])); - } - } - - - // ============== - // getInterface - // ============== - Interface* ModelLoader::getInterface(DataObjectPtr obj) - { - // ----------------- - // get the interface - // ----------------- - DataObjectPtr iface = obj->getDataObject("interface"); - if (!iface) - { - string message = "No interface for: "; - message = message + obj->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - - // Determine the type - string componentTypeName; - string ifType = iface->getType().getName(); - if (ifType == "CPPInterface") - { - string header = iface->getCString("header"); - string className = iface->getCString("class"); - string scope = iface->getCString("scope"); - bool remotable = iface->getBoolean("remotable"); - - return new CPPInterface(header, className, scope, remotable); - } - else - { - // Error? - return 0; - } - } - - // ============================================== - // addProperties: add Properties to the component - // ============================================== - void ModelLoader::addProperties(Component* component, DataObjectPtr componentType) - { - DataObjectList& props = componentType->getList("property"); - for (int i=0; igetCString("name"); - string type = props[i]->getCString("type"); - bool many=false; - if (props[i]->isSet("many")) - { - many = props[i]->getBoolean("many"); - } - - bool required=false; - if (props[i]->isSet("required")) - { - many = props[i]->getBoolean("required"); - } - - const char* defaultValue = 0; - if (props[i]->isSet("default")) - { - defaultValue = props[i]->getCString("default"); - } - - component->addProperty(name, type, many, required, defaultValue); - } - } - - // =============================================== - // addEntryPoint: add an EntryPoint to the module - // =============================================== - void ModelLoader::addEntryPoint(Module* module, DataObjectPtr entryPointDO) - { - //Utils::printDO(entryPointDO); - EntryPoint* entryPoint = module->addEntryPoint(entryPointDO->getCString("name")); - - string multiplicity = "1..1"; - if (entryPointDO->isSet("multiplicity")) - { - multiplicity = entryPointDO->getCString("multiplicity"); - } - - entryPoint->setMultiplicity(multiplicity); - entryPoint->setInterface(getInterface(entryPointDO)); - - DataObjectList& refs = entryPointDO->getList("reference"); - for (int i=0; iaddWire(entryPoint->getName(), targ); - } - } - - - // ========================================================= - // addExternalService: add an ExternalService to the module - // ========================================================= - void ModelLoader::addExternalService(Module* module, DataObjectPtr externalServiceDO) - { - string message; - - ExternalService* externalService = module->addExternalService(externalServiceDO->getCString("name")); - // Add the interface - externalService->setInterface(getInterface(externalServiceDO)); - - // Get binding, it will be the first and only binding - DataObjectPtr binding = externalServiceDO->getList("binding")[0]; - if (!binding) - { - message = "No binding for externalService: "; - message = message + externalServiceDO->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - - //Utils::printDO(binding); - - string uri = binding->getCString("uri"); - - // Determine the binding type - string bindingType = binding->getType().getName(); - if (bindingType == "WebServiceBinding") - { - string port = binding->getCString("port"); - - WSBinding* wsBinding = new WSBinding(uri,port); - - externalService->setBinding(wsBinding); - - } - else if (bindingType == "SCABinding") - { - } - } - - - - /// - /// Use the Tuscany-model.config file in the module root directory to - /// determine which xsds and wsdls to load into a dataFactory. - /// - void ModelLoader::loadModuleConfig(const string &moduleRootDir, const string &moduleName) - { - LOGENTRY(1, "ModelLoader::loadModuleConfig"); - - // Load the "Tuscany-model.config" file, if it exists - Files files(moduleRootDir, "Tuscany-model.config", false); - for (unsigned int i=0; i < files.size(); i++) - { - string filename = moduleRootDir + "/" + files[i].getFileName(); - XMLDocumentPtr moduleConfigFile = getXMLHelper()->loadFile(filename.c_str()); - if (moduleConfigFile->getRootDataObject() == 0) - { - LOGERROR_1(0, "ModelLoader::loadModuleConfig: Unable to load file: %s", filename.c_str()); - } - else - { - LOGINFO_2(2, "ModelLoader::loadModuleConfig: Loading module config for: %s, root Dir: %s", moduleName.c_str(), moduleRootDir.c_str()); - - DataObjectList& xsds = moduleConfigFile->getRootDataObject()->getList("xsd/file"); - for (int i=0; i set the types in the moduleComponents data factory file - string xsdName = moduleRootDir + "/" +xsds[i]->getCString("name"); - loadTypes(xsdName.c_str(), moduleName); - - - } - - DataObjectList& wsdls = moduleConfigFile->getRootDataObject()->getList("wsdl/file"); - for (int j=0; jgetCString("name"); - // Load a wsdl file -> get the types, then the contents of the wsdl - loadTypes(wsdlName.c_str(), moduleName); - - // Load the contents of the wsdl files - loadWsdl(wsdlName.c_str(), moduleName); - - } - - } - } - - - LOGEXIT(1, "ModelLoader::loadModuleConfig"); - } - - - /// - /// Use the types from an xsd or wsdl file - /// - void ModelLoader::loadTypes(const char *fileName, const string &moduleName) - { - - - // Load a xsd file -> set the types in the moduleComponents data factory file - - MODULE_LIST moduleList = system->findModules(moduleName); - MODULE_LIST::iterator moduleIter; - - for (moduleIter = moduleList.begin(); - moduleIter != moduleList.end(); - moduleIter++ ) - { - try { - (*moduleIter)->getXSDHelper()->defineFile(fileName); - //Utils::printTypes((*moduleIter)->getXSDHelper()->getDataFactory()); - - } catch (SDOTypeNotFoundException ex) - { - LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText()); - throw ex; - } - } - - } - - /// - /// Load the web services definition from a wsdl - /// - void ModelLoader::loadWsdl(const char *fileName, const string &moduleName) - { - - try { - // Load the wsdl file - XMLDocumentPtr doc = getXMLHelper()->loadFile(fileName); - - - if (doc->getRootDataObject()!=0) - { - MODULE_LIST moduleList = system->findModules(moduleName); - MODULE_LIST::iterator moduleIter; - - for (moduleIter = moduleList.begin(); - moduleIter != moduleList.end(); - moduleIter++ ) - { - // Add the root object to the module - (*moduleIter)->addWsdl(doc->getRootDataObject()); - - } - - } - else - { - LOGERROR_1(0, "ModuleLoader: Unable to load %s", fileName); - } - - } catch (SDOTypeNotFoundException ex) - { - LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText()); - throw ex; - } - - - - } - - ////////////////////////////////////////////////////////////////////////////// - // Methods used to load the model into memory - ////////////////////////////////////////////////////////////////////////////// - - /// - /// Get an XSDHelper that has the appropriate XSDs already loaded - /// - const XSDHelperPtr ModelLoader::getXSDHelper() - { - if (myXSDHelper == 0) - { - - // Create an xsd helper - myXSDHelper = HelperProvider::getXSDHelper(); - - // Now add to it some xsd files - try { - string root = SCARuntime::getInstance()->getInstallRoot(); - string filename = root + "/xsd/sca.xsd"; - - myXSDHelper->defineFile(filename.c_str()); - - // Tuscany specific xsd for config files - filename = root + "/xsd/tuscany.xsd"; - myXSDHelper->defineFile(filename.c_str()); - - // Load types derived from WSDL schema - loadWSDLTypes(myXSDHelper->getDataFactory()); - - //Utils::printTypes(myXSDHelper->getDataFactory()); - - } catch (SDOTypeNotFoundException ex) - { - LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText()); - throw ex; - } - } - - - return myXSDHelper; - } - - - /// - /// Get an XMLHelper to load files - /// - const XMLHelperPtr ModelLoader::getXMLHelper() - { - if (myXMLHelper == 0) { - - // Create an xml helper - myXMLHelper = HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory()); - - } - - return myXMLHelper; - } - - void ModelLoader::loadWSDLTypes(DataFactoryPtr dataFactory) - { - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tBinding", - false, true, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tDocumentation", - true, true, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tDocumented", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement", - false, false, true); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented", - false, true, true); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented", - false, true, true); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tFault", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tImport", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tMessage", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tPart", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tPort", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tPortType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tService", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/", "tTypes", - false, false, false); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "definitions", - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "import", - "http://schemas.xmlsoap.org/wsdl/", "tImport", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "types", - "http://schemas.xmlsoap.org/wsdl/", "tTypes", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "message", - "http://schemas.xmlsoap.org/wsdl/", "tMessage", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "portType", - "http://schemas.xmlsoap.org/wsdl/", "tPortType", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "binding", - "http://schemas.xmlsoap.org/wsdl/", "tBinding", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "service", - "http://schemas.xmlsoap.org/wsdl/", "tService", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "input", - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "output", - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "fault", - "http://schemas.xmlsoap.org/wsdl/", "tFault", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "output", - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "input", - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "fault", - "http://schemas.xmlsoap.org/wsdl/", "tFault", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "arrayType", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "RootType", - "required", - "commonj.sdo", "Boolean", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBinding", - "operation", - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBinding", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBinding", - "type", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - "input", - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - "output", - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - "fault", - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "import", - "http://schemas.xmlsoap.org/wsdl/", "tImport", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "types", - "http://schemas.xmlsoap.org/wsdl/", "tTypes", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "message", - "http://schemas.xmlsoap.org/wsdl/", "tMessage", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "portType", - "http://schemas.xmlsoap.org/wsdl/", "tPortType", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "binding", - "http://schemas.xmlsoap.org/wsdl/", "tBinding", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "service", - "http://schemas.xmlsoap.org/wsdl/", "tService", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "targetNamespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDefinitions", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tDocumented", - "documentation", - "http://schemas.xmlsoap.org/wsdl/", "tDocumentation", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement", - "required", - "commonj.sdo", "Boolean", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented", - "http://schemas.xmlsoap.org/wsdl/", "tDocumented"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented", - "http://schemas.xmlsoap.org/wsdl/", "tDocumented"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tFault", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tFault", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tFault", - "message", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tImport", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tImport", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tImport", - "location", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tMessage", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tMessage", - "part", - "http://schemas.xmlsoap.org/wsdl/", "tPart", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tMessage", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - "input", - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - "output", - "http://schemas.xmlsoap.org/wsdl/", "tParam", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - "fault", - "http://schemas.xmlsoap.org/wsdl/", "tFault", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - "parameterOrder", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tParam", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tParam", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tParam", - "message", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tPart", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPart", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPart", - "element", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPart", - "type", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tPort", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPort", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPort", - "binding", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tPortType", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPortType", - "operation", - "http://schemas.xmlsoap.org/wsdl/", "tOperation", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tPortType", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tService", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tService", - "port", - "http://schemas.xmlsoap.org/wsdl/", "tPort", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/", "tService", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/", "tTypes", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented"); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - false, false, true); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, false); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "binding", - "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "operation", - "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "body", - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "encodingStyle", - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "use", - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "fault", - "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "header", - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "message", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "part", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "use", - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "encodingStyle", - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "headerfault", - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "RootType", - "address", - "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress", - "location", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", - "transport", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding", - "style", - "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - "parts", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - "encodingStyle", - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - "use", - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFault", - "name", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - "http://schemas.xmlsoap.org/wsdl/soap/", "tBody"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - "required", - "commonj.sdo", "Boolean", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - "parts", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - "encodingStyle", - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - "use", - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "headerfault", - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - true, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "message", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "part", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "use", - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "encodingStyle", - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - "message", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - "part", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - "use", - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - "encodingStyle", - "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault", - "namespace", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", - "soapAction", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation", - "style", - "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice", - "commonj.sdo", "String"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice", - "commonj.sdo", "String"); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/http/", "RootType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/http/", "addressType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/http/", "operationType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/http/", "urlEncoded", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/http/", "urlReplacement", - false, false, false); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "RootType", - "address", - "http://schemas.xmlsoap.org/wsdl/http/", "addressType", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "RootType", - "binding", - "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "RootType", - "operation", - "http://schemas.xmlsoap.org/wsdl/http/", "operationType", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "RootType", - "urlEncoded", - "http://schemas.xmlsoap.org/wsdl/http/", "urlEncoded", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "RootType", - "urlReplacement", - "http://schemas.xmlsoap.org/wsdl/http/", "urlReplacement", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/http/", "addressType", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "addressType", - "location", - "commonj.sdo", "URI", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "bindingType", - "verb", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/http/", "operationType", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/http/", "operationType", - "location", - "commonj.sdo", "URI", - false, false, true); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/mime/", "tPart", - false, true, false); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", - "content", - "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", - "multipartRelated", - "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "RootType", - "mimeXml", - "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", - "type", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "contentType", - "part", - "commonj.sdo", "String", - false, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType", - "part", - "http://schemas.xmlsoap.org/wsdl/mime/", "tPart", - true, false, true); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml", - "part", - "commonj.sdo", "String", - false, false, true); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/wsdl/mime/", "tPart", - "name", - "commonj.sdo", "String", - false, false, true); - } - - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h deleted file mode 100644 index 6d6e19a510..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ModelLoader.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_modelloader_h -#define tuscany_sca_model_modelloader_h - -#include "osoa/sca/export.h" -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; -using commonj::sdo::DataFactoryPtr; - -#include "tuscany/sca/model/System.h" -#include "tuscany/sca/model/Subsystem.h" - -#include "tuscany/sca/util/File.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Provides methods to load the runtime model from the SCDL file. - */ - class ModelLoader { - public: - /** - * Constructor. - * @param system The SCA system to load. - */ - ModelLoader(System* system); - - /** - * Destructor. - */ - virtual ~ModelLoader(); - - /** - * Load the model from the configuration information. - * @param configurationRoot The location of the deployed SCA - * modules and subsystems. - */ - void load(const char *configurationRoot); - - private: - System* system; - void loadModule(const char *moduleRoot); - - - commonj::sdo::XMLHelperPtr myXMLHelper; // Used to load scdl files - commonj::sdo::XSDHelperPtr myXSDHelper; // Used to load xsds - const commonj::sdo::XSDHelperPtr getXSDHelper(void); - const commonj::sdo::XMLHelperPtr getXMLHelper(void); - - void loadSubsystems(const char *configurationRoot); - void loadSubsystemFile(const File& file); - void mapSubsystem(commonj::sdo::DataObjectPtr rootDO); - - void loadModules(const char *configurationRoot); - void loadModuleFile(const File& file); - void mapModule(const string& moduleName, commonj::sdo::DataObjectPtr rootDO, std::string moduleRootDir); - - void addComponent(Module* module, DataObjectPtr componentDO); - void addEntryPoint(Module* module, DataObjectPtr entryPointDO); - void addExternalService(Module* module, DataObjectPtr externalServiceDO); - - void addServices(Component* component, DataObjectPtr componentType); - void addReferences(Component* component, DataObjectPtr componentType); - void addProperties(Component* component, DataObjectPtr componentType); - - - void loadModuleConfig(const string &moduleRootDir, const string &moduleName); - void loadTypes(const char *fileName, const string &moduleName); - void loadWsdl(const char *fileName, const string &moduleName); - - void loadWSDLTypes(DataFactoryPtr dataFactory); - - Interface* getInterface(DataObjectPtr obj); - - - }; - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_modelloader_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp deleted file mode 100644 index 43702144a2..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Module.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Module::Module(const std::string& moduleName) - : name(moduleName) - { - LOGENTRY(1, "Module::constructor"); - LOGEXIT(1, "Module::constructor"); - } - - Module::~Module() - { - } - - void Module::setRoot(const std::string& rootDirectory) - { - moduleRoot = rootDirectory; - } - - - /// - /// Add a new component to the module component - /// - Component* Module::addComponent(const std::string& name) - { - LOGENTRY(1, "Module::addComponent"); - Component* newComponent = new Component(name, this); - components[name] = newComponent; - LOGEXIT(1, "Module::addComponent"); - return newComponent; - } - - Component* Module::findComponent(const std::string& name) - { - LOGENTRY(1, "Module::findComponent"); - Component* foundComponent = components[name]; - LOGEXIT(1, "Module::findComponent"); - return foundComponent; - } - - Service* Module::findComponentService(const std::string& name) - { - LOGENTRY(1, "Module::findComponentService"); - - Service* service = 0; - - string componentName; - string serviceName; - Utils::tokeniseUri(name, componentName, serviceName); - - // Locate the component - Component* foundComponent = components[name]; - if (foundComponent) - { - // Locate the service - service = foundComponent->findService(serviceName); - } - LOGEXIT(1, "Module::findComponentService"); - return service; - } - - ExternalService* Module::findExternalService(const std::string& name) - { - LOGENTRY(1, "Module::findExternalService"); - ExternalService* foundService = externalServices[name]; - LOGEXIT(1, "Module::findExternalService"); - return foundService; - } - - - EntryPoint* Module::addEntryPoint(const std::string& name) - { - LOGENTRY(1, "Module::addEntryPoint"); - EntryPoint* ep = new EntryPoint(name); - entryPoints[name] = ep; - LOGEXIT(1, "Module::addEntryPoint"); - return findEntryPoint(name); - } - - EntryPoint* Module::findEntryPoint(const std::string& name) - { - return entryPoints[name]; - } - - - ExternalService* Module::addExternalService(const std::string& name) - { - LOGENTRY(1, "Module::addExternalService"); - ExternalService* es = new ExternalService(name, this); - externalServices[name] = es; - LOGEXIT(1, "Module::addExternalService"); - return es; - } - - void Module::addWire(const std::string& source, const std::string& target) - { - LOGENTRY(1, "Module::addWire"); - wires.push_back(Wire(source, target)); - LOGEXIT(1, "Module::addWire"); - } - - - void Module::resolveWires() - { - LOGENTRY(1, "Module::resolveWires"); - for (WIRES::iterator iter = wires.begin(); - iter != wires.end(); - iter++) - { - // ----------------- - // Locate the target - // ----------------- - WireTarget* target = findComponentService(iter->getTarget()); - if (!target) - { - target = findExternalService(iter->getTarget()); - } - if (!target) - { - LOGERROR_1(0, "Module::resolveWires: Wire target %s not found", iter->getTarget().c_str()); - } - else - { - EntryPoint* entrypoint = findEntryPoint(iter->getSourceComponent()); - if (entrypoint) - { - entrypoint->addTarget(target); - } - else - { - Component* component = findComponent(iter->getSourceComponent()); - if (component) - { - ServiceReference* serviceReference = component->findReference(iter->getSourceReference()); - if (serviceReference) - { - serviceReference->addTarget(target); - } - else - { - LOGERROR_1(0, "Module::resolveWires: Wire source reference %s not found", iter->getSourceReference().c_str()); - } - } - else - { - LOGERROR_1(0, "Module::resolveWires: Wire source %s not found", iter->getSourceComponent().c_str()); - } - } - } - } - - LOGEXIT(1, "Module::resolveWires"); - } - - - - void Module::addWsdl(commonj::sdo::DataObjectPtr wsdlModel) - { - LOGENTRY(1, "Module::addWsdl"); - Wsdl* wsdl = new Wsdl(wsdlModel); - wsdls[wsdl->getNamespace()] = wsdl; - LOGEXIT(1, "Module::addWsdl"); - - } - - Wsdl* Module::findWsdl(const std::string& wsdlNamespace ) - { - return wsdls[wsdlNamespace]; - - } - - - // Get an XSDHelper - one will be created for each module - commonj::sdo::XSDHelperPtr Module::getXSDHelper() - { - if (xsdHelper == 0) - { - xsdHelper = commonj::sdo::HelperProvider::getXSDHelper(); - } - - return xsdHelper; - } - - // Get an XMLHelper - one will be created for each module - commonj::sdo::XMLHelperPtr Module::getXMLHelper() - { - if (xmlHelper == 0) - { - xmlHelper = commonj::sdo::HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory()); - } - - return xmlHelper; - } - - - // Get a data factory - the one in the xsd/xml helper - commonj::sdo::DataFactoryPtr Module::getDataFactory() - { - return getXSDHelper()->getDataFactory(); - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h deleted file mode 100644 index f73f1d36bc..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Module.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_module_h -#define tuscany_sca_model_module_h - -#include -using std::string; - -#include -using std::map; -#include -using std::vector; - -#include "commonj/sdo/SDO.h" - - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ExternalService.h" -#include "tuscany/sca/model/EntryPoint.h" -#include "tuscany/sca/model/Wire.h" -#include "tuscany/sca/model/Wsdl.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - /** - * Information about a module. - */ - class Module - { - public: - /** - * Constructor. - * @param name the name of the module. - */ - Module(const std::string& name); - - /** - * Destructor. - */ - virtual ~Module(); - - /** - * Set the root directory of the module information. - * @param rootDirectory The root of the module in the file system. - */ - void setRoot(const std::string& rootDirectory); - - /** - * Get the root directory of the module. - * @return The root of the module in the file system. - */ - const std::string& getRoot() {return moduleRoot;} - - /** - * Return the name of the module. - * @return Name of the module. - */ - const std::string& getName() {return name;} - - /** - * Add a new component to the module. - * @param componentName The name of the new component. - * @return The Component added to the module. - */ - Component* addComponent(const std::string& componentName); - - /** - * Add a new entry point to the module. - * @param name The name of the new entry point. - * @return The entry point added to the module. - */ - EntryPoint* addEntryPoint(const std::string& name); - - /** - * Find an entry point by name. - * @param name The name of the entry point to be found. - * @return The entry point that was found, or 0 if not found. - */ - EntryPoint* findEntryPoint(const std::string& name); - - /** - * Add a new external service to the module. - * @param name The name of the new external service. - * @return The external service added to the module. - */ - ExternalService* addExternalService(const std::string& name); - - /** - * Add a wire to the model. - * @param source The source location. Either the source component and - * reference (optional), or an entry point. - * @param target The target location. Either the target component and - * service (optional), or an external service. - */ - void addWire(const std::string& source, const std::string& target); - - /** - * Find a component by name. - * @param componentName The name of the component to be found. - * @return The component that was found, or 0 if not found. - */ - Component* findComponent(const std::string& componentName); - - /** - * Find a component and service by name. - * @param componentServiceName A string of the form - * "componentName"/"serviceName" where the service name is optional - * if there is only one service on the component. - * @return The Service that was found, or 0 if not found. - */ - Service* findComponentService(const std::string& componentServiceName); - - /** - * Find an external service by name. - * @param serviceName The name of the external service to be found. - * @return The external service that was found, or 0 if not found. - */ - ExternalService* findExternalService(const std::string& serviceName); - - /** - * Add a WSDL definition to the module. - * @param wsdlModel A data object holding all the information about - * the WSDL definition from a WSDL file. - */ - void addWsdl(commonj::sdo::DataObjectPtr wsdlModel); - - /** - * Find a WSDL definition by target namespace. - * @param wsdlNamespace The namespace of the WSDL definitions to find. - */ - Wsdl* findWsdl(const std::string& wsdlNamespace); - - /** - * Return a cached SDO XSDHelper. - */ - commonj::sdo::XSDHelperPtr getXSDHelper(void); - - /** - * Return a cached SDO XMLHelper. - */ - commonj::sdo::XMLHelperPtr getXMLHelper(void); - - /** - * Return a data factory which has all the types defined in XSDs and - * WSDL files configured for this module. - * @return The data factory for this module. - */ - commonj::sdo::DataFactoryPtr getDataFactory(void); - - /** - * Work through the list of wires and connect the source and target uris. - */ - void resolveWires(); - - private: - /** - * Name of the module. - */ - string name; - - /** - * Directory of the root of the module. - */ - string moduleRoot; - - /** - * Cached XSDHelper. - */ - commonj::sdo::XSDHelperPtr xsdHelper; - - /** - * Cached XMLHelper. - */ - commonj::sdo::XMLHelperPtr xmlHelper; - - typedef map COMPONENT_MAP; - /** - * Map (by name) of all the components in this module. - */ - COMPONENT_MAP components; - - typedef map EXTERNALSERVICE_MAP; - /** - * Map (by name) of all the external services in this module. - */ - EXTERNALSERVICE_MAP externalServices; - - typedef map ENTRYPOINT_MAP; - /** - * Map (by name) of all the entry points in this module. - */ - ENTRYPOINT_MAP entryPoints; - - typedef vector WIRES; - /** - * Vector of all the wires in this module. - */ - WIRES wires; - - typedef map WSDL_MAP; - /** - * Map by namespace of all the wsdl definitions in this module. - */ - WSDL_MAP wsdls; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // SCA_ModuleComponent_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp deleted file mode 100644 index 42ccecbc99..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/Service.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - Service::Service(const std::string& serviceName, Component* comp) - : WireTarget(serviceName), - component(comp) - { - LOGENTRY(1, "Service::constructor (Component)"); - LOGINFO_1(3, "Service::constructor: Service name: %s", serviceName.c_str()); - LOGEXIT(1, "Service::constructor"); - } - - Service::~Service() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h deleted file mode 100644 index 6c37dabb3e..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Service.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_service_h -#define tuscany_sca_model_service_h - -#include -using std::string; - -#include "tuscany/sca/model/WireTarget.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - class Component; - - /** - * Information about a service defined on a component. - */ - class Service : public WireTarget - { - public: - /** - * Destructor. - */ - virtual ~Service(); - - /** - * Return the type of the wire target. - * @return Always returns ComponentServiceType. - */ - virtual Type getServiceType() {return ComponentServiceType;} - - /** - * Get the component on which this service is defined. - * @return The component on which this service is defined. - */ - Component* getComponent() {return component;} - - - private: - friend class Component; - /** - * Constructor. - * @param name The name of the service. - * @param component The component on which this service is defined. - */ - Service(const std::string& name, Component* component); - - /** - * The component on which this service is defined. - */ - Component* component; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_service_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp deleted file mode 100644 index cada38dec2..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/ServiceReference.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - ServiceReference::ServiceReference(const std::string& referenceName) - : name(referenceName), multiplicity(ONE_ONE) - { - } - - ServiceReference::~ServiceReference() - { - } - - void ServiceReference::addTarget(WireTarget* targ) - { - if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE) - { - if (targets.size() > 0) - { - // throw exception - string message = "Duplicate wire for reference: " + name; - throw SystemConfigurationException(message.c_str()); - } - } - - targets.push_back(targ); - } - - void ServiceReference::setMultiplicity(const std::string& multip) - { - if (multip == "0..1") - { - multiplicity = ZERO_ONE; - } - else if (multip == "1..1") - { - multiplicity = ONE_ONE; - } - else if (multip == "0..n") - { - multiplicity = ZERO_MANY; - } - else if (multip == "1..n") - { - multiplicity = ONE_MANY; - } - else - { - string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name; - throw SystemConfigurationException(msg.c_str()); - } - } - - void ServiceReference::setInterface(Interface* interf) - { - iface = interf; - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h deleted file mode 100644 index 062d7a4c19..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/ServiceReference.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_servicereference_h -#define tuscany_sca_model_servicereference_h - -#include -using std::string; -#include -using std::vector; - -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/model/WireTarget.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about a reference on a serivce. - */ - class ServiceReference - { - public: - /** - * Constructor. - * @param name The name of the reference. - */ - ServiceReference(const std::string& name) - - /** - * Destructor. - */; - virtual ~ServiceReference(); - - /** - * Get the name of the service. - * @return The name of the service. - */ - const std::string& getName() {return name;} - - /** - * Multiplicity (how many wires can be attached to this - * reference as their source) - */ - enum Multiplicity - { - ZERO_ONE, - ONE_ONE, - ZERO_MANY, - ONE_MANY - }; - - /** - * Set the multiplicity of this reference. - * @param multiplicity One of "0..1", "1..1", "0..n", "1..n" - */ - void setMultiplicity(const std::string& multiplicity); - - /** - * Get the multiplicity of this reference. - * @return The multiplicity. - */ - Multiplicity getMultiplicity() {return multiplicity;} - - /** - * Set the interface required by this reference. - * @param iface The interface. - */ - void setInterface(Interface* iface); - - /** - * Get the interface. - * @return The interface. - */ - Interface* getInterface() {return iface;} - - /** - * Add a target for a reference. There may be more than - * one if the multiplicity is 0..n or 1..n. - * @param target The target for a wire. - */ - void addTarget(WireTarget* target); - typedef vector TARGETS; - - /** - * Get a vector of all the targets from this reference. - * @return The targets of this reference. - */ - const TARGETS& getTargets() {return targets;} - private: - /** - * Name of this reference. - */ - string name; - - /** - * The interface defining this reference. - */ - Interface* iface; - - /** - * The multiplicity of this reference. - */ - Multiplicity multiplicity; - - /** - * Vector of all the targets wired from this reference. - */ - TARGETS targets; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_servicereference_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp deleted file mode 100644 index 08ef0dde49..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/Subsystem.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // Constructor - Subsystem::Subsystem(const std::string& subsystemName) : name(subsystemName) - { - LOGENTRY(1, "Subsystem::constructor"); - - - LOGEXIT(1, "Subsystem::constructor"); - } - - Subsystem::~Subsystem() - { - } - - /// - /// Add a new module component - /// - Module* Subsystem::addModuleComponent(const std::string& name, const std::string& moduleName) - { - LOGENTRY(1, "Subsystem::addModuleComponent"); - - Module* newModule = new Module(moduleName); - - // TODO: Should check for duplicates and throw exception - moduleComponents[name] = newModule; - - LOGEXIT(1, "Subsystem::addModuleComponent"); - - return newModule; - } - - Module* Subsystem::findModule(const std::string& moduleName) - { - for (MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin(); - moduleComponentIter != moduleComponents.end(); - moduleComponentIter++) - { - if (moduleName == moduleComponentIter->second->getName()) - { - return (Module*)moduleComponentIter->second; - } - } - return 0; - } - - Module* Subsystem::findModuleByComponentName(const std::string& moduleComponentName) - { - return moduleComponents[moduleComponentName]; - } - - Module* Subsystem::getDefaultModule() - { - if (moduleComponents.size() == 1) - { - MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin(); - return moduleComponentIter->second; - } - return 0; - } - - /// - /// Add a new entrypoint - /// - EntryPoint* Subsystem::addEntryPoint(const std::string& name) - { - LOGENTRY(1, "Subsystem::addEntryPoint"); - - EntryPoint* newEntryPoint = new EntryPoint(name); - entryPoints[name] = newEntryPoint; - LOGEXIT(1, "Subsystem::addEntryPoint"); - return findEntryPoint(name); - } - - EntryPoint* Subsystem::findEntryPoint(const std::string& name) - { - return entryPoints[name]; - } - - void Subsystem::resolveWires() - { - for (MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin(); - moduleComponentIter != moduleComponents.end(); - moduleComponentIter++) - { - moduleComponentIter->second->resolveWires(); - } - - // Resolve EntryPoint wires - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h deleted file mode 100644 index b3c59898eb..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Subsystem.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_h -#define tuscany_sca_model_h - -#include -using std::string; -#include -using std::map; - -#include "tuscany/sca/model/Module.h" -#include "tuscany/sca/model/EntryPoint.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about a subsystem. - */ - class Subsystem { - public: - /** - * Constructor. - * @param name The name of the subsystem. - */ - Subsystem(const std::string& name); - - /** - * Destructor. - */ - virtual ~Subsystem(); - - /** - * Add a new module component to the subsystem. - * @param name The name of the module component. - * @param moduleName The name of the module. - * @return The new Module added to the subsystem. - */ - Module* addModuleComponent(const std::string& name, const std::string& moduleName); - - /** - * Find a module by module name. - * @param moduleName The name of the module to be found. - * @return The Module that was found, or 0 if not found. - */ - Module* findModule(const std::string& moduleName); - - /** - * Find a module by the module component name. - * @param moduleComponentName The module component name to be used to find - * the module. - * @return The Module that was found, or 0 if not found. - */ - Module* findModuleByComponentName(const std::string& moduleComponentName); - - /** - * Get the default module set for this subsystem. - * @return The default module. - */ - Module* getDefaultModule(); - - /** - * Add an new entry point to the subsystem. - * @param name The name of the entry point. - * @return The new EntryPoint added to the subsystem. - */ - EntryPoint* addEntryPoint(const std::string& name); - - /** - * Find an entry point by name. - * @param name The name of the entry point to be found. - * @return The EntryPoint that was found, or 0 if not found. - */ - EntryPoint* findEntryPoint(const std::string& name); - - /** - * Return the name of the subsystem. - * @return The name. - */ - const std::string& getName() {return name;} - - /** - * Resolve all the wires configured in all the modules in this - * subsystem. - */ - void resolveWires(); - - private: - /** - * The name of the subsystem. - */ - std::string name; - - typedef std::map MODULECOMPONENT_MAP; - /** - * A map by module component name of modules. - */ - MODULECOMPONENT_MAP moduleComponents; - - typedef map ENTRYPOINT_MAP; - /** - * A map of entry points defined in this subsystem. - */ - ENTRYPOINT_MAP entryPoints; - }; - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp deleted file mode 100644 index dfc4a21b1c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/System.h" - - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // ============ - // Constructor - // ============ - System::System() - { - LOGENTRY(1, "System::constructor"); - - - LOGEXIT(1, "System::constructor"); - } - - System::~System() - { - SUBSYSTEM_MAP::iterator subsystemsIter; - for (subsystemsIter = subsystemMap.begin(); - subsystemsIter != subsystemMap.end(); - subsystemsIter++ ) - { - delete subsystemsIter->second; - } - } - - // ================================= - // Add a new subsystem to the system - // ================================= - Subsystem* System::addSubsystem(const std::string& name) - { - LOGENTRY(1, "System::addSubsystem"); - - Subsystem* newSubsystem = new Subsystem(name); - - subsystemMap[name] = newSubsystem; - - LOGEXIT(1, "System::addSubsystem"); - - return newSubsystem; - } - - // ==================================================================== - // Get a map of all the moduleComponents that use a particular module - // ==================================================================== - MODULE_LIST System::findModules(const std::string& name) - { - LOGENTRY(1, "System::findModules"); - MODULE_LIST foundModules; - - SUBSYSTEM_MAP::iterator subsystemsIter; - for (subsystemsIter = subsystemMap.begin(); - subsystemsIter != subsystemMap.end(); subsystemsIter++ ) { - LOGINFO_1(2, "System::findModules: Found subsystem: %s", subsystemsIter->second->getName().c_str()); - // In each subsystem, find module components with this module defined - - Module* module = subsystemsIter->second->findModule(name); - if (module) - { - LOGINFO_1(2, "System::findModules: Found module: %s", module->getName().c_str()); - foundModules.push_back(module); - } - } - LOGEXIT(1, "System::findModules"); - - return foundModules; - } - - - // ==================================================================== - // Get a map of all the moduleComponents that use a particular module - // ==================================================================== - Subsystem* System::findSubsystem(const std::string& subsystem) - { - return subsystemMap[subsystem]; - } - - void System::resolveWires() - { - SUBSYSTEM_MAP::iterator subsystemsIter; - for (subsystemsIter = subsystemMap.begin(); - subsystemsIter != subsystemMap.end(); - subsystemsIter++ ) - { - subsystemsIter->second->resolveWires(); - } - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h deleted file mode 100644 index a0f62ce67a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/System.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_system_h -#define tuscany_sca_model_system_h - -#include -#include -#include - -#include "tuscany/sca/model/Subsystem.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - typedef std::vector MODULE_LIST; - - /** - * The root of the runtime model supported by a Tuscany runtime. - */ - class System { - public: - System(); - virtual ~System(); - - /** - * Add a new subsystem to the system. - * @param subsystemName The name of the new subsystem to add. - * @return The new Subsystem added to the system. - */ - Subsystem* addSubsystem(const std::string& subsystemName); - - /** - * Find subsystem by name. - * @param subsystemName The name of the subsystem to be found. - * @return The Subsystem found, or 0 if not found. - */ - Subsystem* findSubsystem(const std::string& subsystemName); - - typedef std::vector MODULE_LIST; - - /** - * Return a vector of all the modules with a given module name. - * @param moduleName The name of the module to find - * @return A vector of all the times the module appears in the - * system. It can be more than once because the same module name - * is used by more than one module component. - */ - MODULE_LIST findModules(const std::string& moduleName); - - /** - * Resolve all the wires defined in the system. - */ - void resolveWires(); - - private: - - typedef std::map SUBSYSTEM_MAP; - - /** - * Map by name of subsystems. - */ - SUBSYSTEM_MAP subsystemMap; - }; - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_system_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp deleted file mode 100644 index 85cb7482bd..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/WSBinding.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - WSBinding::WSBinding(const string& uri, const string& port) - : Binding(uri), port(port) - { - - // Port is of the form: #wsdl.endpoint(/) - string::size_type hash = port.find("#"); - if (hash != string::npos) - { - // Found a hash - - // Namepace is the part before the # - wsdlNamespaceURL = port.substr(0, hash); - - - if ( (hash+1) < port.length()) - { - // Check the next part is wsdl.endpoint( - int ending = hash+15; - string check = port.substr(hash+1, 14); - if (check.compare("wsdl.endpoint(") == 0) - { - // Find the matching ) - int endBracket = port.find(")",ending); - if (endBracket-1 > ending+1) - { - string serviceAndPort = port.substr(ending, endBracket-ending); - // Look for a '/' - string::size_type slash = serviceAndPort.find("/"); - if (slash != string::npos) - { - serviceName = serviceAndPort.substr(0, slash); - - if ( (slash+1) < serviceAndPort.length()) - { - portName = serviceAndPort.substr(slash+1); - } - else - { - portName = ""; - } - - } - else - { - // No '/' so all of it is the service name - serviceName = serviceAndPort; - portName = ""; - - } - } - else - { - // Nothing between the () - serviceName = ""; - portName = ""; - } - } - else - { - // not the correct characters after the #, ignore the rest - serviceName = ""; - portName = ""; - } - - } - else - { - // Nothing after the hash - serviceName = ""; - portName = ""; - } - } - else - { - // No hash at all - wsdlNamespaceURL = port; - serviceName = ""; - portName = ""; - } - - - - - - - } - - WSBinding::~WSBinding() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h deleted file mode 100644 index e7963d205b..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WSBinding.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_wsbinding_h -#define tuscany_sca_model_wsbinding_h - -#include "tuscany/sca/model/Binding.h" - -#include - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about a web service binding for an entry point or an - * external service. - */ - class WSBinding : public Binding - { - public: - /** - * Constructor. - * @param uri The uri of the binding. - * @param port The definition of the port to which the entrypoint - * or external service is to be bound. This is of the form - * "namespace"#endpoint("service"/"port") - */ - WSBinding(const string&uri, const string& port); - - /** - * Destructor. - */ - virtual ~WSBinding(); - - /** - * Return the type of the binding. - * @return Always returns WS. - */ - virtual Type getBindingType() {return WS;}; - - /** - * Return the part of the port definition describing the wsdl - * namespace. - * @return The wsdl namespace. - */ - string getWSDLNamespaceURL() {return wsdlNamespaceURL;}; - - /** - * Return the service part of the port definition. - * @return The service to use. - */ - string getServiceName() {return serviceName;}; - - /** - * Return the port name part of the port definition. - * @return The port name to use. - */ - string getPortName() {return portName;}; - - private: - /** - * The full port string. - */ - string port; - - /** - * Namespace from the port. - */ - string wsdlNamespaceURL; - - /** - * Service name from the port. - */ - string serviceName; - - /** - * Port name from the port. - */ - string portName; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wsbinding_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp deleted file mode 100644 index 6c1b14940f..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Wire.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // Constructor - Wire::Wire(const std::string& source, const std::string& targ) - { - Utils::tokeniseUri(source, sourceComponent, sourceReference); - target = targ; - } - - Wire::~Wire() - { - } - - } // End namespace model - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h deleted file mode 100644 index b126137118..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wire.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_wire_h -#define tuscany_sca_model_wire_h - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about a wire in the model. - */ - class Wire - { - public: - /** - * Constructor. - * @param source The source of the wire. Either the component and - * reference name (optional) or an entry point. - * @param target The target of the wire. Either a component and service - * service name (optional) or an external sevice. - */ - Wire(const std::string& source, const std::string& target); - - /** - * Destructor. - */ - virtual ~Wire(); - - /** - * Get the component name defined by the source of the wire. - * @return The component name which is the source of the wire. - */ - const std::string& getSourceComponent() {return sourceComponent;} - - /** - * Get the reference name defined by the source of the wire. - * @return The reference name which is the source of the wire. - */ - const std::string& getSourceReference() {return sourceReference;} - - /** - * Get the target uri defined by the target of the wire. - * @return The target uri which is the source of the wire. - */ - const std::string& getTarget() {return target;} - private: - /** - * The source component of the wire. - */ - string sourceComponent; - - /** - * The source reference of the wire. - */ - string sourceReference; - - /** - * The target uri of the wire. - */ - string target; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wire_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp deleted file mode 100644 index a35b07f5fe..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/WireTarget.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // Constructor - WireTarget::WireTarget(const std::string& targetName) - : name(targetName) - { - } - - WireTarget::~WireTarget() - { - } - - void WireTarget::setInterface(Interface* interf) - { - iface = interf; - } - - } // End namespace model - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h deleted file mode 100644 index 312d20a704..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WireTarget.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_wiretarget_h -#define tuscany_sca_model_wiretarget_h - -#include -using std::string; - -#include "tuscany/sca/model/Interface.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Represents the target of a wire. This could be a service on a - * component or an external service. - */ - class WireTarget - { - public: - /** - * Supported types of wire target. - */ - enum Type - { - ComponentServiceType, - ExternalServiceType - }; - - /** - * Constructor. - * @param name The name of the wire target. - */ - WireTarget(const std::string& name); - - /** - * Destructor. - */ - virtual ~WireTarget(); - - /** - * Return the name of the wire target. - */ - string getName() {return name;} - - /** - * Get the type of the wire target. - * @return Depends on the type of the wire target. - */ - virtual Type getServiceType() = 0; - - /** - * Set the interface describing the wire target. - * @param iface The interface. - */ - void setInterface(Interface* iface); - - /** - * Get the interface describing the wire target. - * @return The interface. - */ - Interface* getInterface() {return iface;} - - private: - /** - * Name of the wire target (service name or external service name) - */ - string name; - - /** - * Type of the service. - */ - Type serviceType; - - /** - * Interface describing the wire target. - */ - Interface* iface; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wiretarget_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp deleted file mode 100644 index fcc86c78e5..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Wsdl.h" -#include "tuscany/sca/util/Exceptions.h" - -using namespace tuscany::sca; - -using namespace commonj::sdo; - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - Wsdl::Wsdl(DataObjectPtr wsdlModel) - : wsdlModel(wsdlModel) - { - LOGENTRY(1, "Wsdl::constructor"); - - // Trace - Utils::printDO(wsdlModel); - - - - LOGEXIT(1, "Wsdl::constructor"); - } - - Wsdl::~Wsdl() - { - } - - - /// - /// The namespace of the service and other definitions defined in this wsdl definition - string Wsdl::getNamespace() - { - - return wsdlModel->getCString("targetNamespace"); - - } - - /// - /// Find the operation defined in this wsdl - /// - WsdlOperation Wsdl::findOperation(const string& serviceName, - const string& portName, - const string& operationName) - { - string message; - - // Find the service - DataObjectPtr service = findService(serviceName); - if (!service) - { - // Service not found - message = "Unable to find service "; - message = message + serviceName; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - } - else - { - - - // Found the service - DataObjectList& portList = service->getList("port"); - for (int j=0; jgetCString("name")); - if (portListName.compare(portName) == 0) - { - - // found port - // Add address at this point - string targetAddress(portList[j]->getCString("address/location")); - - // find operation by traversing the binding, portType then operation - string wsBindingName(portList[j]->getCString("binding")); - - DataObjectPtr wsBinding = findBinding(wsBindingName); - if (!wsBinding) - { - message = "Unable to find binding "; - message = message + wsBindingName; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - } - - // Get the soapAction - string soapAction = getSoapAction(wsBinding, operationName); - - - // Found the binding, get the portType - string wsPortTypeName(wsBinding->getCString("type")); - DataObjectPtr wsPortType = findPortType(wsPortTypeName); - if (!wsPortType) - { - message = "Unable to find PortType "; - message = message + wsPortTypeName; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - } - - Utils::printDO(wsPortType); - - // Found the portType, find the operation - DataObjectList& operationList = wsPortType->getList("operation"); - for (int k=0; k< operationList.size(); k++) - { - string opName(operationList[k]->getCString("name")); - if( opName.compare(operationName) == 0) - { - // Found the operation - - // Find the type of the request message - string inputMessageType = string(operationList[k]->getCString("input/message")); - - DataObjectPtr wsMessageIn = findMessage(inputMessageType); - if (!wsMessageIn) - { - message = "Unable to find message "; - message = message + inputMessageType; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - } - - string requestType(wsMessageIn->getList("part")[0]->getCString("element")); - string requestTypeName; - string requestTypeUri; - // Utils::tokeniseQName(requestType, requestTypeUri, requestTypeName); - Utils::rTokeniseString(":", requestType, requestTypeUri, requestTypeName); - - // Find the type of the response message - string outputMessageType = string(operationList[k]->getCString("output/message")); - - DataObjectPtr wsMessageOut = findMessage(outputMessageType); - if (!wsMessageOut) - { - message = "Unable to find message "; - message = message + outputMessageType; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - } - - string responseType(wsMessageOut->getList("part")[0]->getCString("element")); - string responseTypeName; - string responseTypeUri; - // Utils::tokeniseQName(responseType, responseTypeUri, responseTypeName); - Utils::rTokeniseString(":", responseType, responseTypeUri, responseTypeName); - - return WsdlOperation(requestTypeName, - soapAction, - targetAddress, - responseTypeName); - } - - } - - message = "Unable to find Operation "; - message = message + operationName; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - - - - - } - - - - - } - // cannot find the port - message = "Unable to find port "; - message = message + portName; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - } - - } - - - - /// - /// Find a service - /// - DataObjectPtr Wsdl::findService(const string& serviceName) - { - DataObjectPtr service = 0; - - - // Find the binding - DataObjectList& serviceList = wsdlModel->getList("service"); - for (int i=0; igetCString("name")); - - if (name.compare(serviceName) == 0) - { - return serviceList[i]; - } - } - - return service; - } - - - /// - /// Find a named binding - /// - DataObjectPtr Wsdl::findBinding(const string& bindingName) - { - DataObjectPtr binding = 0; - string uri; - string name; - - - //Utils::tokeniseQName(bindingName, uri, name); - Utils::rTokeniseString(":", bindingName, uri, name); - - - // Find the binding - DataObjectList& bindingList = wsdlModel->getList("binding"); - for (int i=0; igetCString("name")); - - if (nameBinding.compare(name) == 0) - { - return bindingList[i]; - } - } - - return binding; - } - - /// - /// Find a named portType - /// - DataObjectPtr Wsdl::findPortType(const string& portTypeName) - { - DataObjectPtr portType = 0; - string uri; - string name; - - - // Utils::tokeniseQName(portTypeName, uri, name); - Utils::rTokeniseString(":", portTypeName, uri, name); - - - // Find the binding - DataObjectList& portTypeList = wsdlModel->getList("portType"); - for (int i=0; igetCString("name")); - - if (namePortType.compare(name) == 0) - { - return portTypeList[i]; - } - } - - return portType; - } - - /// - /// Find a named message - /// - DataObjectPtr Wsdl::findMessage(const string& messageName) - { - DataObjectPtr message = 0; - string uri; - string name; - - - // Utils::tokeniseQName(messageName, uri, name); - Utils::rTokeniseString(":", messageName, uri, name); - - - // Find the binding - DataObjectList& messageList = wsdlModel->getList("message"); - for (int i=0; igetCString("name")); - - if (nameMessage.compare(name) == 0) - { - return messageList[i]; - } - } - - return message; - } - - /// - /// Get the soap action - /// - string Wsdl::getSoapAction(DataObjectPtr binding, const string& operationName) - { - - - // Find the binding operation - DataObjectList& bindingOperationList = binding->getList("operation"); - for (int i=0; igetCString("name")); - - if (name.compare(operationName) == 0) - { - // Found the binding operation, return the soap action - string soapAction(bindingOperationList[i]->getCString("operation/soapAction")); - return soapAction; - } - } - - return string(""); - } - - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h deleted file mode 100644 index 440ecc4c2d..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/Wsdl.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_wsdl_h -#define tuscany_sca_model_wsdl_h - -#include -using std::string; - -#include "tuscany/sca/model/WsdlOperation.h" - -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; - - -namespace tuscany -{ - namespace sca - { - namespace model - { - - /** - * Holds information about a WSDL definition loaded into the runtime. - */ - class Wsdl - { - public: - /** - * Constructor. - * @param wsdlModel The data object representing the WSDL document - * defining a web service. - */ - Wsdl(DataObjectPtr wsdlModel); - - /** - * Destructor. - */ - ~Wsdl(); - - - /** - * Returns the target namespace of the WSDL definitions. - * @return The target namespace. - */ - string getNamespace(void); - - /** - * Find an operation in the WSDL definitions. - * @param serviceName The name of the service on which this - * operation is defined. - * @param portName The name of the port in the service to - * use. - * @param operationName The name of the operation to find. - * @return The operation if found. Exception thrown if not found. - */ - WsdlOperation findOperation(const string& serviceName, - const string& portName, - const string& operationName); - - private: - - /** - * Find a service in the wsdl definition. - * @param serviceName The name of the service. - * @return A data object describing the service if found, otherwise - * a 0 if not found. - */ - DataObjectPtr findService(const string& serviceName); - - /** - * Find a binding in the wsdl definition. - * @param bindingName The name of the binding to find. - * @return A data object describing the binding if found, otherwise - * a 0 if not found. - */ - DataObjectPtr findBinding(const string& bindingName); - - /** - * Find a portType in the wsdl definition. - * @param portTypeName The name of the portType. - * @return A data object describing the portType if found, otherwise - * a 0 if not found. - */ - DataObjectPtr findPortType(const string& portTypeName); - - /** - * Find a message in the wsdl definition. - * @param messageName The name of the message. - * @return A data object describing the message if found, otherwise - * a 0 if not found. - */ - DataObjectPtr findMessage(const string& messageName); - - /** - * The the details of the soap action setting for an operation - * on a soap binding. - * @param binding The data object describing the binding. - * @param operationName The name of the operation. - * @return The soap action setting from the WSDL. - */ - string getSoapAction(DataObjectPtr binding, const string& operationName); - - - /** - * The data object representation of the WSDL document. - */ - DataObjectPtr wsdlModel; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wsdl_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp deleted file mode 100644 index e248f64caf..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Wsdl.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - WsdlOperation::WsdlOperation(const string& operation, - const string& soapAct, - const string& endpointAddress, - const string& response) - : operationName(operation), - responseName(response), - soapAction(soapAct), - endpoint(endpointAddress) - { - LOGENTRY(1, "WsdlOperation::constructor"); - - - - - LOGEXIT(1, "WsdlOperation::constructor"); - } - - WsdlOperation::~WsdlOperation() - { - } - - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h deleted file mode 100644 index a77d576a4f..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/model/WsdlOperation.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_model_wsdlOperation_h -#define tuscany_sca_model_wsdlOperation_h - -#include -using std::string; - - -namespace tuscany -{ - namespace sca - { - namespace model - { - - /** - * Represents a single.,bound WSDL defined operation. - * This class includes information from the soapBinding - * in addition to the WSDL definition of the operation. - */ - class WsdlOperation - { - public: - /** - * Constructor. - * @param operation The name of the operation. - * @param soapAction The soapAction associated with this operation - * in the SOAP binding of the operation. - * @param endpoint The endpoint address of the operation. - * @param responseName The name of the response message. - */ - WsdlOperation(const string& operation, - const string& soapAction, - const string& endpoint, - const string& responseName); - - /** - * Destructor. - */ - ~WsdlOperation(); - - /** - * Return the name of the operation for use when serializing an - * outgoing message. - * @return The name of the element in the request message. - */ - const string& getOperationName() {return operationName;}; - - /** - * Return the name of the response for use when deserializing an - * incoming message. - * @return The name of the element in the response message. - */ - const string& getResponseName() {return responseName;}; - - /** - * The soap action string for this operation. - * @return The soap action. - */ - const string& getSoapAction() {return soapAction;}; - - /** - * Return the endpoint address for the target web service. - * @return The endpoint address. - */ - const string& getEndpoint() {return endpoint;}; - - - - private: - /** - * The name of the operation for use when serializing an - * outgoing message. - */ - string operationName; - - /** - * The name of the response for use when deserializing an - * incoming message. - */ - string responseName; - - /** - * The soap action string for this operation. - */ - string soapAction; - - /** - * The endpoint address of the target web service. - */ - string endpoint; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wsdlOperation_h - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp deleted file mode 100644 index 3ea2212f7c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/DefaultLogWriter.h" -#include -using namespace std; - -namespace tuscany -{ - namespace sca - { - DefaultLogWriter::~DefaultLogWriter() - { - } - - void DefaultLogWriter::log(int level, const char* msg) - { - for (int i=0; i < level; i++) - { - cout << " "; - } - cout << msg < - -#include - -#if defined(WIN32) || defined (_WINDOWS) -#include -#else -#include -#include -#include -#endif - -namespace tuscany -{ - namespace sca - { - File::File(const string& dir, const string& file) - : directory(dir), fileName(file) - { - } - File::~File() - { - } - - - Files::Files(const string& rootDir, const string& pattern, bool subdirectories) - : rootDirectory(rootDir) - { - findFiles(rootDirectory, pattern, subdirectories); - } - - Files::~Files() - { - } - - unsigned int Files::size() - { - return files.size(); - } - - const File& Files::operator[] (unsigned int index) - { - if (size() <= index) - { - throw ServiceRuntimeException("Files::operator[] index out of bounds"); - } - - FILES::iterator iter = files.begin(); - for (unsigned int i=0; id_name; - struct stat statbuf; - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) - continue; - if (stat(entryName.c_str(), &statbuf) != 0) - { - perror("stat"); - } - else - { - if (S_ISDIR(statbuf.st_mode)) - { - if (subdirectories) - { - findFiles(entryName, pattern, subdirectories); - } - } - else if (S_ISREG(statbuf.st_mode)) - { - string filename = entry->d_name; - - if ((exactMatch && filename == pattern) || - (!exactMatch && - ((filename.find(token1) == 0) - && (filename.length() >= token2.length()) - && (filename.rfind(token2) == (filename.length() - token2.length())) ))) - { - // Add the file to our list - files.push_back(File(rootDir, filename)); - } - } - } - } - closedir(root); -#endif - } - - - } // End namespace sca -} // End namespace tuscany - - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h deleted file mode 100644 index f177401442..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/File.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_util_file_h -#define tuscany_sca_util_file_h - -#include -using std::string; -#include -using std::vector; - -namespace tuscany -{ - namespace sca - { - /** - * File access methods. Provides platform independent - * access to files. - */ - class File - { - public: - /** - * Constructor. - * @param directory Name of the directory in which this file is located. - * Either / or \ can be used interchangeably for separating directory elements. - * @param fileName Name of the file in the dirctory. - */ - File(const string& directory, const string& fileName); - - /** - * Destructor. - */ - virtual ~File(); - - /** - * Return the directory in which this file is located. - * @return Name of the directory. - */ - const string& getDirectory() const {return directory;} - - /** - * Name of the file. - * @return Name of the file. - */ - const string& getFileName() const {return fileName;} - private: - /** - * Name of the directory. - */ - string directory; - - /** - * Name of the file. - */ - string fileName; - }; - - /** - * Collection of File to provide platform independent access - * to files and directories. - */ - class Files - { - public: - /** - * Constructor which will search a given directory with a pattern and return a - * new instance of this collection class. - * @param rootDirectory The directory in which to search. - * @param pattern A pattern for matching file names. Can include * and ?. - * @param subdirectories Whether subdirectories should be searched too. - */ - Files(const string& rootDirectory, const string& pattern, bool subdirectories = false); - - /** - * Destructor. - */ - virtual ~Files(); - - /** - * Return the number of files found. - * @return The number of files found. - */ - unsigned int size(); - - /** - * Return a File at this position in the collection. - * @param index The index into the collection. - * @return The File at this index in the collection. - */ - const File& operator[] (unsigned int index); - - private: - /** - * Search the given directory and pattern for matching files. - * @param rootDirectory The directory in which to search. - * @param pattern A pattern for matching file names. Can include * and ?. - * @param subdirectories Whether subdirectories should be searched too. - */ - void findFiles(const string& rootDirectory, const string& pattern, bool subdirectories); - - /** - * The top level directory to search. - */ - string rootDirectory; - - typedef vector FILES; - - /** - * Vector of File. - */ - FILES files; - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_file_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp deleted file mode 100644 index c3749c1be2..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date$ */ - -#include "tuscany/sca/util/FileLogWriter.h" -#include -using namespace std; - -namespace tuscany -{ - namespace sca - { - FileLogWriter::FileLogWriter(const char* logfile) - { - logFile.open(logfile, ios_base::app); - } - - FileLogWriter::~FileLogWriter() - { - logFile.close(); - } - - void FileLogWriter::log(int level, const char* msg) - { - for (int i=0; i < level; i++) - { - logFile << " "; - } - logFile << msg < -#include -using std::ofstream; - -namespace tuscany -{ - namespace sca - { - /** - * Log writer to write out to standard out. - */ - class FileLogWriter : public LogWriter - { - public: - FileLogWriter(const char* logfile); - - virtual ~FileLogWriter(); - - /** - * Will write to the console. - * See LogWriter#log. - */ - virtual void log(int level, const char* msg); - private: - ofstream logFile; - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_defaultlogwriter_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp deleted file mode 100644 index 452d185dcd..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Library.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Logging.h" -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - Library::Library() - : hDLL(NULL) - { - } - - Library::Library(const string& libraryName) - : name(libraryName), hDLL(NULL) - { - LOGINFO_1(3, "Library::construcor : %s", name.c_str()); - load(); - } - - Library::Library(const Library& lib) - : name(lib.name), hDLL(NULL) - { - LOGINFO_1(3, "Library::copy constructor : %s", name.c_str()); - if (lib.hDLL) - { - load(); - } - } - - Library& Library::operator=(const Library& lib) - { - LOGINFO_1(3, "Library::operator= : %s", name.c_str()); - if (&lib != this) - { - unload(); - name = lib.name; - load(); - } - return *this; - } - - Library::~Library() - { - LOGINFO_1(3, "Library::destructor: %s", name.c_str()); - unload(); - } - - - void Library::load() - { - LOGINFO_1(3, "Library::load : %s", name.c_str()); - string msg; -#if defined(WIN32) || defined (_WINDOWS) - hDLL = LoadLibrary(name.c_str()); -#else - hDLL = dlopen(name.c_str(), RTLD_NOW); -#endif - if (hDLL == NULL) - { - LOGERROR_1(1, "Library::load: Unable to load library %s", name.c_str()); - msg = "Unable to load dll: " + name; - throw ServiceRuntimeException(msg.c_str()); - } - } - - void Library::unload() - { - if (hDLL != NULL) - { - LOGINFO_1(3, "Library::unload : %s", name.c_str()); -#if defined(WIN32) || defined (_WINDOWS) - FreeLibrary(hDLL); -#else - dlclose(hDLL); -#endif - hDLL = NULL; - } - } - - void* Library::getSymbol(const string& symbol) - { - LOGINFO_1(3, "Library::getSymbol : %s", symbol.c_str()); - if (!hDLL) - { - return 0; - } -#if defined(WIN32) || defined (_WINDOWS) - return GetProcAddress(hDLL, symbol.c_str()); -#else - return dlsym(hDLL, symbol.c_str()); -#endif - } - - } // End namespace sca -} // End namespace tuscany - - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h deleted file mode 100644 index 69b2f5352a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Library.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_util_library_h -#define tuscany_sca_util_library_h - - -#if defined(WIN32) || defined (_WINDOWS) -#include -#else -#include -#include -#endif - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - /** - * Information about shared libraries and methods to - * access these shared libraries. - */ - class Library - { - public: - Library(); - - /** - * Constructor. Will load the library. - * @param libraryName Fully qualified name of the library. - */ - Library(const string& libraryName); - - /** - * Destructor. Will unload the library. - */ - virtual ~Library(); - - Library(const Library& lib); - Library& operator=(const Library& lib); - - /** - * Find an externalized symbol in the library. - * @param symbol The name of the symbol to be found. - * @return The pointer to the symbol if found, otherwise 0. - */ - void* getSymbol(const string& symbol); - private: - /** - * Name of the library. - */ - string name; - - /** - * Handle to the loaded library. - */ -#if defined(WIN32) || defined (_WINDOWS) - HINSTANCE hDLL; -#else - void* hDLL; -#endif - - /** - * Load the library. - */ - void load(); - - /** - * Unload the library, if successfully loaded. - */ - void unload(); - - }; - - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_util_library_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp deleted file mode 100644 index d77d1e4bfd..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/LogWriter.h" - -namespace tuscany -{ - namespace sca - { - LogWriter::~LogWriter() - { - } - - } // End namespace sca -} // End namespace tuscany - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h deleted file mode 100644 index edb07c3684..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/LogWriter.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_util_logwriter_h -#define tuscany_sca_util_logwriter_h - -#include "osoa/sca/export.h" - -namespace tuscany -{ - namespace sca - { - /** - * Abstract class for extending logging to other destinations. - */ - class SCA_API LogWriter - { - public: - virtual ~LogWriter(); - - /** - * Log a message. - * @param level The level of logging for this message. - * @param msg The message to log. - */ - virtual void log(int level, const char* msg) = 0; - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_logwriter_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp deleted file mode 100644 index 0a888a69ef..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include -#include - -#include "tuscany/sca/util/Logger.h" -#include "tuscany/sca/util/DefaultLogWriter.h" -#include "tuscany/sca/util/FileLogWriter.h" - -using namespace std; - -namespace tuscany -{ - namespace sca - { - LogWriter* Logger::logWriter = getLogWriter(); - - LogWriter* Logger::getLogWriter() - { - if (logWriter == 0) - { - setLogWriter(0); - } - return logWriter; - } - - void Logger::setLogWriter(LogWriter* writer) - { - if (logWriter != writer - && logWriter != 0) - { - delete logWriter; - } - - if (writer == 0) - { - char* loggingVar = 0; - loggingVar = getenv("TUSCANY_SCACPP_LOG"); - if (loggingVar == 0) - logWriter = new DefaultLogWriter; - else - logWriter = new FileLogWriter(loggingVar); - } - else - { - logWriter = writer; - } - } - - int Logger::loggingLevel = setLogging(); - - int Logger::setLogging() - { - char* loggingVar = 0; - loggingVar = getenv("TUSCANY_SCACPP_LOGGING"); - if (loggingVar == 0) - return 0; - else - return atoi(loggingVar); - } - - void Logger::setLogging(int level) - { - loggingLevel = level; - } - - void Logger::log(int level, const char* msg) - { - if (level <= loggingLevel) - { - logWriter->log(level, msg); - } - } - - void Logger::logArgs(int level, const char* msg, ...) - { - if (level <= loggingLevel) - { - va_list variableArguments; - va_start(variableArguments, msg); - char messageBuffer[1024]; - vsprintf(messageBuffer, msg, variableArguments); - logWriter->log(level, messageBuffer); - va_end(variableArguments); - } - } - - } // End namespace sca -} // End namespace tuscany - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h deleted file mode 100644 index 8ba934afa5..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logger.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_util_logger_h -#define tuscany_sca_util_logger_h - -#include "osoa/sca/export.h" -#include "tuscany/sca/util/LogWriter.h" -namespace tuscany -{ - namespace sca - { - /** - * Provide a logging interface. - */ - class Logger { - - public: - /** - * Set the log writer to use. - * @param writer The writer to use for all subsequent logging. - */ - SCA_API static void setLogWriter(LogWriter* writer); - - /** - * Set or reset the logging level. Any message with a higher logging - * level than this value will be filtered (i.e. not shown). - * @param level The level of logging to use for all subsequent logging. - */ - SCA_API static void setLogging(int level); - - /** - * Log a message. - * @param level The log level of this message. - * @param msg The message to be logged. - */ - static void log(int level, const char* msg); - - /** - * Log a message with variable arguments. - * @param level The log level of this message. - * @param msg The message to be logged. Must include template - * characters as described in printf. - * @param ... Variable arguments. - */ - static void logArgs(int level, const char* msg, ...); - - /** - * The currently set logging level - */ - static int loggingLevel; - - private: - /** - * The current log writer. - */ - static LogWriter* logWriter; - - /** - * Get the current log writer. - * @return The current log writer. - */ - static LogWriter* getLogWriter(); - - /** - * Retrieves the logging level set as an environment variable. - */ - static int setLogging(); - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_logger_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h deleted file mode 100644 index 066f6a5733..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Logging.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_util_logging_h -#define tuscany_sca_util_logging_h - -#include "tuscany/sca/util/Logger.h" - -#ifdef _DEBUG -#define LOGENTRY(level, methodName) \ -if (Logger::loggingLevel >= level) \ -Logger::log(level, "Entering: " methodName); - -#define LOGEXIT(level, methodName) \ -if (Logger::loggingLevel >= level) \ -Logger::log(level, "Exiting: " methodName); - -#define LOGINFO(level, message) \ -if (Logger::loggingLevel >= level) \ -Logger::log(level, message); - -#define LOGINFO_1(level, message, arg1) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(level, message, arg1); - -#define LOGINFO_2(level, message, arg1, arg2) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(level, message, arg1, arg2); - -#define LOGERROR(level, message) \ -if (Logger::loggingLevel >= level) \ -Logger::log(level, message); - -#define LOGERROR_1(level, message, arg1) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(level, message, arg1); - -#define LOGERROR_2(level, message, arg1, arg2) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(level, message, arg1, arg2); -#else // Not DEBUG -#define LOGENTRY(level, methodName) - -#define LOGEXIT(level, methodName) - -#define LOGINFO(level, message) - -#define LOGINFO_1(level, message, arg1) - -#define LOGINFO_2(level, message, arg1, arg2) -#define LOGERROR(level, message) -#define LOGERROR_1(level, message, arg1) -#define LOGERROR_2(level, message, arg1, arg2) - -#endif -#endif // tuscany_sca_util_logging_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp deleted file mode 100644 index 7f457e68ed..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/util/Utils.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Utils.h" - -using namespace std; -using namespace commonj::sdo; -namespace tuscany -{ - namespace sca - { - void Utils::tokeniseUri(const string& uri, string& token1, string& token2) - { - tokeniseString("/", uri, token1, token2); - } - - void Utils::tokeniseQName(const string& qname, string& uri, string& name) - { - tokeniseString("#", qname, uri, name); - if (name == "") - { - name = uri; - uri = ""; - } - } - - void Utils::tokeniseString( - const string& separator, - const string& str, - string& token1, - string& token2) - { - string::size_type sep = str.find(separator); - if (sep != string::npos) - { - token1 = str.substr(0, sep); - if ( (sep+1) < str.length()) - { - token2 = str.substr(sep+1); - } - else - { - token2 = ""; - } - } - else - { - token1 = str; - token2 = ""; - } - } - - void Utils::rTokeniseString( - const string& separator, - const string& str, - string& token1, - string& token2) - { - string::size_type sep = str.rfind(separator); - if (sep != string::npos) - { - token1 = str.substr(0, sep); - if ( (sep+1) < str.length()) - { - token2 = str.substr(sep+1); - } - else - { - token2 = ""; - } - } - else - { - token1 = ""; - token2 = str; - } - } - - ////////////////////////////////////////////////////////////////////////// - // Print a DatObject tree - ////////////////////////////////////////////////////////////////////////// - void Utils::tabs(int inc) - { - for (int ind=0; ind getType(); - tabs(inc); - cout << "DataObject type: " << dataObjectType.getURI()<< "#" << dataObjectType.getName() << endl; - inc++; - - ////////////////////////////////////////////////////////////////////////// - // Iterate over all the properties - ////////////////////////////////////////////////////////////////////////// - PropertyList pl = dataObject->getInstanceProperties(); - for (int i = 0; i < pl.size(); i++) - { - tabs(inc); - cout << "Property: " << pl[i].getName() << endl; - - const Type& propertyType = pl[i].getType(); - - tabs(inc); - cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl; - - if (dataObject->isSet(pl[i])) - { - - ////////////////////////////////////////////////////////////////////// - // For a many-valued property get the list of values - ////////////////////////////////////////////////////////////////////// - if (pl[i].isMany()) - { - inc++; - DataObjectList& dol = dataObject->getList(pl[i]); - for (int j = 0; j getCString(pl[i]) <getDataObject(pl[i]), inc); - inc--; - } - } - else - { - tabs(inc); - cout<< "Property Value: not set" <getTypes(); - for (int i = 0; i < tl.size(); i++) - { - cout << "Type: " << tl[i].getURI()<< "#" << tl[i].getName() << endl; - PropertyList pl = tl[i].getProperties(); - for (int j = 0; j < pl.size(); j++) - { - cout << "\tProperty: " << pl[j].getName() - << " type: " < -using std::string; -#include "commonj/sdo/SDO.h" - -#include "osoa/sca/export.h" - -namespace tuscany -{ - namespace sca - { - /** - * Utility methods to parse strings and provide debugging information. - */ - class Utils { - - public: - static void tokeniseUri(const string& uri, string& token1, string& token2); - static void tokeniseQName(const string& sdoname, string& uri, string& name); - static void tokeniseString( - const string& separator, - const string& str, - string& token1, - string& token2); - - static void rTokeniseString( - const string& separator, - const string& str, - string& token1, - string& token2); - - SCA_API static void printDO(commonj::sdo::DataObjectPtr dataObject, int increment=0); - SCA_API static void printTypes(commonj::sdo::DataFactoryPtr df); - - private: - static void tabs(int increment=0); - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_utils_h diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp deleted file mode 100644 index 704097833e..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.cpp +++ /dev/null @@ -1,448 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "SDOStub.h" -#include "commonj/sdo/HelperProvider.h" -#include "osoa/sca/export.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Utils.h" - - -// For Axis stub code -#include -#include -#include -#include - -using namespace std; - -AXIS_CPP_NAMESPACE_USE - -using namespace commonj::sdo; -using namespace tuscany::sca; - - -namespace tuscany -{ -namespace sca -{ - namespace ws - { - /** Construct an SDOStub using the default HTTP 1.1 transport. - */ - SDOStub::SDOStub() - : Stub(" ", APTHTTP1_1), - m_strEndpoint(""), - m_strTargetNamespace(""), - m_strOperationName(""), - m_strOperationResponseName(""), - m_strSoapAction("") - { - } - - - /** Construct an SDOStub using the default HTTP 1.1 transport - * and set the web service endpoint URI. - * @param endpoint - web service endpoint URI - */ - SDOStub::SDOStub(const char* endpoint) - : Stub(endpoint, APTHTTP1_1), - m_strEndpoint(endpoint), - m_strTargetNamespace(""), - m_strOperationName(""), - m_strOperationResponseName(""), - m_strSoapAction("") - { - } - - - /** Destruct the SDOStub - */ - SDOStub::~SDOStub() - { - } - - /** Set the web service endpoint URI. - * The endpoint is the value of the soap:address element in the WSDL. - * @param endpoint - web service endpoint URI. - */ - void SDOStub::setEndpoint(const char* endpoint) - { - m_strEndpoint = endpoint; - // Stub::setEndPoint - setEndPoint(endpoint); - } - - /** Get the web service endpoint URI. - * @return web service endpoint URI. - */ - const char* SDOStub::getEndpoint() - { - return m_strEndpoint.c_str(); - } - - /** Set the target namespace for elements and operations. - * @param targetNamespace - the target namespace. - */ - void SDOStub::setTargetNamespace(const char* targetNamespace) - { - m_strTargetNamespace = targetNamespace; - } - - /** Get the target namespace. - * @return - target namespace. - */ - const char* SDOStub::getTargetNamesapce() - { - return m_strTargetNamespace.c_str(); - } - - /** Set the name of the operation to invoke. - * @param operationName - operation name - */ - void SDOStub::setOperationName(const char* operationName) - { - m_strOperationName = operationName; - } - - /** Get the operation name. - * @return operation name. - */ - const char* SDOStub::getOperationName() - { - return m_strOperationName.c_str(); - } - - /** Set the name of the element that is returned as the result of a soap method. - * @param operationResponseName - name of the response element. - */ - void SDOStub::setOperationResponseName(const char* operationResponseName) - { - m_strOperationResponseName = operationResponseName; - } - - /** Get the name of the element that is returned as the result of a soap method. - * @return operation response name. - */ - const char* SDOStub::getOperationResponseName() - { - return m_strOperationResponseName.c_str(); - } - - /** Set the SOAPAction header. - * @param soapAction - the soap action. - */ - void SDOStub::setSoapAction(const char* soapAction) - { - m_strSoapAction = soapAction; - } - - /** Get the SoapAction header. - * @return soap action. - */ - const char* SDOStub::getSoapAction() - { - return m_strSoapAction.c_str(); - } - - /** Invoke the operation on the web service. - * @param requestDO - SDO containing the input parameters for the operation. - * @param dataFactory - DataFactory for de/serialzing the SDOs. - * @return DataObjectPtr - SDO containg the response from the web service. - */ - DataObjectPtr SDOStub::invoke(DataObjectPtr requestDO, DataFactoryPtr dataFactory) - { - LOGENTRY(2, "SDOStub::invoke"); - - // SDO return object - DataObjectPtr pReturn; - - // For faults - //const char* pcCmplxFaultName = NULL; - - // Get an XMLHelper - XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(dataFactory); - - - try - { - // Initialize the call structure for Doc Literal request/response. - if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER)) - { - return pReturn; // Return if there is a failure - } - - // Set the SoapAction if it is not already set. - if (NULL == m_pCall->getTransportProperty("SOAPAction",false)) - { - m_pCall->setTransportProperty(SOAPACTION_HEADER , m_strSoapAction.c_str()); - } - - // Set the Soap Version. - m_pCall->setSOAPVersion(SOAP_VER_1_1); - - // Set the Operation (operationName and targetNamespace) - m_pCall->setOperation(m_strOperationName.c_str(), m_strTargetNamespace.c_str()); - - //includeSecure(); - //applyUserPreferences(); - - // - // Serialize the DataObject. - // - - // DEBUG - XMLDocumentPtr requestDoc = - xmlHelper->createDocument(requestDO, - m_strTargetNamespace.c_str(), - m_strOperationName.c_str()); - requestDoc->setXMLDeclaration(false); - char *requestXML = xmlHelper->save(requestDoc); - LOGINFO_1(2, "SDOStub::invoke: Request XML=%s", requestXML); - - // Loop through the top level data object, serializing individual properties. - // We cannot simply serialize the request DataObject to an XML string and add - // the XML as an AnyType parameter because Axis will wrap the request with an - // element named for the operationName (Doc Literal/Wrapped), duplicating the - // top-level element. - PropertyList properties = requestDO->getInstanceProperties(); - for (int i=0; i < properties.size() ; i++) - { - Property& property = properties[i]; - const char *propertyName = property.getName(); - - // If the property is not set, don't bother adding it as a parameter. - if (!requestDO->isValid(property)) continue; - - switch (property.getTypeEnum()) - { - // Simple string property - add it as an XSD_STRING parameter. - case Type::StringType: - { - if (!property.isMany()) - { - string strPrefixAndParamName; - const char *namespacePrefix = - m_pCall->getNamespacePrefix(m_strTargetNamespace.c_str()); - strPrefixAndParamName.append(namespacePrefix); - strPrefixAndParamName.append(":"); - strPrefixAndParamName.append(propertyName); - const char *paramValue = requestDO->getCString(i); - m_pCall->addParameter((void *)paramValue, - strPrefixAndParamName.c_str(), - XSD_STRING); - } - } - break; - - // DataObject property. - case Type::DataObjectType: - { - const char *dobXML = NULL; - if (property.isMany()) - { - // Many valued property - get the list. - DataObjectList& dobList = requestDO->getList(property); - for (int j=0; j< dobList.size(); j++) - { - DataObjectPtr dob = dobList[j]; - if (dob != 0) - { - // Create an XML string from the DataObject. - XMLDocumentPtr doc = - xmlHelper->createDocument(dob, - m_strTargetNamespace.c_str(), - propertyName); - doc->setXMLDeclaration(false); - dobXML = xmlHelper->save(doc); - - // Add the XML to the call as an AnyType. - AnyType* pAny = new AnyType(); - pAny->_size = 1; - pAny->_array = new char*[1]; - pAny->_array[0] = strdup(dobXML); - m_pCall->addAnyObject(pAny); - } - } - } // if isMany - else - { - // Single valued property. - DataObjectPtr dob = requestDO->getDataObject(property); - if (dob != 0) - { - // Create an XML string from the DataObject. - XMLDocumentPtr doc = - xmlHelper->createDocument(dob, - m_strTargetNamespace.c_str(), - propertyName); - doc->setXMLDeclaration(false); - dobXML = xmlHelper->save(doc); - - // Add the XML to the call as an AnyType. - AnyType* pAny = new AnyType(); - pAny->_size = 1; - pAny->_array = new char*[1]; - pAny->_array[0] = strdup(dobXML); - m_pCall->addAnyObject(pAny); - } - } - } - break; - - default: - break; - } - } - - // Invoke the operation. - if (AXIS_SUCCESS == m_pCall->invoke()) - { - // Make sure the response element is what we expect; ie that the element matches - // the operation response name set on the stub and its targetNamespace matches - // the targetNamespace set on the stub. - if (AXIS_SUCCESS == m_pCall->checkMessage(m_strOperationResponseName.c_str(), - m_strTargetNamespace.c_str())) - { - LOGINFO(2, "SDOStub::invoke: invoke returned AXIS_SUCCESS"); - - // Deserialize the soap response. - string strResponse = getSoapResponse(); - - // Create an XMLDocument from the soap reponse - XMLDocumentPtr returnDoc = - xmlHelper->load(strResponse.c_str(), m_strTargetNamespace.c_str()); - // Get the root DataObject to return as the result. - pReturn = returnDoc->getRootDataObject(); - - } - } - else - { - LOGINFO_2(2, "SDOStub::invoke: checkMessage failed. Expected: %s \' element with namespace \' %s \'.", - m_strOperationResponseName.c_str(), - m_strTargetNamespace.c_str()); - } - - - // Invoked the operation successfully - uninitialize the Call object. - m_pCall->unInitialize(); - - } - catch (AxisException& e) - { - // Get the exception code. - int iExceptionCode = e.getExceptionCode(); - LOGINFO_2(0, "SDOStub::invoke Caught AxisException: %d code: %s", iExceptionCode, e.what()); - if (AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode) - { - m_pCall->unInitialize(); - throw ServiceRuntimeException("AxisException", ServiceRuntimeException::Error, e.what()); - } - - // Get the details of the SoapFault. - ISoapFault* pSoapFault = (ISoapFault*) m_pCall->checkFault("Fault", m_strEndpoint.c_str()); - - if (pSoapFault) - { - const char *detail = pSoapFault->getSimpleFaultDetail(); - bool deleteDetail=false; - - if (NULL==detail || 0==strlen(detail)) - { - detail=m_pCall->getFaultAsXMLString(); - - - if (NULL==detail) - { - detail=""; - } - else - { - deleteDetail=true; - } - } - - OtherFaultException ofe(pSoapFault->getFaultcode(), - pSoapFault->getFaultstring(), - pSoapFault->getFaultactor(), - detail, iExceptionCode); - - if (deleteDetail && NULL!=detail) - { - delete [] const_cast(detail); - } - - m_pCall->unInitialize(); - throw ofe; - } - else - { - m_pCall->unInitialize(); - throw ServiceRuntimeException("AxisException", ServiceRuntimeException::Error, e.what()); - } - } - catch(SDORuntimeException sdoE) - { - throw ServiceRuntimeException("SDORuntimeException", ServiceRuntimeException::Error, sdoE.getMessageText()); - } - - LOGEXIT(2, "SDOStub::invoke"); - return pReturn; - - } - - // Deserialize the soap response from the web service. - string SDOStub::getSoapResponse() - { - // Get the response as an XML string. - AnyType* soapAny = m_pCall->getAnyObject(); - - // The Doc Literal response does not include the top level - // response element if we use getAnyObject - we need to wrap - // the response with the response element. - string strResponse("<"); - strResponse.append(m_strOperationResponseName); - strResponse.append(" xmlns=\""); - strResponse.append(m_strTargetNamespace); - strResponse.append("\">"); - - for (int j=0; j < soapAny->_size ; j++) - { - // DEBUG - cout << "SDOStub::getSoapResponse: soapAny->_array[" << j << "]=" << endl; - cout << soapAny->_array[j] << endl; - cout << endl; - // DEBUG - - strResponse.append(soapAny->_array[j]); - } - - strResponse.append(""); - - return strResponse; - } - - } // end namespace ws -} // end namespace sca -} // end namespace tuscany - diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h deleted file mode 100644 index d5743c9c78..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/SDOStub.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#if !defined(SDOSTUB_H_INCLUDED) -#define SDOSTUB_H_INCLUDED - -#include "osoa/sca/export.h" -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "commonj/sdo/SDO.h" - -// For stub code -#include -#include -#include - -#include - -AXIS_CPP_NAMESPACE_USE -using namespace commonj::sdo; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - /** - * The SDOStub class is an Axis Stub that is used to invoke operations on a Web Service - * using SDO objects as input parameters and return values. - */ - class SDOStub : public Stub - { - public: - - /** Construct an SDOStub using the default HTTP 1.1 transport. - */ - SCA_API SDOStub(); - - /** Construct an SDOStub using the default HTTP 1.1 transport - * and set the web service endpoint URI. - * @param endpointURI - web service endpoint URI - */ - SCA_API SDOStub(const char* endpointURI); - - /** Destruct the SDOStub - */ - SCA_API virtual ~SDOStub(); - - /** Set the web service endpoint URI. - * The endpoint is the value of the soap:address element in the WSDL. - * @param endpoint - web service endpoint URI. - */ - SCA_API void setEndpoint(const char* endpoint); - - /** Get the web service endpoint URI. - * @return web service endpoint URI. - */ - SCA_API const char* getEndpoint(); - - /** Set the target namespace for elements and operations. - * @param targetNamespace - the target namespace. - */ - SCA_API void setTargetNamespace(const char* targetNamespace); - - /** Get the target namespace. - * @return - target namespace. - */ - SCA_API const char* getTargetNamesapce(); - - /** Set the name of the operation to invoke. - * @param operationName - operation name - */ - SCA_API void setOperationName(const char* operationName); - - /** Get the operation name. - * @return operation name. - */ - SCA_API const char* getOperationName(); - - /** Set the name of the element that is returned as the result of a soap method. - * @param operationResponseName - name of the response element. - */ - SCA_API void setOperationResponseName(const char* operationResponseName); - - /** Get the name of the element that is returned as the result of a soap method. - * @return operation response name. - */ - SCA_API const char* getOperationResponseName(); - - /** Set the SOAPAction header. - * @param soapAction - the soap action. - */ - SCA_API void setSoapAction(const char* soapAction); - - /** Get the SoapAction header. - * @return soap action. - */ - SCA_API const char* getSoapAction(); - - /** Invoke the operation on the web service. - * @param requestDO - SDO containing the input parameters for the operation. - * @param dataFactory - DataFactory for de/serialzing the SDOs. - * @return DataObjectPtr - SDO containg the response from the web service. - */ - SCA_API DataObjectPtr invoke(DataObjectPtr requestDO, DataFactoryPtr dataFactory); - - private: - // Deserialize the soap response from the web service. - string getSoapResponse(); - - string m_strEndpoint; - string m_strTargetNamespace; - string m_strOperationName; - string m_strOperationResponseName; - string m_strSoapAction; - }; - - } // end namespace ws - } // end namespace sca -} // end namespace tuscany - - -#endif // !defined(SDOSTUB_H_INCLUDED) diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp deleted file mode 100644 index 672a48b697..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/ws/WSServiceWrapper.h" - -#include "osoa/sca/sca.h" -using namespace osoa::sca; -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/model/WSBinding.h" -#include "tuscany/sca/model/Wsdl.h" -#include "tuscany/sca/ws/SDOStub.h" -#include "tuscany/sca/util/Utils.h" -using namespace tuscany::sca; -using namespace tuscany::sca::ws; - - - -extern "C" -{ - /// - /// Factory function for creating service wrappers for web services. - /// - SCA_API WSServiceWrapper* WSServiceWrapper_Factory(tuscany::sca::model::WireTarget* target) - { - return new WSServiceWrapper(target); - } -} - - -WSServiceWrapper::WSServiceWrapper(tuscany::sca::model::WireTarget* target) : ExternalServiceWrapper(target) -{ - -} - -WSServiceWrapper::~WSServiceWrapper() -{ - -} - -/// -/// This method will be called when a web service call needs to be made. -/// -void WSServiceWrapper::invoke(Operation& operation) -{ - LOGENTRY(1, "WSServiceWrapper::invoke"); - - const string& operationName = operation.getName(); - - LOGINFO_2(2,"External service: %s, Operation: %s", getTarget()->getName().c_str() , operationName.c_str()); - - - // Check one parameter in/ one parameter out and that they are data objects. - - // Get the data factory for the module (it will already have the types loaded for the xsds) - - // From the external service ws-binding, get the namespace of the wsdl endpoint - ExternalService* externalService = getExternalService(); - WSBinding* binding = (WSBinding *)externalService->getBinding(); - - string portNamespace = binding->getWSDLNamespaceURL(); - - // Lookup the wsdl model from the module, keyed on the namespace - // (the wsdl will have been loaded at startup, based on the information in the config file) - Wsdl* wsdlDefinition = externalService->getContainingModule()->findWsdl(portNamespace); - - // Match the operation in Operation to the operation in the wsdl port type. - WsdlOperation wsdlOperation = wsdlDefinition->findOperation( - binding->getServiceName() - , binding->getPortName() - , operationName); - - // Get the name of the response by navigating from the wsdl operation to the return type - - // Get the name of the SoapAction by navigating from the wsdl. - - // Create an SDOStub - try - { - SDOStub wsStub(wsdlOperation.getEndpoint().c_str()); - wsStub.setTargetNamespace(portNamespace.c_str()); - wsStub.setOperationName(wsdlOperation.getOperationName().c_str()); - wsStub.setOperationResponseName(wsdlOperation.getResponseName().c_str()); - wsStub.setSoapAction(wsdlOperation.getSoapAction().c_str()); - - - // Call the service via the SDOStub - *(DataObjectPtr *)operation.getReturnValue() = wsStub.invoke(*((DataObjectPtr*)operation.getParameter(0)), - externalService->getContainingModule()->getDataFactory()); - - } - catch (AxisException& e) - { - throw ServiceRuntimeException("AxisException", ServiceRuntimeException::Error, e.what()); - } - - - LOGEXIT(1, "WSServiceWrapper::invoke"); - -} diff --git a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h b/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h deleted file mode 100644 index 7ae765950c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef tuscany_sca_ws_wsservicewrapper_h -#define tuscany_sca_ws_wsservicewrapper_h - -#include "osoa/sca/export.h" - -#include "tuscany/sca/core/ExternalServiceWrapper.h" -#include "tuscany/sca/model/ExternalService.h" -#include "tuscany/sca/core/Operation.h" - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - class SCA_API WSServiceWrapper : public tuscany::sca::ExternalServiceWrapper - { - public: - WSServiceWrapper(tuscany::sca::model::WireTarget* target); - virtual ~WSServiceWrapper(); - - virtual void invoke(Operation& operation); - }; - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ws_wsservicewrapper_h diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild deleted file mode 100644 index ed308ead8d..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtbuild +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project deleted file mode 100644 index 60a0a75176..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sca_test_CustomerInfo - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 691a33706a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Nov 29 15:05:50 GMT 2005 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.180210457=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.954607388=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.180210457=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.954607388=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.180210457=\n\n -environment/project/cdt.managedbuild.config.gnu.so.release.954607388=\n\n diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h deleted file mode 100644 index 6372a5a45a..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfo.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: - virtual const char* getCustomerInformation(const char* customerID) = 0; - -}; - -#endif diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp deleted file mode 100644 index 91996bace7..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "CustomerInfoImpl.h" -#include -#include -#include "osoa/sca/sca.h" -#include "commonj/sdo/DataObjectInstance.h" -using namespace osoa::sca; -using namespace commonj::sdo; - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -CustomerInfoImpl::CustomerInfoImpl() -{ - cout << "Construct CustomerInfoImpl" << endl; - -} - -CustomerInfoImpl::~CustomerInfoImpl() -{ - cout << "Destroy CustomerInfoImpl" << endl; -} - -////////////////////////////////////////////////////////////////////// -// Other methods -////////////////////////////////////////////////////////////////////// -const char* CustomerInfoImpl::getCustomerInformation(const char* customerID) -{ - cout << "In getCustomerInformation with customerid: " << customerID << endl; - - - - ComponentContext myContext = ComponentContext::getCurrent(); - - DataObjectInstance properties = myContext.getProperties(); - DataObjectInstance props2 = properties; - if (properties) - { - const char* fredVal = properties->getCString("Fred"); - cout << "Property Fred value: " << fredVal <getList("Joe"); - for (int i=0; iinvoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index 7930c4a16e..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h -#define CustomerInfoImpl_CustomerInfoService_Proxy_h - -#include "CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index d1fb6073c9..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl*)getImplementation(); -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformation") - { - const char* p0 = (const char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformation(p0)); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 778a168220..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl* impl; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am b/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am deleted file mode 100644 index b533c6cdb8..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/CustomerInfo/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -lib_LTLIBRARIES = libCustomerInfo.la - -libCustomerInfo_la_SOURCES = \ -CustomerInfoImpl.cpp \ -CustomerInfoImpl_CustomerInfoService_Proxy.cpp \ -CustomerInfoImpl_CustomerInfoService_Wrapper.cpp - -libCustomerInfo_la_LIBADD = - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXISCPP_DEPLOY}/include - -install: \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/Makefile.am b/tags/cpp-sca-20060405/runtime/core/test/Makefile.am deleted file mode 100644 index 05516bac23..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -SUBDIRS = CustomerInfo MyValue src - -BUILT_SOURCES = scagen - -scagen: - cp ./MyValue/MyValue.h ./testSCASystem/modules/MyValueServiceModule - cp ./MyValue/MyValueImpl.h ./testSCASystem/modules/MyValueServiceModule - cp ./MyValue/StockQuoteService.h ./testSCASystem/modules/MyValueServiceModule - cp ./CustomerInfo/CustomerInfo.h ./testSCASystem/modules/MyValueServiceModule - cp ./CustomerInfo/CustomerInfoImpl.h ./testSCASystem/modules/MyValueServiceModule - cd $(top_builddir)/bin && \ - ./scagen.sh -dir ../runtime/core/test/testSCASystem/modules/MyValueServiceModule -output ../runtime/core/test/tmp - cp tmp/CustomerInfoImpl*.* CustomerInfo - cp tmp/MyValueImpl*.* MyValue - - -install-exec-local: - cp CustomerInfo/.libs/libCustomerInfo.so testSCASystem/modules/MyValueServiceModule - cp MyValue/.libs/libMyValue.so testSCASystem/modules/MyValueServiceModule - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild b/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild deleted file mode 100644 index acc65c20f2..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtbuild +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject b/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project b/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project deleted file mode 100644 index 113442bfd8..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sca_test_MyValue - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 4c585d5bb1..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Nov 29 15:11:39 GMT 2005 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.903609302=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1558347965=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.903609302=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1558347965=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.903609302=\n\n -environment/project/cdt.managedbuild.config.gnu.so.release.1558347965=\n\n diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am b/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am deleted file mode 100644 index c6ea61654b..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -lib_LTLIBRARIES = libMyValue.la - -libMyValue_la_SOURCES = \ -MyValueImpl.cpp \ -MyValueImpl_customerInfo_Proxy.cpp \ -MyValueImpl_MyValueService_Proxy.cpp \ -MyValueImpl_MyValueService_Wrapper.cpp \ -MyValueImpl_stockQuote_Proxy.cpp - -libMyValue_la_LIBADD = - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXISCPP_DEPLOY}/include \ - -I../CustomerInfo - -install: \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h deleted file mode 100644 index 710910f08c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValue.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; -class MyValue -{ -public: - virtual float getMyValue(const char* customerID) = 0; - virtual float getMyValueS(const string& customerID) = 0; - virtual string getCustname(string& customerID) = 0; - virtual const string& getCustnamecs(string customerID) = 0; - -}; - -#endif diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp deleted file mode 100644 index 8d45eac6e9..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "MyValueImpl.h" -#include "CustomerInfo.h" -#include "StockQuoteService.h" -#include -using namespace std; - -#include "osoa/sca/sca.h" -#include "commonj/sdo/SDO.h" -using namespace osoa::sca; -using namespace commonj::sdo; - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -MyValueImpl::MyValueImpl() -{ - cout << "Construct MyValueImpl" << endl; - -} - -MyValueImpl::~MyValueImpl() -{ - cout << "Destroy MyValueImpl" << endl; -} - -////////////////////////////////////////////////////////////////////// -// Other methods -////////////////////////////////////////////////////////////////////// -float MyValueImpl::getMyValue(const char *customerID) -{ - cout << "In getMyValue with customerid: " << customerID << endl; - - - ComponentContext myContext = ComponentContext::getCurrent(); - CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo"); - - if (customerInfoService == 0) - { - cout << "unable to find customer info service" << endl; - - return 0.0f; - } - - const char * stock; - try - { - stock = customerInfoService->getCustomerInformation(customerID); - } - catch(const char* x) - { - cout << "Exception caught: " << x <getCustomerInformation(customerID); - cout << "Stock from getServices " << i << " : " << stock <create("http://swanandmokashi.com", "GetQuotes"); - requestDO->setCString("QuoteTicker", stock); - } catch (SDORuntimeException e) - { - cout << e; - } - - // Invoke the service - DataObjectPtr result = stockQuoteService->GetStockQuotes(requestDO); - - float stockPrice = 0.2f; - - try { - float stockPrice = result->getDataObject("GetQuotesResult")->getList("Quote")[0]->getFloat("StockQuote"); - //dataobjectlist& dlist = result->getdataobject("getquotesresult")->getlist("quote"); - //DataObjectList& dlist = result->getDataObject("GetQuotesResult")->getList((unsigned int)0); - //float stockPrice = result->getDataObject("GetQuotesResult")->getList(0u)[0]->getFloat("StockQuote"); - cout << "My stock price is " << stockPrice << endl; - //float stockPrice=((DataObject)result.getDataObject("GetQuotesResult").getList(0).get(0)).getFloat("StockQuote"); - // System.out.println(" [getMyValue] stock quote = "+stockPrice); - } catch (SDORuntimeException e) - { - cout << e; - } - - return stockPrice; - - /* - // Dummy method - - if (!strcmp(stock, "IBM")) - return 99.999f; - else - return 31.05f; - */ - -} - -float MyValueImpl::getMyValueS(const string& customerID) -{ - cout << "In getMyValueS with customerid: " << customerID.c_str() << endl; - return 87.35f; -} - -string MyValueImpl::getCustname(string& customerID) -{ - cout << "In getCustname with customerid: " << customerID.c_str() << endl; - customerID = "FRED"; - cout << "setting customer name to " << customerID.c_str() <invoke(operation); - return ret; - -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS", 1); - operation.setParameter(0, (void*)&arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname", 1); - operation.setParameter(0, (void*)&arg0); - - string ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return *(const string*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 38f22384b0..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Proxy_h -#define MyValueImpl_MyValueService_Proxy_h - -#include "MyValue.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_MyValueService_Proxy : public MyValue -{ -public: - MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_MyValueService_Proxy(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname( string& customerID); - virtual const string& getCustnamecs( string customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_MyValueService_Proxy_h - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index d9337c9341..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new MyValueImpl_MyValueService_Wrapper(target); - } -} - -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (MyValueImpl*)getImplementation(); -} - -MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() -{ - releaseImplementation(); -} - -void* MyValueImpl_MyValueService_Wrapper::newImplementation() -{ - return new MyValueImpl; -} - -void MyValueImpl_MyValueService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getMyValue") - { - const char* p0 = (const char*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameter(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameter(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue((void*)&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 9179537ceb..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Wrapper_h -#define MyValueImpl_MyValueService_Wrapper_h - -#include "MyValueImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); - virtual ~MyValueImpl_MyValueService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index 7625556203..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "MyValueImpl_customerInfo_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 - MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_customerInfo_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_customerInfo_Proxy*)proxy; - } -} - -MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() -{ - if (target) - delete target; -} - -const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index cc60ef5005..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_customerInfo_Proxy_h -#define MyValueImpl_customerInfo_Proxy_h - -#include "CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_customerInfo_Proxy : public CustomerInfo -{ -public: - MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_customerInfo_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_customerInfo_Proxy_h - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 14b37fa4bd..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 "MyValueImpl_stockQuote_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 - MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_stockQuote_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_stockQuote_Proxy*)proxy; - } -} - -MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() -{ - if (target) - delete target; -} - -commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) -{ - Operation operation("GetStockQuotes", 1); - operation.setParameter(0, (void*)&arg0); - - commonj::sdo::DataObjectPtr ret = 0; - operation.setReturnValue((void*)&ret); - - target->invoke(operation); - return ret; - -} - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 850bc3861c..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h - diff --git a/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h b/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h deleted file mode 100644 index 74479c2800..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/MyValue/StockQuoteService.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#ifndef StockQuoteService_h -#define StockQuoteService_h -#include -#include "commonj/sdo/SDO.h" -using std::string; -class StockQuoteService -{ -public: - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; - -}; - -#endif // StockQuoteService_h diff --git a/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild b/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild deleted file mode 100644 index 73f28e14fd..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/src/.cdtbuild +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject b/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/src/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/src/.project b/tags/cpp-sca-20060405/runtime/core/test/src/.project deleted file mode 100644 index 5e5b12e9d8..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/src/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sca_test - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index fe629d7d5b..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Nov 29 17:30:33 GMT 2005 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.exe.debug.961609061=\n\n -environment/project/cdt.managedbuild.config.gnu.exe.release.278641057=\n\n diff --git a/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am b/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am deleted file mode 100644 index 1dfd79aa21..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/src/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -prgbindir=$(prefix)/bin/test -prgbin_PROGRAMS = tuscany_sca_test -SUBDIRS = -AM_CPPFLAGS = $(CPPFLAGS) -tuscany_sca_test_SOURCES = TestSCA.cpp - -tuscany_sca_test_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sca -lxml2 -lstdc++ \ - -L${AXISCPP_DEPLOY}/lib -laxis_client -laxis_clientC - -INCLUDES = -I$(top_builddir)/runtime/core/test/MyValue \ - -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include diff --git a/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp b/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp deleted file mode 100644 index 0143e32510..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/src/TestSCA.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date: 2005/12/22 11:33:21 $ */ - -#include "tuscany/sca/util/Logger.h" -#include "commonj/sdo/Logger.h" -#include "osoa/sca/sca.h" -#include -using namespace osoa::sca; -using namespace tuscany::sca; -#include "MyValue.h" - -int main(int argc, char* argv[]) -{ - tuscany::sca::Logger::setLogging(3); - commonj::sdo::Logger::setLogging(20); - cout << "Start of SCA test" << endl; - - try - { - // Locate a service - ModuleContext myContext = ModuleContext::getCurrent(); - ModuleContext myContext2 = myContext; - - - MyValue* myService = (MyValue*) myContext.locateService("MyValueServiceComponent"); - if (myService == 0) - { - cout << "Unable to find service" << endl; - } - else - { - - try - { - float value = myService->getMyValue("12345"); - cout << "My value is: " << value << endl; - value = myService->getMyValueS("12345"); - cout << "My valueSS is: " << value << endl; - string custid = "fred"; - string name = myService->getCustname(custid); - cout << "Returned string: " << name.c_str() << " custid now: " << custid.c_str() <getCustnamecs(custid); - cout << "Returned string: " << csname.c_str() << " custid now: " << custid.c_str() <getMyValue("999"); - cout << "My value is: " << value << endl; - } - catch (char* x) - { - cout << "Exception caught: " << x << endl; - } - } - cout << "End of SCA test" << endl; - - } - catch (ServiceRuntimeException& ex) - { - cout << ex << endl; - } - return 0; -} diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment deleted file mode 100644 index f473f59748..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType deleted file mode 100644 index 48651b63fe..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType deleted file mode 100644 index ace4154966..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl deleted file mode 100644 index 4917cde583..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config deleted file mode 100644 index 7fee074333..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module deleted file mode 100644 index aedaf354e6..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem deleted file mode 100644 index 1b32bf8a93..0000000000 --- a/tags/cpp-sca-20060405/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw b/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw deleted file mode 100644 index 7df3d3cbe8..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Calculator.dsw +++ /dev/null @@ -1,53 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "CalculatorModule"=.\CalculatorModule\CalculatorModule.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "CalculatorSubsystem"=.\CalculatorSubsystem\CalculatorSubsystem.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Client"=.\Client\Client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb b/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb deleted file mode 100644 index fd603e4f04..0000000000 Binary files a/tags/cpp-sca-20060405/samples/Calculator/Calculator.ncb and /dev/null differ diff --git a/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt b/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt deleted file mode 100644 index c399feabb4..0000000000 Binary files a/tags/cpp-sca-20060405/samples/Calculator/Calculator.opt and /dev/null differ diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild deleted file mode 100644 index ca7fa895f1..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtbuild +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project deleted file mode 100644 index fa611e47c3..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - CalculatorModule - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 415787c073..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Dec 13 10:02:34 GMT 2005 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h deleted file mode 100644 index 9284178d5f..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Calculator.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| (c) Copyright IBM Corporation 2005. | -| All Rights Reserved. | -+----------------------------------------------------------------------+ -| | -| 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 CALCULATOR_H -#define CALCULATOR_H -class Calculator -{ -public: - virtual float add(float arg1, float arg2) = 0; - virtual float sub(float arg1, float arg2) = 0; - virtual float mul(float arg1, float arg2) = 0; - virtual float div(float arg1, float arg2) = 0; -}; - -#endif - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType deleted file mode 100644 index 2033f431bb..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.componentType +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp deleted file mode 100644 index 96bd363167..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| (c) Copyright IBM Corporation 2005. | -| All Rights Reserved. | -+----------------------------------------------------------------------+ -| | -| 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 "CalculatorImpl.h" - -CalculatorImpl::CalculatorImpl() -{ -} - -CalculatorImpl::~CalculatorImpl() -{ -} - -// Calculator interface -float CalculatorImpl::add(float arg1, float arg2) -{ - float result = arg1 + arg2; - return result; -} - -float CalculatorImpl::sub(float arg1, float arg2) -{ - float result = arg1 - arg2; - return result; -} - -float CalculatorImpl::mul(float arg1, float arg2) -{ - float result = arg1 * arg2; - return result; -} - -float CalculatorImpl::div(float arg1, float arg2) -{ - float result = arg1 / arg2; - return result; -} - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h deleted file mode 100644 index 38570aae28..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorImpl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| (c) Copyright IBM Corporation 2005. | -| All Rights Reserved. | -+----------------------------------------------------------------------+ -| | -| 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 CALCULATORIMPL_H -#define CALCULATORIMPL_H - -#include "Calculator.h" - -class CalculatorImpl : public Calculator -{ -public: - CalculatorImpl(); - virtual ~CalculatorImpl(); - - // Calculator interface - virtual float add(float arg1, float arg2); - virtual float sub(float arg1, float arg2); - virtual float mul(float arg1, float arg2); - virtual float div(float arg1, float arg2); -}; - -#endif - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp deleted file mode 100644 index 43c6bfc044..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.dsp +++ /dev/null @@ -1,138 +0,0 @@ -# Microsoft Developer Studio Project File - Name="CalculatorModule" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=CalculatorModule - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "CalculatorModule.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "CalculatorModule.mak" CFG="CalculatorModule - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "CalculatorModule - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "CalculatorModule - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "CalculatorModule - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 - -!ELSEIF "$(CFG)" == "CalculatorModule - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" - -!ENDIF - -# Begin Target - -# Name "CalculatorModule - Win32 Release" -# Name "CalculatorModule - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\CalculatorImpl.cpp -# End Source File -# Begin Source File - -SOURCE=.\CalculatorImpl_CalculatorService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=.\CalculatorImpl_CalculatorService_Wrapper.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Calculator.h -# End Source File -# Begin Source File - -SOURCE=.\CalculatorImpl.h -# End Source File -# Begin Source File - -SOURCE=.\CalculatorImpl_CalculatorService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=.\CalculatorImpl_CalculatorService_Wrapper.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;module;componentType;fragment" -# Begin Source File - -SOURCE=.\CalculatorImpl.componentType -# End Source File -# Begin Source File - -SOURCE=.\sca.module -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg deleted file mode 100644 index 33016bffaf..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/CalculatorModule.plg +++ /dev/null @@ -1,39 +0,0 @@ - - -
      -

      Build Log

      -

      ---------------------Configuration: CalculatorModule - Win32 Debug-------------------- -

      -

      Command Lines

      -Creating temporary file "C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7D.tmp" with contents -[ -/nologo /MDd /W3 /Gm /GX /ZI /I "D:\Development\tuscany\cpp\sdo/include" /I "D:\Development\tuscany\cpp\sca/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /Fp"Debug/CalculatorModule.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl.cpp" -"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.cpp" -"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7D.tmp" -Creating temporary file "C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7E.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"Debug/CalculatorModule.pdb" /debug /machine:I386 /out:"Debug/CalculatorModule.dll" /implib:"Debug/CalculatorModule.lib" /pdbtype:sept /libpath:"D:\Development\tuscany\cpp\sdo/lib" /libpath:"D:\Development\tuscany\cpp\sca/lib" -.\Debug\CalculatorImpl.obj -.\Debug\CalculatorImpl_CalculatorService_Proxy.obj -.\Debug\CalculatorImpl_CalculatorService_Wrapper.obj -] -Creating command line "link.exe @C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7E.tmp" -

      Output Window

      -Compiling... -CalculatorImpl.cpp -CalculatorImpl_CalculatorService_Proxy.cpp -CalculatorImpl_CalculatorService_Wrapper.cpp -Linking... - Creating library Debug/CalculatorModule.lib and object Debug/CalculatorModule.exp - - - -

      Results

      -CalculatorModule.dll - 0 error(s), 0 warning(s) -
      - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile deleted file mode 100644 index 1e7f19fce8..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/makefile +++ /dev/null @@ -1,43 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -ROOT := .. - --include $(ROOT)/makefile.init - -RM := rm -rf - -# All of the sources participating in the build are defined here --include sources.mk --include $(SUBDIRS:%=%/subdir.mk) --include objects.mk -ifneq ($(strip $(DEPS)),) --include $(DEPS) -endif - --include $(ROOT)/makefile.defs - -# Add inputs and outputs from these tool invocations to the build variables - -# All Target -all: libCalculatorModule.so - -# Tool invocations -libCalculatorModule.so: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - @echo g++ -L${SCA4CPP}/lib -shared -olibCalculatorModule.so $(OBJS) $(USER_OBJS) $(LIBS) - @g++ -L${SCA4CPP}/lib -shared -olibCalculatorModule.so $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(OBJS)$(DEPS)$(LIBRARIES) libCalculatorModule.so - -@echo ' ' - -.PHONY: all clean dependents -.SECONDARY: - --include $(ROOT)/makefile.targets diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk deleted file mode 100644 index fbdb88403a..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/objects.mk +++ /dev/null @@ -1,7 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -LIBS := -ltuscany_sca - -USER_OBJS := \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk deleted file mode 100644 index 8f0795952f..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/sources.mk +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -C_UPPER_SRCS := -CPP_SRCS := -O_SRCS := -ASM_SRCS := -S_SRCS := -CXX_SRCS := -CC_SRCS := -OBJ_SRCS := -OBJS := -DEPS := -LIBRARIES := - -# Every subdirectory with source files must be described here -SUBDIRS := \ -. \ - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk deleted file mode 100644 index dd98e3ddc6..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/Debug/subdir.mk +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -$(ROOT)/CalculatorImpl.cpp \ -$(ROOT)/CalculatorImpl_CalculatorService_Proxy.cpp \ -$(ROOT)/CalculatorImpl_CalculatorService_Wrapper.cpp - -OBJS += \ -./CalculatorImpl.o \ -./CalculatorImpl_CalculatorService_Proxy.o \ -./CalculatorImpl_CalculatorService_Wrapper.o - -DEPS += \ -${addprefix ./, \ -CalculatorImpl.d \ -CalculatorImpl_CalculatorService_Proxy.d \ -CalculatorImpl_CalculatorService_Wrapper.d \ -} - - -# Each subdirectory must supply rules for building sources it contributes -%.o: $(ROOT)/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< - @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ - echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ - g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module deleted file mode 100644 index c000e57411..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin b/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin deleted file mode 100644 index 2298b5910f..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorModule/sca.module.lin +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp b/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp deleted file mode 100644 index ed7ceef2a4..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp +++ /dev/null @@ -1,67 +0,0 @@ -# Microsoft Developer Studio Project File - Name="CalculatorSubsystem" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=CalculatorSubsystem - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "CalculatorSubsystem.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "CalculatorSubsystem.mak" CFG="CalculatorSubsystem - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "CalculatorSubsystem - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "CalculatorSubsystem - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -MTL=midl.exe - -!IF "$(CFG)" == "CalculatorSubsystem - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" - -!ELSEIF "$(CFG)" == "CalculatorSubsystem - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" - -!ENDIF - -# Begin Target - -# Name "CalculatorSubsystem - Win32 Release" -# Name "CalculatorSubsystem - Win32 Debug" -# Begin Source File - -SOURCE=.\sca.subsystem -# End Source File -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem b/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem deleted file mode 100644 index 4b9fdd1511..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/CalculatorSubsystem/sca.subsystem +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild b/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild deleted file mode 100644 index 68fe431c95..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject b/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.project b/tags/cpp-sca-20060405/samples/Calculator/Client/.project deleted file mode 100644 index 20d79410f9..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - CalculatorClient - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 64ec20058b..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Dec 13 10:20:35 GMT 2005 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp b/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp deleted file mode 100644 index 8322532617..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| (c) Copyright IBM Corporation 2005. | -| All Rights Reserved. | -+----------------------------------------------------------------------+ -| | -| 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 "Calculator.h" -#include "osoa/sca/sca.h" -#include -#include - -using namespace osoa::sca; -using namespace std; - -void usage(); -bool IsNumber(const char *p); - -int main(int argc, char* argv[]) -{ - const char *operation; - float arg1 = 0; - float arg2 = 0; - - if (argc == 4) - { - operation = argv[1]; - - if (!IsNumber(argv[2])) - { - cout << "Calc.exe: Argument 1 is not a number" << endl; - usage(); - } - else - { - arg1 = atof(argv[2]); - } - - if (!IsNumber(argv[3])) - { - cout << "Calc.exe: Argument 2 is not a number" << endl; - usage(); - } - else - { - arg2 = atof(argv[3]); - } - } - else - { - usage(); - } - - try - { - - // Set the default module environment variable: / - //char *defaultModule = "SCA4CPP_DEFAULT_MODULE=SubSystem2/CalculatorServiceModule"; - //putenv(defaultModule); - - // Locate a service - ModuleContext myContext = ModuleContext::getCurrent(); - Calculator *calcService = (Calculator*) myContext.locateService("CalculatorServiceComponent"); - if (calcService == 0) - { - cout << "Calc.exe: Unable to find Calculator service" << endl; - } - else - { - try - { - float result = 0; - if (strcmp(operation, "add") == 0) - { - result = calcService->add(arg1, arg2); - cout << "Calculator: add(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - if (strcmp(operation, "sub") == 0) - { - result = calcService->sub(arg1, arg2); - cout << "Calculator: sub(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - if (strcmp(operation, "mul") == 0) - { - result = calcService->mul(arg1, arg2); - cout << "Calculator: mul(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - if (strcmp(operation, "div") == 0) - { - result = calcService->div(arg1, arg2); - cout << "Calculator: div(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - { - cout << "Calculator: Unrecognized operation: " << operation << endl; - } - } - catch (char* x) - { - cout << "Calc.exe: exception caught: " << x << endl; - } - } - - } - catch (ServiceRuntimeException& ex) - { - cout << ex << endl; - } - return 0; -} - -void usage() -{ - cout << "Usage: calc add|sub|mul|div arg1 arg2" << endl; - exit(1); -} - -bool IsNumber (const char *p) -{ - int len = strlen(p); - for (int i = 0; i < len; i++) - { - if (!isdigit (p[i])) - { - return false; - } - } - return true; -} diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h b/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h deleted file mode 100644 index 9284178d5f..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| (c) Copyright IBM Corporation 2005. | -| All Rights Reserved. | -+----------------------------------------------------------------------+ -| | -| 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 CALCULATOR_H -#define CALCULATOR_H -class Calculator -{ -public: - virtual float add(float arg1, float arg2) = 0; - virtual float sub(float arg1, float arg2) = 0; - virtual float mul(float arg1, float arg2) = 0; - virtual float div(float arg1, float arg2) = 0; -}; - -#endif - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp b/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp deleted file mode 100644 index 75a19ae815..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Client" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Client - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Client.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Client.mak" CFG="Client - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Client - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Client - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Client - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "Client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" - -!ENDIF - -# Begin Target - -# Name "Client - Win32 Release" -# Name "Client - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Calc.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Calculator.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\readme.txt -# End Source File -# End Target -# End Project diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg b/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg deleted file mode 100644 index 0f33cc8711..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg +++ /dev/null @@ -1,16 +0,0 @@ - - -
      -

      Build Log

      -

      ---------------------Configuration: Client - Win32 Debug-------------------- -

      -

      Command Lines

      - - - -

      Results

      -Client.exe - 0 error(s), 0 warning(s) -
      - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile deleted file mode 100644 index 4fed2ace08..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile +++ /dev/null @@ -1,43 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -ROOT := .. - --include $(ROOT)/makefile.init - -RM := rm -rf - -# All of the sources participating in the build are defined here --include sources.mk --include $(SUBDIRS:%=%/subdir.mk) --include objects.mk -ifneq ($(strip $(DEPS)),) --include $(DEPS) -endif - --include $(ROOT)/makefile.defs - -# Add inputs and outputs from these tool invocations to the build variables - -# All Target -all: CalculatorClient - -# Tool invocations -CalculatorClient: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C++ Linker' - @echo g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) - @g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(OBJS)$(DEPS)$(EXECUTABLES) CalculatorClient - -@echo ' ' - -.PHONY: all clean dependents -.SECONDARY: - --include $(ROOT)/makefile.targets diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk deleted file mode 100644 index a6aa648eba..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk +++ /dev/null @@ -1,7 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -LIBS := -ltuscany_sca -ltuscany_sdo -lxml2 -laxis_clientC -laxis_client - -USER_OBJS := \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk deleted file mode 100644 index 3c384d3f72..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -C_UPPER_SRCS := -CPP_SRCS := -O_SRCS := -ASM_SRCS := -S_SRCS := -CXX_SRCS := -CC_SRCS := -OBJ_SRCS := -OBJS := -DEPS := -EXECUTABLES := - -# Every subdirectory with source files must be described here -SUBDIRS := \ -. \ - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk deleted file mode 100644 index 3328b2862f..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk +++ /dev/null @@ -1,29 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -CPP_SRCS += \ -$(ROOT)/Calc.cpp - -OBJS += \ -./Calc.o - -DEPS += \ -${addprefix ./, \ -Calc.d \ -} - - -# Each subdirectory must supply rules for building sources it contributes -%.o: $(ROOT)/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< - @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ - echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ - g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt b/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt deleted file mode 100644 index 615f1533b1..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt +++ /dev/null @@ -1,53 +0,0 @@ -Tuscany SCA for C++ Samples - Calculator Sample -=============================================== - -This is a very simple sample to show how an SCA module with a single component -can be built and called from an executable. - -There are three sub projects in this workspace: - - CalculatorModule - This contains the source code and SCA artifacts for the SCA module. This - is the module that will be deployed into the SCA runtime. - - CalculatorSubsystem - This contains the sca.subsystem file which describes a subsystem to the - SCA runtime. - - Client - An example client which will call the service exposed by the single component - in the CalculatorModule. - - -Build instructions ------------------- - -1) Build the SCA module. - - Set CalculatorModule project as the active project. - Right click->Set as active project - - - Run the SCA generation tool to create the proxy and wrapper classes. - Either Tools->SCA Gen if you have added SCA Gen as an external tool - Or run from the command line: - scagen -dir -output - where the projectDirectory is the directory with the sca.module file. - - - Rebuild All - Build->Rebuild All - -2) Package and deploy the SCA module - - There is a script file in the sca/samples/Calculator directory which will - copy across all the files needed for deployment to the Tuscany runtime. - On a command line run pack_deploy.cmd - As a default, the sample will be copied to sca/samples/runtime directory - Both the SCA module and the subsystem will be copied. - -3) Build the client - - Set the Client project as the active project. - Right click->Set as active project - - - Rebuild All - Build->Rebuild All - -4) Run the client - - Use the command file in the sca/samples/Calculator/Client directory to run the - client. This command file will set the SCA environment variables before running - the client. For example, - runclient add 4 9 diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd b/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd deleted file mode 100644 index 8aa6f24f65..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd +++ /dev/null @@ -1,14 +0,0 @@ -@echo off -rem Runs the client after setting the SCA environment variables to use the -rem CalculatorSubsystem -setlocal -set SCA4CPP_SYSTEM_ROOT=%~d0%~p0\..\..\runtime - -rem Only need to specify the subsystem (and not the moduleComponent as well) because -rem there is only one moduleComponent in the subsystem - it is a very simple sample. -set SCA4CPP_DEFAULT_MODULE=CalculatorSubsystem - -rem Run the client -%~d0%~p0\debug\Client.exe %* - -endlocal \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/build.sh b/tags/cpp-sca-20060405/samples/Calculator/build.sh deleted file mode 100755 index 3e2dbcb0bc..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/build.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -# 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. - -APFULLDIR=`pwd` - -export SCA4CPP_HOME="$APFULLDIR/../../" - -if [ x$SCA4CPP = x ]; then -export SCA4CPP="$SCA4CPP_HOME" -fi -echo "Using SCA installed at $SCA4CPP" - -if [ x$AXISCPP_DEPLOY = x ]; then -echo "AXISCPP_DEPLOY not set" -exit; -fi -echo "Using Axis C++ installed at $AXISCPP_DEPLOY" - -if [ x$XERCES_DEPLOY = x ]; then -echo "XERCES_DEPLOY not set" -exit; -fi -echo "Using Xerces C++ installed at $XERCES_DEPLOY" - -if [ x$SDO4CPP = x ]; then -echo "SDO4CPP not set" -export SDO4CPP=$SCA4CPP_HOME/../sdo -fi -echo "Using SDO installed at $SDO4CPP" - -TEST_ROOT=$APFULLDIR - -cd $SCA4CPP/bin -./scagen.sh -dir $TEST_ROOT/CalculatorModule -output $TEST_ROOT/CalculatorModule -cd $TEST_ROOT/CalculatorModule/Debug -make clean -make - -cd $TEST_ROOT/Client/Debug -make clean -make - -TEST_SYSTEM=$TEST_ROOT/../runtime - -mkdir -p $TEST_SYSTEM/modules/CalculatorModule -mkdir -p $TEST_SYSTEM/subsystems/CalculatorSubsystem - -cp $TEST_ROOT/CalculatorModule/sca.module.lin $TEST_SYSTEM/modules/CalculatorModule/sca.module -cp $TEST_ROOT/CalculatorModule/*.componentType $TEST_SYSTEM/modules/CalculatorModule -cp $TEST_ROOT/CalculatorModule/Calculator.h $TEST_SYSTEM/modules/CalculatorModule -cp $TEST_ROOT/CalculatorModule/CalculatorImpl.h $TEST_SYSTEM/modules/CalculatorModule -cp $TEST_ROOT/CalculatorModule/Debug/libCalculatorModule.so $TEST_SYSTEM/modules/CalculatorModule -cp $TEST_ROOT/CalculatorSubsystem/sca.subsystem $TEST_SYSTEM/subsystems/CalculatorSubsystem - -export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib - -export TUSCANY_SCACPP=$SCA4CPP -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem - -cd $TEST_ROOT/Client -Debug/CalculatorClient add 4 9 diff --git a/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd b/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd deleted file mode 100644 index eed6af8411..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/pack_deploy.cmd +++ /dev/null @@ -1,27 +0,0 @@ -@echo off -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set sourcePath=%~d0%~p0 -if . == %1. ( -set destinationPath=%sourcePath%..\runtime -) ELSE ( -set destinationPath=%1 -) - -mkdir %destinationPath%\modules -mkdir %destinationPath%\modules\CalculatorModule -copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule -copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule -copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule -copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule - -copy %sourcePath%\CalculatorModule\debug\CalculatorModule.dll %destinationPath%\modules\CalculatorModule - - -mkdir %destinationPath%\subsystems -mkdir %destinationPath%\subsystems\CalculatorSubsystem -copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem - - -endlocal \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/Calculator/runclient.sh b/tags/cpp-sca-20060405/samples/Calculator/runclient.sh deleted file mode 100755 index b16ec76414..0000000000 --- a/tags/cpp-sca-20060405/samples/Calculator/runclient.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# 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. - -APFULLDIR=`pwd` -export SCA4CPP_HOME="$APFULLDIR/../../" - -if [ x$SCA4CPP = x ]; then -export SCA4CPP="$SCA4CPP_HOME" -fi -echo "Using SCA installed at $SCA4CPP" - -if [ x$AXISCPP_DEPLOY = x ]; then -echo "AXISCPP_DEPLOY not set" -exit; -fi -echo "Using Axis C++ installed at $AXISCPP_DEPLOY" - -if [ x$XERCES_DEPLOY = x ]; then -echo "XERCES_DEPLOY not set" -exit; -fi -echo "Using Xerces C++ installed at $XERCES_DEPLOY" - -if [ x$SDO4CPP = x ]; then -echo "SDO4CPP not set" -export SDO4CPP=$SCA4CPP_HOME/../sdo -fi -echo "Using SDO installed at $SDO4CPP" - -TEST_ROOT=$APFULLDIR -TEST_SYSTEM=$TEST_ROOT/../runtime - -export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib - -export TUSCANY_SCACPP=$SCA4CPP -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem - -cd $TEST_ROOT/Client -Debug/CalculatorClient add 4 9 diff --git a/tags/cpp-sca-20060405/samples/Makefile.am b/tags/cpp-sca-20060405/samples/Makefile.am deleted file mode 100644 index 8cd2985ea1..0000000000 --- a/tags/cpp-sca-20060405/samples/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = MyValue diff --git a/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am b/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am deleted file mode 100644 index e404f8f077..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/Client/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -prgbindir=$(prefix)/samples/bin -prgbin_PROGRAMS = MyValueClient - -MyValueClient_SOURCES = MyValueClient.cpp - -MyValueClient_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ - -L$(AXISCPP_DEPLOY)/lib -laxis_client -lxml2 - -INCLUDES = -I.. \ - -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXISCPP_DEPLOY}/include diff --git a/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp b/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp deleted file mode 100755 index 9c5c24486a..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/Client/MyValueClient.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* - * - * 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. - */ -#pragma warning(disable: 4786) - -#include "commonj/sdo/Logger.h" -#include "commonj/sdo/SDO.h" -#include "commonj/sdo/HelperProvider.h" -#include "osoa/sca/sca.h" -#include "tuscany/sca/util/Logger.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/ws/SDOStub.h" -#include - -using namespace std; -using namespace osoa::sca; -using namespace tuscany::sca; -using namespace commonj::sdo; -using namespace tuscany::sca::ws; - -void usage(); - -// -// MyValueClient is a sample application that invokes operations on the -// MyValueService Web Service. -// -int main(int argc, char* argv[]) -{ - - // - // Schema file for the types used by MyValueService - // - char *pszXSD; - - // - // The WebService endpoint uri. - // - char *pszEndpoint; - - // - // TargetNamespace - // - const char *pszTargetNamespace; - - // - // SOAPAction - // - // Axis 1.5: SoapAction must be #. - const char *pcszSoapAction = "MyValueService#getMyValue"; - - // - // Operation Name - // - const char *pcszOperationName = "getMyValue"; - - // - // Operation Response Name - // - const char *pcszOperationResponseName = "getMyValueResponse"; - - - // Get the input parameters. - if (argc == 3) - { - // Schema file. - pszXSD = argv[1]; - // Web Service endpoint. - pszEndpoint = argv[2]; - } - else - { - usage(); - } - - // The current version of SDO does not support the embedded schema in the wsdl file, - // so we have to load an external schema. - XSDHelperPtr xsdHelper = HelperProvider::getXSDHelper(); - - try - { - cout << "define file: " << pszXSD <defineFile(pszXSD); - } - catch (SDORuntimeException ex) - { - cout << ex << endl; - exit(1); - } - cout << "define file done: " << pszTargetNamespace <getDataFactory(); - DataObjectPtr requestDO = 0; - - try - { - // Create the root element for the operation and then add the parameters - // we need to invoke the operation. - requestDO = factory->create(pszTargetNamespace, pcszOperationName); - requestDO->setCString("customerID", "12345"); - } - catch (SDORuntimeException e) - { - cout << "SDORuntimeException: " << e << endl; - exit(1); - } - - // - // Create an SDOStub that will use the request SDO to invoke the operation. - // - SDOStub *stub = new SDOStub(); - stub->setEndpoint(pszEndpoint); - stub->setOperationName(pcszOperationName); - stub->setTargetNamespace(pszTargetNamespace); - stub->setOperationResponseName(pcszOperationResponseName); - stub->setSoapAction(pcszSoapAction); - // DEBUG - Don't let the soap transport timeout while debugging. - stub->setTransportTimeout(0); - // DEBUG - - try - { - // Invoke the operation. - DataObjectPtr responseDO = stub->invoke(requestDO, factory); - // Print the response. - if (responseDO != 0) - { - cout << "MyValueClient: response DataObject = " << endl; - Utils::printDO(responseDO); - cout << endl; - float fValue = responseDO->getFloat("myValue"); - cout << "MyValueClient: myValue = " << fValue; - } - else - { - cout << "MyValueClient: MyValueService did not return a result" << endl; - } - } - catch (SDORuntimeException& e) - { - cout << "SDORuntimeException: " << e << endl; - } - catch (ServiceRuntimeException& e) - { - cout << "ServiceRuntimeException: " << e << endl; - } - catch(exception& e) - { - cout << "Exception: " << e.what() << endl; - } - - - return 0; -} - -// -// Print usage message. -// -void usage() -{ - cout << "MyValueClient.exe: Invoke operations on MyValueService Web Service" << endl; - cout << "Usage: MyValueClient XSD endpoint" << endl; - cout << "where XSD = path and name of XSD file that defines the MyValue types" << endl; - cout << " endpoint = web service endpoint" << endl; - exit(1); -} diff --git a/tags/cpp-sca-20060405/samples/MyValue/Makefile.am b/tags/cpp-sca-20060405/samples/MyValue/Makefile.am deleted file mode 100644 index 7541093280..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -SUBDIRS = MyValueModule Client - -deploy_dir = $(top_builddir)/samples/runtime -deploy_module = $(deploy_dir)/modules/MyValueModule - -install-exec-local: - cp MyValueSubsystem/sca.subsystem $(deploy_dir)/subsystems/MyValueSubsystem - cp MyValueModule/sca.module $(deploy_module) - cp MyValueModule/CustomerInfo.fragment $(deploy_module) - cp MyValueModule/Tuscany-model.config $(deploy_module) - cp MyValueModule/CustomerInfo/CustomerInfoImpl.componentType $(deploy_module)/CustomerInfo - cp MyValueModule/CustomerInfo/.libs/libCustomerInfo.so $(deploy_module)/CustomerInfo - cp MyValueModule/CustomerInfo/CustomerInfo.h $(deploy_module)/CustomerInfo - cp MyValueModule/CustomerInfo/CustomerInfoImpl.h $(deploy_module)/CustomerInfo - cp MyValueModule/MyValue/MyValueImpl.componentType $(deploy_module)/MyValue - cp MyValueModule/MyValue/MyValue.h $(deploy_module)/MyValue - cp MyValueModule/MyValue/MyValueImpl.h $(deploy_module)/MyValue - cp MyValueModule/MyValue/MyValueService.wsdl $(deploy_module)/MyValue - cp MyValueModule/MyValue/.libs/libMyValue.so $(deploy_module)/MyValue - cp MyValueModule/StockQuoteService/StockQuoteService.h $(deploy_module)/StockQuoteService - cp MyValueModule/StockQuoteService/StockQuoteService.wsdl $(deploy_module)/StockQuoteService - - diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment deleted file mode 100755 index b7f79799b5..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo.fragment +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h deleted file mode 100755 index 766fc55fe6..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date$ */ - -#ifndef CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: - virtual const char* getCustomerInformation(const char* customerID) = 0; - -}; - -#endif diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType deleted file mode 100755 index 52988cb90a..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp deleted file mode 100755 index ed3ff5e2ff..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date$ */ - -#include "CustomerInfoImpl.h" -#include -#include -#include "osoa/sca/sca.h" -#include "commonj/sdo/DataObjectInstance.h" -using namespace osoa::sca; -using namespace commonj::sdo; - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -CustomerInfoImpl::CustomerInfoImpl() -{ - cout << "Construct CustomerInfoImpl" << endl; - -} - -CustomerInfoImpl::~CustomerInfoImpl() -{ - cout << "Destroy CustomerInfoImpl" << endl; -} - -////////////////////////////////////////////////////////////////////// -// Other methods -////////////////////////////////////////////////////////////////////// -const char* CustomerInfoImpl::getCustomerInformation(const char* customerID) -{ - cout << "In getCustomerInformation with customerid: " << customerID << endl; - - - - ComponentContext myContext = ComponentContext::getCurrent(); - - DataObjectInstance properties = myContext.getProperties(); - DataObjectInstance props2 = properties; - if (properties) - { - const char* fredVal = properties->getCString("Fred"); - cout << "Property Fred value: " << fredVal <getList("Joe"); - for (int i=0; i - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp deleted file mode 100755 index 4a2d64ea6d..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * - * 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. - */ - -// -// MyValueImpl.cpp: implementation of the MyValueImpl class. -// - -#include "commonj/sdo/HelperProvider.h" -#include "commonj/sdo/SDO.h" -#include "osoa/sca/sca.h" -#include "MyValueImpl.h" -#include "CustomerInfo/CustomerInfo.h" -#include "StockQuoteService/StockQuoteService.h" -#include - -using namespace std; -using namespace osoa::sca; -using namespace commonj::sdo; - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -MyValueImpl::MyValueImpl() -{ - cout << "Construct MyValueImpl" << endl; - -} - -MyValueImpl::~MyValueImpl() -{ - cout << "Destroy MyValueImpl" << endl; -} - -////////////////////////////////////////////////////////////////////// -// Other methods -////////////////////////////////////////////////////////////////////// -DataObjectPtr MyValueImpl::getMyValue(DataObjectPtr inDataObject) -{ - DataObjectPtr responseDO = 0; - - string customerID = inDataObject->getCString("customerID"); - cout << "In getMyValue with customerid: " << customerID << endl; - - // Get the CustomerInfo service. - ComponentContext myContext = ComponentContext::getCurrent(); - CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo"); - - if (customerInfoService == 0) - { - cout << "Unable to find customer info service" << endl; - - return responseDO; - } - - // Get the name of the stock for customer 'customerID' from the customerInfoService. - const char * stock; - try - { - stock = customerInfoService->getCustomerInformation(customerID.c_str()); - } - catch(const char* x) - { - cout << "Exception caught: " << x <getCustomerInformation(customerID.c_str()); - cout << "Stock from getServices " << i << " : " << stock <create("http://swanandmokashi.com", "GetQuotes"); - stockQuoteRequestDO->setCString("QuoteTicker", stock); - - // Invoke the StockQuoteService - DataObjectPtr stockQuoteResponseDO = stockQuoteService->GetStockQuotes(stockQuoteRequestDO); - - // DEBUG (Print the response from the StockQuoteService) - XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(factory);; - XMLDocumentPtr responseDoc = - xmlHelper->createDocument(stockQuoteResponseDO, "http://swanandmokashi.com", "GetQuotesResponse"); - responseDoc->setXMLDeclaration(false); - char *responseXML = xmlHelper->save(responseDoc); - cout << "Response XML from StockQuoteService = " << endl; - cout << responseXML << endl; - cout << endl; - // DEBUG - - // Create the MyValueService response DataObject using the results of the StockQuoteService. - responseDO = factory->create("http://www.myvalue.org/MyValueService/", "getMyValueResponse"); - DataObjectPtr getQuotesResultDO = stockQuoteResponseDO->getDataObject("GetQuotesResult"); - DataObjectList& quoteList = getQuotesResultDO->getList("Quote"); - float fQuote = quoteList[0]->getFloat("StockQuote"); - - responseDO->setFloat("myValue", fQuote); - } - catch (SDORuntimeException sdoE) - { - cout << sdoE; - } - - return responseDO; - -} - diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h deleted file mode 100755 index 05aa7066c1..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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 MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - -class MyValueImpl : public MyValue -{ -public: - MyValueImpl(); - virtual ~MyValueImpl(); - virtual DataObjectPtr getMyValue(DataObjectPtr inDataObject); -}; - -#endif diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl deleted file mode 100755 index 3bc1a12d5c..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd deleted file mode 100755 index 4a1674f89d..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h deleted file mode 100755 index 7da4069bd1..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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. - */ - -/* $Rev$ $Date$ */ - -#ifndef StockQuoteService_h -#define StockQuoteService_h -#include -#include "commonj/sdo/SDO.h" -using std::string; -class StockQuoteService -{ -public: - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; - -}; - -#endif // StockQuoteService_h diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl deleted file mode 100755 index 4917cde583..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config deleted file mode 100755 index 2667f62990..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/Tuscany-model.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module b/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module deleted file mode 100755 index bda42e04bc..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueModule/sca.module +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem b/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem deleted file mode 100755 index ae858ea331..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/MyValueSubsystem/sca.subsystem +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh b/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh deleted file mode 100755 index e5feeda1f0..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/runMyValueClient.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# 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. - - -APFULLDIR=`pwd` - -export SCA4CPP_HOME="$APFULLDIR" -if [ x$SCA4CPP = x ]; then -export TUSCANY_SCACPP="$SCA4CPP_HOME" -fi -echo "Using SCA installed at $SCA4CPP_HOME" - -if [ x$AXISCPP_DEPLOY = x ]; then -echo "AXISCPP_DEPLOY not set" -exit; -fi -echo "Using Axis C++ installed at $AXISCPP_DEPLOY" - -if [ x$XERCES_DEPLOY = x ]; then -echo "XERCES_DEPLOY not set" -exit; -fi -echo "Using Xerces C++ installed at $XERCES_DEPLOY" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set"exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -TEST_ROOT=$SCA4CPP_HOME/runtime/core/test - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT/testSCASystem -export TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1 - -cd $TUSCANY_SCACPP/bin/test -./tuscany_sca_test diff --git a/tags/cpp-sca-20060405/samples/MyValue/server.wsdd b/tags/cpp-sca-20060405/samples/MyValue/server.wsdd deleted file mode 100755 index 8b80b4b6ec..0000000000 --- a/tags/cpp-sca-20060405/samples/MyValue/server.wsdd +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem b/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem deleted file mode 100755 index ae858ea331..0000000000 --- a/tags/cpp-sca-20060405/samples/runtime/subsystems/MyValueSubsystem/sca.subsystem +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/scatest.sh b/tags/cpp-sca-20060405/scatest.sh deleted file mode 100755 index 62bf992bbc..0000000000 --- a/tags/cpp-sca-20060405/scatest.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# 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. - - -APFULLDIR=`pwd` - -export SCA4CPP_HOME="$APFULLDIR" -if [ x$SCA4CPP = x ]; then -export TUSCANY_SCACPP="$SCA4CPP_HOME" -fi -echo "Using SCA installed at $SCA4CPP_HOME" - -if [ x$AXISCPP_DEPLOY = x ]; then -echo "AXISCPP_DEPLOY not set" -exit; -fi -echo "Using Axis C++ installed at $AXISCPP_DEPLOY" - -if [ x$XERCES_DEPLOY = x ]; then -echo "XERCES_DEPLOY not set" -exit; -fi -echo "Using Xerces C++ installed at $XERCES_DEPLOY" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set"exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -TEST_ROOT=$SCA4CPP_HOME/runtime/core/test - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT -export TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1 - -cd $TUSCANY_SCACPP/bin/test -./tuscany_sca_test diff --git a/tags/cpp-sca-20060405/tools/scagen/build.xml b/tags/cpp-sca-20060405/tools/scagen/build.xml deleted file mode 100644 index 5207b6cc79..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/build.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SCA for C++ Tools]]> - - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html deleted file mode 100644 index 1eb0408cef..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-frame.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - -All Classes (SCA for C++ Tools) - - - - - - - - - - -All Classes -
      - - - - - -
      BodyPart -
      -CParsingTool -
      -ComponentDomNodeHandler -
      -ComponentTypeFileHandler -
      -Configuration -
      -DirectoryScanner -
      -DirectoryTree -
      -DomHandler -
      -DomNodeHandler -
      -FileActor -
      -FilePart -
      -GenericDomNodeHandler -
      -Headers -
      -InputCppSourceCode -
      -LittleClass -
      -MethodPart -
      -ModuleOrFragmentFileHandler -
      -Options -
      -Parameter -
      -ParsingException -
      -PrototypePart -
      -ReferenceDomNodeHandler -
      -Scagen -
      -ServiceDomNodeHandler -
      -ServicesGenerator -
      -Signature -
      -Utils -
      -XMLFileActor -
      -
      - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html deleted file mode 100644 index fdbfa13e1c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/allclasses-noframe.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - -All Classes (SCA for C++ Tools) - - - - - - - - - - -All Classes -
      - - - - - -
      BodyPart -
      -CParsingTool -
      -ComponentDomNodeHandler -
      -ComponentTypeFileHandler -
      -Configuration -
      -DirectoryScanner -
      -DirectoryTree -
      -DomHandler -
      -DomNodeHandler -
      -FileActor -
      -FilePart -
      -GenericDomNodeHandler -
      -Headers -
      -InputCppSourceCode -
      -LittleClass -
      -MethodPart -
      -ModuleOrFragmentFileHandler -
      -Options -
      -Parameter -
      -ParsingException -
      -PrototypePart -
      -ReferenceDomNodeHandler -
      -Scagen -
      -ServiceDomNodeHandler -
      -ServicesGenerator -
      -Signature -
      -Utils -
      -XMLFileActor -
      -
      - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html deleted file mode 100644 index e9b450cd20..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/constant-values.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - -Constant Field Values (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      -
      -

      -Constant Field Values

      -
      -
      -Contents - - - - - - -
      -org.apache.*
      - -

      - - - - - - - - - - - - - - - - - - - - - - -
      org.apache.tuscany.sca.cpp.tools.common.BodyPart
      -public static final intCATCH2
      -public static final intRETURN1
      -public static final intTRAILING0
      - -

      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      org.apache.tuscany.sca.cpp.tools.common.FilePart
      -public static final intBEGINSCOPE4
      -public static final intCLASSATTRIBUTE9
      -public static final intCOMMENT1
      -public static final intDIRECTIVE6
      -public static final intENDSCOPE5
      -public static final intENUM10
      -public static final intFIELD3
      -public static final intMACRO8
      -public static final intMETHOD2
      -public static final intPROTOTYPE11
      -public static final intTYPEDEF12
      -public static final intUNKNOWN0
      -public static final intWHITESPACE7
      - -

      - -

      - - - - - - - - - - - - -
      org.apache.tuscany.sca.cpp.tools.common.Utils
      -public static final java.lang.Stringwhitespace" \t\r\n"
      - -

      - -

      - - - - - - - - - - - - -
      org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      -public static final intELEMENT1
      - -

      - -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html deleted file mode 100644 index 9063a7fff9..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/deprecated-list.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Deprecated List (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Deprecated API

      -
      -
      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html deleted file mode 100644 index 5a4302b221..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/help-doc.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -API Help (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -How This API Document Is Organized

      -
      -This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

      -Overview

      -
      - -

      -The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

      -

      -Package

      -
      - -

      -Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

        -
      • Interfaces (italic)
      • Classes
      • Exceptions
      • Errors
      -
      -

      -Class/Interface

      -
      - -

      -Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

        -
      • Class inheritance diagram
      • Direct Subclasses
      • All Known Subinterfaces
      • All Known Implementing Classes
      • Class/interface declaration
      • Class/interface description -

        -

      • Nested Class Summary
      • Field Summary
      • Constructor Summary
      • Method Summary -

        -

      • Field Detail
      • Constructor Detail
      • Method Detail
      -Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
      -

      -Use

      -
      -Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
      -

      -Tree (Class Hierarchy)

      -
      -There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
        -
      • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
      • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
      -
      -

      -Deprecated API

      -
      -The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
      -

      -Index

      -
      -The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
      -

      -Prev/Next

      -These links take you to the next or previous class, interface, package, or related page.

      -Frames/No Frames

      -These links show and hide the HTML frames. All pages are available with or without frames. -

      -

      -Serialized Form

      -Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -

      - - -This help file applies to API documentation generated using the standard doclet. - -
      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html deleted file mode 100644 index dab7cf9cd3..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/index-all.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - -Index (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - - -A B C D E F G H I L M O P Q R S T U V W X
      -

      -A

      -
      -
      actOnFile(File, File, int) - -Method in interface org.apache.tuscany.sca.cpp.tools.common.FileActor -
        -
      actOnFile(File, File, int) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      actOnFile(File, File, int) - -Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
      This method is the main FileActor method -
      -
      -

      -B

      -
      -
      BEGINSCOPE - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      BodyPart - class org.apache.tuscany.sca.cpp.tools.common.BodyPart.
      A snippet of C or C++ source code.
      -
      -

      -C

      -
      -
      CATCH - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      CLASSATTRIBUTE - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      COMMENT - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      CParsingTool - class org.apache.tuscany.sca.cpp.tools.common.CParsingTool.
      The superclass of tools that parse C/C++ code.
      CParsingTool(String[]) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
        -
      ComponentDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler.
      This class will do the required processing for the element of a - sca module or fragment file.
      ComponentDomNodeHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler -
        -
      ComponentTypeFileHandler - class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler.
      The purpose of this class is to specialise the map of XML element handlers - for a XXX.componentType file that is used by the XMLFileActor
      ComponentTypeFileHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler -
        -
      Configuration - class org.apache.tuscany.sca.cpp.tools.common.Configuration.
      Encapsulates the tool's configuration file
      cPrimitives - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.Utils -
        -
      cTypeQualifiers - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.Utils -
        -
      checkFile(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
      Checks the source directory looks good. -
      classExcluded(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      cppsource - -Variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      createDomFromXMLFile(File) - -Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
      This method builds an in memory DOM from an XML file -
      -
      -

      -D

      -
      -
      DIRECTIVE - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      DirectoryScanner - class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner.
       
      DirectoryScanner(FileActor, Set) - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner -
        -
      DirectoryTree - class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree.
       
      DirectoryTree(FileActor, Set) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree -
        -
      DomHandler - class org.apache.tuscany.sca.cpp.tools.services.DomHandler.
      The purpose of this class it to provide a generic class that can handle both - a DOM and a DOM node.
      DomHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.DomHandler -
        -
      DomNodeHandler - interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler.
       
      -
      -

      -E

      -
      -
      ELEMENT - -Static variable in interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler -
        -
      ENDSCOPE - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      ENUM - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      equals(Object) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
      For two parameters to match their types must match or both be null, but - the parameters names don't have to match. -
      equals(Object) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      -
      -

      -F

      -
      -
      FIELD - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      FileActor - interface org.apache.tuscany.sca.cpp.tools.common.FileActor.
      DirectoryTree calls this interface to allow implementations of this interface - to act on a file in the directory tree.
      FilePart - class org.apache.tuscany.sca.cpp.tools.common.FilePart.
      A piece of C++ source code
      failed - -Variable in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
        -
      failed() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      failed() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      failed() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      failed - -Variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
        -
      fileExcluded(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      -
      -

      -G

      -
      -
      GenericDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler.
       
      GenericDomNodeHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler -
        -
      getAllMethods() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
      Tuscany change - a method to get all the method signatures at once -
      getAttributes() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getBodyParts() - -Method in class org.apache.tuscany.sca.cpp.tools.common.MethodPart -
      Returns the method body as code snippets, each ending with a place where - a trace statement belongs. -
      getCaughtValue() - -Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      getClassName() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getCodeFragment() - -Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      getConfigured(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      getFilesActedOn() - -Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
        -
      getMethodName() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getMethods(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      getName() - -Method in class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode -
        -
      getName() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      getNamespace() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getOption(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Options -
        -
      getOriginal() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getOriginalSignature() - -Method in class org.apache.tuscany.sca.cpp.tools.common.MethodPart -
        -
      getParameter(String, Object) - -Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
      Get a parameter -
      getParameters() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getPartIterator() - -Method in class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode -
        -
      getReturnType() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getReturnValue() - -Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      getScope() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getSignature() - -Method in class org.apache.tuscany.sca.cpp.tools.common.MethodPart -
        -
      getSignature() - -Method in class org.apache.tuscany.sca.cpp.tools.common.PrototypePart -
        -
      getTrimClassName() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      getType() - -Method in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      getType() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      getTypeWithoutConst() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      -
      -

      -H

      -
      -
      Headers - class org.apache.tuscany.sca.cpp.tools.common.Headers.
       
      Headers() - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      handleChildElements(Node, String, Map, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler -
      This method will iterate through the DOM node's children and call the - appropriate handler for each one. -
      handleComponentTypeFile(File, File) - -Method in class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler -
      This method just exists to add the default starting depth of 1 to the - underlying actOnFile interface -
      handleDom(Document, Map, Map) - -Static method in class org.apache.tuscany.sca.cpp.tools.services.DomHandler -
      This method will run through the initial level of the DOM using the - handlers map -
      handleInterfaceHeader(Map, boolean) - -Static method in class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator -
        -
      handleNode(Node, String, Map, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler -
      This method will do the "normal" processing and then trigger a call to - processComponentNode. -
      handleNode(Node, String, Map, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.DomHandler -
        -
      handleNode(Node, String, Map, Map) - -Method in interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler -
      An interface for classes that can process DOM nodes. -
      handleNode(Node, String, Map, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler -
      This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node. -
      handleNode(Node, String, Map, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler -
        -
      handleNode(Node, String, Map, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler -
        -
      handlers - -Static variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
        -
      headers - -Variable in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
        -
      -
      -

      -I

      -
      -
      InputCppSourceCode - class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode.
       
      InputCppSourceCode(BufferedReader, String) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode -
        -
      initialise(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
      Reads in the configuration file -
      isAttribute(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      isCatch() - -Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      isClassName(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      isConstructor() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      isDefine(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      isDestructor() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      isDotDotDot() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      isInstanceMethod(Signature) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      isMacro(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      isReturn() - -Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      isStaticMethod(Signature) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Headers -
        -
      isTrailing() - -Method in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      isVoid() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      iterator() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      -
      -

      -L

      -
      -
      LittleClass - class org.apache.tuscany.sca.cpp.tools.services.LittleClass.
      This class is just a convenient application class that is loaded in order to - get the application class loader.
      LittleClass() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.LittleClass -
        -
      -
      -

      -M

      -
      -
      MACRO - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      METHOD - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      MODULE_EXTENSIONS - -Static variable in class org.apache.tuscany.sca.cpp.tools.services.Scagen -
        -
      MethodPart - class org.apache.tuscany.sca.cpp.tools.common.MethodPart.
      A C or C++ method from a piece of source code.
      ModuleOrFragmentFileHandler - class org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler.
      The purpose of this class is purely to specialise the handler map to one with - a specific ComponentDomNodeHandler.
      ModuleOrFragmentFileHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler -
        -
      main(String[]) - -Static method in class org.apache.tuscany.sca.cpp.tools.services.Scagen -
      Take a directory scanning class and create a vistor that knows how to - handle any sca.module or .fragment that the scanner comes across. -
      mapNodeToHandlerAndHandle(Node, String, Map, Map) - -Static method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler -
      This method will resolve any registered handler for a particular DOM - element and call the handleNode method on it. -
      maybeAppendSeparator(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree -
        -
      maybeCreateDirectory(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
      Checks the target directory and creates it if it doesn't already exist. -
      methodExcluded(String, String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Configuration -
        -
      -
      -

      -O

      -
      -
      Options - class org.apache.tuscany.sca.cpp.tools.common.Options.
      Command line options passed to a tool's main program.
      org.apache.tuscany.sca.cpp.tools.common - package org.apache.tuscany.sca.cpp.tools.common
      - -
      org.apache.tuscany.sca.cpp.tools.services - package org.apache.tuscany.sca.cpp.tools.services
      - -
      originalLength() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      outputDebugString(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils -
        -
      -
      -

      -P

      -
      -
      PROTOTYPE - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      Parameter - class org.apache.tuscany.sca.cpp.tools.common.Parameter.
      A parameter from a method signature.
      ParsingException - exception org.apache.tuscany.sca.cpp.tools.common.ParsingException.
       
      ParsingException() - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException -
        -
      ParsingException(String) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException -
        -
      ParsingException(String, Throwable) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException -
        -
      ParsingException(Throwable) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.ParsingException -
        -
      PrototypePart - class org.apache.tuscany.sca.cpp.tools.common.PrototypePart.
      A function prototype in an include file and possibly in a class definition.
      PrototypePart(String, String, String) - -Constructor for class org.apache.tuscany.sca.cpp.tools.common.PrototypePart -
        -
      parameters - -Static variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
        -
      preparseHeaders(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
      Read in any include files before the main processing of the tool is done. -
      printUsage() - -Method in class org.apache.tuscany.sca.cpp.tools.common.CParsingTool -
        -
      printUsage() - -Method in class org.apache.tuscany.sca.cpp.tools.services.Scagen -
      Provide a hint to the user on how to call this class -
      -
      -

      -Q

      -
      -
      quiet() - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Options -
        -
      -
      -

      -R

      -
      -
      RETURN - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      ReferenceDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler.
      The purpose of this class is to process a element in a - componentType file and then trigger a call to the method in ServicesGenerator - to process the interface header file
      ReferenceDomNodeHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler -
        -
      rude(String, String, int, String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils -
      Failed to parse the source code for some reason. -
      rude(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils -
      This method reports an error level problem -
      -
      -

      -S

      -
      -
      Scagen - class org.apache.tuscany.sca.cpp.tools.services.Scagen.
      This is the main top level class.
      Scagen(String[]) - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.Scagen -
        -
      ServiceDomNodeHandler - class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler.
       
      ServiceDomNodeHandler() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler -
        -
      ServicesGenerator - class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator.
      This class is the main class that handles the function that parses a C++ - interface header file into a DOM that holds all the semantic information - about the interface - method names, parameters and return values.
      ServicesGenerator(String[]) - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator -
        -
      Signature - class org.apache.tuscany.sca.cpp.tools.common.Signature.
      A C or C++ method signature with the ability to parse it.
      safeEquals(Object, Object) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils -
      A better method than .equals() because it doesn't NullPointerException - when one of the parameters is null. -
      screenMessage(String) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Utils -
      This method reports an error level problem -
      set(String[]) - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Options -
      Initialises the options based on the args passed to main -
      setNamespace(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      setParameter(String, Object) - -Method in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
      Set a parameter -
      setScope(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.PrototypePart -
        -
      setScope(String) - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
      Sets the scope, but only if the scope is not set by an explicit attribute - in the signature. -
      -
      -

      -T

      -
      -
      TRAILING - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.BodyPart -
        -
      TYPEDEF - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      toString() - -Method in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      toString() - -Method in class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode -
        -
      toString() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Parameter -
        -
      toString() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      toStringWithoutAttrs() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
        -
      traceable() - -Method in class org.apache.tuscany.sca.cpp.tools.common.Signature -
      Should this method be traced? -
      transferAttrsToParameters(Node, String, Map) - -Method in class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler -
      This method parses the DOM attributes into name value pairs in the - parameter map each valued keyed by its XPath. -
      transformerFactory - -Static variable in class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
        -
      type - -Variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      -
      -

      -U

      -
      -
      UNKNOWN - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      Utils - class org.apache.tuscany.sca.cpp.tools.common.Utils.
      Static utility methods.
      -
      -

      -V

      -
      -
      verbose() - -Static method in class org.apache.tuscany.sca.cpp.tools.common.Options -
        -
      -
      -

      -W

      -
      -
      WHITESPACE - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.FilePart -
        -
      walkTree(File, File, int) - -Method in class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree -
      Starts adding trace into the given file. -
      walkTree(File, File, int) - -Method in class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner -
        -
      whitespace - -Static variable in class org.apache.tuscany.sca.cpp.tools.common.Utils -
        -
      -
      -

      -X

      -
      -
      XMLFileActor - class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor.
      The purpose of this abstract class is to provide a home for the standard - processing that is involved in turning a XML file into an internal DOM.
      XMLFileActor() - -Constructor for class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor -
        -
      -
      -A B C D E F G H I L M O P Q R S T U V W X - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html deleted file mode 100644 index 6595eb4eac..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -SCA for C++ Tools - - - - - - - - - -<H2> -Frame Alert</H2> - -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to<A HREF="overview-summary.html">Non-frame version.</A> - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html deleted file mode 100644 index 88b29695e0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/BodyPart.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - -BodyPart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class BodyPart

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.BodyPart
      -
      -
      -
      -
      public class BodyPart
      extends java.lang.Object
      - -

      -A snippet of C or C++ source code. If this snippet ends with a return - statement, this body part also contains the return value. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - -
      -Field Summary
      -static intCATCH - -
      -           
      -static intRETURN - -
      -           
      -static intTRAILING - -
      -           
      -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - ParametergetCaughtValue() - -
      -           
      - java.lang.StringgetCodeFragment() - -
      -           
      - java.lang.StringgetReturnValue() - -
      -           
      - booleanisCatch() - -
      -           
      - booleanisReturn() - -
      -           
      - booleanisTrailing() - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -TRAILING

      -
      -public static final int TRAILING
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -RETURN

      -
      -public static final int RETURN
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -CATCH

      -
      -public static final int CATCH
      -
      -
      -
      See Also:
      Constant Field Values
      -
      - - - - - - - - - - - -
      -Method Detail
      - -

      -getCodeFragment

      -
      -public java.lang.String getCodeFragment()
      -
      -
      -
      -
      -
      -
      - -

      -isTrailing

      -
      -public boolean isTrailing()
      -
      -
      -
      -
      -
      -
      - -

      -isReturn

      -
      -public boolean isReturn()
      -
      -
      -
      -
      -
      -
      - -

      -isCatch

      -
      -public boolean isCatch()
      -
      -
      -
      -
      -
      -
      - -

      -getReturnValue

      -
      -public java.lang.String getReturnValue()
      -
      -
      -
      -
      -
      -
      - -

      -getCaughtValue

      -
      -public Parameter getCaughtValue()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html deleted file mode 100644 index f688955d94..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -CParsingTool (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class CParsingTool

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.CParsingTool
      -
      -
      -
      Direct Known Subclasses:
      Scagen, ServicesGenerator
      -
      -
      -
      -
      public class CParsingTool
      extends java.lang.Object
      - -

      -The superclass of tools that parse C/C++ code. This CParsingTool provides - some useful common methods. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - -
      -Field Summary
      -protected  booleanfailed - -
      -           
      -protected  Headersheaders - -
      -           
      -  - - - - - - - - - - - -
      -Constructor Summary
      -protected CParsingTool(java.lang.String[] args) - -
      -           
      -  - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      -protected  java.io.FilecheckFile(java.lang.String option) - -
      -          Checks the source directory looks good.
      -protected  java.io.FilemaybeCreateDirectory(java.lang.String option) - -
      -          Checks the target directory and creates it if it doesn't already exist.
      -protected  HeaderspreparseHeaders(java.lang.String option) - -
      -          Read in any include files before the main processing of the tool is done.
      -protected  voidprintUsage() - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -failed

      -
      -protected boolean failed
      -
      -
      -
      -
      -
      - -

      -headers

      -
      -protected Headers headers
      -
      -
      -
      -
      - - - - - - - - -
      -Constructor Detail
      - -

      -CParsingTool

      -
      -protected CParsingTool(java.lang.String[] args)
      -                throws java.lang.Exception
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -preparseHeaders

      -
      -protected Headers preparseHeaders(java.lang.String option)
      -                           throws java.lang.Exception
      -
      -
      Read in any include files before the main processing of the tool is done. - This constructs the Headers. -

      -

      - -
      Throws: -
      java.lang.Exception
      -
      -
      -
      - -

      -checkFile

      -
      -protected java.io.File checkFile(java.lang.String option)
      -                          throws java.lang.Exception
      -
      -
      Checks the source directory looks good. -

      -

      - -
      Throws: -
      java.lang.Exception
      -
      -
      -
      - -

      -maybeCreateDirectory

      -
      -protected java.io.File maybeCreateDirectory(java.lang.String option)
      -                                     throws java.lang.Exception
      -
      -
      Checks the target directory and creates it if it doesn't already exist. -

      -

      - -
      Throws: -
      java.lang.Exception
      -
      -
      -
      - -

      -printUsage

      -
      -protected void printUsage()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html deleted file mode 100644 index 5fa0f3af67..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Configuration.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - -Configuration (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class Configuration

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.Configuration
      -
      -
      -
      -
      public class Configuration
      extends java.lang.Object
      - -

      -Encapsulates the tool's configuration file -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      -static booleanclassExcluded(java.lang.String s) - -
      -           
      -static booleanfileExcluded(java.lang.String s) - -
      -           
      -static java.lang.StringgetConfigured(java.lang.String key) - -
      -           
      -static voidinitialise(java.lang.String filename) - -
      -          Reads in the configuration file
      -static booleanisAttribute(java.lang.String s) - -
      -           
      -static booleanisDefine(java.lang.String s) - -
      -           
      -static booleanisMacro(java.lang.String s) - -
      -           
      -static booleanmethodExcluded(java.lang.String className, - java.lang.String method) - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - - - - -
      -Method Detail
      - -

      -initialise

      -
      -public static void initialise(java.lang.String filename)
      -                       throws java.lang.Exception
      -
      -
      Reads in the configuration file -

      -

      - -
      Throws: -
      java.lang.Exception
      -
      -
      -
      - -

      -fileExcluded

      -
      -public static boolean fileExcluded(java.lang.String s)
      -
      -
      -
      -
      -
      -
      - -

      -classExcluded

      -
      -public static boolean classExcluded(java.lang.String s)
      -
      -
      -
      -
      -
      -
      - -

      -methodExcluded

      -
      -public static boolean methodExcluded(java.lang.String className,
      -                                     java.lang.String method)
      -
      -
      -
      -
      -
      -
      - -

      -isMacro

      -
      -public static boolean isMacro(java.lang.String s)
      -
      -
      -
      -
      -
      -
      - -

      -isDefine

      -
      -public static boolean isDefine(java.lang.String s)
      -
      -
      -
      -
      -
      -
      - -

      -isAttribute

      -
      -public static boolean isAttribute(java.lang.String s)
      -
      -
      -
      -
      -
      -
      - -

      -getConfigured

      -
      -public static java.lang.String getConfigured(java.lang.String key)
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html deleted file mode 100644 index 88913b0dc8..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - -DirectoryTree (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class DirectoryTree

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.DirectoryTree
      -
      -
      -
      -
      public class DirectoryTree
      extends java.lang.Object
      - -

      -


      - -

      - - - - - - - - - - - - - - - - -
      -Constructor Summary
      DirectoryTree(FileActor actor, - java.util.Set extensions) - -
      -           
      -  - - - - - - - - - - - - - - - -
      -Method Summary
      -static java.lang.StringmaybeAppendSeparator(java.lang.String name) - -
      -           
      - voidwalkTree(java.io.File source, - java.io.File target, - int depth) - -
      -          Starts adding trace into the given file.
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -DirectoryTree

      -
      -public DirectoryTree(FileActor actor,
      -                     java.util.Set extensions)
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -walkTree

      -
      -public void walkTree(java.io.File source,
      -                     java.io.File target,
      -                     int depth)
      -              throws java.lang.Exception
      -
      -
      Starts adding trace into the given file. If the given file is a directory - then this the starting directory and all code beneath and in this - directory will be given trace. -

      -

      -
      Parameters:
      source - - - either the starting directory or one file to add trace to. -
      Throws: -
      java.lang.Exception
      -
      -
      -
      - -

      -maybeAppendSeparator

      -
      -public static java.lang.String maybeAppendSeparator(java.lang.String name)
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html deleted file mode 100644 index adc1ec6aab..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FileActor.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - -FileActor (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Interface FileActor

      -
      -
      All Known Implementing Classes:
      Headers, XMLFileActor
      -
      -
      -
      -
      public interface FileActor
      - -

      -DirectoryTree calls this interface to allow implementations of this interface - to act on a file in the directory tree. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - voidactOnFile(java.io.File source, - java.io.File target, - int depth) - -
      -           
      -  -

      - - - - - - - - - - - - - - -
      -Method Detail
      - -

      -actOnFile

      -
      -public void actOnFile(java.io.File source,
      -                      java.io.File target,
      -                      int depth)
      -               throws java.lang.Exception
      -
      -
      - -
      Throws: -
      java.lang.Exception
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html deleted file mode 100644 index c5e0c1da1c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/FilePart.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - -FilePart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class FilePart

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.FilePart
      -
      -
      -
      Direct Known Subclasses:
      MethodPart, PrototypePart
      -
      -
      -
      -
      public class FilePart
      extends java.lang.Object
      - -

      -A piece of C++ source code -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Field Summary
      -static intBEGINSCOPE - -
      -           
      -static intCLASSATTRIBUTE - -
      -           
      -static intCOMMENT - -
      -           
      -protected  java.lang.Stringcppsource - -
      -           
      -static intDIRECTIVE - -
      -           
      -static intENDSCOPE - -
      -           
      -static intENUM - -
      -           
      -static intFIELD - -
      -           
      -static intMACRO - -
      -           
      -static intMETHOD - -
      -           
      -static intPROTOTYPE - -
      -           
      -protected  inttype - -
      -           
      -static intTYPEDEF - -
      -           
      -static intUNKNOWN - -
      -           
      -static intWHITESPACE - -
      -           
      -  - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - intgetType() - -
      -           
      - java.lang.StringtoString() - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -UNKNOWN

      -
      -public static final int UNKNOWN
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -COMMENT

      -
      -public static final int COMMENT
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -METHOD

      -
      -public static final int METHOD
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -FIELD

      -
      -public static final int FIELD
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -BEGINSCOPE

      -
      -public static final int BEGINSCOPE
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -ENDSCOPE

      -
      -public static final int ENDSCOPE
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -DIRECTIVE

      -
      -public static final int DIRECTIVE
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -WHITESPACE

      -
      -public static final int WHITESPACE
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -MACRO

      -
      -public static final int MACRO
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -CLASSATTRIBUTE

      -
      -public static final int CLASSATTRIBUTE
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -ENUM

      -
      -public static final int ENUM
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -PROTOTYPE

      -
      -public static final int PROTOTYPE
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -TYPEDEF

      -
      -public static final int TYPEDEF
      -
      -
      -
      See Also:
      Constant Field Values
      -
      -
      - -

      -cppsource

      -
      -protected java.lang.String cppsource
      -
      -
      -
      -
      -
      - -

      -type

      -
      -protected int type
      -
      -
      -
      -
      - - - - - - - - - - - -
      -Method Detail
      - -

      -getType

      -
      -public int getType()
      -
      -
      -
      -
      -
      -
      - -

      -toString

      -
      -public java.lang.String toString()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html deleted file mode 100644 index 3d08c1df43..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Headers.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - -Headers (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class Headers

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.Headers
      -
      -
      -
      All Implemented Interfaces:
      FileActor
      -
      -
      -
      -
      public class Headers
      extends java.lang.Object
      implements FileActor
      - -

      -


      - -

      - - - - - - - - - - - - - - - - -
      -Constructor Summary
      Headers() - -
      -           
      -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - voidactOnFile(java.io.File header, - java.io.File ignored, - int depth) - -
      -           
      - booleanfailed() - -
      -           
      - java.util.ListgetAllMethods() - -
      -          Tuscany change - a method to get all the method signatures at once
      - java.util.ListgetMethods(java.lang.String method) - -
      -           
      - booleanisClassName(java.lang.String text) - -
      -           
      - booleanisInstanceMethod(Signature sign) - -
      -           
      - booleanisStaticMethod(Signature sign) - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -Headers

      -
      -public Headers()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -actOnFile

      -
      -public void actOnFile(java.io.File header,
      -                      java.io.File ignored,
      -                      int depth)
      -               throws java.lang.Exception
      -
      -
      -
      Specified by:
      actOnFile in interface FileActor
      -
      -
      - -
      Throws: -
      java.lang.Exception
      -
      -
      -
      - -

      -failed

      -
      -public boolean failed()
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -

      -isInstanceMethod

      -
      -public boolean isInstanceMethod(Signature sign)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -

      -isStaticMethod

      -
      -public boolean isStaticMethod(Signature sign)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -

      -getMethods

      -
      -public java.util.List getMethods(java.lang.String method)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - -

      -getAllMethods

      -
      -public java.util.List getAllMethods()
      -
      -
      Tuscany change - a method to get all the method signatures at once -

      -

      -
      -
      -
      -
      -
      -
      -
      - -

      -isClassName

      -
      -public boolean isClassName(java.lang.String text)
      -
      -
      -
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html deleted file mode 100644 index 0d48df2ac7..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -InputCppSourceCode (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class InputCppSourceCode

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode
      -
      -
      -
      -
      public class InputCppSourceCode
      extends java.lang.Object
      - -

      -


      - -

      - - - - - - - - - - - - - - - - -
      -Constructor Summary
      InputCppSourceCode(java.io.BufferedReader br, - java.lang.String name) - -
      -           
      -  - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - java.lang.StringgetName() - -
      -           
      - java.util.IteratorgetPartIterator() - -
      -           
      - java.lang.StringtoString() - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -InputCppSourceCode

      -
      -public InputCppSourceCode(java.io.BufferedReader br,
      -                          java.lang.String name)
      -                   throws java.lang.Exception
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -getPartIterator

      -
      -public java.util.Iterator getPartIterator()
      -
      -
      -
      -
      -
      -
      - -

      -getName

      -
      -public java.lang.String getName()
      -
      -
      -
      -
      -
      -
      - -

      -toString

      -
      -public java.lang.String toString()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html deleted file mode 100644 index 591a36b08c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/MethodPart.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - -MethodPart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class MethodPart

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.FilePart
      -      extended byorg.apache.tuscany.sca.cpp.tools.common.MethodPart
      -
      -
      -
      -
      public class MethodPart
      extends FilePart
      - -

      -A C or C++ method from a piece of source code. The method has a signature and - a body (the bit between the braces). -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
      BEGINSCOPE, CLASSATTRIBUTE, COMMENT, cppsource, DIRECTIVE, ENDSCOPE, ENUM, FIELD, MACRO, METHOD, PROTOTYPE, type, TYPEDEF, UNKNOWN, WHITESPACE
      -  - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - BodyPart[]getBodyParts() - -
      -          Returns the method body as code snippets, each ending with a place where - a trace statement belongs.
      - java.lang.StringgetOriginalSignature() - -
      -           
      - SignaturegetSignature() - -
      -           
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
      getType, toString
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - - - - - - - -
      -Method Detail
      - -

      -getSignature

      -
      -public Signature getSignature()
      -
      -
      -
      -
      -
      -
      - -

      -getOriginalSignature

      -
      -public java.lang.String getOriginalSignature()
      -
      -
      -
      -
      -
      -
      - -

      -getBodyParts

      -
      -public BodyPart[] getBodyParts()
      -                        throws ParsingException
      -
      -
      Returns the method body as code snippets, each ending with a place where - a trace statement belongs. The end of the first code snippet is where the - entry trace should go. The end of every other snippet is a return from - the method. -

      -

      - -
      Throws: -
      ParsingException
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html deleted file mode 100644 index 57c1e42dab..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Options.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - -Options (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class Options

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.Options
      -
      -
      -
      -
      public class Options
      extends java.lang.Object
      - -

      -Command line options passed to a tool's main program. All command line - options should begin with a dash "-". Some command line options take a value - which is the next parameter after the option. Others do not. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      -static java.lang.ObjectgetOption(java.lang.String key) - -
      -           
      -static booleanquiet() - -
      -           
      -static voidset(java.lang.String[] args) - -
      -          Initialises the options based on the args passed to main
      -static booleanverbose() - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - - - - -
      -Method Detail
      - -

      -set

      -
      -public static void set(java.lang.String[] args)
      -
      -
      Initialises the options based on the args passed to main -

      -

      -
      -
      -
      -
      - -

      -getOption

      -
      -public static java.lang.Object getOption(java.lang.String key)
      -
      -
      -
      -
      -
      -
      - -

      -verbose

      -
      -public static boolean verbose()
      -
      -
      -
      -
      -
      -
      - -

      -quiet

      -
      -public static boolean quiet()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html deleted file mode 100644 index e61c2ae9ae..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Parameter.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -Parameter (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class Parameter

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.Parameter
      -
      -
      -
      -
      public class Parameter
      extends java.lang.Object
      - -

      -A parameter from a method signature. The parameter is the datatype plus its - name but not its value. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - booleanequals(java.lang.Object o) - -
      -          For two parameters to match their types must match or both be null, but - the parameters names don't have to match.
      - booleanfailed() - -
      -           
      - java.lang.StringgetName() - -
      -           
      - java.lang.StringgetType() - -
      -           
      - java.lang.StringgetTypeWithoutConst() - -
      -           
      - booleanisDotDotDot() - -
      -           
      - booleanisVoid() - -
      -           
      - java.util.Iteratoriterator() - -
      -           
      - java.lang.StringtoString() - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - - - - - - - -
      -Method Detail
      - -

      -failed

      -
      -public boolean failed()
      -
      -
      -
      -
      -
      -
      - -

      -getType

      -
      -public java.lang.String getType()
      -
      -
      -
      -
      -
      -
      - -

      -getTypeWithoutConst

      -
      -public java.lang.String getTypeWithoutConst()
      -
      -
      -
      -
      -
      -
      - -

      -getName

      -
      -public java.lang.String getName()
      -
      -
      -
      -
      -
      -
      - -

      -isVoid

      -
      -public boolean isVoid()
      -
      -
      -
      -
      -
      -
      - -

      -isDotDotDot

      -
      -public boolean isDotDotDot()
      -
      -
      -
      -
      -
      -
      - -

      -equals

      -
      -public boolean equals(java.lang.Object o)
      -
      -
      For two parameters to match their types must match or both be null, but - the parameters names don't have to match. Just because a parameter is - called something different in a header file as in the the source file - doesn't mean it's a different parameter. -

      -

      -
      -
      -
      -
      - -

      -toString

      -
      -public java.lang.String toString()
      -
      -
      -
      -
      -
      -
      - -

      -iterator

      -
      -public java.util.Iterator iterator()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html deleted file mode 100644 index 29585ad7ee..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/ParsingException.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - -ParsingException (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class ParsingException

      -
      -java.lang.Object
      -  extended byjava.lang.Throwable
      -      extended byjava.lang.Exception
      -          extended byorg.apache.tuscany.sca.cpp.tools.common.ParsingException
      -
      -
      -
      All Implemented Interfaces:
      java.io.Serializable
      -
      -
      -
      -
      public class ParsingException
      extends java.lang.Exception
      - -

      -

      -
      See Also:
      Serialized Form
      -
      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Constructor Summary
      ParsingException() - -
      -           
      ParsingException(java.lang.String message) - -
      -           
      ParsingException(java.lang.String message, - java.lang.Throwable cause) - -
      -           
      ParsingException(java.lang.Throwable cause) - -
      -           
      -  - - - - - - - - - - -
      Methods inherited from class java.lang.Throwable
      fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ParsingException

      -
      -public ParsingException()
      -
      -
      -
      - -

      -ParsingException

      -
      -public ParsingException(java.lang.String message)
      -
      -
      -
      - -

      -ParsingException

      -
      -public ParsingException(java.lang.String message,
      -                        java.lang.Throwable cause)
      -
      -
      -
      - -

      -ParsingException

      -
      -public ParsingException(java.lang.Throwable cause)
      -
      -
      - - - - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html deleted file mode 100644 index bfd601d5b3..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - -PrototypePart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class PrototypePart

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.FilePart
      -      extended byorg.apache.tuscany.sca.cpp.tools.common.PrototypePart
      -
      -
      -
      -
      public class PrototypePart
      extends FilePart
      - -

      -A function prototype in an include file and possibly in a class definition. -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
      BEGINSCOPE, CLASSATTRIBUTE, COMMENT, cppsource, DIRECTIVE, ENDSCOPE, ENUM, FIELD, MACRO, METHOD, PROTOTYPE, type, TYPEDEF, UNKNOWN, WHITESPACE
      -  - - - - - - - - - - -
      -Constructor Summary
      PrototypePart(java.lang.String s, - java.lang.String className, - java.lang.String namespace) - -
      -           
      -  - - - - - - - - - - - - - - - -
      -Method Summary
      - SignaturegetSignature() - -
      -           
      - voidsetScope(java.lang.String scope) - -
      -           
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.FilePart
      getType, toString
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -PrototypePart

      -
      -public PrototypePart(java.lang.String s,
      -                     java.lang.String className,
      -                     java.lang.String namespace)
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -getSignature

      -
      -public Signature getSignature()
      -
      -
      -
      -
      -
      -
      - -

      -setScope

      -
      -public void setScope(java.lang.String scope)
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html deleted file mode 100644 index 2a2eef3678..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Signature.html +++ /dev/null @@ -1,584 +0,0 @@ - - - - - - -Signature (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class Signature

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.Signature
      -
      -
      -
      -
      public class Signature
      extends java.lang.Object
      - -

      -A C or C++ method signature with the ability to parse it. TODO: properly - support variable length argument lists using "..." TODO: passing or returning - function pointers (hopefully not needed) TODO: Cope with ~ Classname() -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - booleanequals(java.lang.Object obj) - -
      -           
      - booleanfailed() - -
      -           
      - java.lang.StringgetAttributes() - -
      -           
      - java.lang.StringgetClassName() - -
      -           
      - java.lang.StringgetMethodName() - -
      -           
      - java.lang.StringgetNamespace() - -
      -           
      - java.lang.StringgetOriginal() - -
      -           
      - Parameter[]getParameters() - -
      -           
      - ParametergetReturnType() - -
      -           
      - java.lang.StringgetScope() - -
      -           
      - java.lang.StringgetTrimClassName() - -
      -           
      - booleanisConstructor() - -
      -           
      - booleanisDestructor() - -
      -           
      - intoriginalLength() - -
      -           
      - voidsetNamespace(java.lang.String namespace) - -
      -           
      - voidsetScope(java.lang.String scope) - -
      -          Sets the scope, but only if the scope is not set by an explicit attribute - in the signature.
      - java.lang.StringtoString() - -
      -           
      - java.lang.StringtoStringWithoutAttrs() - -
      -           
      - booleantraceable() - -
      -          Should this method be traced?
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      -  -

      - - - - - - - - - - - - - - -
      -Method Detail
      - -

      -getOriginal

      -
      -public java.lang.String getOriginal()
      -
      -
      -
      -
      -
      -
      - -

      -originalLength

      -
      -public int originalLength()
      -
      -
      -
      -
      -
      -
      - -

      -failed

      -
      -public boolean failed()
      -
      -
      -
      -
      -
      -
      - -

      -getAttributes

      -
      -public java.lang.String getAttributes()
      -
      -
      -
      -
      -
      -
      - -

      -getClassName

      -
      -public java.lang.String getClassName()
      -
      -
      -
      -
      -
      -
      - -

      -setNamespace

      -
      -public void setNamespace(java.lang.String namespace)
      -
      -
      -
      Parameters:
      namespace - The namespace to set.
      -
      -
      -
      - -

      -getNamespace

      -
      -public java.lang.String getNamespace()
      -
      -
      - -
      Returns:
      Returns the namespace.
      -
      -
      -
      - -

      -getTrimClassName

      -
      -public java.lang.String getTrimClassName()
      -
      -
      -
      -
      -
      -
      - -

      -getMethodName

      -
      -public java.lang.String getMethodName()
      -
      -
      -
      -
      -
      -
      - -

      -getReturnType

      -
      -public Parameter getReturnType()
      -
      -
      -
      -
      -
      -
      - -

      -getParameters

      -
      -public Parameter[] getParameters()
      -
      -
      -
      -
      -
      -
      - -

      -isConstructor

      -
      -public boolean isConstructor()
      -
      -
      -
      -
      -
      -
      - -

      -isDestructor

      -
      -public boolean isDestructor()
      -
      -
      -
      -
      -
      -
      - -

      -getScope

      -
      -public java.lang.String getScope()
      -
      -
      -
      -
      -
      -
      - -

      -setScope

      -
      -public void setScope(java.lang.String scope)
      -
      -
      Sets the scope, but only if the scope is not set by an explicit attribute - in the signature. -

      -

      -
      -
      -
      -
      - -

      -traceable

      -
      -public boolean traceable()
      -
      -
      Should this method be traced? -

      -

      -
      -
      -
      -
      - -

      -equals

      -
      -public boolean equals(java.lang.Object obj)
      -
      -
      -
      -
      -
      -
      - -

      -toStringWithoutAttrs

      -
      -public java.lang.String toStringWithoutAttrs()
      -
      -
      -
      -
      -
      -
      - -

      -toString

      -
      -public java.lang.String toString()
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html deleted file mode 100644 index 8571178678..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/Utils.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - -Utils (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.common -
      -Class Utils

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.Utils
      -
      -
      -
      -
      public final class Utils
      extends java.lang.Object
      - -

      -Static utility methods. Some of these methods are similar to the methods on - java.lang.String except they are aware of C/C++ comments and string literals. - - TODO: Many of these methods would perform better using StringBuffer not - String -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - -
      -Field Summary
      -static java.util.SetcPrimitives - -
      -           
      -static java.util.SetcTypeQualifiers - -
      -           
      -static java.lang.Stringwhitespace - -
      -           
      -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      -static voidoutputDebugString(java.lang.String line) - -
      -           
      -static voidrude(java.lang.String reason) - -
      -          This method reports an error level problem
      -static voidrude(java.lang.String reason, - java.lang.String filename, - int lineno, - java.lang.String codefragment) - -
      -          Failed to parse the source code for some reason.
      -static booleansafeEquals(java.lang.Object o1, - java.lang.Object o2) - -
      -          A better method than .equals() because it doesn't NullPointerException - when one of the parameters is null.
      -static voidscreenMessage(java.lang.String msg) - -
      -          This method reports an error level problem
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -cPrimitives

      -
      -public static final java.util.Set cPrimitives
      -
      -
      -
      -
      -
      - -

      -cTypeQualifiers

      -
      -public static final java.util.Set cTypeQualifiers
      -
      -
      -
      -
      -
      - -

      -whitespace

      -
      -public static final java.lang.String whitespace
      -
      -
      -
      See Also:
      Constant Field Values
      -
      - - - - - - - - - - - -
      -Method Detail
      - -

      -rude

      -
      -public static void rude(java.lang.String reason,
      -                        java.lang.String filename,
      -                        int lineno,
      -                        java.lang.String codefragment)
      -                 throws ParsingException
      -
      -
      Failed to parse the source code for some reason. This method prints out a - suitably rude message, and then what? I haven't quite decided yet. - - TODO: Do something sensible here like throw an Exception which will give - up on this file completely and tidy up the output file. It may be just - too dangerous to try to carry on. But we need to fail in such a way that - the build system knows that we've failed for this file and can build this - file without trace. -

      -

      - -
      Throws: -
      ParsingException
      -
      -
      -
      - -

      -rude

      -
      -public static void rude(java.lang.String reason)
      -                 throws ParsingException
      -
      -
      This method reports an error level problem -

      -

      -
      Parameters:
      reason - why we have an error level problem -
      Throws: -
      ParsingException
      -
      -
      -
      - -

      -screenMessage

      -
      -public static void screenMessage(java.lang.String msg)
      -
      -
      This method reports an error level problem -

      -

      -
      -
      -
      -
      - -

      -safeEquals

      -
      -public static boolean safeEquals(java.lang.Object o1,
      -                                 java.lang.Object o2)
      -
      -
      A better method than .equals() because it doesn't NullPointerException - when one of the parameters is null. -

      -

      -
      -
      -
      -
      - -

      -outputDebugString

      -
      -public static void outputDebugString(java.lang.String line)
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html deleted file mode 100644 index 109d6c539a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/BodyPart.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.BodyPart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.BodyPart

      -
      - - - - - - - - - -
      -Packages that use BodyPart
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      -  -

      - - - - - -
      -Uses of BodyPart in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - -
      Methods in org.apache.tuscany.sca.cpp.tools.common that return BodyPart -
      - BodyPart[]MethodPart.getBodyParts() - -
      -          Returns the method body as code snippets, each ending with a place where - a trace statement belongs.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html deleted file mode 100644 index 36cb776f02..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/CParsingTool.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.CParsingTool (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.CParsingTool

      -
      - - - - - - - - - -
      -Packages that use CParsingTool
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - -
      -Uses of CParsingTool in org.apache.tuscany.sca.cpp.tools.services
      -  -

      - - - - - - - - - - - - -
      Subclasses of CParsingTool in org.apache.tuscany.sca.cpp.tools.services -
      - classScagen - -
      -          This is the main top level class.
      - classServicesGenerator - -
      -          This class is the main class that handles the function that parses a C++ - interface header file into a DOM that holds all the semantic information - about the interface - method names, parameters and return values.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html deleted file mode 100644 index bb2432666e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Configuration.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.Configuration (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.Configuration

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.Configuration -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html deleted file mode 100644 index 4140168273..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/DirectoryTree.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.DirectoryTree

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.DirectoryTree -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html deleted file mode 100644 index 3ab90283bd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FileActor.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - -Uses of Interface org.apache.tuscany.sca.cpp.tools.common.FileActor (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Interface
      org.apache.tuscany.sca.cpp.tools.common.FileActor

      -
      - - - - - - - - - - - - - -
      -Packages that use FileActor
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - -
      -Uses of FileActor in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - -
      Classes in org.apache.tuscany.sca.cpp.tools.common that implement FileActor -
      - classHeaders - -
      -           
      -  -

      - - - - - - - -
      Constructors in org.apache.tuscany.sca.cpp.tools.common with parameters of type FileActor -
      DirectoryTree(FileActor actor, - java.util.Set extensions) - -
      -           
      -  -

      - - - - - -
      -Uses of FileActor in org.apache.tuscany.sca.cpp.tools.services
      -  -

      - - - - - - - - - - - - - - - - -
      Classes in org.apache.tuscany.sca.cpp.tools.services that implement FileActor -
      - classComponentTypeFileHandler - -
      -          The purpose of this class is to specialise the map of XML element handlers - for a XXX.componentType file that is used by the XMLFileActor
      - classModuleOrFragmentFileHandler - -
      -          The purpose of this class is purely to specialise the handler map to one with - a specific ComponentDomNodeHandler.
      - classXMLFileActor - -
      -          The purpose of this abstract class is to provide a home for the standard - processing that is involved in turning a XML file into an internal DOM.
      -  -

      - - - - - - - -
      Constructors in org.apache.tuscany.sca.cpp.tools.services with parameters of type FileActor -
      DirectoryScanner(FileActor actor, - java.util.Set extensions) - -
      -           
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html deleted file mode 100644 index aa4796486e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/FilePart.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.FilePart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.FilePart

      -
      - - - - - - - - - -
      -Packages that use FilePart
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      -  -

      - - - - - -
      -Uses of FilePart in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - - - - - -
      Subclasses of FilePart in org.apache.tuscany.sca.cpp.tools.common -
      - classMethodPart - -
      -          A C or C++ method from a piece of source code.
      - classPrototypePart - -
      -          A function prototype in an include file and possibly in a class definition.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html deleted file mode 100644 index 60190bbada..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Headers.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.Headers (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.Headers

      -
      - - - - - - - - - -
      -Packages that use Headers
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      -  -

      - - - - - -
      -Uses of Headers in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - -
      Fields in org.apache.tuscany.sca.cpp.tools.common declared as Headers -
      -protected  HeadersCParsingTool.headers - -
      -           
      -  -

      - - - - - - - - -
      Methods in org.apache.tuscany.sca.cpp.tools.common that return Headers -
      -protected  HeadersCParsingTool.preparseHeaders(java.lang.String option) - -
      -          Read in any include files before the main processing of the tool is done.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html deleted file mode 100644 index 463968468c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/InputCppSourceCode.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html deleted file mode 100644 index 19b474a7e7..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/MethodPart.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.MethodPart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.MethodPart

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.MethodPart -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html deleted file mode 100644 index 040187072f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Options.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.Options (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.Options

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.Options -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html deleted file mode 100644 index a91a2c687b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Parameter.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.Parameter (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.Parameter

      -
      - - - - - - - - - -
      -Packages that use Parameter
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      -  -

      - - - - - -
      -Uses of Parameter in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - - - - - - - - - -
      Methods in org.apache.tuscany.sca.cpp.tools.common that return Parameter -
      - ParameterSignature.getReturnType() - -
      -           
      - Parameter[]Signature.getParameters() - -
      -           
      - ParameterBodyPart.getCaughtValue() - -
      -           
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html deleted file mode 100644 index dedd25a4f2..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/ParsingException.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.ParsingException (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.ParsingException

      -
      - - - - - - - - - -
      -Packages that use ParsingException
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      -  -

      - - - - - -
      -Uses of ParsingException in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - - - - - - - - - -
      Methods in org.apache.tuscany.sca.cpp.tools.common that throw ParsingException -
      -static voidUtils.rude(java.lang.String reason, - java.lang.String filename, - int lineno, - java.lang.String codefragment) - -
      -          Failed to parse the source code for some reason.
      -static voidUtils.rude(java.lang.String reason) - -
      -          This method reports an error level problem
      - BodyPart[]MethodPart.getBodyParts() - -
      -          Returns the method body as code snippets, each ending with a place where - a trace statement belongs.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html deleted file mode 100644 index 22c4575fab..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/PrototypePart.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.PrototypePart (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.PrototypePart

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.PrototypePart -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html deleted file mode 100644 index 228807ba8a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Signature.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.Signature (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.Signature

      -
      - - - - - - - - - -
      -Packages that use Signature
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      -  -

      - - - - - -
      -Uses of Signature in org.apache.tuscany.sca.cpp.tools.common
      -  -

      - - - - - - - - - - - - -
      Methods in org.apache.tuscany.sca.cpp.tools.common that return Signature -
      - SignaturePrototypePart.getSignature() - -
      -           
      - SignatureMethodPart.getSignature() - -
      -           
      -  -

      - - - - - - - - - - - - -
      Methods in org.apache.tuscany.sca.cpp.tools.common with parameters of type Signature -
      - booleanHeaders.isInstanceMethod(Signature sign) - -
      -           
      - booleanHeaders.isStaticMethod(Signature sign) - -
      -           
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html deleted file mode 100644 index cd93afeeb6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/class-use/Utils.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.common.Utils (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.common.Utils

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.common.Utils -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html deleted file mode 100644 index 2e0e528f32..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-frame.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - -org.apache.tuscany.sca.cpp.tools.common (SCA for C++ Tools) - - - - - - - - - - - -org.apache.tuscany.sca.cpp.tools.common - - - - -
      -Interfaces  - -
      -FileActor
      - - - - - - -
      -Classes  - -
      -BodyPart -
      -Configuration -
      -CParsingTool -
      -DirectoryTree -
      -FilePart -
      -Headers -
      -InputCppSourceCode -
      -MethodPart -
      -Options -
      -Parameter -
      -PrototypePart -
      -Signature -
      -Utils
      - - - - - - -
      -Exceptions  - -
      -ParsingException
      - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html deleted file mode 100644 index 3fa24db0cd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-summary.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - -org.apache.tuscany.sca.cpp.tools.common (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -

      -Package org.apache.tuscany.sca.cpp.tools.common -

      -
      - - -

      -See: -
      -          Description -

      - - - - - - - - - -
      -Interface Summary
      FileActorDirectoryTree calls this interface to allow implementations of this interface - to act on a file in the directory tree.
      -  - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Class Summary
      BodyPartA snippet of C or C++ source code.
      ConfigurationEncapsulates the tool's configuration file
      CParsingToolThe superclass of tools that parse C/C++ code.
      DirectoryTree 
      FilePartA piece of C++ source code
      Headers 
      InputCppSourceCode 
      MethodPartA C or C++ method from a piece of source code.
      OptionsCommand line options passed to a tool's main program.
      ParameterA parameter from a method signature.
      PrototypePartA function prototype in an include file and possibly in a class definition.
      SignatureA C or C++ method signature with the ability to parse it.
      UtilsStatic utility methods.
      -  - -

      - - - - - - - - - -
      -Exception Summary
      ParsingException 
      -  - -

      -

      -Package org.apache.tuscany.sca.cpp.tools.common Description -

      - -

      -

      - -

      Overview

      - -This package can be used to reflect across C++ source code. It can produce -a network of descriptive objects describing C++ Headers, Signatures, Parameters and so -on that it finds in a given location of the file system. -Each of the descriptive objects has a set of getters that return either -the descriptive child objects, or for primitives, the string that represents the actual -value such as "int" or "myFunction". -

      -There are also various utility methods that help with navigating the information, for example the Signature -class has an isConstructor method. The API Javadoc contains further details of these. -

      -The package can scan a directory using a file mask to identify what types -of files are to be scanned. In this application we are interested only -in the function prototypes in the C++ header files. -

      -The implementation was originated using some java code that was also -contributed to the Apache org.apache.axis.tools.common package. Care -has been taken that the original code was not sourced via Apache. If -this project is adopted by Apache then it is very possible that this -package could be merged with or made obsolete by org.apache.axis.tools.common -and because of this the design and interfaces have been preserved from -the original code as much as possible. - -

      -

      -

      - -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html deleted file mode 100644 index d6ca34c836..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-tree.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - -org.apache.tuscany.sca.cpp.tools.common Class Hierarchy (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Hierarchy For Package org.apache.tuscany.sca.cpp.tools.common -

      -
      -
      -
      Package Hierarchies:
      All Packages
      -
      -

      -Class Hierarchy -

      -
        -
      • class java.lang.Object
          -
        • class org.apache.tuscany.sca.cpp.tools.common.BodyPart
        • class org.apache.tuscany.sca.cpp.tools.common.Configuration
        • class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
        • class org.apache.tuscany.sca.cpp.tools.common.DirectoryTree
        • class org.apache.tuscany.sca.cpp.tools.common.FilePart
            -
          • class org.apache.tuscany.sca.cpp.tools.common.MethodPart
          • class org.apache.tuscany.sca.cpp.tools.common.PrototypePart
          -
        • class org.apache.tuscany.sca.cpp.tools.common.Headers (implements org.apache.tuscany.sca.cpp.tools.common.FileActor) -
        • class org.apache.tuscany.sca.cpp.tools.common.InputCppSourceCode
        • class org.apache.tuscany.sca.cpp.tools.common.Options
        • class org.apache.tuscany.sca.cpp.tools.common.Parameter
        • class org.apache.tuscany.sca.cpp.tools.common.Signature
        • class java.lang.Throwable (implements java.io.Serializable) -
            -
          • class java.lang.Exception -
          -
        • class org.apache.tuscany.sca.cpp.tools.common.Utils
        -
      -

      -Interface Hierarchy -

      -
        -
      • interface org.apache.tuscany.sca.cpp.tools.common.FileActor
      -
      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html deleted file mode 100644 index 36fda7a829..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/common/package-use.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - -Uses of Package org.apache.tuscany.sca.cpp.tools.common (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Package
      org.apache.tuscany.sca.cpp.tools.common

      -
      - - - - - - - - - - - - - -
      -Packages that use org.apache.tuscany.sca.cpp.tools.common
      org.apache.tuscany.sca.cpp.tools.common
      - - 
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Classes in org.apache.tuscany.sca.cpp.tools.common used by org.apache.tuscany.sca.cpp.tools.common
      BodyPart - -
      -          A snippet of C or C++ source code.
      FileActor - -
      -          DirectoryTree calls this interface to allow implementations of this interface - to act on a file in the directory tree.
      FilePart - -
      -          A piece of C++ source code
      Headers - -
      -           
      Parameter - -
      -          A parameter from a method signature.
      ParsingException - -
      -           
      Signature - -
      -          A C or C++ method signature with the ability to parse it.
      -  -

      - - - - - - - - - - - -
      -Classes in org.apache.tuscany.sca.cpp.tools.common used by org.apache.tuscany.sca.cpp.tools.services
      CParsingTool - -
      -          The superclass of tools that parse C/C++ code.
      FileActor - -
      -          DirectoryTree calls this interface to allow implementations of this interface - to act on a file in the directory tree.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html deleted file mode 100644 index 84b07c500a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - -ComponentDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class ComponentDomNodeHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler
      -
      -
      -
      All Implemented Interfaces:
      DomNodeHandler
      -
      -
      -
      -
      public class ComponentDomNodeHandler
      extends GenericDomNodeHandler
      - -

      -This class will do the required processing for the element of a - sca module or fragment file. -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      ELEMENT
      -  - - - - - - - - - - -
      -Constructor Summary
      ComponentDomNodeHandler() - -
      -           
      -  - - - - - - - - - - - -
      -Method Summary
      - voidhandleNode(org.w3c.dom.Node node, - java.lang.String contextXPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will do the "normal" processing and then trigger a call to - processComponentNode.
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ComponentDomNodeHandler

      -
      -public ComponentDomNodeHandler()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -handleNode

      -
      -public void handleNode(org.w3c.dom.Node node,
      -                       java.lang.String contextXPath,
      -                       java.util.Map handlers,
      -                       java.util.Map parameters)
      -
      -
      This method will do the "normal" processing and then trigger a call to - processComponentNode. -

      -

      -
      Specified by:
      handleNode in interface DomNodeHandler
      Overrides:
      handleNode in class GenericDomNodeHandler
      -
      -
      -
      Parameters:
      node - the node being processed
      contextXPath - the XPath to the node
      handlers - the map pf element names to DomNodeHandlers
      parameters - a map of XPaths to parameters values found so far
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html deleted file mode 100644 index 666f530637..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - -ComponentTypeFileHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class ComponentTypeFileHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler
      -
      -
      -
      All Implemented Interfaces:
      FileActor
      -
      -
      -
      -
      public class ComponentTypeFileHandler
      extends XMLFileActor
      - -

      -The purpose of this class is to specialise the map of XML element handlers - for a XXX.componentType file that is used by the XMLFileActor -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      failed, handlers, parameters, transformerFactory
      -  - - - - - - - - - - -
      -Constructor Summary
      ComponentTypeFileHandler() - -
      -           
      -  - - - - - - - - - - - -
      -Method Summary
      - voidhandleComponentTypeFile(java.io.File componentTypeXML, - java.io.File target) - -
      -          This method just exists to add the default starting depth of 1 to the - underlying actOnFile interface
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      actOnFile, createDomFromXMLFile, getFilesActedOn, getParameter, setParameter
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ComponentTypeFileHandler

      -
      -public ComponentTypeFileHandler()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -handleComponentTypeFile

      -
      -public void handleComponentTypeFile(java.io.File componentTypeXML,
      -                                    java.io.File target)
      -                             throws java.lang.Exception
      -
      -
      This method just exists to add the default starting depth of 1 to the - underlying actOnFile interface -

      -

      -
      Parameters:
      componentTypeXML -
      target - -
      Throws: -
      java.lang.Exception
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html deleted file mode 100644 index c7c82a3cc0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - -DirectoryScanner (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class DirectoryScanner

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.DirectoryScanner
      -
      -
      -
      -
      public class DirectoryScanner
      extends java.lang.Object
      - -

      -


      - -

      - - - - - - - - - - - - - - - - -
      -Constructor Summary
      DirectoryScanner(FileActor actor, - java.util.Set extensions) - -
      -           
      -  - - - - - - - - - - - -
      -Method Summary
      - voidwalkTree(java.io.File source, - java.io.File target, - int depth) - -
      -           
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -DirectoryScanner

      -
      -public DirectoryScanner(FileActor actor,
      -                        java.util.Set extensions)
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -walkTree

      -
      -public void walkTree(java.io.File source,
      -                     java.io.File target,
      -                     int depth)
      -              throws java.lang.Exception
      -
      -
      -
      Parameters:
      source - The module root directory
      target - The directory that will holdthe generated output
      depth - The depth from the inial starting point, not significant for - the Scagen tool as we are only interested in the module root - directory but present due to the inherited actOnFile interface - whcih come from the oreg.apache.axis.tools practice This - interface has been left unchanged as we hope to reconverge the - parser here with the original one once the changes are fed - back into the original code. -
      Throws: -
      java.lang.Exception
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html deleted file mode 100644 index cf6f2e436c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomHandler.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - -DomHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class DomHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.DomHandler
      -
      -
      -
      All Implemented Interfaces:
      DomNodeHandler
      -
      -
      -
      -
      public class DomHandler
      extends GenericDomNodeHandler
      - -

      -The purpose of this class it to provide a generic class that can handle both - a DOM and a DOM node. -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      ELEMENT
      -  - - - - - - - - - - -
      -Constructor Summary
      DomHandler() - -
      -           
      -  - - - - - - - - - - - - - - - -
      -Method Summary
      -static voidhandleDom(org.w3c.dom.Document dom, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will run through the initial level of the DOM using the - handlers map
      - voidhandleNode(org.w3c.dom.Node node, - java.lang.String contextXPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node.
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -DomHandler

      -
      -public DomHandler()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -handleDom

      -
      -public static void handleDom(org.w3c.dom.Document dom,
      -                             java.util.Map handlers,
      -                             java.util.Map parameters)
      -
      -
      This method will run through the initial level of the DOM using the - handlers map -

      -

      -
      Parameters:
      dom - the document being consumed
      handlers - the map from element name to node handler
      parameters - a map of parameters - this is often used by a handler to place - a name-value pair, the name is often an Xpath representation - of the location of the data in the DOM but handlers are free - to use whatever they like - the contextXpath is generated as - an Xpath prefix for those handlers that wish to use it.
      -
      -
      -
      - -

      -handleNode

      -
      -public void handleNode(org.w3c.dom.Node node,
      -                       java.lang.String contextXPath,
      -                       java.util.Map handlers,
      -                       java.util.Map parameters)
      -
      -
      Description copied from class: GenericDomNodeHandler
      -
      This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node. -

      -

      -
      Specified by:
      handleNode in interface DomNodeHandler
      Overrides:
      handleNode in class GenericDomNodeHandler
      -
      -
      -
      Parameters:
      node - The DOM node being consumed
      contextXPath - The XPath to this node
      handlers - The map from element name to node handler
      parameters - A map of parameters - this is often used by a handler to place - a name-value pair, the name is often an Xpath representation - of the location of the data in the DOM but handlers are free - to use whatever they like - the contextXpath is generated as - an Xpath prefix for those handlers that wish to use it.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html deleted file mode 100644 index b62f5a4694..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - -DomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Interface DomNodeHandler

      -
      -
      All Known Implementing Classes:
      GenericDomNodeHandler
      -
      -
      -
      -
      public interface DomNodeHandler
      - -

      -


      - -

      - - - - - - - - - - - - - - -
      -Field Summary
      -static intELEMENT - -
      -           
      -  - - - - - - - - - - - - - - -
      -Method Summary
      - voidhandleNode(org.w3c.dom.Node node, - java.lang.String contextXPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          An interface for classes that can process DOM nodes.
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -ELEMENT

      -
      -public static final int ELEMENT
      -
      -
      -
      See Also:
      Constant Field Values
      -
      - - - - - - - - - - - -
      -Method Detail
      - -

      -handleNode

      -
      -public void handleNode(org.w3c.dom.Node node,
      -                       java.lang.String contextXPath,
      -                       java.util.Map handlers,
      -                       java.util.Map parameters)
      -
      -
      An interface for classes that can process DOM nodes. -

      -

      -
      Parameters:
      node - the DOM node being consumed
      contextXPath - the XPath to this node
      handlers - The map from element name to node handler
      parameters - A map of parameters - this is often used by a handler to place - a name-value pair, the name is often an Xpath representation of the - location of the data in the DOM but handlers are free to use whatever - they like - the contextXpath is generated as an Xpath prefix for those - handlers that wish to use it.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html deleted file mode 100644 index 2a7a65c242..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - -GenericDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class GenericDomNodeHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      -
      -
      -
      All Implemented Interfaces:
      DomNodeHandler
      -
      -
      -
      Direct Known Subclasses:
      ComponentDomNodeHandler, DomHandler, ReferenceDomNodeHandler, ServiceDomNodeHandler
      -
      -
      -
      -
      public class GenericDomNodeHandler
      extends java.lang.Object
      implements DomNodeHandler
      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      ELEMENT
      -  - - - - - - - - - - -
      -Constructor Summary
      GenericDomNodeHandler() - -
      -           
      -  - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - voidhandleChildElements(org.w3c.dom.Node node, - java.lang.String contextPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will iterate through the DOM node's children and call the - appropriate handler for each one.
      - voidhandleNode(org.w3c.dom.Node node, - java.lang.String contextXPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node.
      -static voidmapNodeToHandlerAndHandle(org.w3c.dom.Node node, - java.lang.String contextPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will resolve any registered handler for a particular DOM - element and call the handleNode method on it.
      - voidtransferAttrsToParameters(org.w3c.dom.Node node, - java.lang.String contextPath, - java.util.Map parameters) - -
      -          This method parses the DOM attributes into name value pairs in the - parameter map each valued keyed by its XPath.
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -GenericDomNodeHandler

      -
      -public GenericDomNodeHandler()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -transferAttrsToParameters

      -
      -public void transferAttrsToParameters(org.w3c.dom.Node node,
      -                                      java.lang.String contextPath,
      -                                      java.util.Map parameters)
      -
      -
      This method parses the DOM attributes into name value pairs in the - parameter map each valued keyed by its XPath. -

      -

      -
      -
      -
      -
      Parameters:
      node - the DOM node being processed
      contextPath - the XPath to the DOM node being processed
      parameters - a scratchpad map of name value pairs
      -
      -
      -
      - -

      -handleChildElements

      -
      -public void handleChildElements(org.w3c.dom.Node node,
      -                                java.lang.String contextPath,
      -                                java.util.Map handlers,
      -                                java.util.Map parameters)
      -
      -
      This method will iterate through the DOM node's children and call the - appropriate handler for each one. -

      -

      -
      -
      -
      -
      Parameters:
      node - the DOM node being processed
      contextPath - the XPath to the DOM node being processed
      handlers - a map of element name to handler objects
      parameters - a scratchpad map of name value pairs
      -
      -
      -
      - -

      -mapNodeToHandlerAndHandle

      -
      -public static void mapNodeToHandlerAndHandle(org.w3c.dom.Node node,
      -                                             java.lang.String contextPath,
      -                                             java.util.Map handlers,
      -                                             java.util.Map parameters)
      -
      -
      This method will resolve any registered handler for a particular DOM - element and call the handleNode method on it. If the handlers map has a - mapping from "entity" to an instance of EntityHandler which implements - the DomNodeHandler interface then any node that looks like - - - Will be passed to the EntityHandler to process. -

      -

      -
      -
      -
      -
      Parameters:
      node - the DOM node being processed
      contextPath - the XPath to the DOM node being processed
      handlers - a map of element name to handler objects
      parameters - a scratchpad map of name value pairs
      -
      -
      -
      - -

      -handleNode

      -
      -public void handleNode(org.w3c.dom.Node node,
      -                       java.lang.String contextXPath,
      -                       java.util.Map handlers,
      -                       java.util.Map parameters)
      -
      -
      This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node. -

      -

      -
      Specified by:
      handleNode in interface DomNodeHandler
      -
      -
      -
      Parameters:
      node - The DOM node being consumed
      contextXPath - The XPath to this node
      handlers - The map from element name to node handler
      parameters - A map of parameters - this is often used by a handler to place - a name-value pair, the name is often an Xpath representation - of the location of the data in the DOM but handlers are free - to use whatever they like - the contextXpath is generated as - an Xpath prefix for those handlers that wish to use it.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html deleted file mode 100644 index 3562f99e07..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/LittleClass.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - -LittleClass (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class LittleClass

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.LittleClass
      -
      -
      -
      -
      public class LittleClass
      extends java.lang.Object
      - -

      -This class is just a convenient application class that is loaded in order to - get the application class loader. We are interested in the application class - loader as we use its getResource method to resolve XML files independantly of - where they are. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - -
      -Constructor Summary
      LittleClass() - -
      -           
      -  - - - - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -LittleClass

      -
      -public LittleClass()
      -
      -
      - - - - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html deleted file mode 100644 index 71448f7f04..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - -ModuleOrFragmentFileHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class ModuleOrFragmentFileHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler
      -
      -
      -
      All Implemented Interfaces:
      FileActor
      -
      -
      -
      -
      public class ModuleOrFragmentFileHandler
      extends XMLFileActor
      - -

      -The purpose of this class is purely to specialise the handler map to one with - a specific ComponentDomNodeHandler. -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      failed, handlers, parameters, transformerFactory
      -  - - - - - - - - - - -
      -Constructor Summary
      ModuleOrFragmentFileHandler() - -
      -           
      -  - - - - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      actOnFile, createDomFromXMLFile, getFilesActedOn, getParameter, setParameter
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ModuleOrFragmentFileHandler

      -
      -public ModuleOrFragmentFileHandler()
      -
      -
      - - - - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html deleted file mode 100644 index 506b804627..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - -ReferenceDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class ReferenceDomNodeHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler
      -
      -
      -
      All Implemented Interfaces:
      DomNodeHandler
      -
      -
      -
      -
      public class ReferenceDomNodeHandler
      extends GenericDomNodeHandler
      - -

      -The purpose of this class is to process a element in a - componentType file and then trigger a call to the method in ServicesGenerator - to process the interface header file -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      ELEMENT
      -  - - - - - - - - - - -
      -Constructor Summary
      ReferenceDomNodeHandler() - -
      -           
      -  - - - - - - - - - - - -
      -Method Summary
      - voidhandleNode(org.w3c.dom.Node node, - java.lang.String contextXPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node.
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ReferenceDomNodeHandler

      -
      -public ReferenceDomNodeHandler()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -handleNode

      -
      -public void handleNode(org.w3c.dom.Node node,
      -                       java.lang.String contextXPath,
      -                       java.util.Map handlers,
      -                       java.util.Map parameters)
      -
      -
      Description copied from class: GenericDomNodeHandler
      -
      This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node. -

      -

      -
      Specified by:
      handleNode in interface DomNodeHandler
      Overrides:
      handleNode in class GenericDomNodeHandler
      -
      -
      -
      Parameters:
      node - The DOM node being consumed
      contextXPath - The XPath to this node
      handlers - The map from element name to node handler
      parameters - A map of parameters - this is often used by a handler to place - a name-value pair, the name is often an Xpath representation - of the location of the data in the DOM but handlers are free - to use whatever they like - the contextXpath is generated as - an Xpath prefix for those handlers that wish to use it.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html deleted file mode 100644 index 08c200c9e8..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/Scagen.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - -Scagen (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class Scagen

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.CParsingTool
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.Scagen
      -
      -
      -
      -
      public class Scagen
      extends CParsingTool
      - -

      -This is the main top level class. Its purpose is to create a - Module/FragmentFile handler visitor and pass it to a DirectoryScanner for - processing. -

      - -

      -


      - -

      - - - - - - - - - - - - - - -
      -Field Summary
      -static java.util.SetMODULE_EXTENSIONS - -
      -           
      - - - - - - - -
      Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
      failed, headers
      -  - - - - - - - - - - -
      -Constructor Summary
      Scagen(java.lang.String[] args) - -
      -           
      -  - - - - - - - - - - - - - - - -
      -Method Summary
      -static voidmain(java.lang.String[] args) - -
      -          Take a directory scanning class and create a vistor that knows how to - handle any sca.module or .fragment that the scanner comes across.
      -protected  voidprintUsage() - -
      -          Provide a hint to the user on how to call this class
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
      checkFile, maybeCreateDirectory, preparseHeaders
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -MODULE_EXTENSIONS

      -
      -public static java.util.Set MODULE_EXTENSIONS
      -
      -
      -
      -
      - - - - - - - - -
      -Constructor Detail
      - -

      -Scagen

      -
      -public Scagen(java.lang.String[] args)
      -       throws java.lang.Exception
      -
      - -
      Throws: -
      java.lang.Exception
      - - - - - - - - -
      -Method Detail
      - -

      -main

      -
      -public static void main(java.lang.String[] args)
      -
      -
      Take a directory scanning class and create a vistor that knows how to - handle any sca.module or .fragment that the scanner comes across. -

      -

      -
      Parameters:
      args - standard main args. THe values we expect in this class are - scagen -dir input_dir -output output_dir
      -
      -
      -
      - -

      -printUsage

      -
      -protected void printUsage()
      -
      -
      Provide a hint to the user on how to call this class -

      -

      -
      Overrides:
      printUsage in class CParsingTool
      -
      -
      -
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html deleted file mode 100644 index 5970989783..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - -ServiceDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class ServiceDomNodeHandler

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler
      -
      -
      -
      All Implemented Interfaces:
      DomNodeHandler
      -
      -
      -
      -
      public class ServiceDomNodeHandler
      extends GenericDomNodeHandler
      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      ELEMENT
      -  - - - - - - - - - - -
      -Constructor Summary
      ServiceDomNodeHandler() - -
      -           
      -  - - - - - - - - - - - -
      -Method Summary
      - voidhandleNode(org.w3c.dom.Node node, - java.lang.String contextXPath, - java.util.Map handlers, - java.util.Map parameters) - -
      -          This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node.
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler
      handleChildElements, mapNodeToHandlerAndHandle, transferAttrsToParameters
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ServiceDomNodeHandler

      -
      -public ServiceDomNodeHandler()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -handleNode

      -
      -public void handleNode(org.w3c.dom.Node node,
      -                       java.lang.String contextXPath,
      -                       java.util.Map handlers,
      -                       java.util.Map parameters)
      -
      -
      Description copied from class: GenericDomNodeHandler
      -
      This method will place the attributes in this node into the parameter - map keyed by the XPath and recursively continue processing for any - sub-elements of the node. -

      -

      -
      Specified by:
      handleNode in interface DomNodeHandler
      Overrides:
      handleNode in class GenericDomNodeHandler
      -
      -
      -
      Parameters:
      node - The DOM node being consumed
      contextXPath - The XPath to this node
      handlers - The map from element name to node handler
      parameters - A map of parameters - this is often used by a handler to place - a name-value pair, the name is often an Xpath representation - of the location of the data in the DOM but handlers are free - to use whatever they like - the contextXpath is generated as - an Xpath prefix for those handlers that wish to use it.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html deleted file mode 100644 index ebf2ec4ac5..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - -ServicesGenerator (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class ServicesGenerator

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.common.CParsingTool
      -      extended byorg.apache.tuscany.sca.cpp.tools.services.ServicesGenerator
      -
      -
      -
      -
      public class ServicesGenerator
      extends CParsingTool
      - -

      -This class is the main class that handles the function that parses a C++ - interface header file into a DOM that holds all the semantic information - about the interface - method names, parameters and return values. It then - uses XSLT to generate different "views" of this data plus the parameter map - from other sources that are the C++ programs for the proxy and wrapper - implementations and headers. -

      - -

      -


      - -

      - - - - - - - - - - -
      -Field Summary
      - - - - - - - -
      Fields inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
      failed, headers
      -  - - - - - - - - - - -
      -Constructor Summary
      ServicesGenerator(java.lang.String[] args) - -
      -           
      -  - - - - - - - - - - - -
      -Method Summary
      -static voidhandleInterfaceHeader(java.util.Map parameters, - boolean forReference) - -
      -           
      - - - - - - - -
      Methods inherited from class org.apache.tuscany.sca.cpp.tools.common.CParsingTool
      checkFile, maybeCreateDirectory, preparseHeaders, printUsage
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - - - - -
      -Constructor Detail
      - -

      -ServicesGenerator

      -
      -public ServicesGenerator(java.lang.String[] args)
      -                  throws java.lang.Exception
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -handleInterfaceHeader

      -
      -public static void handleInterfaceHeader(java.util.Map parameters,
      -                                         boolean forReference)
      -                                  throws java.lang.Exception
      -
      -
      -
      Parameters:
      parameters -
      forReference - true if we are creating a proxy for a reference (rather than - for a service) -
      Throws: -
      java.lang.Exception - The design is -
        -
      • handleInterfaceHeader -
      • createDOMofMethods -
      • createProxyCPPFromDom(outputDir, dom); -
      • createProxyHeaderFromDom(outputDir, dom); -
      - - plus if we are not generating for a reference element -
        -
      • createWrapperCPPFromDom(outputDir, dom); -
      • createWrapperHeaderFromDom(outputDir, dom); -
          - Each of the create.... methods calls createOutputFromDom with a different - style sheet.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html deleted file mode 100644 index 67930e3ba8..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - -XMLFileActor (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - -

      - -org.apache.tuscany.sca.cpp.tools.services -
      -Class XMLFileActor

      -
      -java.lang.Object
      -  extended byorg.apache.tuscany.sca.cpp.tools.services.XMLFileActor
      -
      -
      -
      All Implemented Interfaces:
      FileActor
      -
      -
      -
      Direct Known Subclasses:
      ComponentTypeFileHandler, ModuleOrFragmentFileHandler
      -
      -
      -
      -
      public abstract class XMLFileActor
      extends java.lang.Object
      implements FileActor
      - -

      -The purpose of this abstract class is to provide a home for the standard - processing that is involved in turning a XML file into an internal DOM. -

      - -

      -


      - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Field Summary
      - booleanfailed - -
      -           
      -protected static java.util.Maphandlers - -
      -           
      -protected static java.util.Mapparameters - -
      -           
      -protected static javax.xml.transform.TransformerFactorytransformerFactory - -
      -           
      -  - - - - - - - - - - -
      -Constructor Summary
      XMLFileActor() - -
      -           
      -  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Method Summary
      - voidactOnFile(java.io.File moduleXML, - java.io.File target, - int depth) - -
      -          This method is the main FileActor method
      -protected  org.w3c.dom.DocumentcreateDomFromXMLFile(java.io.File xmlSourceFile) - -
      -          This method builds an in memory DOM from an XML file
      - intgetFilesActedOn() - -
      -           
      - java.lang.ObjectgetParameter(java.lang.String name, - java.lang.Object value) - -
      -          Get a parameter
      - voidsetParameter(java.lang.String name, - java.lang.Object value) - -
      -          Set a parameter
      - - - - - - - -
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      -  -

      - - - - - - - - -
      -Field Detail
      - -

      -handlers

      -
      -protected static java.util.Map handlers
      -
      -
      -
      -
      -
      - -

      -parameters

      -
      -protected static java.util.Map parameters
      -
      -
      -
      -
      -
      - -

      -failed

      -
      -public boolean failed
      -
      -
      -
      -
      -
      - -

      -transformerFactory

      -
      -protected static javax.xml.transform.TransformerFactory transformerFactory
      -
      -
      -
      -
      - - - - - - - - -
      -Constructor Detail
      - -

      -XMLFileActor

      -
      -public XMLFileActor()
      -
      -
      - - - - - - - - -
      -Method Detail
      - -

      -actOnFile

      -
      -public void actOnFile(java.io.File moduleXML,
      -                      java.io.File target,
      -                      int depth)
      -               throws java.lang.Exception
      -
      -
      This method is the main FileActor method -

      -

      -
      Specified by:
      actOnFile in interface FileActor
      -
      -
      -
      Parameters:
      moduleXML - the sca.module or fragment file
      target - the target directory
      depth - not uesed here but in the -
      Throws: -
      java.lang.Exception
      See Also:
      Here we create an initial DOM - and kick off the processing (using the handler map that has been set - up by the concrete subclass)., -interface to allow for - recursive diving into a directory structure.
      -
      -
      -
      - -

      -createDomFromXMLFile

      -
      -protected org.w3c.dom.Document createDomFromXMLFile(java.io.File xmlSourceFile)
      -
      -
      This method builds an in memory DOM from an XML file -

      -

      -
      -
      -
      -
      Parameters:
      xmlSourceFile - the XML file we are handling -
      Returns:
      the resulting document
      -
      -
      -
      - -

      -setParameter

      -
      -public void setParameter(java.lang.String name,
      -                         java.lang.Object value)
      -
      -
      Set a parameter -

      -

      -
      -
      -
      -
      Parameters:
      name -
      value -
      -
      -
      -
      - -

      -getParameter

      -
      -public java.lang.Object getParameter(java.lang.String name,
      -                                     java.lang.Object value)
      -
      -
      Get a parameter -

      -

      -
      -
      -
      -
      Parameters:
      name -
      value - -
      Returns:
      the value of the parameter
      -
      -
      -
      - -

      -getFilesActedOn

      -
      -public int getFilesActedOn()
      -
      -
      -
      -
      -
      - -
      Returns:
      Returns the filesActedOn.
      -
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html deleted file mode 100644 index 5b92855433..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentDomNodeHandler.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.ComponentDomNodeHandler -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html deleted file mode 100644 index 5b7fe28bdb..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ComponentTypeFileHandler.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.ComponentTypeFileHandler -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html deleted file mode 100644 index 2b9b52e3bc..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DirectoryScanner.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.DirectoryScanner -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html deleted file mode 100644 index 000ac87acc..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomHandler.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.DomHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.DomHandler

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.DomHandler -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html deleted file mode 100644 index ed14ed35cd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/DomNodeHandler.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - -Uses of Interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Interface
      org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler

      -
      - - - - - - - - - -
      -Packages that use DomNodeHandler
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - -
      -Uses of DomNodeHandler in org.apache.tuscany.sca.cpp.tools.services
      -  -

      - - - - - - - - - - - - - - - - - - - - - - - - -
      Classes in org.apache.tuscany.sca.cpp.tools.services that implement DomNodeHandler -
      - classComponentDomNodeHandler - -
      -          This class will do the required processing for the element of a - sca module or fragment file.
      - classDomHandler - -
      -          The purpose of this class it to provide a generic class that can handle both - a DOM and a DOM node.
      - classGenericDomNodeHandler - -
      -           
      - classReferenceDomNodeHandler - -
      -          The purpose of this class is to process a element in a - componentType file and then trigger a call to the method in ServicesGenerator - to process the interface header file
      - classServiceDomNodeHandler - -
      -           
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html deleted file mode 100644 index b35bfde41f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/GenericDomNodeHandler.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.GenericDomNodeHandler

      -
      - - - - - - - - - -
      -Packages that use GenericDomNodeHandler
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - -
      -Uses of GenericDomNodeHandler in org.apache.tuscany.sca.cpp.tools.services
      -  -

      - - - - - - - - - - - - - - - - - - - - -
      Subclasses of GenericDomNodeHandler in org.apache.tuscany.sca.cpp.tools.services -
      - classComponentDomNodeHandler - -
      -          This class will do the required processing for the element of a - sca module or fragment file.
      - classDomHandler - -
      -          The purpose of this class it to provide a generic class that can handle both - a DOM and a DOM node.
      - classReferenceDomNodeHandler - -
      -          The purpose of this class is to process a element in a - componentType file and then trigger a call to the method in ServicesGenerator - to process the interface header file
      - classServiceDomNodeHandler - -
      -           
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html deleted file mode 100644 index a7597e3212..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/LittleClass.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.LittleClass (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.LittleClass

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.LittleClass -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html deleted file mode 100644 index 4115066abd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ModuleOrFragmentFileHandler.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.ModuleOrFragmentFileHandler -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html deleted file mode 100644 index b86f9da242..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ReferenceDomNodeHandler.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.ReferenceDomNodeHandler -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html deleted file mode 100644 index 2a212df7cf..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/Scagen.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.Scagen (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.Scagen

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.Scagen -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html deleted file mode 100644 index 630cee5ec6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServiceDomNodeHandler.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.ServiceDomNodeHandler -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html deleted file mode 100644 index ecf5d60367..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/ServicesGenerator.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator

      -
      -No usage of org.apache.tuscany.sca.cpp.tools.services.ServicesGenerator -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html deleted file mode 100644 index 4749bbd440..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/class-use/XMLFileActor.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -Uses of Class org.apache.tuscany.sca.cpp.tools.services.XMLFileActor (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Class
      org.apache.tuscany.sca.cpp.tools.services.XMLFileActor

      -
      - - - - - - - - - -
      -Packages that use XMLFileActor
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - -
      -Uses of XMLFileActor in org.apache.tuscany.sca.cpp.tools.services
      -  -

      - - - - - - - - - - - - -
      Subclasses of XMLFileActor in org.apache.tuscany.sca.cpp.tools.services -
      - classComponentTypeFileHandler - -
      -          The purpose of this class is to specialise the map of XML element handlers - for a XXX.componentType file that is used by the XMLFileActor
      - classModuleOrFragmentFileHandler - -
      -          The purpose of this class is purely to specialise the handler map to one with - a specific ComponentDomNodeHandler.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html deleted file mode 100644 index 67936195cb..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-frame.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - -org.apache.tuscany.sca.cpp.tools.services (SCA for C++ Tools) - - - - - - - - - - - -org.apache.tuscany.sca.cpp.tools.services - - - - -
      -Interfaces  - -
      -DomNodeHandler
      - - - - - - -
      -Classes  - -
      -ComponentDomNodeHandler -
      -ComponentTypeFileHandler -
      -DirectoryScanner -
      -DomHandler -
      -GenericDomNodeHandler -
      -LittleClass -
      -ModuleOrFragmentFileHandler -
      -ReferenceDomNodeHandler -
      -Scagen -
      -ServiceDomNodeHandler -
      -ServicesGenerator -
      -XMLFileActor
      - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html deleted file mode 100644 index 7d4ef0c594..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-summary.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - -org.apache.tuscany.sca.cpp.tools.services (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -

      -Package org.apache.tuscany.sca.cpp.tools.services -

      -
      - - -

      -See: -
      -          Description -

      - - - - - - - - - -
      -Interface Summary
      DomNodeHandler 
      -  - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -Class Summary
      ComponentDomNodeHandlerThis class will do the required processing for the element of a - sca module or fragment file.
      ComponentTypeFileHandlerThe purpose of this class is to specialise the map of XML element handlers - for a XXX.componentType file that is used by the XMLFileActor
      DirectoryScanner 
      DomHandlerThe purpose of this class it to provide a generic class that can handle both - a DOM and a DOM node.
      GenericDomNodeHandler 
      LittleClassThis class is just a convenient application class that is loaded in order to - get the application class loader.
      ModuleOrFragmentFileHandlerThe purpose of this class is purely to specialise the handler map to one with - a specific ComponentDomNodeHandler.
      ReferenceDomNodeHandlerThe purpose of this class is to process a element in a - componentType file and then trigger a call to the method in ServicesGenerator - to process the interface header file
      ScagenThis is the main top level class.
      ServiceDomNodeHandler 
      ServicesGeneratorThis class is the main class that handles the function that parses a C++ - interface header file into a DOM that holds all the semantic information - about the interface - method names, parameters and return values.
      XMLFileActorThe purpose of this abstract class is to provide a home for the standard - processing that is involved in turning a XML file into an internal DOM.
      -  - -

      -

      -Package org.apache.tuscany.sca.cpp.tools.services Description -

      - -

      -

      - -

      Overview

      - - - -

      This package contains classes that generate C++ wrappers and -proxies for C++ implementations of SCA services.

      - -

      What the package does

      - -

      The Scagen class main method will take in an input and -output directory name. The input directory is taken to be the SCA module root -directory.  The tool will generate the wrapper and proxy headers and methods -bodies in the output directory.

      - -

      These proxies and wrappers enable the SCA for C++ runtime to -act as a conduit for SCA C++ calls in a type free manner. Client code can call -the type specific functions that are in the generated proxy classes. The call -is marshalled into a generic format and a SCA for C++ runtime function with a -standard signature is invoked. The details of the call are passed as data.

      - -

      On the other end of the runtime, a generated function with a -standard signature is called, this function will inspect the data that -represents the call’s method name and call the appropriate type specific -function in the C++ implementation.

      - -

      The Input Data Used

      - -

      The input directory passed to the Scagen method is taken to -be the SCA module root directory. All the sca.module and .fragment files in -that directory are inspected to resolve all the <component/> elements -within them.

      - -

      Each <component/> element found is inspected to see if -it has a <implementation.cpp/> element within it.

      - -

      Each <implementation.cpp/> element should have a -header attribute that represents a C++ header file that contains function -prototypes for the C++ implementation of the service. An optional class -attribute can be used to select one class if more than one that is present in -the header file. The default class is the one with the same name as the header -file. The tool will verify that the implementation header contains an -appropriate class prototype.

      - - - -

      The directory that contains the implementation header should -also contain a matching .componentType file for the equivalent SCA component. So -for example, a MyServiceImpl.h file would have a corresponding MyServiceImpl.componentType -file in the same directory.

      - - - -

      Each componentType file is inspected for <service/> -and <reference/> elements. For each <service/> element that is -found that contains a <interface.cpp/> element within it,

      - -

      the header attribute of the <interface.cpp/> is taken -as the filename of the C++ interface header for the SCA service.  This C++ -header file is opened and used as a means for specifying the SCA service -resulting in an appropriate wrapper and proxy being generated for this service -interface. Both method bodies and headers are generated in the given output -directory. The processing of a <reference/> element is the same except -that only a proxy header and implementation are generated.

      - - - - - -

      Outline Design: How it Works

      - - - -

      The basic approach is to scan in the XML files by first -creating a DOM document tree of them and then recursively rifling through the DOM  -with some generic code in the XMLFileActorClass by default this processing will -build up a map which maps the XPath location of attributes to their values. -Additionally subclasses can add to a “handlers map” which maps from the name of -a particular element to an object that implements the DomNodeHandler interface. -If the XMLFileActor code comes across any element that has an equivalent handler -in the handler map the objects handleNode method will be called.

      - -

      Typically the DomNodeHandler’s handle node interface will -use XPath to pull out the parameters that it is interested in from the -parameters map that is being built up by the generic code.

      - -

      This design was chosen as the Java level specified for the -original implementation did not have direct XPath query of XML data but it was -known that this would be available in Java 1.5 onwards. The design allows the -DOM and parameters map handling to be replaced in the future with JRE 1.5 code -with less impact on the rest of the code.

      - - - -

      The processing leads to the parsing of the C++ interface -files using the org\apache\tuscany\sca\cpp\tools\common package. This results -in a Headers object

      - -

      that contains a List of Signature objects, each one -representing a function prototype found in the header.

      - - - -

      We are aiming to get all the semantic data we want to use -into a DOM document (this represents the model of our input data) and then use -XSLT to create the 4 different views of this data:

      - -

      Proxy C++ header

      - -

      Proxy C++  body

      - -

      Wrapper C++ header

      - -

      Wrapper C++ body

      - - - -

      So we prepopulate the DOM with parameter data that comes -from the XML files and then iterate through the Signatures that are returned -from the C++ header parser transferring the useful data into the DOM.

      - - - -

      We than use 4 XSLT stylesheets to generate the C++ output -files as required.

      - -
      -

      - -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html deleted file mode 100644 index adceb9d363..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-tree.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - -org.apache.tuscany.sca.cpp.tools.services Class Hierarchy (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Hierarchy For Package org.apache.tuscany.sca.cpp.tools.services -

      -
      -
      -
      Package Hierarchies:
      All Packages
      -
      -

      -Class Hierarchy -

      - -

      -Interface Hierarchy -

      - -
      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html deleted file mode 100644 index f35093ab2a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/org/apache/tuscany/sca/cpp/tools/services/package-use.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - -Uses of Package org.apache.tuscany.sca.cpp.tools.services (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Uses of Package
      org.apache.tuscany.sca.cpp.tools.services

      -
      - - - - - - - - - -
      -Packages that use org.apache.tuscany.sca.cpp.tools.services
      org.apache.tuscany.sca.cpp.tools.services
      - - 
      -  -

      - - - - - - - - - - - - - - -
      -Classes in org.apache.tuscany.sca.cpp.tools.services used by org.apache.tuscany.sca.cpp.tools.services
      DomNodeHandler - -
      -           
      GenericDomNodeHandler - -
      -           
      XMLFileActor - -
      -          The purpose of this abstract class is to provide a home for the standard - processing that is involved in turning a XML file into an internal DOM.
      -  -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html deleted file mode 100644 index ac9bf75355..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-frame.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -Overview (SCA for C++ Tools) - - - - - - - - - - - - - - - -
      -
      - - - - - -
      All Classes -

      - -Packages -
      -org.apache.tuscany.sca.cpp.tools.common -
      -org.apache.tuscany.sca.cpp.tools.services -
      -

      - -

      -  - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html deleted file mode 100644 index 8d79e7de28..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-summary.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - -Overview (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -


      - -
      -

      - -

      SCA for C++ Tools

      - - -
      - - - - - - - - - -
      -C++ Parser
      org.apache.tuscany.sca.cpp.tools.common
      - -
      - -

      -  - - - - - - - - -
      -SCA Services Generator
      org.apache.tuscany.sca.cpp.tools.services
      - -
      - -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html deleted file mode 100644 index 0c3da7e516..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/overview-tree.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Class Hierarchy (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Hierarchy For All Packages

      -
      -
      -
      Package Hierarchies:
      org.apache.tuscany.sca.cpp.tools.common, org.apache.tuscany.sca.cpp.tools.services
      -
      -

      -Class Hierarchy -

      - -

      -Interface Hierarchy -

      -
        -
      • interface org.apache.tuscany.sca.cpp.tools.services.DomNodeHandler
      • interface org.apache.tuscany.sca.cpp.tools.common.FileActor
      -
      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list b/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list deleted file mode 100644 index 2d78f0b38b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/package-list +++ /dev/null @@ -1,2 +0,0 @@ -org.apache.tuscany.sca.cpp.tools.common -org.apache.tuscany.sca.cpp.tools.services diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html deleted file mode 100644 index 5657522fec..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/packages.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - (SCA for C++ Tools) - - - - - - - - - - - -
      - -
      - -
      -
      -The front page has been relocated.Please see: -
      -          Frame version -
      -          Non-frame version.
      - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif b/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif deleted file mode 100644 index c814867a13..0000000000 Binary files a/tags/cpp-sca-20060405/tools/scagen/docs/api/resources/inherit.gif and /dev/null differ diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html b/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html deleted file mode 100644 index 75a28975e2..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/serialized-form.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - -Serialized Form (SCA for C++ Tools) - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      - - - -
      - -
      -

      -Serialized Form

      -
      -
      - - - - - -
      -Package org.apache.tuscany.sca.cpp.tools.common
      - -

      - - - - - -
      -Class org.apache.tuscany.sca.cpp.tools.common.ParsingException extends java.lang.Exception implements Serializable
      - -

      - -

      -


      - - - - - - - - - - - - - - - -
      - -
      - - - -
      - - Copyright 2005 The Apache Software Foundation and Copyright IBM Corp. 2005 All Rights Reserved - - diff --git a/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css b/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css deleted file mode 100644 index 6d31fdbc7f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/docs/api/stylesheet.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Javadoc style sheet */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { background-color: #FFFFFF } - -/* Headings */ -h1 { font-size: 145% } - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ -.TableRowColor { background: #FFFFFF } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } -.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } -.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ -.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java deleted file mode 100644 index 448fd6dd7d..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase; - -/** - * This test case tests a simple Calculator service tools generation - */ -public class CalculatorTest extends TuscanyTestCase { - - public void testCalculatorModuleAndComponent() { - testModule("CalculatorModuleAndComponent", check_results); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java deleted file mode 100644 index 2f1bf78921..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * This is a "run this first" testcase that just tests some simple operations of - * the scagen tools it uses the - * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as - * input data. - */ -public class EnvHandlerTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public EnvHandlerTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testModule("MyValueServiceModule", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java deleted file mode 100644 index 1dfe302cf1..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * This is a "run this first" testcase that just tests some simple operations of - * the scagen tools it uses the - * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as - * input data. - */ -public class ImplClassWithNameSpaceTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public ImplClassWithNameSpaceTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testModule("MyValueServiceModuleImplClassWithNamespace", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java deleted file mode 100644 index 146c18fa1b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * This is a "run this first" testcase that just tests some simple operations of - * the scagen tools it uses the - * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as - * input data. - */ -public class IntfClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public IntfClassWithNameSpaceButNotInClassAttrTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testModule("MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java deleted file mode 100644 index c78f8a5f93..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * This is a "run this first" testcase that just tests some simple operations of - * the scagen tools it uses the - * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as - * input data. - */ -public class IntfClassWithNameSpaceTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public IntfClassWithNameSpaceTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testModule("MyValueServiceModuleIntfClassWithNamespace", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java deleted file mode 100644 index 4a8f8449a6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * This is a "run this first" testcase that just tests some simple operations of - * the scagen tools it uses the - * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as - * input data. - */ -public class MissingModuleAndFragmentTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public MissingModuleAndFragmentTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testModule("MyValueServiceModuleMissingScaModule",check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java deleted file mode 100644 index 9c05599286..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.junit; - -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * This is a "run this first" testcase that just tests some simple operations of - * the scagen tools it uses the - * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as - * input data. - */ -public class SimplePublicPrivateProtectedTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public SimplePublicPrivateProtectedTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule - * proxy and wrapper generation. - */ - public void testEnvHandler() { - - testModule("SimplePublicPrivateProtectedTest", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java deleted file mode 100644 index fc5c8c5653..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * IBM Confidential - * - * OCO Source Materials - * - * - * - * (C) Copyright IBM Corp. 2005 - * - * The source code for this program is not published - * or otherwise divested of its trade secrets, - * irrespective of what has been deposited with the - * U. S. Copyright Office. - */ -package org.apache.tuscany.sca.cpp.tools.junit; - -import java.io.File; -import java.util.HashSet; -import java.util.Set; - -import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase; - -/** - * This test case will test all the modules placed in the "modules" directory - * against the results in their repectice "expected_results" folders. - */ -public class TestAllModulesTest extends TuscanyTestCase { - - String testsDir = TuscanyTestCase.junit_modules; - - Set excludes = new HashSet(); - - public TestAllModulesTest(String arg0) { - super(arg0); - excludes.add("MyValueServiceModuleMissingScaModule"); - excludes.add("CVS"); - } - - - /* main exists to allow running from the java ant task */ - public static void main(String[] args) { - TestAllModulesTest test = new TestAllModulesTest(""); - test.testAllModulesRegression(); - } - - public void testAllModulesRegression() { - File dir = new File(testsDir); - - if (dir.isDirectory()) { - System.out.println("Testing all modules under " - + dir.getAbsolutePath()); - String[] test_modules = dir.list(); - - for (int i = 0; i < test_modules.length; i++) { - File test_module = new File(testsDir, test_modules[i]); - - String module_name = null; - if (test_module.isDirectory()) { - module_name = test_module.getName(); - if (!excludes.contains(module_name.intern())) { - testModule(module_name, check_results); - System.out.println("Test of module \"" + module_name - + "\" passed."); - continue; - } else { - System.out - .println("Ignoring excluded module subdirectory \"" - + module_name + "\""); - } - } - } - - } else { - - fail("Test directory is not a directory! \r The variable org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase.root sets the location of the junit input data,\r it is currently set as " - + TuscanyTestCase.root + "\rand we expect to find a testinput\\modules directory under there."); - } - - System.out.println("testAllModules test passed."); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java deleted file mode 100644 index fb4cd4b606..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * IBM Confidential - * - * OCO Source Materials - * - * - * - * (C) Copyright IBM Corp. 2005 - * - * The source code for this program is not published - * or otherwise divested of its trade secrets, - * irrespective of what has been deposited with the - * U. S. Copyright Office. - */ -package org.apache.tuscany.sca.cpp.tools.junit; - -import java.io.File; -import java.util.HashSet; -import java.util.Set; - -import org.apache.tuscany.sca.cpp.tools.common.Utils; -import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase; - -/** - * This test case will test all the modules placed in the "modules" directory - * against the results in their repectice "expected_results" folders. - */ -public class TestDeployAssistTool extends TuscanyTestCase { - - String testsDir = TuscanyTestCase.junit_modules; - - Set excludes = new HashSet(); - - public TestDeployAssistTool(String arg0) { - super(arg0); - excludes.add("MyValueServiceModuleMissingScaModule"); - excludes.add("CVS"); - } - - /* main exists to allow running from the test script which will - * wrap this test case and pipe the satandard output to somewhere - * for checking. - */ - - public static void main(String[] args) { - TestDeployAssistTool test = new TestDeployAssistTool(""); - test.testDeployToolNullParms(); - } - - public void testDeployTool() { - //Utils.setReportArtefacts(true); - TestAllModulesTest t = new TestAllModulesTest(""); - File dir = new File(testsDir); - - if (dir.isDirectory()) { - String[] test_modules = dir.list(); - - for (int i = 0; i < test_modules.length; i++) { - File test_module = new File(testsDir, test_modules[i]); - String module_name = null; - if (test_module.isDirectory()) { - module_name = test_module.getName(); - if (!excludes.contains(module_name.intern())) { - t.testModuleDeploy(module_name, create_results, "c:\\colin", "cp"); - } - } - System.out.println(""); - } - } - } - - public void testDeployToolNullParms() { - //Utils.setReportArtefacts(true); - TestAllModulesTest t = new TestAllModulesTest(""); - File dir = new File(testsDir); - - if (dir.isDirectory()) { - String[] test_modules = dir.list(); - - for (int i = 0; i < test_modules.length; i++) { - File test_module = new File(testsDir, test_modules[i]); - String module_name = null; - if (test_module.isDirectory()) { - module_name = test_module.getName(); - if (!excludes.contains(module_name.intern())) { - t.testModuleDeploy(module_name, create_results, null, null); - } - } - System.out.println(""); - } - } - } -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java b/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java deleted file mode 100644 index 00f6868ce6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.junit; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.cpp.tools.common.Options; -import org.apache.tuscany.sca.cpp.tools.services.Scagen; - -/** - * A superclass for testcases that can be used to store common functions. - */ -public class TuscanyTestCase extends TestCase { - - public static String root = "cpp\\sca\\tools\\scagen\\junit\\"; - - public static String junit_modules = root + "testinput\\modules\\"; - - public static String junit_output = root + "testoutput\\"; - - private String testcase = "TESTCASE NOT SET BY SUBCLASS"; - - String input = null; - - String output = null; - - /** - * Check the resulting files with the contents of the expected_results - * folder in the testModule method - */ - public final static boolean check_results = true; - - /** - * Create test output but do not check it (useful for setting up new - * expected test output - */ - public final static boolean create_results = false; - - /** - * - */ - public TuscanyTestCase() { - super(); - } - - /** - * @param arg0 - */ - public TuscanyTestCase(String arg0) { - super(arg0); - } - - protected void setUp() throws Exception { - super.setUp(); - } - - protected void tearDown() throws Exception { - super.tearDown(); - } - - /** - * Tests to see if two files are the same - this is just a scratch method at - * the moment that flags up testcase output files not matching expected - * results rather than needing to be a fully robust implementation and needs - * a little further work. - * - * @param file1 - * the first file to compare - * @param file2 - * the second file to compare - * - */ - protected boolean areFilesEqual(String file1, String file2) { - - try { - FileInputStream fis1 = new java.io.FileInputStream(file1); - FileInputStream fis2 = new java.io.FileInputStream(file2); - - BufferedReader br1 = new BufferedReader(new InputStreamReader(fis1)); - BufferedReader br2 = new BufferedReader(new InputStreamReader(fis2)); - - String line1 = br1.readLine(); - String line2 = br2.readLine(); - boolean moretodo = (line1 != null) && (line2 != null); - - for (int line = 1; moretodo; line++) { - - if (line1.equals(line2)) { - - line1 = br1.readLine(); - line2 = br2.readLine(); - - } else { - - int l1i, l2i; - - if ((l1i = line1.lastIndexOf("$Id")) > 0) { - //allow CVS strings - line1 = br1.readLine(); - } - - if ((l2i = line2.lastIndexOf("$Id")) > 0) { - //allow CVS strings - line2 = br2.readLine(); - } - - if (l1i == -1 && l2i == -1) { - - // they don't match - System.out.println("file " + file1 + " and file " - + file2); - System.out.println(" don't match at line " + line); - System.out.println("1 is :" + line1); - System.out.println("2 is :" + line2); - - return false; - } - } - - moretodo = (line1 != null) && (line2 != null); - } - - System.out.println("MATCH FOR: file " + file1 + " and file " - + file2); - return true; - - } catch (Throwable t) { - t.printStackTrace(); - return true; - } - - } - - /** - * @param outputDir - */ - protected void clearDirButNotExpectedOutputSubDir(String outputDir) { - File dir = new File(outputDir); - if (dir.isDirectory()) { - String[] files = dir.list(); - for (int i = 0; i < files.length; i++) { - File child = new File(dir, files[i]); - if (child.isDirectory()) { - if (!child.getName().equals("expected_output")) { - clearDirButNotExpectedOutputSubDir(dir - .getAbsolutePath() - + File.separator + files[i]); - } - } - child.delete(); - } - - } - - } - - public void testModule(String module, boolean check) { - - Options.reset(); - setTestcase(module); - clearDirButNotExpectedOutputSubDir(output); - - String[] commandLine = new String[] { "-dir", input, "-output", output }; - try { - Scagen.main(commandLine); - } catch (Exception e) { - fail(e.getMessage()); - } - - if (check) { - checkDirWithExpected(output); - } - } - - public void testModuleDeploy(String module, boolean check, - String deployDir, String command) { - - Options.reset(); - setTestcase(module); - clearDirButNotExpectedOutputSubDir(output); - - String[] commandLine; - if (null == deployDir) { - commandLine = new String[] { "-dir", input, "-output", - output, "-deploy"}; - } else { - commandLine = new String[] { "-dir", input, "-output", - output, "-deploy", deployDir, "-command", command }; - } - try { - Scagen.main(commandLine); - } catch (Exception e) { - fail(e.getMessage()); - } - - if (check) { - checkDirWithExpected(output); - } - } - - /** - * @param outputDirName - */ - private void checkDirWithExpected(String outputDirName) { - - File actualDir = new File(outputDirName); - if (actualDir == null || !actualDir.isDirectory()) { - fail("result directory does not exist"); - } - - File expectedDir = new File(outputDirName + File.separator - + "expected_output"); - if (expectedDir == null || !actualDir.isDirectory()) { - fail("can't check results as expected directory does not exist"); - } - - //Check every file in the expected output directory is present - //in the actual directory - - String[] expectedFiles = expectedDir.list(); - - if (expectedFiles == null) { - fail("no expected results for " + expectedDir.getPath()); - } - for (int i = 0; expectedFiles != null && i < expectedFiles.length; i++) { - File expectedFile = new File(expectedDir, expectedFiles[i]); - if (expectedFile.isDirectory()) { - // we can't check subdirectories yet - // and it conveniently skips over "CVS" - } else { - File actualFile = checkFileExistsFailIfNot(actualDir, - expectedFile.getName()); - checkFileHasNoTabsAndEndsInNewline(actualDir, expectedFile - .getName()); - if (!areFilesEqual(expectedFile.getAbsolutePath(), actualFile - .getAbsolutePath())) { - fail("odd output for " + expectedFile.getPath()); - } - - } - - } - - } - - /** - * @param actualDir - * @param name - */ - private File checkFileExistsFailIfNot(File dir, String name) { - - File f = new File(dir, name); - if (f == null || !f.exists() || !f.isFile()) { - fail("Expected result file " + f + " does not exist"); - } - return f; - - } - - /** - * @param actualDir - * @param name - */ - private void checkFileHasNoTabsAndEndsInNewline(File dir, String name) { - - try { - File f = new File(dir, name); - FileInputStream fis = new FileInputStream(f); - InputStreamReader isr = new InputStreamReader(fis); - Reader br = new BufferedReader(isr); - int ch, charBeforeMinusOne = -1; - while ((ch = br.read()) > -1) { - if (ch == '\t') { - fail("found tab in output " + f.getPath()); - } - charBeforeMinusOne = ch; - } - //The last char must be newline; - if (charBeforeMinusOne != '\n') { - fail("last char in file is not a newline in " + "(char is:" - + ch + " " + dir.getName() + File.separator + name); - } - - br.close(); - } catch (IOException e) { - e.printStackTrace(); - fail("io exception in tab/newline checker for " + dir.getName() - + File.separator + name); - return; - } - - } - - /** - * @param testcase - * The testcase to set. - */ - void setTestcase(String testcase) { - this.testcase = testcase; - input = TuscanyTestCase.junit_modules + testcase; - output = TuscanyTestCase.junit_output + testcase; - } - - /** - * @return Returns the testcase. - */ - String getTestcase() { - return testcase; - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd b/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd deleted file mode 100644 index 6a303b1471..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go.cmd +++ /dev/null @@ -1,2 +0,0 @@ -rm -rf out -java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output c:\hydra\out diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd b/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd deleted file mode 100644 index 13834b3aae..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd +++ /dev/null @@ -1 +0,0 @@ -java -jar scagen.jar -dirX c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output c:\hydra\out diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd b/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd deleted file mode 100644 index 4fa9a86b1f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd +++ /dev/null @@ -1 +0,0 @@ -java -jar scagen.jar -dir x:\not_there -output c:\hydra\irrelevant diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd b/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd deleted file mode 100644 index 5e6b818ae3..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd +++ /dev/null @@ -1 +0,0 @@ -java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output r:\hydra\out diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd b/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd deleted file mode 100644 index 2640ed87de..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd +++ /dev/null @@ -1 +0,0 @@ -copy c:\workspaces\wid60-no-core\Hydra.sca.tools\scagen.jar . \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h deleted file mode 100644 index 3ab503ef1d..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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 CALCULATOR_H -#define CALCULATOR_H - - -class Calculator { - -private: - virtual long add(long a, long b) = 0; -public: - - virtual long subtract(long a, long b) = 0; -}; - - -#endif // CALCULATOR_H diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType deleted file mode 100644 index ef0f346ba0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h deleted file mode 100644 index daa9b25627..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * 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 CALCULATORIMPL_H -#define CALCULATORIMPL_H - -#include "Calculator.h" - -class CalculatorImpl : public Calculator -{ -public: - CalculatorImpl(); - virtual ~CalculatorImpl(); - virtual long add(long a, long b); - virtual long subtract(long a, long b); - -}; - -#endif // diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module deleted file mode 100644 index f74d5f690c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h deleted file mode 100644 index da74be77a6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * 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 CALCULATOR_H -#define CALCULATOR_H - - -class CalculatorBack { - - - -public: - virtual long subtractBack(long a, long b) = 0; - virtual long addBack(long a, long b) = 0; -}; - - -#endif // CALCULATOR_H diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h deleted file mode 100644 index 48a5ff5018..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * 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 CALCULATOR_H -#define CALCULATOR_H - - -class CalculatorForward { - -public: - - virtual long subtractForward(long a, long b) = 0; - virtual long addForward(long a, long b) = 0; -}; - - -#endif // CALCULATOR_H diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module deleted file mode 100644 index b4aaa37a4c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType deleted file mode 100644 index 6a5a152266..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h deleted file mode 100644 index 0cacc5916c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * 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 CALCULATORIMPL_H -#define CALCULATORIMPL_H - -#include "Calculator.h" - -class CalculatorBackImpl : public Calculator -{ -public: - CalculatorImpl(); - virtual ~CalculatorImpl(); - virtual long addBack(long a, long b); - virtual long subtractBack(long a, long b); - -}; - -#endif // diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType deleted file mode 100644 index 9617b22aee..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h deleted file mode 100644 index f3b0467002..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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 CALCULATORIMPL_H -#define CALCULATORIMPL_H - -#include "Calculator.h" - -class CalculatorForwardImpl : public Calculator -{ -public: - CalculatorImpl(); - virtual ~CalculatorImpl(); - virtual long addForward(long a, long b); - virtual long subtractForward(long a, long b); - -}; - -#endif // diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment deleted file mode 100644 index 29fd03c399..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h deleted file mode 100644 index d5e1a702c6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * - * 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 CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: -//char (simple extra type) - virtual const char* getCustomerInformationChar(char * p1, const char* customerID ) = 0; - virtual const char* getCustomerInfoAChar(char * p1,const char*) = 0; - virtual const char* getCustomerInfoBChar(char * p1, char* customerID ) = 0; - virtual const char* getCustomerInfoCChar(char * p1, char customerID ) = 0; - virtual const char* getCustomerInfoDChar(char * p1,char) = 0; - virtual const char* getCustomerInfoEChar(char * p1 , char *) = 0; - virtual const char* getCustomerInfoFChar(char * p1, char * p1, char *customerID ) = 0; - virtual const char* getCustomerInfoGChar(char * p1, char *, char * p1,signed char *customerID ) = 0; - virtual const char* getCustomerInfoHChar(unsigned char *customerID, const char, ) = 0; - virtual const char* getCustomerInfoHChar(unsigned char *customerID, const char*) = 0; - -//long (duplicate the types) - virtual const long* getCustomerInformationLong(const long* customerID, const long* customerID ) = 0; - virtual const long* getCustomerInfoALong(const long*,const long*) = 0; - virtual const long* getCustomerInfoBLong(long* customerID, long* customerID2 ) = 0; - virtual const long* getCustomerInfoCLong(long customerID , long customerID2 ) = 0; - virtual const long* getCustomerInfoDLong(long,long) = 0; - virtual const long* getCustomerInfoELong(long *, long*) = 0; - virtual const long* getCustomerInfoFLong(long *customerID, long* customerID2 ) = 0; - virtual const long* getCustomerInfoGLong(signed long *customerID, signed long *customerID2 ) = 0; - virtual const long* getCustomerInfoHLong(signed long *customerID, signed long *customerID2 ) = 0; - -//int - virtual const int* getCustomerInformationInt(char*, const int* customerID ) = 0; - virtual const int* getCustomerInfoAInt(char*,const int*) = 0; - virtual const int* getCustomerInfoBInt(char*,int* customerID ) = 0; - virtual const int* getCustomerInfoCInt(char*,int customerID ) = 0; - virtual const int* getCustomerInfoDInt(char*,int) = 0; - virtual const int* getCustomerInfoEInt(char*,int *) = 0; - virtual const int* getCustomerInfoFInt(char*,int *customerID ) = 0; - virtual const int* getCustomerInfoGInt(char*,signed int *customerID ) = 0; - virtual const int* getCustomerInfoHInt(char*,unsigned int *customerID ) = 0; - - -//__int64 - virtual const __int64* getCustomerInformationint64(Diamond&,const __int64* customerID ) = 0; - virtual const __int64* getCustomerInfoAint64(Diamond&, const __int64*) = 0; - virtual const __int64* getCustomerInfoBint64( Diamond&, __int64* customerID ) = 0; - virtual const __int64* getCustomerInfoCint64(Diamond&,__int64 customerID ) = 0; - virtual const __int64* getCustomerInfoDint64(Diamond& myDiamond,__int64) = 0; - virtual const __int64* getCustomerInfoEint64(Diamond& myDiamond, __int64 *) = 0; - virtual const __int64* getCustomerInfoFint64(Diamond& myDiamond, __int64 *customerID ) = 0; - virtual const __int64* getCustomerInfoGint64(Diamond& myDiamond, signed __int64 *customerID ) = 0; - virtual const __int64* getCustomerInfoHint64(const Diamond& myDiamond, unsigned int64 *customerID ) = 0; - -//void - virtual const void* getCustomerInformationVoid(float& f, const __int64* customerID ) = 0; - virtual void getCustomerInfoAVoid(const float& f, const __int64*) = 0; - virtual void getCustomerInfoBVoid( ) = 0; - virtual void getCustomerInfoCVoid() = 0; - virtual void getCustomerInfoDVoid(void) = 0; - virtual char getCustomerInfoEVoid(void) = 0; - virtual char getCustomerInfoFVoid() = 0; - virtual char getCustomerInfoGVoid( void ) = 0; - -//inline - virtual inline const char * getCustomerInfoAInline(int,int,int,int, char* customer id) = 0; - inline int getCustomerInfoBInline(int*,int* f, int* g, char* customer id) = 0; - virtual inline friend const unsigned int * getCustomerInfoCInline(char* customer id) = 0; - -//tricky examples - int getCustomerInfoTrickyA(const char, const char) = 0; - int getCustomerInfoTrickyB(int myInt, int myInt) = 0; - - - - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType deleted file mode 100644 index d39a3bdadf..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h deleted file mode 100644 index 546df093a3..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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 CustomerInfoImpl_h -#define CustomerInfoImpl_h - -#include "CustomerInfo.h" - - - -class CustomerInfoImpl : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment deleted file mode 100644 index fa6d101363..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h deleted file mode 100644 index d3be176bfd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * 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 CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: -//char - virtual const char* getCustomerInformationChar(const char* customerID ) = 0; - virtual const char* getCustomerInfoAChar(const char*) = 0; - virtual const char* getCustomerInfoBChar(char* customerID ) = 0; - virtual const char* getCustomerInfoCChar(char customerID ) = 0; - virtual const char* getCustomerInfoDChar(char) = 0; - virtual const char* getCustomerInfoEChar(char *) = 0; - virtual const char* getCustomerInfoFChar(char *customerID ) = 0; - virtual const char* getCustomerInfoGChar(signed char *customerID ) = 0; - virtual const char* getCustomerInfoHChar(unsigned char *customerID ) = 0; - -//long - virtual const long* getCustomerInformationLong(const long* customerID ) = 0; - virtual const long* getCustomerInfoALong(const long*) = 0; - virtual const long* getCustomerInfoBLong(long* customerID ) = 0; - virtual const long* getCustomerInfoCLong(long customerID ) = 0; - virtual const long* getCustomerInfoDLong(long) = 0; - virtual const long* getCustomerInfoELong(long *) = 0; - virtual const long* getCustomerInfoFLong(long *customerID ) = 0; - virtual const long* getCustomerInfoGLong(signed long *customerID ) = 0; - virtual const long* getCustomerInfoHLong(unsigned long *customerID ) = 0; - -//int - virtual const int* getCustomerInformationInt(const int* customerID ) = 0; - virtual const int* getCustomerInfoAInt(const int*) = 0; - virtual const int* getCustomerInfoBInt(int* customerID ) = 0; - virtual const int* getCustomerInfoCInt(int customerID ) = 0; - virtual const int* getCustomerInfoDInt(int) = 0; - virtual const int* getCustomerInfoEInt(int *) = 0; - virtual const int* getCustomerInfoFInt(int *customerID ) = 0; - virtual const int* getCustomerInfoGInt(signed int *customerID ) = 0; - virtual const int* getCustomerInfoHInt(unsigned int *customerID ) = 0; - - -//__int64 - virtual const __int64* getCustomerInformationint64(const __int64* customerID ) = 0; - virtual const __int64* getCustomerInfoAint64(const __int64*) = 0; - virtual const __int64* getCustomerInfoBint64(__int64* customerID ) = 0; - virtual const __int64* getCustomerInfoCint64(__int64 customerID ) = 0; - virtual const __int64* getCustomerInfoDint64(__int64) = 0; - virtual const __int64* getCustomerInfoEint64(__int64 *) = 0; - virtual const __int64* getCustomerInfoFint64(__int64 *customerID ) = 0; - virtual const __int64* getCustomerInfoGint64(signed __int64 *customerID ) = 0; - virtual const __int64* getCustomerInfoHint64(unsigned int64 *customerID ) = 0; - -//void - virtual const void* getCustomerInformationVoid(const __int64* customerID ) = 0; - virtual void getCustomerInfoAVoid(const __int64*) = 0; - virtual void getCustomerInfoBVoid( ) = 0; - virtual void getCustomerInfoCVoid() = 0; - virtual void getCustomerInfoDVoid(void) = 0; - -//inline - virtual inline const char * getCustomerInfoAInline(char* customer id) = 0; - inline int getCustomerInfoBInline(char* customer id) = 0; - virtual inline friend const unsigned int * getCustomerInfoCInline(char* customer id) = 0; - -//tricky examples - int getCustomerInfoTrickyA(const char) = 0; - int getCustomerInfoTrickyB(int myInt) = 0; - - - - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType deleted file mode 100644 index d39a3bdadf..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h deleted file mode 100644 index 50d37ee4f2..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * 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 CustomerInfoImpl_h -#define CustomerInfoImpl_h - -#include "CustomerInfo.h" - - - -class CustomerInfoImpl : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; - -class CustomerInfoImpl2 : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation2(const char* customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment deleted file mode 100644 index 491e79f5e4..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h deleted file mode 100644 index 7bd355b3ab..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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 CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: - virtual const char* getCustomerInformation(const char* customerID) = 0; - -}; - - -class CustomerInfoSecond -{ -public: - virtual const char* getCustomerInformationSecond(const char* customerID) = 0; - -}; - - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType deleted file mode 100644 index 179af71dca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h deleted file mode 100644 index 85e96bb348..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * 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. - */ - - -// Class definition for the implementation - -#ifndef CustomerInfoImpl_h -#define CustomerInfoImpl_h - -#include "CustomerInfo.h" - - - -class CustomerInfoImpl : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; - -class CustomerInfoImpl2 : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation2(const char* customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h deleted file mode 100644 index a65b1f944c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * 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. - */ -// MyValue.h: interface for the MyValueImpl class. -// -////////////////////////////////////////////////////////////////////// - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; -class MyValue -{ -public: - virtual float getMyValue(const char* customerID) = 0; - virtual float getMyValueS(const string& customerID) = 0; - virtual string getCustname(string& customerID) = 0; - virtual const string& getCustnamecs(string customerID) = 0; - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType deleted file mode 100644 index df0d97a438..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp deleted file mode 100644 index f7a8171a65..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - - -class MyValueImpl : public MyValue -{ -public: - MyValueImpl(); - virtual ~MyValueImpl(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname(string& customerID); - virtual const string& getCustnamecs(string customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 5c8293b51e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h deleted file mode 100644 index d96115fb3f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * 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 StockQuoteService_h -#define StockQuoteService_h -#include -#include "commonj/sdo/sdo.h" -using std::string; -class StockQuoteService -{ -public: - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; - -}; - -#endif // StockQuoteService_h diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module deleted file mode 100644 index 565f4a74ec..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment deleted file mode 100644 index 5666c51a41..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h deleted file mode 100644 index e41f9e8287..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * 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 CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: - virtual const char* getCustomerInformation(const char* customerID) = 0; - -}; - - -class CustomerInfoSecond -{ -public: - virtual const char* getCustomerInformationSecond(const char* customerID) = 0; - -}; - - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType deleted file mode 100644 index 179af71dca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h deleted file mode 100644 index b1360c5994..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef CustomerInfoImpl_h -#define CustomerInfoImpl_h - -#include "CustomerInfo.h" - - -/* -class CustomerInfoImpl : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; - -*/ -namespace Other { - class CustomerInfoImpl : public CustomerInfo - { - public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformationOther(const char* customerID); - - }; -} - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h deleted file mode 100644 index 8b921bc2bf..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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. - */ - -// MyValue.h: interface for the MyValueImpl class. -// -////////////////////////////////////////////////////////////////////// - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; -class MyValue -{ -public: - virtual float getMyValue(const char* customerID) = 0; - virtual float getMyValueS(const string& customerID) = 0; - virtual string getCustname(string& customerID) = 0; - virtual const string& getCustnamecs(string customerID) = 0; - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType deleted file mode 100644 index df0d97a438..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp deleted file mode 100644 index f7a8171a65..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - - -class MyValueImpl : public MyValue -{ -public: - MyValueImpl(); - virtual ~MyValueImpl(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname(string& customerID); - virtual const string& getCustnamecs(string customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 5c8293b51e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h deleted file mode 100644 index 919b514e1a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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 StockQuoteService_h -#define StockQuoteService_h -#include -#include "commonj/sdo/sdo.h" -using std::string; -class StockQuoteService -{ -public: - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; - -}; - -#endif // StockQuoteService_h diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module deleted file mode 100644 index 565f4a74ec..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h deleted file mode 100644 index 503f771bb2..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * 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. - */ - -// MyValue.h: interface for the MyValueImpl class. -// -////////////////////////////////////////////////////////////////////// - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; - -namespace Other { - class MyValue - { - public: - virtual float getMyValueOther(const char* customerID) = 0; - virtual float getMyValueSOther(const string& customerID) = 0; - virtual string getCustnameOther(string& customerID) = 0; - virtual const string& getCustnamecsOther(string customerID) = 0; - } -} - - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType deleted file mode 100644 index 8673c813a6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp deleted file mode 100644 index f7a8171a65..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - - -class MyValueImpl : public MyValue -{ -public: - MyValueImpl(); - virtual ~MyValueImpl(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname(string& customerID); - virtual const string& getCustnamecs(string customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module deleted file mode 100644 index 6572621f1d..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h deleted file mode 100644 index ea8ebbb792..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * 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. - */ - -// MyValue.h: interface for the MyValueImpl class. -// -////////////////////////////////////////////////////////////////////// - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; - -namespace Other { - class MyValue - { - public: - virtual float getMyValueOther(const char* customerID) = 0; - virtual float getMyValueSOther(const string& customerID) = 0; - virtual string getCustnameOther(string& customerID) = 0; - virtual const string& getCustnamecsOther(string customerID) = 0; - } -} -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType deleted file mode 100644 index c8d68fba5a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp deleted file mode 100644 index f7a8171a65..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - - -class MyValueImpl : public MyValue -{ -public: - MyValueImpl(); - virtual ~MyValueImpl(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname(string& customerID); - virtual const string& getCustnamecs(string customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module deleted file mode 100644 index 6572621f1d..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX deleted file mode 100644 index 10c1805244..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX deleted file mode 100644 index 3eea80439f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment deleted file mode 100644 index 491e79f5e4..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h deleted file mode 100644 index 7bd355b3ab..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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 CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: - virtual const char* getCustomerInformation(const char* customerID) = 0; - -}; - - -class CustomerInfoSecond -{ -public: - virtual const char* getCustomerInformationSecond(const char* customerID) = 0; - -}; - - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType deleted file mode 100644 index 179af71dca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h deleted file mode 100644 index e247a9b0bb..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * 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. - */ - -// Class definition for the implementation - -#ifndef CustomerInfoImpl_h -#define CustomerInfoImpl_h - -#include "CustomerInfo.h" - - - -class CustomerInfoImpl : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; - -class CustomerInfoImpl2 : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h deleted file mode 100644 index a65b1f944c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * 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. - */ -// MyValue.h: interface for the MyValueImpl class. -// -////////////////////////////////////////////////////////////////////// - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; -class MyValue -{ -public: - virtual float getMyValue(const char* customerID) = 0; - virtual float getMyValueS(const string& customerID) = 0; - virtual string getCustname(string& customerID) = 0; - virtual const string& getCustnamecs(string customerID) = 0; - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType deleted file mode 100644 index df0d97a438..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp deleted file mode 100644 index f7a8171a65..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - - -class MyValueImpl : public MyValue -{ -public: - MyValueImpl(); - virtual ~MyValueImpl(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname(string& customerID); - virtual const string& getCustnamecs(string customerID); - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 5c8293b51e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h deleted file mode 100644 index 919b514e1a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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 StockQuoteService_h -#define StockQuoteService_h -#include -#include "commonj/sdo/sdo.h" -using std::string; -class StockQuoteService -{ -public: - virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; - -}; - -#endif // StockQuoteService_h diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module deleted file mode 100644 index 565f4a74ec..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment deleted file mode 100644 index 687162ec2a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h deleted file mode 100644 index b944d161eb..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * 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 CustomerInfo_h -#define CustomerInfo_h - -class CustomerInfo -{ -public: - virtual const char* getCustomerInformationCharPublic(char * p1, const char* customerID ) = 0; - virtual const char* getCustomerInfoACharPublic(char * p1,const char*) = 0; - virtual const char* getCustomerInfoBCharPublic(char * p1, char* customerID ) = 0; - -private: - virtual const char* getCustomerInformationCharPrivate(char * p1, const char* customerID ) = 0; - virtual const char* getCustomerInfoACharPrivate(char * p1,const char*) = 0; - virtual const char* getCustomerInfoBCharPrivate(char * p1, char* customerID ) = 0; - -protected: - virtual const char* getCustomerInformationCharProtected(char * p1, const char* customerID ) = 0; - virtual const char* getCustomerInfoACharProtected(char * p1,const char*) = 0; - virtual const char* getCustomerInfoBCharProtected(char * p1, char* customerID ) = 0; - - -}; - -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType deleted file mode 100644 index 179af71dca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h b/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h deleted file mode 100644 index 87cac61085..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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. - */ -// Class definition for the implementation - -#ifndef CustomerInfoImpl_h -#define CustomerInfoImpl_h - -#include "CustomerInfo.h" - - - -class CustomerInfoImpl : public CustomerInfo -{ -public: - CustomerInfoImpl(); - virtual ~CustomerInfoImpl(); - virtual const char* getCustomerInformation(const char* customerID); - -}; -#endif diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp deleted file mode 100644 index 04980879e3..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 "CalculatorImpl_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 - CalculatorImpl_CalculatorService_Proxy* CalculatorImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target) - { - return new CalculatorImpl_CalculatorService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CalculatorImpl_CalculatorService_Proxy_Destructor(void* proxy) - { - delete (CalculatorImpl_CalculatorService_Proxy*)proxy; - } -} - -CalculatorImpl_CalculatorService_Proxy::CalculatorImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CalculatorImpl_CalculatorService_Proxy::~CalculatorImpl_CalculatorService_Proxy() -{ - if (target) - delete target; -} - -long CalculatorImpl_CalculatorService_Proxy::subtract( long arg0, long arg1) -{ - Operation operation("subtract", 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/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h deleted file mode 100644 index 748c493865..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 CalculatorImpl_CalculatorService_Proxy_h -#define CalculatorImpl_CalculatorService_Proxy_h - -#include "Calculator.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CalculatorImpl_CalculatorService_Proxy : public Calculator -{ -public: - CalculatorImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CalculatorImpl_CalculatorService_Proxy(); - virtual long subtract( long a, long b); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CalculatorImpl_CalculatorService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp deleted file mode 100644 index c174fb3a47..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 "CalculatorImpl_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 - CalculatorImpl_CalculatorService_Wrapper* CalculatorImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CalculatorImpl_CalculatorService_Wrapper(target); - } -} - -CalculatorImpl_CalculatorService_Wrapper::CalculatorImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CalculatorImpl*)getImplementation(); -} - -CalculatorImpl_CalculatorService_Wrapper::~CalculatorImpl_CalculatorService_Wrapper() -{ - releaseImplementation(); -} - -void* CalculatorImpl_CalculatorService_Wrapper::newImplementation() -{ - return new CalculatorImpl; -} - -void CalculatorImpl_CalculatorService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CalculatorImpl_CalculatorService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "subtract") - { - long& p0 = *( long*)operation.getParameter(0); - long& p1 = *( long*)operation.getParameter(1); - *(long*)operation.getReturnValue() = impl->subtract(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h deleted file mode 100644 index 8856c7786c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CalculatorImpl_CalculatorService_Wrapper_h -#define CalculatorImpl_CalculatorService_Wrapper_h - -#include "CalculatorImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CalculatorImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CalculatorImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CalculatorImpl_CalculatorService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CalculatorImpl* impl; -}; - -#endif // CalculatorImpl_CalculatorService_Wrapper_h - 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 deleted file mode 100644 index ded3e76eb0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 deleted file mode 100644 index 2a2474aad1..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 deleted file mode 100644 index b9a7f0a69a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 deleted file mode 100644 index da132b9e34..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 deleted file mode 100644 index 77c6b7e29b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 deleted file mode 100644 index 8714cddb83..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 deleted file mode 100644 index 019cf00ca8..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 deleted file mode 100644 index 3ab3fd9a7d..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index 9087c58b0f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,699 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) - { - return new CustomerInfoImpl_CustomerInfoService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) - { - delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; - } -} - -CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() -{ - if (target) - delete target; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationChar( char* arg0, const char* arg1) -{ - Operation operation("getCustomerInformationChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar( char* arg0, const char* arg1) -{ - Operation operation("getCustomerInfoAChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0, char* arg1) -{ - Operation operation("getCustomerInfoBChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char* arg0, char arg1) -{ - Operation operation("getCustomerInfoCChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char* arg0, char arg1) -{ - Operation operation("getCustomerInfoDChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0, char* arg1) -{ - Operation operation("getCustomerInfoEChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0, char* arg1, char* arg2) -{ - Operation operation("getCustomerInfoFChar", 3); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - operation.setParameter(2, (void*)arg2); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( char* arg0, char* arg1, char* arg2, signed char* arg3) -{ - Operation operation("getCustomerInfoGChar", 4); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - operation.setParameter(2, (void*)arg2); - - operation.setParameter(3, (void*)arg3); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char arg1) -{ - Operation operation("getCustomerInfoHChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char* arg1) -{ - Operation operation("getCustomerInfoHChar", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0, const long* arg1) -{ - Operation operation("getCustomerInformationLong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0, const long* arg1) -{ - Operation operation("getCustomerInfoALong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0, long* arg1) -{ - Operation operation("getCustomerInfoBLong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0, long arg1) -{ - Operation operation("getCustomerInfoCLong", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0, long arg1) -{ - Operation operation("getCustomerInfoDLong", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0, long* arg1) -{ - Operation operation("getCustomerInfoELong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0, long* arg1) -{ - Operation operation("getCustomerInfoFLong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0, signed long* arg1) -{ - Operation operation("getCustomerInfoGLong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( signed long* arg0, signed long* arg1) -{ - Operation operation("getCustomerInfoHLong", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt( char* arg0, const int* arg1) -{ - Operation operation("getCustomerInformationInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt( char* arg0, const int* arg1) -{ - Operation operation("getCustomerInfoAInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( char* arg0, int* arg1) -{ - Operation operation("getCustomerInfoBInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( char* arg0, int arg1) -{ - Operation operation("getCustomerInfoCInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( char* arg0, int arg1) -{ - Operation operation("getCustomerInfoDInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( char* arg0, int* arg1) -{ - Operation operation("getCustomerInfoEInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( char* arg0, int* arg1) -{ - Operation operation("getCustomerInfoFInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( char* arg0, signed int* arg1) -{ - Operation operation("getCustomerInfoGInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( char* arg0, unsigned int* arg1) -{ - Operation operation("getCustomerInfoHInt", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64( Diamond& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInformationint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64( Diamond& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInfoAint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( Diamond& arg0, __int64* arg1) -{ - Operation operation("getCustomerInfoBint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( Diamond& arg0, __int64 arg1) -{ - Operation operation("getCustomerInfoCint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( Diamond& arg0, __int64 arg1) -{ - Operation operation("getCustomerInfoDint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( Diamond& arg0, __int64* arg1) -{ - Operation operation("getCustomerInfoEint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( Diamond& arg0, __int64* arg1) -{ - Operation operation("getCustomerInfoFint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( Diamond& arg0, signed __int64* arg1) -{ - Operation operation("getCustomerInfoGint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64(const Diamond& arg0, unsigned int64* arg1) -{ - Operation operation("getCustomerInfoHint64", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid( float& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInformationVoid", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const void*)operation.getReturnValue(); - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const float& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInfoAVoid", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return; - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid() -{ - Operation operation("getCustomerInfoBVoid", 0); - - target->invoke(operation); - return; - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid() -{ - Operation operation("getCustomerInfoCVoid", 0); - - target->invoke(operation); - return; - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid() -{ - Operation operation("getCustomerInfoDVoid", 0); - - target->invoke(operation); - return; - -} - -char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEVoid() -{ - Operation operation("getCustomerInfoEVoid", 0); - char ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFVoid() -{ - Operation operation("getCustomerInfoFVoid", 0); - char ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGVoid() -{ - Operation operation("getCustomerInfoGVoid", 0); - char ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( int arg0, int arg1, int arg2, int arg3, char* customer arg4) -{ - Operation operation("getCustomerInfoAInline", 5); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - operation.setParameter(2, (void*)&arg2); - - operation.setParameter(3, (void*)&arg3); - - operation.setParameter(4, (void*)arg4); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( int* arg0, int* arg1, int* arg2, char* customer arg3) -{ - Operation operation("getCustomerInfoBInline", 4); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - operation.setParameter(2, (void*)arg2); - - operation.setParameter(3, (void*)arg3); - - int ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0) -{ - Operation operation("getCustomerInfoCInline", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (friend const unsigned int*)operation.getReturnValue(); - -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0, const char arg1) -{ - Operation operation("getCustomerInfoTrickyA", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - int ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0, int arg1) -{ - Operation operation("getCustomerInfoTrickyB", 2); - operation.setParameter(0, (void*)&arg0); - - operation.setParameter(1, (void*)&arg1); - - int ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index 47b604358a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h -#define CustomerInfoImpl_CustomerInfoService_Proxy_h - -#include "/CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformationChar( char* p1, const char* customerID); - virtual const char* getCustomerInfoAChar( char* p1, const char* ); - virtual const char* getCustomerInfoBChar( char* p1, char* customerID); - virtual const char* getCustomerInfoCChar( char* p1, char customerID); - virtual const char* getCustomerInfoDChar( char* p1, char ); - virtual const char* getCustomerInfoEChar( char* p1, char* ); - virtual const char* getCustomerInfoFChar( char* p1, char* p1, char* customerID); - virtual const char* getCustomerInfoGChar( char* p1, char* , char* p1, signed char* customerID); - virtual const char* getCustomerInfoHChar( unsigned char* customerID, const char ); - virtual const char* getCustomerInfoHChar( unsigned char* customerID, const char* ); - virtual const long* getCustomerInformationLong(const long* customerID, const long* customerID); - virtual const long* getCustomerInfoALong(const long* , const long* ); - virtual const long* getCustomerInfoBLong( long* customerID, long* customerID2); - virtual const long* getCustomerInfoCLong( long customerID, long customerID2); - virtual const long* getCustomerInfoDLong( long , long ); - virtual const long* getCustomerInfoELong( long* , long* ); - virtual const long* getCustomerInfoFLong( long* customerID, long* customerID2); - virtual const long* getCustomerInfoGLong( signed long* customerID, signed long* customerID2); - virtual const long* getCustomerInfoHLong( signed long* customerID, signed long* customerID2); - virtual const int* getCustomerInformationInt( char* , const int* customerID); - virtual const int* getCustomerInfoAInt( char* , const int* ); - virtual const int* getCustomerInfoBInt( char* , int* customerID); - virtual const int* getCustomerInfoCInt( char* , int customerID); - virtual const int* getCustomerInfoDInt( char* , int ); - virtual const int* getCustomerInfoEInt( char* , int* ); - virtual const int* getCustomerInfoFInt( char* , int* customerID); - virtual const int* getCustomerInfoGInt( char* , signed int* customerID); - virtual const int* getCustomerInfoHInt( char* , unsigned int* customerID); - virtual const __int64* getCustomerInformationint64( Diamond& , const __int64* customerID); - virtual const __int64* getCustomerInfoAint64( Diamond& , const __int64* ); - virtual const __int64* getCustomerInfoBint64( Diamond& , __int64* customerID); - virtual const __int64* getCustomerInfoCint64( Diamond& , __int64 customerID); - virtual const __int64* getCustomerInfoDint64( Diamond& myDiamond, __int64 ); - virtual const __int64* getCustomerInfoEint64( Diamond& myDiamond, __int64* ); - virtual const __int64* getCustomerInfoFint64( Diamond& myDiamond, __int64* customerID); - virtual const __int64* getCustomerInfoGint64( Diamond& myDiamond, signed __int64* customerID); - virtual const __int64* getCustomerInfoHint64(const Diamond& myDiamond, unsigned int64* customerID); - virtual const void* getCustomerInformationVoid( float& f, const __int64* customerID); - virtual void getCustomerInfoAVoid(const float& f, const __int64* ); - virtual void getCustomerInfoBVoid(); - virtual void getCustomerInfoCVoid(); - virtual void getCustomerInfoDVoid( void ); - virtual char getCustomerInfoEVoid( void ); - virtual char getCustomerInfoFVoid(); - virtual char getCustomerInfoGVoid( void ); - virtual const char* getCustomerInfoAInline( int , int , int , int , char* customer id); - virtual int getCustomerInfoBInline( int* , int* f, int* g, char* customer id); - virtual friend const unsigned int* getCustomerInfoCInline( char* customer id); - virtual int getCustomerInfoTrickyA(const char , const char ); - virtual int getCustomerInfoTrickyB( int myInt, int myInt); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 51c975ec9b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl*)getImplementation(); -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformationChar") - { - char* p0 = ( char*)operation.getParameter(0); - const char* p1 = (const char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInformationChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoAChar") - { - char* p0 = ( char*)operation.getParameter(0); - const char* p1 = (const char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoAChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoBChar") - { - char* p0 = ( char*)operation.getParameter(0); - char* p1 = ( char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoBChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoCChar") - { - char* p0 = ( char*)operation.getParameter(0); - char& p1 = *( char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoCChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoDChar") - { - char* p0 = ( char*)operation.getParameter(0); - char& p1 = *( char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoDChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoEChar") - { - char* p0 = ( char*)operation.getParameter(0); - char* p1 = ( char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoEChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoFChar") - { - char* p0 = ( char*)operation.getParameter(0); - char* p1 = ( char*)operation.getParameter(1); - char* p2 = ( char*)operation.getParameter(2); - - operation.setReturnValue((void*) impl->getCustomerInfoFChar(p0, p1, p2)); - return; - } - if (operationName == "getCustomerInfoGChar") - { - char* p0 = ( char*)operation.getParameter(0); - char* p1 = ( char*)operation.getParameter(1); - char* p2 = ( char*)operation.getParameter(2); - signed char* p3 = ( signed char*)operation.getParameter(3); - - operation.setReturnValue((void*) impl->getCustomerInfoGChar(p0, p1, p2, p3)); - return; - } - if (operationName == "getCustomerInfoHChar") - { - unsigned char* p0 = ( unsigned char*)operation.getParameter(0); - const char& p1 = *(const char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoHChar(p0, p1)); - return; - } - if (operationName == "getCustomerInfoHChar") - { - unsigned char* p0 = ( unsigned char*)operation.getParameter(0); - const char* p1 = (const char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoHChar(p0, p1)); - return; - } - if (operationName == "getCustomerInformationLong") - { - const long* p0 = (const long*)operation.getParameter(0); - const long* p1 = (const long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInformationLong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoALong") - { - const long* p0 = (const long*)operation.getParameter(0); - const long* p1 = (const long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoALong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoBLong") - { - long* p0 = ( long*)operation.getParameter(0); - long* p1 = ( long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoBLong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoCLong") - { - long& p0 = *( long*)operation.getParameter(0); - long& p1 = *( long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoCLong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoDLong") - { - long& p0 = *( long*)operation.getParameter(0); - long& p1 = *( long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoDLong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoELong") - { - long* p0 = ( long*)operation.getParameter(0); - long* p1 = ( long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoELong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoFLong") - { - long* p0 = ( long*)operation.getParameter(0); - long* p1 = ( long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoFLong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoGLong") - { - signed long* p0 = ( signed long*)operation.getParameter(0); - signed long* p1 = ( signed long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoGLong(p0, p1)); - return; - } - if (operationName == "getCustomerInfoHLong") - { - signed long* p0 = ( signed long*)operation.getParameter(0); - signed long* p1 = ( signed long*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoHLong(p0, p1)); - return; - } - if (operationName == "getCustomerInformationInt") - { - char* p0 = ( char*)operation.getParameter(0); - const int* p1 = (const int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInformationInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoAInt") - { - char* p0 = ( char*)operation.getParameter(0); - const int* p1 = (const int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoAInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoBInt") - { - char* p0 = ( char*)operation.getParameter(0); - int* p1 = ( int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoBInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoCInt") - { - char* p0 = ( char*)operation.getParameter(0); - int& p1 = *( int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoCInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoDInt") - { - char* p0 = ( char*)operation.getParameter(0); - int& p1 = *( int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoDInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoEInt") - { - char* p0 = ( char*)operation.getParameter(0); - int* p1 = ( int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoEInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoFInt") - { - char* p0 = ( char*)operation.getParameter(0); - int* p1 = ( int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoFInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoGInt") - { - char* p0 = ( char*)operation.getParameter(0); - signed int* p1 = ( signed int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoGInt(p0, p1)); - return; - } - if (operationName == "getCustomerInfoHInt") - { - char* p0 = ( char*)operation.getParameter(0); - unsigned int* p1 = ( unsigned int*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoHInt(p0, p1)); - return; - } - if (operationName == "getCustomerInformationint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - const __int64* p1 = (const __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInformationint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoAint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - const __int64* p1 = (const __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoAint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoBint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - __int64* p1 = ( __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoBint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoCint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - __int64& p1 = *( __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoCint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoDint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - __int64& p1 = *( __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoDint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoEint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - __int64* p1 = ( __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoEint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoFint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - __int64* p1 = ( __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoFint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoGint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - signed __int64* p1 = ( signed __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoGint64(p0, p1)); - return; - } - if (operationName == "getCustomerInfoHint64") - { - Diamond& p0 = *(Diamond*)operation.getParameter(0); - unsigned int64* p1 = ( unsigned int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoHint64(p0, p1)); - return; - } - if (operationName == "getCustomerInformationVoid") - { - float& p0 = *(float*)operation.getParameter(0); - const __int64* p1 = (const __int64*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInformationVoid(p0, p1)); - return; - } - if (operationName == "getCustomerInfoAVoid") - { - float& p0 = *(float*)operation.getParameter(0); - const __int64* p1 = (const __int64*)operation.getParameter(1); - impl->getCustomerInfoAVoid(p0, p1); - return; - } - if (operationName == "getCustomerInfoBVoid") - { - impl->getCustomerInfoBVoid(); - return; - } - if (operationName == "getCustomerInfoCVoid") - { - impl->getCustomerInfoCVoid(); - return; - } - if (operationName == "getCustomerInfoDVoid") - { - impl->getCustomerInfoDVoid(); - return; - } - if (operationName == "getCustomerInfoEVoid") - { - *(char*)operation.getReturnValue() = impl->getCustomerInfoEVoid(); - return; - } - if (operationName == "getCustomerInfoFVoid") - { - *(char*)operation.getReturnValue() = impl->getCustomerInfoFVoid(); - return; - } - if (operationName == "getCustomerInfoGVoid") - { - *(char*)operation.getReturnValue() = impl->getCustomerInfoGVoid(); - return; - } - if (operationName == "getCustomerInfoAInline") - { - int& p0 = *( int*)operation.getParameter(0); - int& p1 = *( int*)operation.getParameter(1); - int& p2 = *( int*)operation.getParameter(2); - int& p3 = *( int*)operation.getParameter(3); - char* customer p4 = ( char* customer)operation.getParameter(4); - - operation.setReturnValue((void*) impl->getCustomerInfoAInline(p0, p1, p2, p3, p4)); - return; - } - if (operationName == "getCustomerInfoBInline") - { - int* p0 = ( int*)operation.getParameter(0); - int* p1 = ( int*)operation.getParameter(1); - int* p2 = ( int*)operation.getParameter(2); - char* customer p3 = ( char* customer)operation.getParameter(3); - *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0, p1, p2, p3); - return; - } - if (operationName == "getCustomerInfoCInline") - { - char* customer p0 = ( char* customer)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoCInline(p0)); - return; - } - if (operationName == "getCustomerInfoTrickyA") - { - const char& p0 = *(const char*)operation.getParameter(0); - const char& p1 = *(const char*)operation.getParameter(1); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0, p1); - return; - } - if (operationName == "getCustomerInfoTrickyB") - { - int& p0 = *( int*)operation.getParameter(0); - int& p1 = *( int*)operation.getParameter(1); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 778a168220..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl* impl; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index a033e9b11e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,556 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) - { - return new CustomerInfoImpl_CustomerInfoService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) - { - delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; - } -} - -CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() -{ - if (target) - delete target; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationChar(const char* arg0) -{ - Operation operation("getCustomerInformationChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar(const char* arg0) -{ - Operation operation("getCustomerInfoAChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0) -{ - Operation operation("getCustomerInfoBChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char arg0) -{ - Operation operation("getCustomerInfoCChar", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char arg0) -{ - Operation operation("getCustomerInfoDChar", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0) -{ - Operation operation("getCustomerInfoEChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0) -{ - Operation operation("getCustomerInfoFChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( signed char* arg0) -{ - Operation operation("getCustomerInfoGChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0) -{ - Operation operation("getCustomerInfoHChar", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0) -{ - Operation operation("getCustomerInformationLong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0) -{ - Operation operation("getCustomerInfoALong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0) -{ - Operation operation("getCustomerInfoBLong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0) -{ - Operation operation("getCustomerInfoCLong", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0) -{ - Operation operation("getCustomerInfoDLong", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0) -{ - Operation operation("getCustomerInfoELong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0) -{ - Operation operation("getCustomerInfoFLong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0) -{ - Operation operation("getCustomerInfoGLong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( unsigned long* arg0) -{ - Operation operation("getCustomerInfoHLong", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const long*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt(const int* arg0) -{ - Operation operation("getCustomerInformationInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt(const int* arg0) -{ - Operation operation("getCustomerInfoAInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( int* arg0) -{ - Operation operation("getCustomerInfoBInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( int arg0) -{ - Operation operation("getCustomerInfoCInt", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( int arg0) -{ - Operation operation("getCustomerInfoDInt", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( int* arg0) -{ - Operation operation("getCustomerInfoEInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( int* arg0) -{ - Operation operation("getCustomerInfoFInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( signed int* arg0) -{ - Operation operation("getCustomerInfoGInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( unsigned int* arg0) -{ - Operation operation("getCustomerInfoHInt", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const int*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64(const __int64* arg0) -{ - Operation operation("getCustomerInformationint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64(const __int64* arg0) -{ - Operation operation("getCustomerInfoAint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( __int64* arg0) -{ - Operation operation("getCustomerInfoBint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( __int64 arg0) -{ - Operation operation("getCustomerInfoCint64", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( __int64 arg0) -{ - Operation operation("getCustomerInfoDint64", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( __int64* arg0) -{ - Operation operation("getCustomerInfoEint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( __int64* arg0) -{ - Operation operation("getCustomerInfoFint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( signed __int64* arg0) -{ - Operation operation("getCustomerInfoGint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64( unsigned int64* arg0) -{ - Operation operation("getCustomerInfoHint64", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const __int64*)operation.getReturnValue(); - -} - -const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid(const __int64* arg0) -{ - Operation operation("getCustomerInformationVoid", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const void*)operation.getReturnValue(); - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const __int64* arg0) -{ - Operation operation("getCustomerInfoAVoid", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return; - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid() -{ - Operation operation("getCustomerInfoBVoid", 0); - - target->invoke(operation); - return; - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid() -{ - Operation operation("getCustomerInfoCVoid", 0); - - target->invoke(operation); - return; - -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid() -{ - Operation operation("getCustomerInfoDVoid", 0); - - target->invoke(operation); - return; - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( char* customer arg0) -{ - Operation operation("getCustomerInfoAInline", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( char* customer arg0) -{ - Operation operation("getCustomerInfoBInline", 1); - operation.setParameter(0, (void*)arg0); - - int ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0) -{ - Operation operation("getCustomerInfoCInline", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (friend const unsigned int*)operation.getReturnValue(); - -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0) -{ - Operation operation("getCustomerInfoTrickyA", 1); - operation.setParameter(0, (void*)&arg0); - - int ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0) -{ - Operation operation("getCustomerInfoTrickyB", 1); - operation.setParameter(0, (void*)&arg0); - - int ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index f10da9c15e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h -#define CustomerInfoImpl_CustomerInfoService_Proxy_h - -#include "/CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformationChar(const char* customerID); - virtual const char* getCustomerInfoAChar(const char* ); - virtual const char* getCustomerInfoBChar( char* customerID); - virtual const char* getCustomerInfoCChar( char customerID); - virtual const char* getCustomerInfoDChar( char ); - virtual const char* getCustomerInfoEChar( char* ); - virtual const char* getCustomerInfoFChar( char* customerID); - virtual const char* getCustomerInfoGChar( signed char* customerID); - virtual const char* getCustomerInfoHChar( unsigned char* customerID); - virtual const long* getCustomerInformationLong(const long* customerID); - virtual const long* getCustomerInfoALong(const long* ); - virtual const long* getCustomerInfoBLong( long* customerID); - virtual const long* getCustomerInfoCLong( long customerID); - virtual const long* getCustomerInfoDLong( long ); - virtual const long* getCustomerInfoELong( long* ); - virtual const long* getCustomerInfoFLong( long* customerID); - virtual const long* getCustomerInfoGLong( signed long* customerID); - virtual const long* getCustomerInfoHLong( unsigned long* customerID); - virtual const int* getCustomerInformationInt(const int* customerID); - virtual const int* getCustomerInfoAInt(const int* ); - virtual const int* getCustomerInfoBInt( int* customerID); - virtual const int* getCustomerInfoCInt( int customerID); - virtual const int* getCustomerInfoDInt( int ); - virtual const int* getCustomerInfoEInt( int* ); - virtual const int* getCustomerInfoFInt( int* customerID); - virtual const int* getCustomerInfoGInt( signed int* customerID); - virtual const int* getCustomerInfoHInt( unsigned int* customerID); - virtual const __int64* getCustomerInformationint64(const __int64* customerID); - virtual const __int64* getCustomerInfoAint64(const __int64* ); - virtual const __int64* getCustomerInfoBint64( __int64* customerID); - virtual const __int64* getCustomerInfoCint64( __int64 customerID); - virtual const __int64* getCustomerInfoDint64( __int64 ); - virtual const __int64* getCustomerInfoEint64( __int64* ); - virtual const __int64* getCustomerInfoFint64( __int64* customerID); - virtual const __int64* getCustomerInfoGint64( signed __int64* customerID); - virtual const __int64* getCustomerInfoHint64( unsigned int64* customerID); - virtual const void* getCustomerInformationVoid(const __int64* customerID); - virtual void getCustomerInfoAVoid(const __int64* ); - virtual void getCustomerInfoBVoid(); - virtual void getCustomerInfoCVoid(); - virtual void getCustomerInfoDVoid( void ); - virtual const char* getCustomerInfoAInline( char* customer id); - virtual int getCustomerInfoBInline( char* customer id); - virtual friend const unsigned int* getCustomerInfoCInline( char* customer id); - virtual int getCustomerInfoTrickyA(const char ); - virtual int getCustomerInfoTrickyB( int myInt); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index abf2b8ed1a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,376 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl*)getImplementation(); -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformationChar") - { - const char* p0 = (const char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformationChar(p0)); - return; - } - if (operationName == "getCustomerInfoAChar") - { - const char* p0 = (const char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoAChar(p0)); - return; - } - if (operationName == "getCustomerInfoBChar") - { - char* p0 = ( char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoBChar(p0)); - return; - } - if (operationName == "getCustomerInfoCChar") - { - char& p0 = *( char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoCChar(p0)); - return; - } - if (operationName == "getCustomerInfoDChar") - { - char& p0 = *( char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoDChar(p0)); - return; - } - if (operationName == "getCustomerInfoEChar") - { - char* p0 = ( char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoEChar(p0)); - return; - } - if (operationName == "getCustomerInfoFChar") - { - char* p0 = ( char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoFChar(p0)); - return; - } - if (operationName == "getCustomerInfoGChar") - { - signed char* p0 = ( signed char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoGChar(p0)); - return; - } - if (operationName == "getCustomerInfoHChar") - { - unsigned char* p0 = ( unsigned char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoHChar(p0)); - return; - } - if (operationName == "getCustomerInformationLong") - { - const long* p0 = (const long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformationLong(p0)); - return; - } - if (operationName == "getCustomerInfoALong") - { - const long* p0 = (const long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoALong(p0)); - return; - } - if (operationName == "getCustomerInfoBLong") - { - long* p0 = ( long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoBLong(p0)); - return; - } - if (operationName == "getCustomerInfoCLong") - { - long& p0 = *( long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoCLong(p0)); - return; - } - if (operationName == "getCustomerInfoDLong") - { - long& p0 = *( long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoDLong(p0)); - return; - } - if (operationName == "getCustomerInfoELong") - { - long* p0 = ( long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoELong(p0)); - return; - } - if (operationName == "getCustomerInfoFLong") - { - long* p0 = ( long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoFLong(p0)); - return; - } - if (operationName == "getCustomerInfoGLong") - { - signed long* p0 = ( signed long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoGLong(p0)); - return; - } - if (operationName == "getCustomerInfoHLong") - { - unsigned long* p0 = ( unsigned long*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoHLong(p0)); - return; - } - if (operationName == "getCustomerInformationInt") - { - const int* p0 = (const int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformationInt(p0)); - return; - } - if (operationName == "getCustomerInfoAInt") - { - const int* p0 = (const int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoAInt(p0)); - return; - } - if (operationName == "getCustomerInfoBInt") - { - int* p0 = ( int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoBInt(p0)); - return; - } - if (operationName == "getCustomerInfoCInt") - { - int& p0 = *( int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoCInt(p0)); - return; - } - if (operationName == "getCustomerInfoDInt") - { - int& p0 = *( int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoDInt(p0)); - return; - } - if (operationName == "getCustomerInfoEInt") - { - int* p0 = ( int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoEInt(p0)); - return; - } - if (operationName == "getCustomerInfoFInt") - { - int* p0 = ( int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoFInt(p0)); - return; - } - if (operationName == "getCustomerInfoGInt") - { - signed int* p0 = ( signed int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoGInt(p0)); - return; - } - if (operationName == "getCustomerInfoHInt") - { - unsigned int* p0 = ( unsigned int*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoHInt(p0)); - return; - } - if (operationName == "getCustomerInformationint64") - { - const __int64* p0 = (const __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformationint64(p0)); - return; - } - if (operationName == "getCustomerInfoAint64") - { - const __int64* p0 = (const __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoAint64(p0)); - return; - } - if (operationName == "getCustomerInfoBint64") - { - __int64* p0 = ( __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoBint64(p0)); - return; - } - if (operationName == "getCustomerInfoCint64") - { - __int64& p0 = *( __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoCint64(p0)); - return; - } - if (operationName == "getCustomerInfoDint64") - { - __int64& p0 = *( __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoDint64(p0)); - return; - } - if (operationName == "getCustomerInfoEint64") - { - __int64* p0 = ( __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoEint64(p0)); - return; - } - if (operationName == "getCustomerInfoFint64") - { - __int64* p0 = ( __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoFint64(p0)); - return; - } - if (operationName == "getCustomerInfoGint64") - { - signed __int64* p0 = ( signed __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoGint64(p0)); - return; - } - if (operationName == "getCustomerInfoHint64") - { - unsigned int64* p0 = ( unsigned int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoHint64(p0)); - return; - } - if (operationName == "getCustomerInformationVoid") - { - const __int64* p0 = (const __int64*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformationVoid(p0)); - return; - } - if (operationName == "getCustomerInfoAVoid") - { - const __int64* p0 = (const __int64*)operation.getParameter(0); - impl->getCustomerInfoAVoid(p0); - return; - } - if (operationName == "getCustomerInfoBVoid") - { - impl->getCustomerInfoBVoid(); - return; - } - if (operationName == "getCustomerInfoCVoid") - { - impl->getCustomerInfoCVoid(); - return; - } - if (operationName == "getCustomerInfoDVoid") - { - impl->getCustomerInfoDVoid(); - return; - } - if (operationName == "getCustomerInfoAInline") - { - char* customer p0 = ( char* customer)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoAInline(p0)); - return; - } - if (operationName == "getCustomerInfoBInline") - { - char* customer p0 = ( char* customer)operation.getParameter(0); - *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0); - return; - } - if (operationName == "getCustomerInfoCInline") - { - char* customer p0 = ( char* customer)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInfoCInline(p0)); - return; - } - if (operationName == "getCustomerInfoTrickyA") - { - const char& p0 = *(const char*)operation.getParameter(0); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0); - return; - } - if (operationName == "getCustomerInfoTrickyB") - { - int& p0 = *( int*)operation.getParameter(0); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 778a168220..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl* impl; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp deleted file mode 100644 index e1950f17a6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "CustomerInfoImpl2_CustomerInfoService_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 - CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) - { - return new CustomerInfoImpl2_CustomerInfoService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CustomerInfoImpl2_CustomerInfoService_Proxy_Destructor(void* proxy) - { - delete (CustomerInfoImpl2_CustomerInfoService_Proxy*)proxy; - } -} - -CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CustomerInfoImpl2_CustomerInfoService_Proxy::~CustomerInfoImpl2_CustomerInfoService_Proxy() -{ - if (target) - delete target; -} - -const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h deleted file mode 100644 index 03fe3e3b93..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 CustomerInfoImpl2_CustomerInfoService_Proxy_h -#define CustomerInfoImpl2_CustomerInfoService_Proxy_h - -#include "/CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl2_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl2_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl2_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 2d5f502b08..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 "CustomerInfoImpl2_CustomerInfoService_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 - CustomerInfoImpl2_CustomerInfoService_Wrapper* CustomerInfoImpl2_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl2_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl2*)getImplementation(); -} - -CustomerInfoImpl2_CustomerInfoService_Wrapper::~CustomerInfoImpl2_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl2_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl2; -} - -void CustomerInfoImpl2_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformation") - { - const char* p0 = (const char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformation(p0)); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h deleted file mode 100644 index 7f7cb13a6b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl2_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl2_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl2_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl2* impl; -}; - -#endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index c83eb661ca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_MyValueService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_MyValueService_Proxy*)proxy; - } -} - -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() -{ - if (target) - delete target; -} - -float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) -{ - Operation operation("getMyValue", 1); - operation.setParameter(0, (void*)arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS", 1); - operation.setParameter(0, (void*)&arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname", 1); - operation.setParameter(0, (void*)&arg0); - - string ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return *(const string*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 38f22384b0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Proxy_h -#define MyValueImpl_MyValueService_Proxy_h - -#include "MyValue.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_MyValueService_Proxy : public MyValue -{ -public: - MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_MyValueService_Proxy(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname( string& customerID); - virtual const string& getCustnamecs( string customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_MyValueService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index d9337c9341..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new MyValueImpl_MyValueService_Wrapper(target); - } -} - -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (MyValueImpl*)getImplementation(); -} - -MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() -{ - releaseImplementation(); -} - -void* MyValueImpl_MyValueService_Wrapper::newImplementation() -{ - return new MyValueImpl; -} - -void MyValueImpl_MyValueService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getMyValue") - { - const char* p0 = (const char*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameter(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameter(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue((void*)&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 2f5da06e30..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Wrapper_h -#define MyValueImpl_MyValueService_Wrapper_h - -#include "MyValueImpl.hpp" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); - virtual ~MyValueImpl_MyValueService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index 7625556203..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "MyValueImpl_customerInfo_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 - MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_customerInfo_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_customerInfo_Proxy*)proxy; - } -} - -MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() -{ - if (target) - delete target; -} - -const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index cc60ef5005..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_customerInfo_Proxy_h -#define MyValueImpl_customerInfo_Proxy_h - -#include "CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_customerInfo_Proxy : public CustomerInfo -{ -public: - MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_customerInfo_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_customerInfo_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 14b37fa4bd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 "MyValueImpl_stockQuote_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 - MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_stockQuote_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_stockQuote_Proxy*)proxy; - } -} - -MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() -{ - if (target) - delete target; -} - -commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) -{ - Operation operation("GetStockQuotes", 1); - operation.setParameter(0, (void*)&arg0); - - commonj::sdo::DataObjectPtr ret = 0; - operation.setReturnValue((void*)&ret); - - target->invoke(operation); - return ret; - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 850bc3861c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index aaf2115547..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) - { - return new CustomerInfoImpl_CustomerInfoService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) - { - delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; - } -} - -CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() -{ - if (target) - delete target; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index 3739cd72d1..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h -#define CustomerInfoImpl_CustomerInfoService_Proxy_h - -#include "/CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index d1fb6073c9..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl*)getImplementation(); -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformation") - { - const char* p0 = (const char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformation(p0)); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 778a168220..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl* impl; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index c83eb661ca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_MyValueService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_MyValueService_Proxy*)proxy; - } -} - -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() -{ - if (target) - delete target; -} - -float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) -{ - Operation operation("getMyValue", 1); - operation.setParameter(0, (void*)arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS", 1); - operation.setParameter(0, (void*)&arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname", 1); - operation.setParameter(0, (void*)&arg0); - - string ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return *(const string*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 38f22384b0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Proxy_h -#define MyValueImpl_MyValueService_Proxy_h - -#include "MyValue.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_MyValueService_Proxy : public MyValue -{ -public: - MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_MyValueService_Proxy(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname( string& customerID); - virtual const string& getCustnamecs( string customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_MyValueService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index d9337c9341..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new MyValueImpl_MyValueService_Wrapper(target); - } -} - -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (MyValueImpl*)getImplementation(); -} - -MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() -{ - releaseImplementation(); -} - -void* MyValueImpl_MyValueService_Wrapper::newImplementation() -{ - return new MyValueImpl; -} - -void MyValueImpl_MyValueService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getMyValue") - { - const char* p0 = (const char*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameter(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameter(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue((void*)&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 2f5da06e30..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Wrapper_h -#define MyValueImpl_MyValueService_Wrapper_h - -#include "MyValueImpl.hpp" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); - virtual ~MyValueImpl_MyValueService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index 7625556203..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "MyValueImpl_customerInfo_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 - MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_customerInfo_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_customerInfo_Proxy*)proxy; - } -} - -MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() -{ - if (target) - delete target; -} - -const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index cc60ef5005..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_customerInfo_Proxy_h -#define MyValueImpl_customerInfo_Proxy_h - -#include "CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_customerInfo_Proxy : public CustomerInfo -{ -public: - MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_customerInfo_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_customerInfo_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 14b37fa4bd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 "MyValueImpl_stockQuote_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 - MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_stockQuote_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_stockQuote_Proxy*)proxy; - } -} - -MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() -{ - if (target) - delete target; -} - -commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) -{ - Operation operation("GetStockQuotes", 1); - operation.setParameter(0, (void*)&arg0); - - commonj::sdo::DataObjectPtr ret = 0; - operation.setReturnValue((void*)&ret); - - target->invoke(operation); - return ret; - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 850bc3861c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index 5e5a85a7c5..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_MyValueService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_MyValueService_Proxy*)proxy; - } -} - -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() -{ - if (target) - delete target; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0) -{ - Operation operation("getMyValueOther", 1); - operation.setParameter(0, (void*)arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) -{ - Operation operation("getMyValueSOther", 1); - operation.setParameter(0, (void*)&arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) -{ - Operation operation("getCustnameOther", 1); - operation.setParameter(0, (void*)&arg0); - - string ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) -{ - Operation operation("getCustnamecsOther", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return *(const string*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 19f4e9c89a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Proxy_h -#define MyValueImpl_MyValueService_Proxy_h - -#include "MyValue.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_MyValueService_Proxy : public Other::MyValue -{ -public: - MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_MyValueService_Proxy(); - virtual float getMyValueOther(const char* customerID); - virtual float getMyValueSOther(const string& customerID); - virtual string getCustnameOther( string& customerID); - virtual const string& getCustnamecsOther( string customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_MyValueService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index 7a5e40e9ea..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new MyValueImpl_MyValueService_Wrapper(target); - } -} - -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (MyValueImpl*)getImplementation(); -} - -MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() -{ - releaseImplementation(); -} - -void* MyValueImpl_MyValueService_Wrapper::newImplementation() -{ - return new MyValueImpl; -} - -void MyValueImpl_MyValueService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getMyValueOther") - { - const char* p0 = (const char*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameter(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameter(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue((void*)&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 2f5da06e30..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Wrapper_h -#define MyValueImpl_MyValueService_Wrapper_h - -#include "MyValueImpl.hpp" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); - virtual ~MyValueImpl_MyValueService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index 5e5a85a7c5..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_MyValueService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_MyValueService_Proxy*)proxy; - } -} - -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() -{ - if (target) - delete target; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0) -{ - Operation operation("getMyValueOther", 1); - operation.setParameter(0, (void*)arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) -{ - Operation operation("getMyValueSOther", 1); - operation.setParameter(0, (void*)&arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) -{ - Operation operation("getCustnameOther", 1); - operation.setParameter(0, (void*)&arg0); - - string ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) -{ - Operation operation("getCustnamecsOther", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return *(const string*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 19f4e9c89a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Proxy_h -#define MyValueImpl_MyValueService_Proxy_h - -#include "MyValue.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_MyValueService_Proxy : public Other::MyValue -{ -public: - MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_MyValueService_Proxy(); - virtual float getMyValueOther(const char* customerID); - virtual float getMyValueSOther(const string& customerID); - virtual string getCustnameOther( string& customerID); - virtual const string& getCustnamecsOther( string customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_MyValueService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index 7a5e40e9ea..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new MyValueImpl_MyValueService_Wrapper(target); - } -} - -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (MyValueImpl*)getImplementation(); -} - -MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() -{ - releaseImplementation(); -} - -void* MyValueImpl_MyValueService_Wrapper::newImplementation() -{ - return new MyValueImpl; -} - -void MyValueImpl_MyValueService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getMyValueOther") - { - const char* p0 = (const char*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameter(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameter(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue((void*)&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 2f5da06e30..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Wrapper_h -#define MyValueImpl_MyValueService_Wrapper_h - -#include "MyValueImpl.hpp" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); - virtual ~MyValueImpl_MyValueService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp deleted file mode 100644 index e1950f17a6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "CustomerInfoImpl2_CustomerInfoService_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 - CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) - { - return new CustomerInfoImpl2_CustomerInfoService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CustomerInfoImpl2_CustomerInfoService_Proxy_Destructor(void* proxy) - { - delete (CustomerInfoImpl2_CustomerInfoService_Proxy*)proxy; - } -} - -CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CustomerInfoImpl2_CustomerInfoService_Proxy::~CustomerInfoImpl2_CustomerInfoService_Proxy() -{ - if (target) - delete target; -} - -const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h deleted file mode 100644 index 03fe3e3b93..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 CustomerInfoImpl2_CustomerInfoService_Proxy_h -#define CustomerInfoImpl2_CustomerInfoService_Proxy_h - -#include "/CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl2_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl2_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl2_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 2d5f502b08..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 "CustomerInfoImpl2_CustomerInfoService_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 - CustomerInfoImpl2_CustomerInfoService_Wrapper* CustomerInfoImpl2_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl2_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl2*)getImplementation(); -} - -CustomerInfoImpl2_CustomerInfoService_Wrapper::~CustomerInfoImpl2_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl2_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl2; -} - -void CustomerInfoImpl2_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformation") - { - const char* p0 = (const char*)operation.getParameter(0); - - operation.setReturnValue((void*) impl->getCustomerInformation(p0)); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h deleted file mode 100644 index 7f7cb13a6b..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl2_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl2_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl2_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl2* impl; -}; - -#endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index c83eb661ca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_MyValueService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_MyValueService_Proxy*)proxy; - } -} - -MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy() -{ - if (target) - delete target; -} - -float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0) -{ - Operation operation("getMyValue", 1); - operation.setParameter(0, (void*)arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS", 1); - operation.setParameter(0, (void*)&arg0); - - float ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname", 1); - operation.setParameter(0, (void*)&arg0); - - string ret; - operation.setReturnValue((void*)&ret); - target->invoke(operation); - return ret; - -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs", 1); - operation.setParameter(0, (void*)&arg0); - - - target->invoke(operation); - return *(const string*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 38f22384b0..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Proxy_h -#define MyValueImpl_MyValueService_Proxy_h - -#include "MyValue.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_MyValueService_Proxy : public MyValue -{ -public: - MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_MyValueService_Proxy(); - virtual float getMyValue(const char* customerID); - virtual float getMyValueS(const string& customerID); - virtual string getCustname( string& customerID); - virtual const string& getCustnamecs( string customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_MyValueService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index d9337c9341..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 "MyValueImpl_MyValueService_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 - MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new MyValueImpl_MyValueService_Wrapper(target); - } -} - -MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (MyValueImpl*)getImplementation(); -} - -MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper() -{ - releaseImplementation(); -} - -void* MyValueImpl_MyValueService_Wrapper::newImplementation() -{ - return new MyValueImpl; -} - -void MyValueImpl_MyValueService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getMyValue") - { - const char* p0 = (const char*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameter(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameter(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameter(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue((void*)&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 2f5da06e30..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 MyValueImpl_MyValueService_Wrapper_h -#define MyValueImpl_MyValueService_Wrapper_h - -#include "MyValueImpl.hpp" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target); - virtual ~MyValueImpl_MyValueService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index 7625556203..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "MyValueImpl_customerInfo_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 - MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_customerInfo_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_customerInfo_Proxy*)proxy; - } -} - -MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy() -{ - if (target) - delete target; -} - -const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0) -{ - Operation operation("getCustomerInformation", 1); - operation.setParameter(0, (void*)arg0); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index cc60ef5005..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_customerInfo_Proxy_h -#define MyValueImpl_customerInfo_Proxy_h - -#include "CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_customerInfo_Proxy : public CustomerInfo -{ -public: - MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_customerInfo_Proxy(); - virtual const char* getCustomerInformation(const char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_customerInfo_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 14b37fa4bd..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 "MyValueImpl_stockQuote_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 - MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target) - { - return new MyValueImpl_stockQuote_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy) - { - delete (MyValueImpl_stockQuote_Proxy*)proxy; - } -} - -MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy() -{ - if (target) - delete target; -} - -commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0) -{ - Operation operation("GetStockQuotes", 1); - operation.setParameter(0, (void*)&arg0); - - commonj::sdo::DataObjectPtr ret = 0; - operation.setReturnValue((void*)&ret); - - target->invoke(operation); - return ret; - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 850bc3861c..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 MyValueImpl_stockQuote_Proxy_h -#define MyValueImpl_stockQuote_Proxy_h - -#include "StockQuoteService.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class MyValueImpl_stockQuote_Proxy : public StockQuoteService -{ -public: - MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~MyValueImpl_stockQuote_Proxy(); - virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // MyValueImpl_stockQuote_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index fae8534537..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target) - { - return new CustomerInfoImpl_CustomerInfoService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy) - { - delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy; - } -} - -CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy() -{ - if (target) - delete target; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationCharPublic( char* arg0, const char* arg1) -{ - Operation operation("getCustomerInformationCharPublic", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoACharPublic( char* arg0, const char* arg1) -{ - Operation operation("getCustomerInfoACharPublic", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBCharPublic( char* arg0, char* arg1) -{ - Operation operation("getCustomerInfoBCharPublic", 2); - operation.setParameter(0, (void*)arg0); - - operation.setParameter(1, (void*)arg1); - - - target->invoke(operation); - return (const char*)operation.getReturnValue(); - -} - - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index ea4c69e376..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Proxy_h -#define CustomerInfoImpl_CustomerInfoService_Proxy_h - -#include "/CustomerInfo.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo -{ -public: - CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~CustomerInfoImpl_CustomerInfoService_Proxy(); - virtual const char* getCustomerInformationCharPublic( char* p1, const char* customerID); - virtual const char* getCustomerInfoACharPublic( char* p1, const char* ); - virtual const char* getCustomerInfoBCharPublic( char* p1, char* customerID); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 70a1e8cbd1..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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 "CustomerInfoImpl_CustomerInfoService_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 - CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new CustomerInfoImpl_CustomerInfoService_Wrapper(target); - } -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target) -{ - impl = (CustomerInfoImpl*)getImplementation(); -} - -CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper() -{ - releaseImplementation(); -} - -void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation() -{ - return new CustomerInfoImpl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "getCustomerInformationCharPublic") - { - char* p0 = ( char*)operation.getParameter(0); - const char* p1 = (const char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInformationCharPublic(p0, p1)); - return; - } - if (operationName == "getCustomerInfoACharPublic") - { - char* p0 = ( char*)operation.getParameter(0); - const char* p1 = (const char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoACharPublic(p0, p1)); - return; - } - if (operationName == "getCustomerInfoBCharPublic") - { - char* p0 = ( char*)operation.getParameter(0); - char* p1 = ( char*)operation.getParameter(1); - - operation.setReturnValue((void*) impl->getCustomerInfoBCharPublic(p0, p1)); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 778a168220..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 CustomerInfoImpl_CustomerInfoService_Wrapper_h -#define CustomerInfoImpl_CustomerInfoService_Wrapper_h - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/core/ComponentServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper -{ -public: - CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target); - virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - CustomerInfoImpl* impl; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt b/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt deleted file mode 100644 index d99c666c6a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/lib/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -Place a junit.jar file (not shipped as part of Tuscany) -in this directory to get the scagen build.xml Ant build -file to find it and Junit classes (without setting the -property "junit.jar.folder". diff --git a/tags/cpp-sca-20060405/tools/scagen/scagen.cmd b/tags/cpp-sca-20060405/tools/scagen/scagen.cmd deleted file mode 100644 index b222ce2f9f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/scagen.cmd +++ /dev/null @@ -1 +0,0 @@ -@java -jar %~d0%~p0scagen.jar %* diff --git a/tags/cpp-sca-20060405/tools/scagen/scagen.sh b/tags/cpp-sca-20060405/tools/scagen/scagen.sh deleted file mode 100755 index 23d6dedc47..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/scagen.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# 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. - -java -jar scagen.jar -dir $2 -output $4 \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java deleted file mode 100644 index 65b1e2f6fa..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ - -package org.apache.tuscany.sca.cpp.tools.common; - -/** - * A snippet of C or C++ source code. If this snippet ends with a return - * statement, this body part also contains the return value. - */ -public class BodyPart { - public final static int TRAILING = 0; - - public final static int RETURN = 1; - - public final static int CATCH = 2; - - private String codeFragment; - - private String returnValue = null; - - private Parameter caughtValue = null; - - private int type; - - BodyPart(String cf) { - codeFragment = cf; - type = TRAILING; - } - - BodyPart(String cf, String rv) { - codeFragment = cf; - if (null != rv && !Utils.isSpace(rv)) { - type = RETURN; - returnValue = rv; - } else - type = TRAILING; - } - - BodyPart(String cf, Parameter cv) { - codeFragment = cf; - caughtValue = cv; - type = CATCH; - } - - public String getCodeFragment() { - return codeFragment; - } - - public boolean isTrailing() { - return TRAILING == type; - } - - public boolean isReturn() { - return RETURN == type; - } - - public boolean isCatch() { - return CATCH == type; - } - - public String getReturnValue() { - if (returnValue != null) - return returnValue.trim(); - else - return null; - } - - public Parameter getCaughtValue() { - return caughtValue; - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java deleted file mode 100644 index 6846bb4096..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; - -/** - * The superclass of tools that parse C/C++ code. This CParsingTool provides - * some useful common methods. - */ -public class CParsingTool { - protected boolean failed = false; - - protected Headers headers = new Headers(); - - protected CParsingTool(String[] args) throws Exception { - String text = new String(); - for (int i = 0; i < args.length; i++) - text += args[i] + " "; - Utils.outputDebugString(text); - - Options.set(args); - String config = (String) Options.getOption("-config"); - if (null != config) - Configuration.initialise(config); - } - - /** - * Read in any include files before the main processing of the tool is done. - * This constructs the Headers. - */ - protected Headers preparseHeaders(String option) throws Exception { - Headers headers = new Headers(); - Object o = Options.getOption(option); - if (null != o) { - Utils.outputDebugString("Pre-parsing headers..."); - List includeList; - if (o instanceof List) - includeList = (List) o; - else { - includeList = new ArrayList(); - includeList.add(o); - } - Iterator it = includeList.iterator(); - while (it.hasNext()) { - File include = new File((String) it.next()); - if (!include.isDirectory()) - Utils.rude("Bad include directory " + include); - - DirectoryTree tree = new DirectoryTree(headers, new HashSet( - Arrays.asList(new Object[] { "hpp", "h" }))); - tree.walkTree(include, null, 0); - } - Utils.outputDebugString("Parsing files..."); - } - - return headers; - } - - /** - * Checks the source directory looks good. - */ - protected File checkFile(String option) throws Exception { - String name = (String) Options.getOption(option); - if (null == name) { - printUsage(); - System.exit(-1); - } - - File file = new File(name); - if (!file.isFile() && !file.isDirectory()) - Utils.rude("Bad file or directory " + file); - return file; - } - - /** - * Checks the target directory and creates it if it doesn't already exist. - */ - protected File maybeCreateDirectory(String option) throws Exception { - String name = (String) Options.getOption(option); - if (null == name) { - printUsage(); - System.exit(-1); - } - - File file = new File(name); - if (!file.exists() && !file.mkdir()) - Utils.screenMessage("Failed to create directory " + file); - return file; - } - - protected void printUsage() { - System.out.println("usage: ??"); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java deleted file mode 100644 index 1a900ff711..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -/** - * Encapsulates the tool's configuration file - */ -public class Configuration { - private static Set files = new HashSet(); - - private static Set classes = new HashSet(); - - private static Set methods = new HashSet(); - - private static Set macros = new HashSet(); - - private static Set defines = new HashSet(); - - private static Set attributes = new HashSet(); - - private static Map others = new HashMap(); - - /** - * No one creates an instance of this class. - */ - private Configuration() { - } - - /** - * Reads in the configuration file - */ - public static void initialise(String filename) throws Exception { - File file = new File(filename); - FileReader fr = new FileReader(file); - BufferedReader br = new BufferedReader(fr); - String line = br.readLine(); - for (int lineno = 1; null != line; lineno++, line = br.readLine()) { - // Ignore lines starting with a # (comments) and blank lines - if (line.startsWith("#")) - continue; - boolean blank = true; - for (int i = 0; i < line.length() && blank; i++) - if (!Character.isWhitespace(line.charAt(i))) - blank = false; - if (blank) - continue; - - int equals = line.indexOf("="); - if (-1 == equals) - Utils.rude("Bad line in configuration file " + filename - + " lineno " + lineno); - String key = line.substring(0, equals).trim(); - String value = line.substring(equals + 1).trim(); - if ("excludefile".equals(key)) { - files.add(value); - } else if ("excludeclass".equals(key)) { - classes.add(value); - } else if ("excludemethod".equals(key)) { - methods.add(value); - } else if ("macro".equals(key)) { - macros.add(value); - } else if ("define".equals(key)) { - defines.add(value); - } else if ("attribute".equals(key)) { - attributes.add(value); - } else { - others.put(key, value); - } - } - } - - public static boolean fileExcluded(String s) { - return files.contains(s); - } - - public static boolean classExcluded(String s) { - return classes.contains(s); - } - - public static boolean methodExcluded(String className, String method) { - return methods.contains(className + "::" + method); - } - - public static boolean isMacro(String s) { - return macros.contains(s); - } - - public static boolean isDefine(String s) { - return defines.contains(s); - } - - public static boolean isAttribute(String s) { - return attributes.contains(s); - } - - public static String getConfigured(String key) { - return (String) others.get(key); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java deleted file mode 100644 index a4f1ca9a21..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.File; -import java.util.Set; -import java.util.StringTokenizer; - -public class DirectoryTree { - private FileActor actor; - - private Set extensions; - - public DirectoryTree(FileActor actor, Set extensions) { - this.actor = actor; - this.extensions = extensions; - } - - /** - * Starts adding trace into the given file. If the given file is a directory - * then this the starting directory and all code beneath and in this - * directory will be given trace. - * - * @param source - - * either the starting directory or one file to add trace to. - */ - public void walkTree(File source, File target, int depth) throws Exception { - depth++; - boolean noTarget = (null == target); - - if (!source.canRead()) - Utils.rude("Cannot read from source directory " + source); - if (!noTarget && !target.canWrite()) - Utils.rude("Cannot write to target directory " + target); - - if (source.isDirectory()) { - File[] filesInDirectory = source.listFiles(); - for (int i = 0; i < filesInDirectory.length; i++) { - File file = filesInDirectory[i]; - String name = file.getName(); - int dot = name.lastIndexOf('.'); - String ext = null; - if (-1 != dot) - ext = name.substring(dot + 1); - - if (file.isDirectory()) { - File newTarget = null; - if (!noTarget) { - StringTokenizer st = new StringTokenizer( - file.getPath(), "\\/"); - String newdir = null; - while (st.hasMoreTokens()) - newdir = st.nextToken(); - String targetName = maybeAppendSeparator(target - .toString()); - newTarget = new File(targetName + newdir); - if (!newTarget.mkdir()) - Utils.rude("Failed to create target directory " - + newTarget); - } - - // recurse - walkTree(file, newTarget, depth); - } else if (file.isFile() - && (extensions == null || (!file.isHidden() && extensions - .contains(ext)))) { - // this is a file and we need to add trace into it ! - actor.actOnFile(file, target, depth); - } - } - } else { - actor.actOnFile(source, target, depth); - } - } - - public static String maybeAppendSeparator(String name) { - if (!name.endsWith("/") && !name.endsWith("\\")) - name += "/"; - return name; - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java deleted file mode 100644 index fc1c8ec5c3..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.File; - -/** - * DirectoryTree calls this interface to allow implementations of this interface - * to act on a file in the directory tree. - */ -public interface FileActor { - public void actOnFile(File source, File target, int depth) throws Exception; -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java deleted file mode 100644 index e629751ea4..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ - -package org.apache.tuscany.sca.cpp.tools.common; - -/** - * A piece of C++ source code - */ -public class FilePart { - public final static int UNKNOWN = 0; - - public final static int COMMENT = 1; - - public final static int METHOD = 2; - - public final static int FIELD = 3; - - public final static int BEGINSCOPE = 4; - - public final static int ENDSCOPE = 5; - - public final static int DIRECTIVE = 6; - - public final static int WHITESPACE = 7; - - public final static int MACRO = 8; - - public final static int CLASSATTRIBUTE = 9; - - public final static int ENUM = 10; - - public final static int PROTOTYPE = 11; - - public final static int TYPEDEF = 12; - - protected String cppsource; - - protected int type; - - FilePart(String s, int type) { - cppsource = s; - this.type = type; - } - - public int getType() { - return type; - } - - int length() { - return cppsource.length(); - } - - public String toString() { - return cppsource; - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java deleted file mode 100644 index 8deba2401d..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -public class Headers implements FileActor { - private ArrayList instanceMethods = new ArrayList(); - - private ArrayList staticMethods = new ArrayList(); - - private ArrayList allMethods = new ArrayList(); - - private ArrayList classNames = new ArrayList(); - - private boolean failed = false; - - public void actOnFile(File header, File ignored, int depth) - throws Exception { - if (Configuration.fileExcluded(header.getName())) { - Utils.outputDebugString("excluding " + header + "..."); - return; - } - - Utils.outputDebugString("pre-parsing " + header + "..."); - FileReader fr = null; - try { - fr = new FileReader(header); - } catch (FileNotFoundException fnfe) { - throw fnfe; - } - BufferedReader inputFile = new BufferedReader(fr); - - try { - InputCppSourceCode code = new InputCppSourceCode(inputFile, header - .getName()); - Iterator it = code.getPartIterator(); - while (it.hasNext()) { - FilePart fp = (FilePart) (it.next()); - if (fp.getType() != FilePart.PROTOTYPE) - continue; - PrototypePart pp = (PrototypePart) fp; - String className = pp.className(); - if (null == className) - continue; - String trimClassName = className; - if (className.endsWith("::")) - trimClassName = className.substring(0, - className.length() - 2); - if (!classNames.contains(trimClassName)) - classNames.add(trimClassName); - - Signature sign = new Signature(fp.toString()); - sign.setClassName(className); - //Tuscany - sign.setScope(pp.getSignature().getScope()); - sign.setNamespace(pp.getSignature().getNamespace()); - - // "Clean" the signature by stripping off attributes, - // semicolons, etc - Signature cleaned = new Signature(sign.toStringWithoutAttrs()); - //Tuscany - problem - cleaned.setClassName(className); - cleaned.setScope(pp.getSignature().getScope()); - cleaned.setNamespace(pp.getSignature().getNamespace()); - //Tuscany - end of problem - - - if (-1 == sign.getAttributes().indexOf("static")) - instanceMethods.add(cleaned); - else - staticMethods.add(cleaned); - } - } catch (ParsingException pe) { - failed = true; - } - - inputFile.close(); - allMethods.addAll(staticMethods); - allMethods.addAll(instanceMethods); - } - - public boolean failed() { - return failed; - } - - public boolean isInstanceMethod(Signature sign) { - Iterator it = instanceMethods.iterator(); - while (it.hasNext()) { - Signature s = (Signature) it.next(); - if (s.equals(sign)) - return true; - } - return false; - } - - public boolean isStaticMethod(Signature sign) { - Iterator it = staticMethods.iterator(); - while (it.hasNext()) { - Signature s = (Signature) it.next(); - if (s.equals(sign)) - return true; - } - return false; - } - - public List getMethods(String method) { - ArrayList list = new ArrayList(); - if (null == method) - return list; - - Iterator it = allMethods.iterator(); - while (it.hasNext()) { - Signature s = (Signature) it.next(); - if (method.equals(s.getMethodName())) - list.add(s); - } - return list; - } - - /** - * Tuscany change - a method to get all the method signatures at once - */ - public List getAllMethods() { - ArrayList list = new ArrayList(); - Iterator it = allMethods.iterator(); - while (it.hasNext()) { - Signature s = (Signature) it.next(); - list.add(s); - } - return list; - } - - public boolean isClassName(String text) { - return classNames.contains(text); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java deleted file mode 100644 index ae6a646eaf..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.BufferedReader; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.StringTokenizer; - -public class InputCppSourceCode { - - private ArrayList parts = new ArrayList(); - - private String name; - - public InputCppSourceCode(BufferedReader br, String name) throws Exception { - this.name = name; - - String s = null; - StringBuffer buff = new StringBuffer(); - for (int i = 1;; i++) { - try { - s = br.readLine(); - } catch (Exception e) { - System.err.println("Ignoring exception thrown parsing file " - + name + " line number " + i); - e.printStackTrace(); - break; - } - if (s == null) - break; - buff.append(s + "\n"); - } - String str = buff.toString(); - - // TODO: When checking for rest.startsWith("struct") should - // check the next letter after struct is not alphanumeric otherwise - // we'll get false matches on a function called structify() for - // instance. Also applies to enum, union, public, typedef, etc - - String rest, text = ""; - int scopedepth = 0; - String scope = "public"; - String currentClass = null; - String currentNamespace = null; - for (int idx = 0; idx < str.length(); /* No idx++ */ - ) { - rest = str.substring(idx); - if (Character.isWhitespace(rest.charAt(0))) { - int ridx = 0; - while (ridx < rest.length() - && Character.isWhitespace(rest.charAt(ridx))) - ridx++; - text = rest.substring(0, ridx); - FilePart fp = new FilePart(text, FilePart.WHITESPACE); - parts.add(fp); - idx += ridx; - - } else if (rest.startsWith("/*")) { - int ridx = rest.indexOf("*/"); // Don't use Utils here - text = str.substring(idx, idx + ridx + 2); - FilePart fp = new FilePart(text, FilePart.COMMENT); - parts.add(fp); - idx += text.length(); - - } else if (rest.startsWith("//")) { - text = str.substring(idx, idx + rest.indexOf("\n")); - FilePart fp = new FilePart(text, FilePart.COMMENT); - parts.add(fp); - idx += text.length(); - - } else if (rest.startsWith("#")) { - int ridx = rest.indexOf("\n"); - char c = rest.charAt(ridx - 1); - while (-1 != ridx && '\\' == c) { - String rest2 = rest.substring(ridx + 1); - ridx += rest2.indexOf("\n") + 1; - c = rest.charAt(ridx - 1); - } - text = str.substring(idx, idx + ridx); - FilePart fp = new FilePart(text, FilePart.DIRECTIVE); - parts.add(fp); - idx += text.length(); - - } else if (rest.startsWith("}")) { - if (scopedepth <= 0) //Tuscany need to increase scopedepth for - // namespaces? - Utils.rude("Braces do not match", name, lineNo(str, idx), - rest.substring(0, rest.indexOf("\n"))); - else - scopedepth--; - // TODO: better checking that this brace really ends the class - if (0 == scopedepth) - currentClass = null; - scope = "public"; - parts.add(new FilePart("}", FilePart.ENDSCOPE)); - idx++; - - } else if (rest.startsWith(";")) { - parts.add(new FilePart(";", FilePart.FIELD)); - idx++; - - } else if (!Character.isLetter(rest.charAt(0)) - && '~' != rest.charAt(0) && '_' != rest.charAt(0)) { - Utils.rude("Lines must start with a letter ", name, lineNo(str, - idx), rest.substring(0, rest.indexOf("\n"))); - - } else if (MacroPart.isAMacro(rest)) { - MacroPart mp = MacroPart.create(rest); - parts.add(mp); - idx += mp.length(); - - } else if (beginsScope(rest)) { - - //Tuscany a namespace comes in here - scopedepth++; - text = rest.substring(0, Utils.indexOf(rest, "{") + 1); - FilePart fp = new FilePart(text, FilePart.BEGINSCOPE); - parts.add(fp); - idx += text.length(); - if (Utils.startsWith(text, "class")) { - // TODO: cope with comments here - // TODO: split out classes into a ClassPart - StringTokenizer st = new StringTokenizer(text, - Utils.whitespace + ":"); - st.nextToken(); // step over "class" - while (st.hasMoreTokens()) { - String word = st.nextToken(); - if (Configuration.isAttribute(word)) - continue; - currentClass = word; - break; - } - } - - //Tuscany - if (Utils.startsWith(text, "namespace")) { - // TODO: cope with comments here - StringTokenizer st = new StringTokenizer(text, - Utils.whitespace + "{"); - st.nextToken(); // step over "namespace" - String word = ""; - while (st.hasMoreTokens()) { - word = st.nextToken(); - if (word.equals("{")) { - break; - } - - } - currentNamespace = word; - //We have not got to the class yet - //so will need ot deal with the namespace - //when we do - } - // Tuscany end - - } else if (isEnumOrUnion(rest)) { - int ridx = Utils.findMatching(rest, '{', '}') + 1; - String rest2 = rest.substring(ridx); - ridx = idx + ridx + Utils.indexOf(rest2, ';') + 1; - text = str.substring(idx, ridx); - FilePart fp = new FilePart(text, FilePart.ENUM); - parts.add(fp); - idx += text.length(); - - } else if (scopedepth > 0 - && (rest.startsWith("public") - || rest.startsWith("protected") || rest - .startsWith("private"))) { - int colon = rest.indexOf(":"); - if (-1 == colon) - Utils.rude("No colon found after public or private ", name, - lineNo(str, idx), rest.substring(0, rest - .indexOf("\n"))); - scope = str.substring(idx, idx + colon); - text = str.substring(idx, idx + colon + 1); - FilePart fp = new FilePart(text, FilePart.CLASSATTRIBUTE); - parts.add(fp); - idx += text.length(); - - } else if (Utils.startsWith(rest, "typedef")) { - int semicolon = Utils.indexOf(rest, ';'); - int brace = Utils.indexOf(rest, '{'); - - if (-1 == semicolon) - Utils.rude("No semicolon found after typedef", name, - lineNo(str, idx), rest.substring(0, rest - .indexOf("\n"))); - - if (-1 == brace || semicolon < brace) { - // Simple typedef - text = str.substring(idx, idx + semicolon + 1); - } else { - // Typedef of a struct, etc - int endbrace = Utils.findMatching(rest, '{', '}'); - String rest2 = rest.substring(endbrace); - semicolon = Utils.indexOf(rest2, ';'); - text = str.substring(idx, idx + endbrace + semicolon + 1); - } - FilePart fp = new FilePart(text, FilePart.TYPEDEF); - parts.add(fp); - idx += text.length(); - - } else { - if (isMethod(rest)) { - - int brace = Utils.indexOf(rest, '{'); - Signature signature = new Signature(str.substring(idx, idx - + brace)); - if (signature.failed()) - Utils.rude("Signature parsing failed", name, lineNo( - str, idx), signature.getOriginal()); - if (null != currentClass - && null == signature.getClassName()) - signature.setClassName(currentClass); - signature.setScope(scope); - signature.setNamespace(currentNamespace); - - String body = rest.substring(brace); - int endBrace = Utils.findMatching(body, '{', '}'); - body = body.substring(0, endBrace + 1); - int endIdx = idx + signature.originalLength() - + body.length(); - text = str.substring(idx, endIdx); - MethodPart mp = new MethodPart(text, signature, body); - parts.add(mp); - idx += text.length(); - - } else if (isField(rest)) { - int semicolon = Utils.indexOf(rest, ';'); - text = str.substring(idx, idx + semicolon + 1); - FilePart fp = new FilePart(text, FilePart.FIELD); - parts.add(fp); - idx += text.length(); - - } else if (isPrototype(rest)) { - int semicolon = Utils.indexOf(rest, ';'); - text = str.substring(idx, idx + semicolon + 1); - PrototypePart pp = new PrototypePart(text, currentClass, currentNamespace); - pp.setScope(scope); - parts.add(pp); - idx += text.length(); - - } else { - //TODO other file parts here - not sure if there are any - // others? - Utils.rude("Unrecognised file part", name, - lineNo(str, idx), rest.substring(0, rest - .indexOf("\n"))); - } // end if - } // end if - } // end for - } - - public Iterator getPartIterator() { - return parts.iterator(); - } - - private int lineNo(String s, int idx) { - int n = 0; - for (int i = 0; i < idx && i < s.length(); i++) - if ('\n' == s.charAt(i)) - n++; - return n; - } - - /** - * Find out whether we are defining a class, struct or extern "C" which may - * contain function implementations. These will have braces which begin a - * new scope. Ignore function prototypes that return a struct. struct mystr { - * int f1; }; struct mystr func(); struct mystr func() { struct mystr a; - * return a; } - */ - private static boolean beginsScope(String s) throws ParsingException { - if (isMethod(s)) - return false; - - int brace = Utils.indexOf(s, '{'); - int semicolon = Utils.indexOf(s, ';'); - - // Return false for class prototypes, but true for class definitions. - if (Utils.startsWith(s, "class")) { - if (-1 == brace) - return false; - if (-1 == semicolon) - return true; - return brace < semicolon; - } - - if (Utils.startsWith(s, "struct")) { - if (-1 == brace || -1 == semicolon) - return false; - return brace < semicolon; - } - - //Tuscany handle namespace for prototypes - //in a similar way to "class" - if (Utils.startsWith(s, "namespace")) { - if (-1 == brace || -1 == semicolon) - return false; - return brace < semicolon; - } - - return startsWithExternScope(s); - } - - /** - * There are 4 types of extern ... extern int field; extern int func(); - * extern "C" int func() { return 2; } extern "C" { int func() { return 2; } } - * This method should return true only for the last of these three examples - * since only the last one creates a new scope using braces. - */ - private static boolean startsWithExternScope(String s) - throws ParsingException { - if (!s.startsWith("extern")) - return false; - - int brace = Utils.indexOf(s, '{'); - int semicolon = Utils.indexOf(s, ';'); - int bracket = Utils.indexOf(s, '('); - - if (-1 == brace) - return false; - return (-1 == semicolon || brace < semicolon) - && (-1 == bracket || brace < bracket); - } - - /** - * Find out whether we are defining an enum or union which will contain - * braces. Ignore function prototypes that return an enum or union. enum - * colour { red, blue }; enum colour func(); enum colour func() { return - * colour.red; } - */ - private static boolean isEnumOrUnion(String s) throws ParsingException { - if ((!Utils.startsWith(s, "enum") && !Utils.startsWith(s, "union")) - || isMethod(s)) - return false; - - int brace = Utils.indexOf(s, '{'); - int semicolon = Utils.indexOf(s, ';'); - return -1 != brace && (-1 == semicolon || brace < semicolon); - } - - /** - * Rules to recognise fields and methods... - * - * Fields must contain a semicolon Methods may or may not contain a - * semicolon Prototypes must contain a semicolon Fields may or may not - * contain a brace (array initialisers do) Methods must contain a brace - * Prototypes must not contain a brace Fields may or may not contain a - * bracket (casts do) Methods must contain a bracket Prototypes must contain - * a bracket - * - * It's a method if it contains a bracket and then a brace before the first - * semicolon (if there is a semicolon). It's a prototype if it's not a - * method and it contains brackets before a semicolon. It's a field if it's - * not a method or a prototype and it contains a semicolon. If it's not a - * field, a method or a prototype and we haven't recognised it previously - * then it's an error. - */ - private static boolean isMethod(String s) throws ParsingException { - int semicolon = Utils.indexOf(s, ';'); - int brace = Utils.indexOf(s, '{'); - int bracket = Utils.indexOf(s, '('); - - return (-1 != bracket && -1 != brace && bracket < brace && (-1 == semicolon || brace < semicolon)); - } - - private static boolean isPrototype(String s) throws ParsingException { - int semicolon = Utils.indexOf(s, ';'); - int bracket = Utils.indexOf(s, '('); - return !isMethod(s) && -1 != semicolon && -1 != bracket - && bracket < semicolon; - } - - private static boolean isField(String s) throws ParsingException { - int semicolon = Utils.indexOf(s, ';'); - return !isMethod(s) && !isPrototype(s) && -1 != semicolon; - } - - public String getName() { - return name; - } - - public String toString() { - StringBuffer text = new StringBuffer(); - for (int i = 0; i < parts.size(); i++) { - text.append(((FilePart) (parts.get(i))).toString()); - } - return text.toString(); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java deleted file mode 100644 index 813de0ff56..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ - -/* - * A C or C++ macro as it is used in the source code - */ -package org.apache.tuscany.sca.cpp.tools.common; - -class MacroPart extends FilePart { - /** - * Factory method to create a MacroPart. - * - * @param s - * unparsed source code which may start with a define or macro. - */ - static MacroPart create(String s) { - String orig = getOriginalText(s); - if (null == orig) - return null; - return new MacroPart(orig); - } - - MacroPart(String s) { - super(s, FilePart.MACRO); - } - - /** - * @param s - * unparsed source code which may start with a define or macro. - * @return all of s up to the end of the define or macro. - */ - private static String getOriginalText(String s) { - String name = getName(s); - int len = name.length(); - if (null == name) - return null; - else if (Configuration.isDefine(name)) { - return s.substring(0, len); - } else if (Configuration.isMacro(name)) { - String rest = s.substring(len); - len += Utils.findMatching(rest, '(', ')'); - return s.substring(0, len + 1); - } else - return null; - } - - static boolean isAMacro(String s) { - if (s == null || 0 == s.length()) - return false; - String name = getName(s); - return Configuration.isMacro(name) || Configuration.isDefine(name); - } - - private static String getName(String s) { - int i; - for (i = 0; i < s.length(); i++) - if (!Character.isLetterOrDigit(s.charAt(i)) && '_' != s.charAt(i)) - break; - if (s.length() == i) - return null; - return s.substring(0, i); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java deleted file mode 100644 index facebe84ef..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.util.ArrayList; - -/** - * A C or C++ method from a piece of source code. The method has a signature and - * a body (the bit between the braces). - */ -public class MethodPart extends FilePart { - private Signature signature; - - private String body; - - MethodPart(String s, Signature signature, String body) { - super(s, METHOD); - this.signature = signature; - this.body = body; - } - - public Signature getSignature() { - return signature; - } - - public String getOriginalSignature() { - return signature.getOriginal(); - } - - /** - * Returns the method body as code snippets, each ending with a place where - * a trace statement belongs. The end of the first code snippet is where the - * entry trace should go. The end of every other snippet is a return from - * the method. - */ - public BodyPart[] getBodyParts() throws ParsingException { - String b = body; // Don't alter field member - if (b.startsWith("{")) - b = b.substring(1); - - // Add in trace exit at all the return statements in the method. - ArrayList al = new ArrayList(); - int idxR = Utils.indexOf(b, "return"); - int idxC = Utils.indexOf(b, "catch"); - while (-1 != idxR || -1 != idxC) { - if (-1 == idxC || (-1 != idxR && idxR < idxC)) { - String frag = b.substring(0, idxR); - String rest = b.substring(idxR + "return".length()); - - int semicolon = Utils.indexOf(rest, ';'); - if (-1 == semicolon) - Utils.rude("Missing semicolon in " + signature); - String retVal = rest.substring(0, semicolon); - BodyPart bp = new BodyPart(frag, retVal); - al.add(bp); - b = b.substring(idxR + "return".length() + retVal.length() + 1); - } else { - String frag = b.substring(0, idxC); - String rest = b.substring(idxC); - - int brace = Utils.indexOf(rest, "{"); - if (-1 == brace) - Utils.rude("Missing open brace in " + signature); - Signature signature = new Signature(rest.substring(0, brace)); - frag = frag + rest.substring(0, brace + 1); - BodyPart bp = new BodyPart(frag, signature.getParameters()[0]); - al.add(bp); - b = rest.substring(brace + 1); - } - idxR = Utils.indexOf(b, "return"); - idxC = Utils.indexOf(b, "catch"); - } - - // Add in trace exit before the last } if there are no returns in - // the method or there is code after the last return and the method - // returns void. - // int f1(){try{return f2();}catch(Exception& e){throw;}} - // has code after the last return but having a traceexit before the - // last brace wouldn't compile since the method returns an int. We - // cope with this by only adding in a traceexit before the last brace - // if the method returns void. That may mean we add in an unreachable - // traceexit which may give a compiler warning, but that should be - // benign. - // - // TODO: Not quite good enough for - // void f(int a){if(a){printf("a");}else{printf("!a");return;}} - // as a trace exit is needed before the last } in case a>0 but - // void f(int a){if(a){printf("a");return;}else{printf("!a");return;}} - // would give compiler warnings about unreachable code if a trace - // exit is added before the last brace. This could be tricky to fix. - if ((0 == al.size() || -1 != Utils.indexOf(b, ';')) - && null == signature.getReturnType().getType()) { - - int last = b.lastIndexOf('}'); - if (-1 == last) - Utils.rude("Missing end brace in " + signature); - String b2 = b.substring(0, last); - al.add(new BodyPart(b2)); - b = b.substring(last); - } - - // The final body part is the last } - al.add(new BodyPart(b)); - - BodyPart[] bps = new BodyPart[al.size()]; - System.arraycopy(al.toArray(), 0, bps, 0, al.size()); - return bps; - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java deleted file mode 100644 index dc9d941849..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - * - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * Command line options passed to a tool's main program. All command line - * options should begin with a dash "-". Some command line options take a value - * which is the next parameter after the option. Others do not. - */ -public class Options { - static HashMap pairs = new HashMap(); - - static List values = new ArrayList(); - - /** - * No one constructs this class. - */ - private Options() { - } - - public static void reset() { - pairs = new HashMap(); - values = new ArrayList(); - } - - /** - * Initialises the options based on the args passed to main - */ - public static void set(String args[]) { - for (int i = 0; i < args.length; i++) { - if (args[i].startsWith("-")) { - if ((i + 1 <= args.length - 1) && // next one is testable - !args[i + 1].startsWith("-") // and it starts with a "-" - ) { - String key = args[i]; - Object pairValue = pairs.get(key); - if (null == pairValue) { - pairs.put(args[i], args[i + 1]); - } else if (pairValue instanceof String) { - List l = new ArrayList(); - l.add(pairValue); - l.add(args[i + 1]); - pairs.put(key, l); - } else if (pairValue instanceof List) { - ((List) pairValue).add(args[i + 1]); - } - i++; // Step over value for this key - } else - values.add(args[i]); - } - } - } - - public static Object getOption(String key) { - return pairs.get(key); - } - - static boolean isOptionSet(String key) { - return values.contains(key) || null!=pairs.get(key); - } - - /** - * This option will cause scagen to print out messages - * about the artefacts it is processing - * @return - */ - public static boolean verbose() { - return isOptionSet("-verbose"); - } - - /** - * This option will cause scagen to print out some - * basic internal log type messages - * @return - */ - public static boolean debug() { - return isOptionSet("-debug"); - } - - /** - * This option will cause scagen to print out some - * text that can be used or pasted into a command - * file to copy all the relevant artefacts from - * where they are found or generated to a specific - * deployment location - * - * @return - */ - public static boolean deploy() { - return isOptionSet("-deploy"); - } - - /** - * This option will prevent scagen from actually writing out - * the generated files. It is useful if used in conjunction - * with the "-deploy" option. - * @return - */ - public static boolean noGenerate() { - return isOptionSet("-nogenerate"); - } - - /** - * This option is useful only when used in conjunction with - * the "-deploy" option. It changes the output to be more like the - * source code of a command script to copy the files to a - * specific place. - * @return - */ - public static boolean outputCommand() { - return isOptionSet("-outputCommand"); - } - - /** - * This option is useful only when used in conjunction with - * the "-deploy" option. It changes the output to be a simple - * list of artefacts. It has no effect if the "-outputCommand" - * option is set. - * - * @return - */ - public static boolean list() { - return isOptionSet("-list"); - } - - /** - * This option is maintained for compatibility with the - * original package source. It is not used by new scagen code. - * - * @return - */ - public static boolean quiet() { - return isOptionSet("-quiet"); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java deleted file mode 100644 index 3f4b3e971e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - * - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * A parameter from a method signature. The parameter is the datatype plus its - * name but not its value. - */ -public class Parameter { - private ArrayList type = new ArrayList(); - - private String name = null; - - private boolean failed = false; - - /** - * Defaults to a parameter in a parameter list so it HAS a parameter name in - * it - */ - Parameter(List parts) { - this(parts, false); - } - - /** - * A parameter which is a return type does not have a parameter name. - * Parameters in a parameter list do have parameter names embedded in them - */ - Parameter(List parts, boolean isRetType) { - if (parts == null || parts.size() == 0) - return; - - // Tuscany: The original code below from apache axis blocks int - // getCustomer(long) - // i.e. no spaces in parameter list. - // We do not need to deal with "..." as parameters to SCS methods. - // - // if (!isRetType && parts.size() == 1) { - // if ("...".equals(parts.get(0))) { - // type.add("..."); - // name = ""; - // } else if (!"void".equals(parts.get(0))) - // failed = true; // Seems like bad C++ code here - // return; - // } - - if (isRetType) { - Iterator it = parts.iterator(); - while (it.hasNext()) - type.add(it.next()); - - // Some methods return have void on their signature and others - // have nothing. So to make them both the same, if a method - // doesn't return anything make type null. - // TODO: This assumption is wrong - methods that return nothing - // default to returning an int! - if (1 == type.size() && "void".equals(type.get(0))) - type = new ArrayList(); - - } else { - // Cope with array subscripts [] after the name - int arrIdx = -1; - for (int i = 0; i < parts.size(); i++) { - String tok = (String) parts.get(i); - if ("[".equals(tok)) { - arrIdx = i; - break; - } - } - - // Find the name - int nameIdx = parts.size() - 1; - if (-1 != arrIdx) - nameIdx = arrIdx - 1; - - // Even in real method declarations, parameters may not have a name - boolean noName = false; - name = (String) parts.get(nameIdx); - // Tuscany: The original code below from apache axis - // was updated to work with signatures of - // the form fn(int) a non-named, no-space, parameter list. - // if (Utils.cPrimitives.contains(name) || - // Utils.cTypeQualifiers.contains(name) ) - // - if (Utils.cPrimitives.contains(name) - || Utils.cTypeQualifiers.contains(name) - || parts.size() == 1) - noName = true; - - if (noName) { - name = null; - for (int i = 0; i < parts.size(); i++) - type.add(parts.get(i)); - } else { - // Construct the type - for (int i = 0; i < nameIdx; i++) - type.add(parts.get(i)); - - if (-1 != arrIdx) - for (int i = arrIdx; i < parts.size(); i++) - type.add(parts.get(i)); - } - } - } - - public boolean failed() { - return failed; - } - - public String getType() { - String s = null; - Iterator it = type.iterator(); - while (it.hasNext()) { - String next = (String) it.next(); - if (null == s) - s = next; - else if ("*".equals(next) || "&".equals(next)) - s += next; - else - s += " " + next; - } - return s; - } - - public String getTypeWithoutConst() { - String s = null; - Iterator it = type.iterator(); - while (it.hasNext()) { - String next = (String) it.next(); - if ("const".equals(next)) - continue; - else if (null == s) - s = next; - else if ("*".equals(next) || "&".equals(next)) - s += next; - else - s += " " + next; - } - return s; - } - - public String getName() { - return name; - } - - public boolean isVoid() { - return 0 == type.size(); - } - - public boolean isDotDotDot() { - return 1 == type.size() && "...".equals(type.get(0)); - } - - /** - * For two parameters to match their types must match or both be null, but - * the parameters names don't have to match. Just because a parameter is - * called something different in a header file as in the the source file - * doesn't mean it's a different parameter. - */ - public boolean equals(Object o) { - if (null == o || !(o instanceof Parameter)) - return false; - Parameter that = (Parameter) o; - if (type.size() != that.type.size()) - return false; - for (int i = 0; i < type.size(); i++) { - String s1 = (String) type.get(i); - String s2 = (String) that.type.get(i); - if (!Utils.safeEquals(s1, s2)) - return false; - } - return true; - } - - public String toString() { - if (0 == type.size()) - return "void"; - if (null == name) - return getType(); - return getType() + " " + name; - } - - public Iterator iterator() { - if (null == type) - return null; - return type.iterator(); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java deleted file mode 100644 index 3f140c0f9f..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - * - */ -package org.apache.tuscany.sca.cpp.tools.common; - -public class ParsingException extends Exception { - - public ParsingException() { - super(); - } - - public ParsingException(String message) { - super(message); - } - - public ParsingException(String message, Throwable cause) { - super(message, cause); - } - - public ParsingException(Throwable cause) { - super(cause); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java deleted file mode 100644 index 64ed2e9542..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - * - */ -package org.apache.tuscany.sca.cpp.tools.common; - -/** - * A function prototype in an include file and possibly in a class definition. - */ -public class PrototypePart extends FilePart { - private Signature signature; - - public PrototypePart(String s, String className, String namespace) { - super(s, PROTOTYPE); - signature = new Signature(s); - if (null != className) - signature.setClassName(className); - if (null != namespace && namespace.length()>0) - signature.setNamespace(namespace); - } - - String className() { - return signature.getClassName(); - } - - public Signature getSignature() { - return signature; - } - - public void setScope(String scope) { - signature.setScope(scope); - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java deleted file mode 100644 index 3650839cab..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java +++ /dev/null @@ -1,501 +0,0 @@ -/* - * - * 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. - */ - -/* - * Branched from the original class that was also contributed to the - * org.apache.axis.tools.common package. - * - */ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * A C or C++ method signature with the ability to parse it. TODO: properly - * support variable length argument lists using "..." TODO: passing or returning - * function pointers (hopefully not needed) TODO: Cope with ~ Classname() - */ -public class Signature { - private String originalText; - - private String attributes; - - private String className = null; - - private String namespace = null; - - private String methodName = null; - - private Parameter returnType = null; - - private Parameter[] params = null; - - private String trailingAttributes; - - private String scope = "public"; - - private boolean failed = false; - - private boolean traceable = true; - - private final static Set knownAttrs = new HashSet(Arrays - .asList(new Object[] { "public", "private", "extern", "\"C\"", - "virtual", "static", "inline" })); - - private final static Set specialOperators = new HashSet( - Arrays.asList(new Object[] { "(", ")", "*", ",", "&", "]", "[", - "=", "~" })); - - /** - * Takes an unparsed signature string and parses it. - * - * TODO: Should optionally pass in the className here in case it's an inline - * method implementation inside the class{}. Just so the className comes out - * in the trace. - */ - Signature(String s) { - originalText = s; - - try { - List tokens = tokenise(s); - - ArrayList alAttrs = new ArrayList(); - ArrayList alName = new ArrayList(); - ArrayList alParms = new ArrayList(); - ArrayList alTrailAttrs = new ArrayList(); - ArrayList alInits = new ArrayList(); - if (!splitUp(tokens, alAttrs, alName, alParms, alTrailAttrs, - alInits)) { - failed = true; - return; - } - - parseAttributes(alAttrs); - parseNameAndRetType(alName); - parseParameters(alParms); - parseTrailingAttributes(alTrailAttrs); - - // Ignore any tokens after the ) since these are (hopefully) - // constructor initialisers - - traceable = !Configuration.methodExcluded(className, methodName); - } catch (NullPointerException npe) { - failed = true; - traceable = false; - } - } - - /** - * Parse the signature into tokens. This removes whitespace and comments and - * separates out "*", ",", "(", ")", "&", "[" and "]". - */ - private static List tokenise(String s) { - ArrayList tokens = new ArrayList(); - String tok = null; - boolean space = true; - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (Character.isWhitespace(c)) { - space = true; - continue; - } - if (space) { - if (tok != null) - tokens.add(tok); - tok = "" + c; - } else - tok += c; - space = false; - - if (tok.endsWith("/*")) { - String sub = s.substring(i); - int endcomm = sub.indexOf("*/"); - if (endcomm == -1) - break; - i += endcomm + 1; - if (tok.equals("/*")) - tok = ""; - else - tok = tok.substring(0, tok.length() - 2); - continue; - } - - if (tok.endsWith("//")) { - String sub = s.substring(i); - int endcomm = sub.indexOf("\n"); - if (endcomm == -1) - break; - i += endcomm; - if (tok.equals("//")) - tok = ""; - else - tok = tok.substring(0, tok.length() - 1); - continue; - } - - if (tok.endsWith("::")) - space = true; - - String sc = "" + c; - if (specialOperators.contains(sc)) { - if (!tok.equals(sc)) { - tokens.add(tok.substring(0, tok.length() - 1)); - tok = sc; - } - space = true; - } - } - tokens.add(tok); - return tokens; - } - - /** - * Split up a tokenised method signature into a list of attributes, a list - * of name and return type tokens, a list of parameter tokens and a list of - * initialiser tokens. - */ - private static boolean splitUp(List tokens, List attrs, List nameAndRet, - List parms, List trailAttrs, List inits) { - - // nameStart points to the start of the return type if there is one - // else the start of the method name - int nameStart; - for (nameStart = 0; nameStart < tokens.size(); nameStart++) { - String tok = (String) (tokens.get(nameStart)); - if (!knownAttrs.contains(tok) && !Configuration.isAttribute(tok)) - break; - } - if (nameStart == tokens.size()) - return false; - - // initStart points to the initialisers, or thrown exceptions after - // the parameter list. throw is a keyword so we can safely search for - // it. - int initStart = tokens.size(); - for (int i = nameStart; i < tokens.size(); i++) { - String tok = (String) tokens.get(i); - if ((tok.startsWith(":") && !tok.startsWith("::")) - || "throw".equals(tok)) - initStart = i; - } - - int parmEnd; - for (parmEnd = initStart - 1; parmEnd > nameStart; parmEnd--) - if (")".equals(tokens.get(parmEnd))) - break; - if (parmEnd == nameStart) - return false; - - int parmStart = parmEnd; - for (parmStart = parmEnd; parmStart > nameStart; parmStart--) - if ("(".equals(tokens.get(parmStart))) - break; - - for (int i = 0; i < tokens.size(); i++) { - Object tok = tokens.get(i); - if (i < nameStart || Configuration.isAttribute((String) tok)) - attrs.add(tok); - else if (i < parmStart) - nameAndRet.add(tok); - else if (i <= parmEnd) - parms.add(tok); - else if (i < initStart) - trailAttrs.add(tok); - else - inits.add(tok); - } - return true; - } - - private void parseAttributes(List list) { - attributes = new String(); - Iterator it = list.iterator(); - while (it.hasNext()) { - if (attributes.length() > 0) - attributes += " "; - String next = (String) it.next(); - - //Tuscancy - //the scope is not present in the attributes - //but is set later in the InputCppSource contructor - if ("public".equals(next) || "protected".equals(next) - || "private".equals(next)) - scope = next; - attributes += next; - } - } - - private void parseNameAndRetType(List list) { - int size = list.size(); - int idx; - // "operator" is a key word so if it's present we know we're - // dealing with operator overloading. The operator that's been - // overloaded might have been split up into multiple tokens. - for (idx = 0; idx < size; idx++) - if ("operator".equals(list.get(idx))) - break; - - if (idx < size) { - methodName = ""; - for (int i = idx; i < size; i++) - methodName += (String) list.get(i); - } else { // No operator overloading - methodName = "" + list.get(size - 1); - idx = size - 1; - } - - // If it's a destructor, the "~" will be split out into a separate - // token, so add it onto the methodName here. - if (idx > 0 && "~".equals(list.get(idx - 1))) { - methodName = "~" + methodName; - idx--; - } - - // The class name comes before the method name - while (idx > 0 && ((String) list.get(idx - 1)).endsWith("::")) { - if (null == className) - className = (String) list.get(idx - 1); - else - className = (String) list.get(idx - 1) + className; - idx--; - } - - // Whatever's left before the classname/methodname must be the - // return type - ArrayList retParm = new ArrayList(); - for (int i = 0; i < idx; i++) - retParm.add(list.get(i)); - - returnType = new Parameter(retParm, true); - } - - /** - * Constructs the parameter list - */ - private void parseParameters(List list) { - ArrayList alParams = new ArrayList(); - Iterator it = list.iterator(); - String token = (String) it.next(); // step over the ( - while (it.hasNext() && !")".equals(token)) { - token = (String) it.next(); - - int template = 0; // Depth of template scope - boolean foundEquals = false; - // Ignore default value for an optional parameter - ArrayList parm = new ArrayList(); - while (!token.equals(")") && (!token.equals(",") || template > 0)) { - if (token.equals("=")) - foundEquals = true; - if (!foundEquals) - parm.add(token); - if (contains(token, "<")) - template++; - if (contains(token, ">")) - template--; - token = (String) it.next(); - } - - // No parameters so break out - if (token.equals(")") && 0 == parm.size()) - break; - - Parameter p = new Parameter(parm); - if (p.failed()) { - failed = true; - return; - } - - // Copes with void func(void) - if (!p.isVoid()) - alParams.add(p); - } - - int size = alParams.size(); - if (size > 0) { - params = new Parameter[size]; - System.arraycopy(alParams.toArray(), 0, params, 0, size); - } - } - - private void parseTrailingAttributes(List list) { - trailingAttributes = new String(); - Iterator it = list.iterator(); - while (it.hasNext()) { - if (trailingAttributes.length() > 0) - trailingAttributes += " "; - trailingAttributes += (String) it.next(); - } - } - - public String getOriginal() { - return originalText; - } - - public int originalLength() { - return originalText.length(); - } - - public boolean failed() { - return failed; - } - - public String getAttributes() { - return attributes; - } - - public String getClassName() { - return className; - } - - /** - * @param namespace The namespace to set. - */ - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - /** - * @return Returns the namespace. - */ - public String getNamespace() { - return namespace; - } - - public String getTrimClassName() { - return trimClassName(className); - } - - public String getMethodName() { - return methodName; - } - - public Parameter getReturnType() { - return returnType; - } - - public Parameter[] getParameters() { - return params; - } - - public boolean isConstructor() { - return className != null && methodName != null - && trimClassName(className).equals(methodName); - } - - public boolean isDestructor() { - return className != null && methodName != null - && methodName.startsWith("~") - && methodName.endsWith(trimClassName(className)); - } - - private static String trimClassName(String name) { - if (name.endsWith("::")) - return name.substring(0, name.length() - 2); - return name; - } - - void setClassName(String className) { - if (null == className) - return; - if (!className.endsWith("::")) - className += "::"; - this.className = className; - } - - public String getScope() { - return scope; - } - - /** - * Sets the scope, but only if the scope is not set by an explicit attribute - * in the signature. - */ - public void setScope(String scope) { - if (-1 == attributes.indexOf(this.scope)) - this.scope = scope; - } - - /** - * Should this method be traced? - */ - public boolean traceable() { - return traceable; - } - - private static boolean contains(String src, String tgt) { - if (src == null || tgt == null) - return false; - if (-1 == src.indexOf(tgt)) - return false; - return true; - } - - public boolean equals(Object obj) { - if (null == obj || !(obj instanceof Signature)) - return false; - Signature that = (Signature) obj; - if (!Utils.safeEquals(className, that.className)) - return false; - if (!Utils.safeEquals(methodName, that.methodName)) - return false; - if (!Utils.safeEquals(returnType, that.returnType)) - return false; - if (null == params && null == that.params) - return true; - if (null != params && null == that.params) - return false; - if (null == params && null != that.params) - return false; - if (params.length != that.params.length) - return false; - for (int i = 0; i < params.length; i++) - if (!Utils.safeEquals(params[i], that.params[i])) - return false; - return true; - } - - public String toStringWithoutAttrs() { - String s = new String(); - if (returnType != null) - s += returnType + " "; - if (className != null) - s += className; - s += methodName + "("; - for (int i = 0; params != null && i < params.length; i++) { - if (i > 0) - s += ", "; - s += params[i].toString(); - } - s += ")"; - return s; - } - - public String toString() { - String s = attributes; - if (attributes.length() > 0) - s += " "; - s += toStringWithoutAttrs(); - if (trailingAttributes.length() > 0) - s += " " + trailingAttributes; - return s; - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java deleted file mode 100644 index 5bd80fc37a..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java +++ /dev/null @@ -1,543 +0,0 @@ -/* -* -* 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. -*/ - -/* -* Branched from the original class that was also contributed to the -* org.apache.axis.tools.common package. -* -*/ -package org.apache.tuscany.sca.cpp.tools.common; - -import java.io.File; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -//Apache Common Logging -//import org.apache.commons.logging.Log; -//import org.apache.commons.logging.LogFactory; - -/** -* Static utility methods. Some of these methods are similar to the methods on -* java.lang.String except they are aware of C/C++ comments and string literals. -* -* TODO: Many of these methods would perform better using StringBuffer not -* String -*/ -public final class Utils { - // All the C primitive data types - public final static Set cPrimitives = new HashSet(Arrays - .asList(new Object[] { "void", "byte", "char", "unsigned", - "signed", "int", "short", "long", "double", "float", - "struct", "class", "enum", "union" })); - - // All the qualifiers that can affect C types - public final static Set cTypeQualifiers = new HashSet( - Arrays.asList(new Object[] { "(", ")", "*", ",", "&", "]", "[", - "const" })); - - public final static String whitespace = " \t\r\n"; - - //private static Log log = LogFactory.getLog(CLASS.class); - - /** - * Never instantiate this class - */ - private Utils() { - } - - /** - * Is this string all whitespace? - */ - static boolean isSpace(String s) { - for (int i = 0; i < s.length(); i++) - if (!Character.isWhitespace(s.charAt(i))) - return false; - return true; - } - - // TODO look for other trailing chars like { (because of class{) - static boolean startsWith(String source, String target) { - if (source == null || target == null) - return false; - if (!source.startsWith(target)) - return false; - if (source.length() == target.length()) - return true; - if (Character.isWhitespace(source.charAt(target.length()))) - return true; - return false; - } - - /** - * Performs a C-aware version of String.indexOf(char) in that it skips - * characters in string literals and comments. - */ - static int indexOf(String s, char c) throws ParsingException { - if ('"' == c) - rude("Utils.indexOf cannot be passed quotes"); - - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) == c) - return i; - - i = skip(s.substring(i), i); - if (-1 == i) - return -1; - } - return -1; - } - - /** - * Performs a C-aware version of String.indexOf(String) in that it skips - * characters in string literals and comments and makes sure that the target - * string is not embedded in a longer word. - */ - static int indexOf(String s, String t) { - char t0 = t.charAt(0); - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) == t0 - && s.substring(i).startsWith(t) - && (0 == i || !Character.isLetterOrDigit(s.charAt(i - 1))) - && (s.length() == (i + t.length()) || !Character - .isLetterOrDigit(s.charAt(i + t.length())))) - return i; - - i = skip(s.substring(i), i); - if (-1 == i) - return -1; - } - return -1; - } - - /** - * Matches braces or quotes and is C-aware. It skips characters in string - * literals and comments. - */ - static int findMatching(String s, char c1, char c2) { - int depth = 0; - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) == c1) - depth++; - else if (s.charAt(i) == c2) { - depth--; - if (depth == 0) - return i; - } else { - i = skip(s.substring(i), i); - if (-1 == i) - return -1; - } - } - return -1; - } - - /** - * Failed to parse the source code for some reason. This method prints out a - * suitably rude message, and then what? I haven't quite decided yet. - * - * TODO: Do something sensible here like throw an Exception which will give - * up on this file completely and tidy up the output file. It may be just - * too dangerous to try to carry on. But we need to fail in such a way that - * the build system knows that we've failed for this file and can build this - * file without trace. - */ - public static void rude(String reason, String filename, int lineno, - String codefragment) throws ParsingException { - - String text = "Bad C++ code!! "; - if (reason != null) - text += reason; - if (filename != null) - text += " " + filename + " lineno=" + lineno; - if (codefragment != null) - text += " <" + codefragment + ">"; - System.err.println(text); - throw new ParsingException(); - } - - /** - * This method reports an error level problem - * - * @param reason - * why we have an error level problem - */ - public static void rude(String reason) throws ParsingException { - // Apache commons logging - // log.error(Object line, null); - // or for now.... - rude(reason, null, 0, null); - } - - /** - * This method reports an error level problem - * - * @param reason - * why we have an error level problem - */ - public static void screenMessage(String msg) { - // Apache commons logging - // log.error(Object line, null); - // or for now.... - System.out.println(msg); - } - - /** - * Escapes special characters like " so that they can be output in a C - * string literal. Also removes newlines, since C string literals can't be - * split over lines. - */ - String pretty(String s) { - StringBuffer sb = new StringBuffer(s); - for (int i = 0; i < sb.length(); i++) - switch (sb.charAt(i)) { - case '"': - sb = sb.insert(i, '\\'); - i++; - break; - case '\n': - sb = sb.deleteCharAt(i); - i--; - break; - } - return sb.toString(); - } - - private static boolean startsWithComment(String s) { - if (null == s || s.length() < 2) - return false; - if (s.startsWith("//")) - return true; - if (s.startsWith("/*")) - return true; - return false; - } - - private static int endOfComment(String s) { - int idx; - if (s.startsWith("//")) - idx = s.indexOf("\n"); - else { - idx = s.indexOf("*/"); - if (-1 != idx) - idx++; // Step over */ - } - return idx; - } - - private static boolean startsWithStringLiteral(String s) { - if (null == s || s.length() < 1) - return false; - if (s.startsWith("\"") || s.startsWith("'")) - return true; - return false; - } - - private static int endOfStringLiteral(String s) { - boolean escape = false; - char c0 = s.charAt(0); - for (int i = 1; i < s.length(); i++) { - if (!escape && s.charAt(i) == c0) - return i; - - // \" or \' does not end the literal - if ('\\' == s.charAt(i)) - // Escaping a \ should switch escape off so \\' does end - // the literal - escape = !escape; - else - escape = false; - } - return -1; - } - - /** - * If the String s starts with a string literal or a comment, return i plus - * the index of the end of the literal or comment. String literals are - * enclosed in " or ' and comments start with /* or //. - */ - private static int skip(String s, int i) { - int j = 0; - if (startsWithStringLiteral(s)) { - j = endOfStringLiteral(s); - if (-1 == j) - return -1; - } else if (startsWithComment(s)) { - j = endOfComment(s); - if (-1 == j) - return -1; - } - return i + j; - } - - /** - * A better method than .equals() because it doesn't NullPointerException - * when one of the parameters is null. - */ - public static boolean safeEquals(Object o1, Object o2) { - if (null == o1 && null == o2) - return true; - if (null == o1 && null != o2) - return false; - if (null != o1 && null == o2) - return false; - return o1.equals(o2); - } - - public static void outputDebugString(String line) { - if (!Options.quiet()) { - if (Options.debug()) - // Apache commons logging - // log.debug(Object line, null); - // or for now - System.out.println(line); - } - } - - /** - * This static method allows different parts of the code to inform about - * significant events. Code interested in specific types of event can - * register a listener against that type (not written yet) - * - * @param eventType - * An int type enum indicating the type of event. - * @param message - * A message that can be output to the user. - */ - public static final int EVENT_TYPE_XML_ITEM_PARSED = 1; - - public static final int EVENT_TYPE_FILE_PARSED = 2; - - public static final int EVENT_TYPE_FILE_CREATE = 3; - - public static final int VERBOSE_LIMIT = 1024; - - public static final int DEPLOYMENT_ARTEFACT = VERBOSE_LIMIT; - - public static final int DEPLOYMENT_ARTEFACT_ENCOUNTERED = DEPLOYMENT_ARTEFACT + 1; - - public static final int DEPLOYMENT_ARTEFACT_GENERATED = DEPLOYMENT_ARTEFACT + 2; - - public static final int DEPLOYMENT_INPUT_DIRECTORY = DEPLOYMENT_ARTEFACT + 3; - - public static final int DEPLOYMENT_OUTPUT_DIRECTORY = DEPLOYMENT_ARTEFACT + 4; - - private static boolean reportArtefacts = false; - - /** - * An easily callable method to allow tracking/reposting of events in scagen - * and other tools. - * - * @param eventType - * used for classifying event - * @param message - * a user readable message - */ - public static void postEvent(int eventType, String message) { - if (Options.verbose() && eventType < VERBOSE_LIMIT) { - screenMessage(message); - } - - if ((eventType & DEPLOYMENT_ARTEFACT) > 0) { - reportArtefact(message, eventType); - } - - } - - /** - * @param message - * The user message - * @param eventType - * The type of event (input or output). This is used to determine - * if the path name of the file starts with the MODULE_ROOT - * directory or the given output directory as the one of these - * prefixes is removed from the path name in order to give the - * new (destination) path relative to the new module root - * - * - */ - - static String scagenInputDir = "MODULE_ROOT"; - - static String scagenOutputDir = "SCAGEN_OUTPUT"; - - static String newModuleRoot = "NEW_MODULE_ROOT"; - - static String generatedDirName = "$sourceDir1"; - - private static void reportArtefact(String message, int eventType) { - - if (Utils.isReportArtefacts()) { - - // Changing the value of the variable below will alter the output of - // the - // deploy assist strings: - // true will result in a "copy source NEW_MODULE_ROOT\dest" output - // and - // false will result in a "inputDir c:\fred" - // "outputDir c:\bob" - // "input c:\fred\sca.module" - // "output c:\bob\proxy.h" type output - String command = null; - - try { - newModuleRoot = (String) Options.getOption("-deploy"); - command = (String) Options.getOption("-command"); - } catch (Exception e) { - // let it default - } - - if (null == newModuleRoot) { - newModuleRoot = "DEPLOY_MODULE_ROOT"; - } - - if (null == command) { - command = "copy"; - } - - if (Options.outputCommand()) { - - String tail = message; - switch (eventType) { - case DEPLOYMENT_ARTEFACT_ENCOUNTERED: - if (message.startsWith(scagenInputDir)) { - tail = message.substring(scagenInputDir.length()); - } - - String dest = joinPathElements(newModuleRoot, tail); - - System.out.println(command + " " + platformSlashes(message) - + " " + platformSlashes(dest)); - break; - - case DEPLOYMENT_ARTEFACT_GENERATED: - if (message.startsWith(scagenOutputDir)) { - tail = message.substring(scagenOutputDir.length()); - } - - dest = joinPathElements(newModuleRoot, tail); - System.out.println(command + " " + platformSlashes(message) - + " " + platformSlashes(dest)); - break; - case DEPLOYMENT_INPUT_DIRECTORY: - scagenInputDir = message; - //System.out.println("inputDir " + message); - break; - case DEPLOYMENT_OUTPUT_DIRECTORY: - scagenOutputDir = message; - //System.out.println("outputDir " + message); - break; - default: - break; - } - - } else { - - if (Options.list()) { - switch (eventType) { - case DEPLOYMENT_ARTEFACT_ENCOUNTERED: - case DEPLOYMENT_ARTEFACT_GENERATED: - System.out.println(platformSlashes(message)); - break; - case DEPLOYMENT_INPUT_DIRECTORY: - case DEPLOYMENT_OUTPUT_DIRECTORY: - default: - break; - } - } else { - switch (eventType) { - case DEPLOYMENT_ARTEFACT_ENCOUNTERED: - //TODO make efficient - System.out.println("$sourceDir1" - + platformSlashes(message.substring(scagenInputDir.length()))); - break; - case DEPLOYMENT_ARTEFACT_GENERATED: - //TODO make efficient - System.out.println(generatedDirName - + platformSlashes(message.substring(scagenOutputDir.length()))); - break; - case DEPLOYMENT_INPUT_DIRECTORY: - scagenInputDir = platformSlashes(message); - System.out.println("sourceDir1=" + scagenInputDir); - break; - case DEPLOYMENT_OUTPUT_DIRECTORY: - scagenOutputDir = platformSlashes(message); - if (!scagenInputDir.equals(scagenOutputDir)) { - generatedDirName = "$sourceDir2"; - System.out.println("sourceDir2=" + scagenOutputDir); - } else { - //generatedDirName = "sourceDir1"; - } - break; - default: - break; - } - } - } - } - } - - /** - * @param tail - * @param tail - * @return - */ - public static String joinPathElements(String root, String tail) { - String separator; - // Stick in a "/" (File.separator) if required. - if ((tail.substring(0, 1).equals("/") || newModuleRoot.substring( - root.length() - 1, root.length()).equals("/")) - || (tail.substring(0, 1).equals("\\") || root.substring( - root.length() - 1, root.length()).equals("\\")) - - ) { - separator = ""; - } else { - separator = File.separator; - } - String dest = newModuleRoot + separator + tail; - return dest; - } - - /** - * @param reportArtefacts - * The reportArtefacts to set. - */ - public static void setReportArtefacts(boolean reportArtefacts) { - Utils.reportArtefacts = reportArtefacts; - } - - /** - * @return Returns the reportArtefacts. - */ - private static boolean isReportArtefacts() { - return reportArtefacts; - } - - private static String platformSlashes(String path) { - if (null == path) { - return path; - } - // We need a double level of \\ escapes if the slashes are - // this way round. - String separatorForRegex = File.separator - .replaceAll("\\\\", "\\\\\\\\"); - return path.replaceAll("[/\\\\]+", separatorForRegex); - - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html deleted file mode 100644 index c86184f441..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html +++ /dev/null @@ -1,39 +0,0 @@ - - - -Design documentation for org\apache\tuscany\sca\cpp\tools\common - - - - -
      - -

      Overview

      - -This package can be used to reflect across C++ source code. It can produce -a network of descriptive objects describing C++ Headers, Signatures, Parameters and so -on that it finds in a given location of the file system. -Each of the descriptive objects has a set of getters that return either -the descriptive child objects, or for primitives, the string that represents the actual -value such as "int" or "myFunction". -

      -There are also various utility methods that help with navigating the information, for example the Signature -class has an isConstructor method. The API Javadoc contains further details of these. -

      -The package can scan a directory using a file mask to identify what types -of files are to be scanned. In this application we are interested only -in the function prototypes in the C++ header files. -

      -The implementation was originated using some java code that was also -contributed to the Apache org.apache.axis.tools.common package. Care -has been taken that the original code was not sourced via Apache. If -this project is adopted by Apache then it is very possible that this -package could be merged with or made obsolete by org.apache.axis.tools.common -and because of this the design and interfaces have been preserved from -the original code as much as possible. - -

      -

      - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java deleted file mode 100644 index ea27e33d09..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.apache.tuscany.sca.cpp.tools.common.Headers; -import org.apache.tuscany.sca.cpp.tools.common.Signature; -import org.apache.tuscany.sca.cpp.tools.common.Utils; -import org.w3c.dom.Node; - -/** - * This class will do the required processing for the element of a - * sca module or fragment file. - */ -public class ComponentDomNodeHandler extends GenericDomNodeHandler { - - /** - * This method will do the "normal" processing and then trigger a call to - * processComponentNode. - * - * @param node - * the node being processed - * @param contextXPath - * the XPath to the node - * @param handlers - * the map pf element names to DomNodeHandlers - * @param parameters - * a map of XPaths to parameters values found so far - */ - - public void handleNode(Node node, String contextXPath, Map handlers, - Map parameters) { - - // Pick up attrs and the interface.cpp child elements - super.handleNode(node, contextXPath, handlers, parameters); - - try { - //OK now go and create the wrapper and proxy for the service - processComponentNode(contextXPath, parameters); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - /** - * This method basically moved from the text names of things to operating on - * the actual Files. It will also verify or work out the correct class name - * for the implmentation and complain if this does match at least one - * potential service method in the class. - * - * @param contextXPath - * used to pull the correct values from the parameters map (as - * there can be multiple implementation.cpp elelements in there). - * @param parameters - * a map of XPath keys to attribute values - * @throws Exception - */ - private void processComponentNode(String contextXPath, Map parameters) - throws Exception { - - String implHeader = (String) parameters.get(contextXPath - + "/implementation.cpp/@header"); - String implClass = (String) parameters.get(contextXPath - + "/implementation.cpp/@class"); - - File moduleOrFragmentFile = (File) parameters - .get("moduleOrFragmentFile"); - File implHeaderFile = null; - if (null != moduleOrFragmentFile) { - File dir = moduleOrFragmentFile.getParentFile(); - implHeaderFile = new File(dir, implHeader); - } else { - throw new InternalError( - "Internal error: sca.module or fragment file not present in interal parameters"); - } - - try { - String resolvedImplClassName = getClassName(implHeaderFile, - implClass); - - // Check or retrieve the impl Class name. - if (null == resolvedImplClassName) { - try { - //A class attribute was set but there were no methods of - // the - // class in the header - System.out - .println("Classname given (" - + implClass - + ") does not match any header file method's classes in file: " - + implHeaderFile.getCanonicalPath()); - } catch (IOException e) { - System.out - .println("Classname given (" - + implClass - + ") does not match any header file method's classes in file: " - + implHeaderFile.getAbsolutePath()); - } - return; - } else { - File target = (File) parameters.get("targetFile"); - // go into the .componentType file and generate the cpp - processComponentTypeFile(implHeaderFile, target, - resolvedImplClassName); - - } - } catch (Exception e) { - String compName = (String) parameters - .get("/moduleFragment/component/@name"); - Utils - .screenMessage("Problem interpreting header or class attributes in " - + compName - + " component, in " - + moduleOrFragmentFile.getPath() + " file"); - System.exit(-2); - } - - } - - /** - * The purpose of this method is to move from the DOM parameters to dealing - * with the actual Files involved. It is from this method that we kick off - * the processing of the componentType file. - * - * @param header - * the implementation header - * @param target - * the directory for the output - * @param implClass - * @throws Exception - */ - private void processComponentTypeFile(File header, File target, - String implClass) throws Exception { - - // The componentType files should be in the same dir as the Impl - // header... - if (header == null || target == null) { - return; - } - - File componentTypeDirectory = header.getParentFile(); - String headerFileName = header.getName(); - String componentTypeName = headerFileName.substring(0, headerFileName - .lastIndexOf(".")); - - File componentTypeFile = new File(componentTypeDirectory, - componentTypeName + ".componentType"); - - ComponentTypeFileHandler ctParser = new ComponentTypeFileHandler(); - - // The implClass is used in the generated wrapper code so we need to - // store - // it so we can tunnel through the standard actOnFile signature. - - int namespaceEnd = -1; - if (null != implClass) { - namespaceEnd = implClass.lastIndexOf("::"); - } - - String namespace = null; - - if (-1 != namespaceEnd) { - namespace = implClass.substring(0, namespaceEnd); - ctParser.setParameter("namespace", namespace); - implClass = implClass.substring(namespaceEnd + 2); - } - - if (implClass != null) { - ctParser.setParameter("implClass", implClass); - } - - try { - ctParser.handleComponentTypeFile(componentTypeFile, target); - } catch (Exception e) { - Utils - .screenMessage("There has been a problem parsing the componentType file: " - + componentTypeFile.getCanonicalPath()); - Utils.screenMessage(" the reported errors is " - + e.getLocalizedMessage()); - Utils.screenMessage(" and the java exception stack is below."); - e.printStackTrace(); - throw e; - } - } - - /** - * The resolve and check the classname of the service. If we have an - * implementation class name we have to check that there is: at least one - * (non-private, non constructor or finalizer) method of that class in the - * header If there is no implementation class then we will return the class - * of the first non-private/constructor/finalizer method we find. - * - * @param header - * @param implementationCppClass - * @return - * @throws Exception - */ - private String getClassName(File header, String implementationCppClass) - throws Exception { - String methodClassName = null; - List methods = null; - - if (null == header) { - return null; - } - - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, header - .getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, - "Scagen processing C++ implementation header " - + header.getAbsolutePath()); - - try { - Headers headers = new Headers(); - - headers.actOnFile(header, null, 1); - - methods = headers.getAllMethods(); - - } catch (FileNotFoundException fnfe) { - String path; - try { - path = header.getCanonicalPath(); - } catch (IOException e1) { - path = header.getPath(); - } - Utils.screenMessage("The header file: " + path - + " referenced cannot be found."); - throw fnfe; - } catch (Exception e) { - String path = header.getPath(); - Utils.screenMessage("The header file: " + path - + " referenced is not valid. Reason given is " - + e.getLocalizedMessage()); - throw e; - } - - // We need at least some methods - if (null == methods) { - return null; - } - - // We need at least one service method of to do anything - methods = trimMethodsOfPrivatesConstructorsAndDestrutors(methods); - if (null == methods || methods.size() == 0) { - return null; - } - - // If the user specifies an implementation class then we need at - // least one service method of that class - if (implementationCppClass != null) { - methods = filterMethodsToOneClass(methods, implementationCppClass); - - if (null == methods || methods.size() == 0) { - return null; - } else { - // There was at least one method of the correct type - return implementationCppClass; - } - } else { - // Implementation class is null so we return the classname of the - // first service method - return ((Signature) methods.get(0)).getTrimClassName(); - } - } - - /** - * Filter the mthods supplied to only ones fo the supplied class. - * - * @param methods - * the list of methods - * @param implementationCppClass - * the class we wish - * @return a list of methods of the correct class - */ - private List filterMethodsToOneClass(List methods, - String implementationCppClass) { - - if (null == methods) { - return null; - } - - if (null == implementationCppClass - || implementationCppClass.length() == 0) { - return null; - } - - for (Iterator iter = methods.listIterator(); iter.hasNext();) { - Signature method = (Signature) iter.next(); - - String className = method.getTrimClassName(); - String namespace = method.getNamespace(); - - if (namespace != null && namespace.length() > 0) { - className = namespace + "::" + className; - } - - if (!implementationCppClass.equals(className)) { - iter.remove(); - } - } - - return methods; - - } - - /** - * This method removes contructor and destructor methods from the list. - * - * @param methods - * the list of methods - * @return - */ - private List trimMethodsOfPrivatesConstructorsAndDestrutors(List methods) { - - if (null == methods) { - return null; - } - - for (Iterator iter = methods.listIterator(); iter.hasNext();) { - Signature method = (Signature) iter.next(); - - if (method.isConstructor() || method.isDestructor()) { - iter.remove(); - } - } - - return methods; - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java deleted file mode 100644 index 0ee9b97138..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; - -import org.apache.tuscany.sca.cpp.tools.common.FileActor; -import org.apache.tuscany.sca.cpp.tools.common.Utils; - -/** - * The purpose of this class is to specialise the map of XML element handlers - * for a XXX.componentType file that is used by the XMLFileActor - */ -public class ComponentTypeFileHandler extends XMLFileActor { - - static { - // We set up a map for each element type we wish to handle - // this alows the XML handling code to be generic and type free - // while the handlers don't have to do mcuh XML handling. - - GenericDomNodeHandler gdnh = new GenericDomNodeHandler(); - handlers.put("componentType", gdnh); - handlers.put("interface.cpp", gdnh); - - ServiceDomNodeHandler sdnh = new ServiceDomNodeHandler(); - handlers.put("service", sdnh); - - ReferenceDomNodeHandler rdnh = new ReferenceDomNodeHandler(); - handlers.put("reference", rdnh); - } - - /** - * This method just exists to add the default starting depth of 1 to the - * underlying actOnFile interface - * - * @param componentTypeXML - * @param target - * @throws Exception - */ - public void handleComponentTypeFile(File componentTypeXML, File target) - throws Exception { - // We have already set up the XML element handlers. - actOnFile(componentTypeXML, target, 1); - // We need do no more, the service and reference handlers - // ServiceDomNodeHandler and ReferenceDomNodeHandler - // will take appropriate action. - } - - /** - * This method is the main FileActor method - * - * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM - * and kick off the processing (using the handler map that has been set - * up by the concrete subclass). - * - * @param moduleXML - * the sca.module or fragment file - * @param target - * the target directory - * @param depth - * not uesed here but in the - * @see FileActor#actOnFile(File, File, int) interface to allow for - * recursive diving into a directory structure. - */ - public void actOnFile(File fileXML, File target, int depth) - throws Exception { - - if (null == fileXML || null == target) { - return; - } - - parameters.put("componentTypeFile", fileXML); - - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, fileXML.getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, "Scagen processing SCA componentType file " + fileXML.getAbsolutePath()); - - super.actOnFile(fileXML, target, depth); - - } - - /** - * @return an error message - usually over-ridden. - */ - protected String getContextMessage() { - - String module = ((File) parameters.get("moduleOrFragmentFile")).getPath(); - if (null == module) { - module = "unknown"; - } - - String component = (String) parameters.get("/module/component/@name"); - if (null == component) { - component = (String) parameters - .get("/moduleFragment/component/@name"); - } - if (null == component) { - module = "unknown"; - } - - String msg = "when processing module " + module; - - msg = msg - + "\nin this module file, the component \"" - + component - + "\" has an implementation.cpp element with a header attribute \nwhere the C++ header can be found but it has no matching .componentType file present in\nthe same directory as the header."; - - return msg; - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java deleted file mode 100644 index 1ff4504fff..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; -import java.util.Set; - -import org.apache.tuscany.sca.cpp.tools.common.FileActor; -import org.apache.tuscany.sca.cpp.tools.common.Utils; - -public class DirectoryScanner { - private FileActor actor; - - private Set actOnTheseFileExtensions; - - public DirectoryScanner(FileActor actor, Set extensions) { - this.actor = actor; - this.actOnTheseFileExtensions = extensions; - } - - /** - * - * @param source - * The module root directory - * @param target - * The directory that will hold the generated output - * @param depth - * The depth from the initial starting point, not significant for - * the Scagen tool as we are only interested in the module root - * directory but present due to the FileActor actOnFile interface - * method. This code is pulled from the code in the CParsingTool - * class and further work is needed to remove the duplication. - * Tnterface has been left unchanged as we hope to reconverge the - * parser here with the original one once the changes are fed - * back into the original code. - * @throws Exception - */ - public void walkTree(File source, File target, int depth) throws Exception { - depth++; - boolean noTarget = (null == target); - - if (!source.canRead()) - Utils.rude("Cannot read from source directory " + source); - if (!noTarget && !target.canWrite()) - Utils.rude("Cannot write to target directory " + target); - - if (source.isDirectory()) { - File[] filesInDirectory = source.listFiles(); - for (int i = 0; i < filesInDirectory.length; i++) { - File file = filesInDirectory[i]; - String name = file.getName(); - int dot = name.lastIndexOf('.'); - String ext = null; - if (-1 != dot) { - ext = name.substring(dot + 1); - } - - if (file.isFile() - && (actOnTheseFileExtensions == null || (!file - .isHidden() && actOnTheseFileExtensions - .contains(ext)))) { - // this is a file we need to act on! - actor.actOnFile(file, target, depth); - } - } - } else { - return; // Do not act on single files for now we expect a module - // root directory - // and the "main" class checks its parameters to ensure this is so. - } - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java deleted file mode 100644 index 2ca4c7c881..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.util.Map; - -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * The purpose of this class it to provide a generic class that can handle both - * a DOM and a DOM node. - * - */ -public class DomHandler extends GenericDomNodeHandler { - /** - * This method will run through the initial level of the DOM using the - * handlers map - * - * @param dom - * the document being consumed - * @param handlers - * the map from element name to node handler - * @param parameters - * a map of parameters - this is often used by a handler to place - * a name-value pair, the name is often an Xpath representation - * of the location of the data in the DOM but handlers are free - * to use whatever they like - the contextXpath is generated as - * an Xpath prefix for those handlers that wish to use it. - */ - public static void handleDom(Document dom, Map handlers, Map parameters) { - if (dom != null) { - NodeList childNodes = dom.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node childNode = childNodes.item(i); - mapNodeToHandlerAndHandle(childNode, "/" - + childNode.getNodeName(), handlers, parameters); - } - } - } - - /** - * - * @param node - * The DOM node being consumed - * @param contextXPath - * The XPath to this node - * @param handlers - * The map from element name to node handler - * @param parameters - * A map of parameters - this is often used by a handler to place - * a name-value pair, the name is often an Xpath representation - * of the location of the data in the DOM but handlers are free - * to use whatever they like - the contextXpath is generated as - * an Xpath prefix for those handlers that wish to use it. - */ - public void handleNode(Node node, String contextXPath, Map handlers, - Map parameters) { - mapNodeToHandlerAndHandle(node, contextXPath, handlers, parameters); - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java deleted file mode 100644 index 00942bd9ca..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* -* -* 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. -*/ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.util.Map; - -import org.w3c.dom.Node; - -public interface DomNodeHandler { - - public static int ELEMENT = 1; - /** - * An interface for classes that can process DOM nodes. - * - * @param node the DOM node being consumed - * @param contextXPath the XPath to this node - * @param handlers The map from element name to node handler - * @param parameters A map of parameters - this is often used by a handler to place - * a name-value pair, the name is often an Xpath like representation of the - * location of the data in the DOM but handlers are free to use whatever - * they like - the contextXpath is generated as an Xpath prefix for those - * handlers that wish to use it. - */ - void handleNode( Node node, String contextXPath, Map handlers, Map parameters ); - -} diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java deleted file mode 100644 index 3f9fb359f5..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.Map.Entry; - -import org.apache.tuscany.sca.cpp.tools.common.Utils; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * - * - * - * - */ -public class GenericDomNodeHandler implements DomNodeHandler { - /** - * This method parses the DOM attributes into name value pairs in the - * parameter map each valued keyed by its XPath. - * - * @param node - * the DOM node being processed - * @param contextPath - * the XPath to the DOM node being processed - * @param parameters - * a scratchpad map of name value pairs - */ - public void transferAttrsToParameters(Node node, String contextPath, - Map parameters) { - - if (node == null || contextPath == null || parameters == null) - return; - - NamedNodeMap attrs = node.getAttributes(); - if (attrs != null) { - for (int i = 0; i < attrs.getLength(); i++) { - Node attr = attrs.item(i); - parameters.put(contextPath + "/" + "@" + attr.getNodeName(), - attr.getNodeValue()); - - // Report the dll name to the deployment tool if required. - if ("dll".equals(attr.getNodeName())) { - //This is a path relative to the module root. - //so we need to add it in. - File mod = (File) parameters.get("moduleOrFragmentFile"); - if (null != mod) { - String separatorForRegex = File.separator.replaceAll( - "\\\\", "\\\\\\\\"); - - String end = attr.getNodeValue().replaceAll("[/\\\\]+", - separatorForRegex); - - if (!end.startsWith(File.separator)) { - end = File.separator + end; - } - - String fullPath = mod.getParentFile().getAbsolutePath() - + end; - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, - fullPath); - } - - } - - } - } - return; - } - - /** - * This method will iterate through the DOM node's children and call the - * appropriate handler for each one. - * - * @param node - * the DOM node being processed - * @param contextPath - * the XPath to the DOM node being processed - * @param handlers - * a map of element name to handler objects - * @param parameters - * a scratchpad map of name value pairs - */ - public void handleChildElements(Node node, String contextPath, - Map handlers, Map parameters) { - - if (node == null || contextPath == null) - return; - - NodeList children = node.getChildNodes(); - if (children != null) { - for (int i = 0; i < children.getLength(); i++) { - Node child = children.item(i); - mapNodeToHandlerAndHandle(child, contextPath + "/" - + child.getNodeName(), handlers, parameters); - } - } - return; - } - - /** - * This method will resolve any registered handler for a particular DOM - * element and call the handleNode method on it. If the handlers map has a - * mapping from "entity" to an instance of EntityHandler which implements - * the DomNodeHandler interface then any node that looks like - * - * - * Will be passed to the EntityHandler to process. - * - * @param node - * the DOM node being processed - * @param contextPath - * the XPath to the DOM node being processed - * @param handlers - * a map of element name to handler objects - * @param parameters - * a scratchpad map of name value pairs - */ - public static void mapNodeToHandlerAndHandle(Node node, String contextPath, - Map handlers, Map parameters) { - if (node != null && node.getNodeType() == DomNodeHandler.ELEMENT) { - String nodeName = node.getNodeName(); - if (nodeName != null && nodeName.length() > 0) { - DomNodeHandler handler = (DomNodeHandler) handlers - .get(nodeName); - if (handler != null) { - handler.handleNode(node, contextPath, handlers, parameters); - } - } - } - } - - /** - * This method will place the attributes in this node into the parameter map - * keyed by the XPath and recursively continue processing for any - * sub-elements of the node. - * - * @param node - * The DOM node being consumed - * @param contextXPath - * The XPath to this node - * @param handlers - * The map from element name to node handler - * @param parameters - * A map of parameters - this is often used by a handler to place - * a name-value pair, the name is often an Xpath representation - * of the location of the data in the DOM but handlers are free - * to use whatever they like - the contextXpath is generated as - * an Xpath prefix for those handlers that wish to use it. - */ - public void handleNode(Node node, String contextXPath, Map handlers, - Map parameters) { - - clearParametersAtThisXPath(contextXPath, parameters); - transferAttrsToParameters(node, contextXPath, parameters); - handleChildElements(node, contextXPath, handlers, parameters); - } - - /** - * @param contextXPath - * @param parameters - */ - private void clearParametersAtThisXPath(String contextXPath, Map parameters) { - - // TODO: Slow but works, improve parameters mechanism overall - // to make this unecessary - if (contextXPath == null || parameters == null) { - return; - } - - // We want to clear both /moduleFragment and /module - // subtrees when we come across the root of either.. - if (contextXPath.equals("/moduleFragment")) { - //clear both this and "module" - contextXPath = "/module"; - } - - Set parms = parameters.entrySet(); - if (null != parms) { - Iterator iter = parms.iterator(); - Map.Entry item = null; - String thisKey; - - while (iter.hasNext()) { - item = (Entry) iter.next(); - thisKey = (String) item.getKey(); - if (thisKey.startsWith(contextXPath)) { - //System.out.println(" removing " + thisKey + " for " + - // item.getValue().toString() + " against " + contextXPath); - iter.remove(); - } - } - } - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java deleted file mode 100644 index 699abf7a08..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -/** - * This class is just a convenient application class that is loaded in order to - * get the application class loader. We are interested in the application class - * loader as we use its getResource method to resolve XML files independantly of - * where they are. - */ -public class LittleClass { - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java deleted file mode 100644 index 3bd8129401..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; - -import org.apache.tuscany.sca.cpp.tools.common.FileActor; -import org.apache.tuscany.sca.cpp.tools.common.Utils; - -/** - * The purpose of this class is purely to specialise the handler map to one with - * a specific ComponentDomNodeHandler. - */ -public class ModuleOrFragmentFileHandler extends XMLFileActor { - - static { - - GenericDomNodeHandler gdnh = new GenericDomNodeHandler(); - - /* - * We use a specific Component node handler in order to be able to - * process multiple components in the same XML file - */ - ComponentDomNodeHandler componentdnh = new ComponentDomNodeHandler(); - handlers.put("component", componentdnh); - - /* - * We are interested inthe elements below but they only need standard - * processing - */ - handlers.put("module", gdnh); - handlers.put("moduleFragment", gdnh); - handlers.put("implementation.cpp", gdnh); - } - - /** - * This method is the main FileActor method - * - * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM - * and kick off the processing (using the handler map that has been set - * up by the concrete subclass). - * - * @param moduleXML - * the sca.module or fragment file - * @param target - * the target directory - * @param depth - * not uesed here but in the - * @see FileActor#actOnFile(File, File, int) interface to allow for - * recursive diving into a directory structure. - */ - public void actOnFile(File moduleXML, File target, int depth) - throws Exception { - - if (null == moduleXML || null == target) { - return; - } - - parameters.put("moduleOrFragmentFile", moduleXML); - - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, moduleXML - .getAbsolutePath()); - - Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, - "Scagen processing SCA module file " - + moduleXML.getAbsolutePath()); - - super.actOnFile(moduleXML, target, depth); - - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java deleted file mode 100644 index a490d184d1..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.util.Map; - -import org.apache.tuscany.sca.cpp.tools.common.Options; -import org.w3c.dom.Node; - -/** - * The purpose of this class is to process a element in a - * componentType file and then trigger a call to the method in ServicesGenerator - * to process the interface header file - */ -public class ReferenceDomNodeHandler extends GenericDomNodeHandler { - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.cpp.services.DomNodeHandler#handleNode(org.w3c.dom.Node, - * java.lang.String, java.util.Map, java.util.Map) - */ - public void handleNode(Node node, String contextXPath, Map handlers, - Map parameters) { - - // Pick up attrs and children - super.handleNode(node, contextXPath, handlers, parameters); - - //OK we know we are handling a reference - //now go and create the wrapper and proxy for it - createProxyForReference(parameters); - - } - - /** - * This method is really just an adapter that adapts the -dir Option to a - * value int he parameters map for "module_root" - * - * @param parameters - * the map of name-value parameters. - */ - private void createProxyForReference(Map parameters) { - try { - String mr = (String) Options.getOption("-dir"); - parameters.put("module_root", mr); - ServicesGenerator.handleInterfaceHeader(parameters, true); - - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java deleted file mode 100644 index a6f6f58644..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -import org.apache.tuscany.sca.cpp.tools.common.CParsingTool; -import org.apache.tuscany.sca.cpp.tools.common.Options; -import org.apache.tuscany.sca.cpp.tools.common.Utils; - -/** - * This is the main top level class. Its purpose is to create a - * Module/FragmentFile handler visitor and pass it to a DirectoryScanner for - * processing. - */ -public class Scagen extends CParsingTool { - - public static Set MODULE_EXTENSIONS = new HashSet(Arrays - .asList(new Object[] { "module", "fragment" })); - - /** - * @throws Exception - * - */ - public Scagen(String[] args) throws Exception { - super(args); - } - - /** - * Take a directory scanning class and create a vistor that knows how to - * handle any sca.module or .fragment that the scanner comes across. - * - * @param args - * standard main args. THe values we expect in this class are - * scagen -dir input_dir -output output_dir - * - */ - public static void main(String[] args) { - boolean failed = false; - try { - Scagen env = new Scagen(args); - ModuleOrFragmentFileHandler module_handler = new ModuleOrFragmentFileHandler(); - - // Check and access the input SCA module directory - String name = (String) Options.getOption("-dir"); - if (null == name) { - Utils - .screenMessage("Please provide a SCA module directory name as a \"-dir\" option."); - env.printUsage(); - System.exit(-1); - } - File source = new File(name); - if (!source.isFile() && !source.isDirectory()) { - Utils - .screenMessage("The SCA module directory provided as the \"-dir\" option cannot be accessed,"); - Utils.screenMessage("the option given was: " + source); - env.printUsage(); - System.exit(-1); - } - - String deployDir = null; - try { - deployDir = (String) Options.getOption("-deploy"); - if (null != deployDir || Options.deploy()) { - Utils.setReportArtefacts(true); - } - } catch (Exception e) { - // let it default to null - } - - Utils.postEvent(Utils.DEPLOYMENT_INPUT_DIRECTORY, source - .getAbsolutePath()); - - // We check the -output option here as we wish to - // reuse the env.maybeCreateDirectory method - // unchanged from the original that went into axis and it will do a - // System.exit if there is no matching Option - String outputDirName = (String) Options.getOption("-output"); - if (null == outputDirName) { - Utils - .screenMessage("Please provide an output directory name for the generated files as a \"-output\" option."); - env.printUsage(); - System.exit(-1); - } - - File outputDir = new File(outputDirName); - - // Check we can create the output directory - if (outputDir == null || !outputDir.exists() && !outputDir.mkdir()) { - Utils.screenMessage("Failed to create output directory: " - + outputDirName); - env.printUsage(); - System.exit(-1); - } - - Utils.postEvent(Utils.DEPLOYMENT_OUTPUT_DIRECTORY, outputDir - .getAbsolutePath()); - - DirectoryScanner scanner = new DirectoryScanner(module_handler, - MODULE_EXTENSIONS); - scanner.walkTree(source, outputDir, 1); - - if (0 == module_handler.getFilesActedOn()) { - Utils - .screenMessage("No SCA module or fragment files were found in: " - + source); - } - - failed = module_handler.failed; - - } catch (Exception exception) { - Utils - .screenMessage("Unexpected error occurred while runnning the Scagen tool. The Java exception is below."); - exception.printStackTrace(); - failed = true; - } - - if (failed) { - Utils - .outputDebugString("Finished! (but encountered problems parsing modules)"); - System.exit(-2); - } - - Utils.outputDebugString("Finished!"); - } - - /** - * Provide a hint to the user on how to call this class - */ - protected void printUsage() { - System.out - .println("usage: Java Scagen -dir -output [-verbose] [-deploy ] [-nogenerate] [-outputCommand] [-command ]"); - System.out - .println(" -dir : the SCA module root directory"); - System.out - .println(" -output : a directory to put the generated output into"); - System.out.println(" [-verbose]: report on what scagen is doing"); - System.out - .println(" [-deploy ]: output text to help in deploying the module's artefacts"); - System.out - .println(" [-command ]: a string that is injected into the deploy text"); - System.out - .println(" [-list]: change the deploy output text to a simple list of artefacts"); - System.out - .println(" [-outputCommand]: change the deploy output text to command text format"); - System.out - .println(" output is of form \"copy_cmd file1 file1\""); - System.out - .println(" [-nogenerate]: do not generate proxies and wrappers"); - - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java deleted file mode 100644 index 79b74c0450..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.util.Map; - -import org.apache.tuscany.sca.cpp.tools.common.Options; -import org.w3c.dom.Node; - -public class ServiceDomNodeHandler extends GenericDomNodeHandler { - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.cpp.services.DomNodeHandler#handleNode(org.w3c.dom.Node, - * java.lang.String, java.util.Map, java.util.Map) - */ - public void handleNode(Node node, String contextXPath, Map handlers, - Map parameters) { - - // Pick up attrs and the interface.cpp child elements - super.handleNode(node, contextXPath, handlers, parameters); - - //OK now go and create the wrapper and proxy for the service - createWrapperAndProxyForService(parameters); - - } - - /** - * This method will generate the wrapper and proxy C++ and header files for - * the service. - * - * @param parameters - * a map of name-value parameters - */ - private void createWrapperAndProxyForService(Map parameters) { - - try { - String mr = (String) Options.getOption("-dir"); - parameters.put("module_root", mr); - ServicesGenerator.handleInterfaceHeader(parameters, false); - - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java deleted file mode 100644 index 6442b76992..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java +++ /dev/null @@ -1,802 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.tuscany.sca.cpp.tools.common.CParsingTool; -import org.apache.tuscany.sca.cpp.tools.common.Headers; -import org.apache.tuscany.sca.cpp.tools.common.Options; -import org.apache.tuscany.sca.cpp.tools.common.Parameter; -import org.apache.tuscany.sca.cpp.tools.common.Signature; -import org.apache.tuscany.sca.cpp.tools.common.Utils; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - -/** - * This class is the main class that handles the function that parses a C++ - * interface header file into a DOM that holds all the semantic information - * about the interface - method names, parameters and return values. It then - * uses XSLT to generate different "views" of this data plus the parameter map - * from other sources that are the C++ programs for the proxy and wrapper - * implementations and headers. - */ -public class ServicesGenerator extends CParsingTool { - - private static final String OPERATION_NAME_ATTR = "operationNameAttr"; - - private static final String HEADER_NAME_ATTR = "headerNameAttr"; - - private static final String SCA_OPERATION = "scaOperation"; - - private static final String SCA_SERVICE = "scaService"; - - private static final String SCA_OPERATION_RETURN_TYPE = "scaOperationReturnType"; - - private static final String SCA_OPERATION_PARAMETER = "scaOperationParameter"; - - private static final String SCA_OPERATION_PARAMETER_NAME_ATTR = "scaOperationParameterNameAttr"; - - private static final String SCA_OPERATION_PARAMETER_CONST_ATTR = "scaOperationParameterConstAttr"; - - private static final String SCA_INTERFACE_NAME_ATTR = "scaInterfaceNameAttr"; - - private static final String CPP_HEADER = "cppHeader"; - - private static boolean TESTING = true; - - private static TransformerFactory txmf = null; - - private static ServicesGenerator instance = null; - - public ServicesGenerator(String[] args) throws Exception { - super(args); - txmf = TransformerFactory.newInstance(); - } - - /** - * - * @param parameters - * @param forReference - * true if we are creating a proxy for a reference (rather than - * for a service) - * @throws Exception - * - * The design is - *
        - *
      • handleInterfaceHeader - *
      • createDOMofMethods - *
      • createProxyCPPFromDom(outputDir, dom); - *
      • createProxyHeaderFromDom(outputDir, dom); - *
      - * - * plus if we are not generating for a reference element - *
        - *
      • createWrapperCPPFromDom(outputDir, dom); - *
      • createWrapperHeaderFromDom(outputDir, dom); - *
          - * Each of the create.... methods calls createOutputFromDom with a different - * style sheet. - * - */ - public static void handleInterfaceHeader(Map parameters, - boolean forReference) throws Exception { - boolean failed = false; - - String type = null; - if (forReference) { - type = "reference"; - } else { - type = "service"; - } - String interfaceHeaderFilename = (String) parameters - .get("/componentType/" + type + "/interface.cpp/@header"); - - String componentTypeFileHeaderName = interfaceHeaderFilename; - - String sca_module_root = (String) Options.getOption("-dir"); - parameters.put("module_root", sca_module_root); - - if (sca_module_root != null && interfaceHeaderFilename != null - && interfaceHeaderFilename.length() > 0) { - String separator; - // Stick in a "/" (File.separator) if required. - if ((interfaceHeaderFilename.substring(0, 1).equals("/") || sca_module_root - .substring(sca_module_root.length() - 1, - sca_module_root.length()).equals("/")) - || (interfaceHeaderFilename.substring(0, 1).equals("\\") || sca_module_root - .substring(sca_module_root.length() - 1, - sca_module_root.length()).equals("\\")) - - ) { - separator = ""; - } else { - separator = File.separator; - } - interfaceHeaderFilename = sca_module_root + separator - + interfaceHeaderFilename; - } - - File outputDir = (File) parameters.get("targetDirectoryFile"); - - String[] args = new String[] { "-source", interfaceHeaderFilename, - "-target", outputDir.getPath() }; - ServicesGenerator gen = new ServicesGenerator(args); - File file; - try { - if (null == interfaceHeaderFilename) { - gen.printUsage(); - System.exit(-1); - } - - file = new File(interfaceHeaderFilename); - if (!file.isFile()) { - if (file.isDirectory()) { - Utils - .rude("This tool works at the header file level and not for directories like " - + file); - } - Utils.rude("Bad file or directory " + file); - } - File source = file; - if (!outputDir.exists() && !outputDir.mkdir()) - Utils.rude("Failed to create directory " + outputDir); - - // The class below is the one that will go through the header - // file(s) - Headers headers = new Headers(); - - if (null != interfaceHeaderFilename) { - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, file - .getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, - "Scagen processing C++ interface header " - + file.getAbsolutePath()); - headers.actOnFile(file, outputDir, 1); - Utils.outputDebugString("Parsing files..."); - } - - String nameOfSorR = null; - String referenceName = null; - String serviceName = null; - - if (forReference) { - - Object rn = parameters.get("/componentType/reference/@name"); - - if (rn instanceof String) { - referenceName = (String) rn; - nameOfSorR = referenceName; - } - } else { - - Object sn = parameters.get("/componentType/service/@name"); - - if (sn instanceof String) { - serviceName = (String) sn; - nameOfSorR = serviceName; - } - } - - String moduleXmlFileHeader = null; - String moduleXmlFileHeaderNoExt = null; - Object moduleh = parameters - .get("/module/component/implementation.cpp/@header"); - - if (moduleh == null) { - moduleh = parameters - .get("/moduleFragment/component/implementation.cpp/@header"); - } - - if (moduleh instanceof String) { - File f = new File((String) moduleh); - moduleXmlFileHeader = (String) moduleh; - - String fname = f.getName(); - moduleXmlFileHeaderNoExt = fname.substring(0, fname - .lastIndexOf('.')); - - } - - String implClassNameAttrFromModuleFile = (String) parameters - .get("implClass"); - - String interfaceClassNameAttrFromComponentTypeFile; - if (forReference) { - interfaceClassNameAttrFromComponentTypeFile = (String) parameters - .get("/componentType/reference/interface.cpp/@class"); - } else { - interfaceClassNameAttrFromComponentTypeFile = (String) parameters - .get("/componentType/service/interface.cpp/@class"); - } - - List methods = headers.getAllMethods(); - - // Pull out one of the methods' namespace attributes. - String intfNamespace = null; - if (methods.size() > 0) { - Signature method = (Signature) methods.get(0); - intfNamespace = method.getNamespace(); - } - - if (interfaceClassNameAttrFromComponentTypeFile != null) { - methods = filterToPublicMethodsOfGivenClass(methods, - interfaceClassNameAttrFromComponentTypeFile, true); - } else { - //We want to filter to methods of the class whose - //name matches the header file name. - // String intfClassName = (String) parameters.get("intfClass"); - // - String headerFileBase = file.getName().replaceAll( - "\\.h|\\.hpp|\\.h++", ""); - - methods = filterToPublicMethodsOfGivenClass(methods, - headerFileBase, false); - } - - Document dom = createDOMofMethods(methods, source, serviceName, - referenceName, nameOfSorR, null, - componentTypeFileHeaderName, moduleXmlFileHeader, - moduleXmlFileHeaderNoExt, intfNamespace, - interfaceClassNameAttrFromComponentTypeFile, - implClassNameAttrFromModuleFile); - - createProxyCPPFromDom(outputDir, dom); - createProxyHeaderFromDom(outputDir, dom); - - if (!forReference) { - createWrapperCPPFromDom(outputDir, dom); - createWrapperHeaderFromDom(outputDir, dom); - } - - } catch (Exception exception) { - exception.printStackTrace(); - failed = true; - } - - if (failed) { - Utils.outputDebugString("Finished! (but encountered problems)"); - System.exit(-2); - } - } - - /** - * This methods takes a list of methods and filters them to only contain the - * public methods of the given class - * - * @param methods - * a list of methods - * @param className - * we will return a list of only this classes methods from the - * methods parameter - * @param attrSpecified - * if the user does not specify one we ignore namespaces - * @return - */ - private static List filterToPublicMethodsOfGivenClass(List methods, - String className, boolean useNamespace) { - if (methods != null && className != null && className.length() > 0) { - for (Iterator iter = methods.listIterator(); iter.hasNext();) { - Signature method = (Signature) iter.next(); - String scope = method.getScope(); - String sig = method.getOriginal(); - String namespace = method.getNamespace(); - - String qualifiedClassName; - if (useNamespace && null != namespace && 0 < namespace.length()) { - qualifiedClassName = namespace + "::" - + method.getTrimClassName(); - } else { - qualifiedClassName = method.getTrimClassName(); - } - - // If we are not public or the classname does not match - // remove... - if (!qualifiedClassName.equals(className) - || -1 == scope.indexOf("public")) { - iter.remove(); - } - } - } - return methods; - } - - /** - * Use an XSLT transformation to create a Proxy "view" of the DOM - * information - * - * @param outputDir - * where to put the C++ - * @param dom - * the DOM of semantic method information - * @throws TransformerException - */ - private static void createProxyCPPFromDom(File outputDir, Document dom) - throws TransformerException { - - //Create the Filename from the Service Name in the DOM - if (dom == null) { - return; - } - - String serviceOrReferenceName = "noSorRNameDefined"; - - String implClass = "nomoduleXmlFileHeaderDefined"; - - Element topNode = dom.getDocumentElement(); - if (null != topNode) { - Attr attr = topNode.getAttributeNode("nameOfSorR"); - if (attr != null) { - serviceOrReferenceName = attr.getNodeValue(); - } - - attr = topNode.getAttributeNode("implClass"); - if (attr != null) { - implClass = attr.getNodeValue(); - } - } - - File proxyCPP = new File(outputDir, implClass + "_" - + serviceOrReferenceName + "_Proxy.cpp"); - if (null != proxyCPP) { - - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, proxyCPP - .getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, - "Scagen creating SCA for C++ proxy implementation " - + proxyCPP.getAbsolutePath()); - } - - createOutputFromDom(dom, proxyCPP, - "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl"); - - } - - /** - * Use an XSLT transformation to create a Wrapper "view" of the DOM - * information - * - * @param outputDir - * where to put the C++ - * @param dom - * the DOM of semantic method information - * @throws TransformerException - */ - private static void createWrapperCPPFromDom(File outputDir, Document dom) - throws TransformerException { - - //Create the Filename from the Service Name in the DOM - if (dom == null) { - return; - } - - String serviceName = "noServiceDefined"; - - String implClass = "nomoduleXmlFileHeaderDefined"; - - Element topNode = dom.getDocumentElement(); - if (null != topNode) { - Attr attr = topNode.getAttributeNode("serviceName"); - if (attr != null) { - serviceName = attr.getNodeValue(); - } - - attr = topNode.getAttributeNode("implClass"); - if (attr != null) { - implClass = attr.getNodeValue(); - } - } - - File wrapperCPP = new File(outputDir, implClass + "_" + serviceName - + "_Wrapper.cpp"); - if (null != wrapperCPP) { - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, wrapperCPP - .getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, - "Scagen creating SCA for C++ wrapper implementation " - + wrapperCPP.getAbsolutePath()); - } - createOutputFromDom(dom, wrapperCPP, - "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl"); - - } - - /** - * Use an XSLT transformation to create a Proxy header "view" of the DOM - * information - * - * @param outputDir - * where to put the C++ - * @param dom - * the DOM of sematic method information - * @throws TransformerException - */ - private static void createProxyHeaderFromDom(File outputDir, Document dom) - throws TransformerException { - - //Create the Filename from the Service Name in the DOM - if (dom == null) { - return; - } - - String serviceOrReferenceName = "noServiceDefined"; - String intfClass = "noInterfaceClassNameOrDefaultDefined"; - String implClass = "noImplementationClassOrDefaultDefined"; - - Element topNode = dom.getDocumentElement(); - if (null != topNode) { - Attr attr = topNode.getAttributeNode("nameOfSorR"); - if (attr != null) { - serviceOrReferenceName = attr.getNodeValue(); - } - attr = topNode.getAttributeNode("intfClass"); - if (attr != null) { - intfClass = attr.getNodeValue(); - } - attr = topNode.getAttributeNode("implClass"); - if (attr != null) { - implClass = attr.getNodeValue(); - } - } - - File proxyHeader = new File(outputDir, implClass + "_" - + serviceOrReferenceName + "_Proxy.h"); - if (null != proxyHeader) { - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, proxyHeader - .getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, - "Scagen creating SCA for C++ proxy header " - + proxyHeader.getAbsolutePath()); - } - - createOutputFromDom(dom, proxyHeader, - "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl"); - - } - - /** - * Use an XSLT transformation to create a Wrapper header "view" of the DOM - * information - * - * @param outputDir - * where to put the C++ - * @param dom - * the DOM of sematic method information - * @throws TransformerException - */ - private static void createWrapperHeaderFromDom(File outputDir, Document dom) - throws TransformerException { - - //Create the Filename from the Service Name in the DOM - if (dom == null) { - return; - } - - String serviceName = "noServiceDefined"; - - String implClass = "nomoduleXmlFileHeaderDefined"; - - Element topNode = dom.getDocumentElement(); - if (null != topNode) { - Attr attr = topNode.getAttributeNode("serviceName"); - if (attr != null) { - serviceName = attr.getNodeValue(); - } - - attr = topNode.getAttributeNode("implClass"); - if (attr != null) { - implClass = attr.getNodeValue(); - } - } - - File wrapperHeader = new File(outputDir, implClass + "_" + serviceName - + "_Wrapper.h"); - - if (null != wrapperHeader) { - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, wrapperHeader - .getAbsolutePath()); - Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE, - "Scagen creating SCA for C++ wrapper header " - + wrapperHeader.getAbsolutePath()); - } - createOutputFromDom(dom, wrapperHeader, - "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl"); - - } - - /** - * This method will return a class loader that can see the resources that - * are parts of "this" package. - */ - private static ClassLoader getALoader() { - - LittleClass lc; - try { - lc = new LittleClass(); - return lc.getClass().getClassLoader(); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * This method will generically process the DOM using a stylesheet passed - * in. - * - * @param dom - * the source of data (the model) - * @param outputFile - * where to put the result - * @param xslTransformationFileName - * the xsl file containing the "view" - * @throws TransformerException - */ - private static void createOutputFromDom(Document dom, File outputFile, - String xslTransformationFileName) throws TransformerException { - - if(Options.noGenerate()){ - return; - } - - InputStream stream = getALoader().getResourceAsStream( - xslTransformationFileName); - StreamSource ss = new StreamSource(stream); - StreamResult out = new StreamResult(outputFile); - try { - Transformer xslt = txmf.newTransformer(ss); - - // Unless a width is set, there will be only line breaks but no - // indentation. - // The IBM JDK and the Sun JDK don't agree on the property name, - // so we set them both. - // - try { - xslt.setOutputProperty( - "{http://xml.apache.org/xalan}indent-amount", "2"); - } catch (Throwable t) { - //OK to ignore this, depends on XSLT engine and one will fail - } - try { - xslt.setOutputProperty( - "{http://xml.apache.org/xslt}indent-amount", "2"); - } catch (Throwable t) { - //OK to ignore this, depends on XSLT engine and one will fail - } - - DOMSource from = new DOMSource(dom); - - xslt.transform(from, out); - - } catch (TransformerConfigurationException e) { - e.printStackTrace(); - throw (e); - } catch (TransformerException e) { - e.printStackTrace(); - throw (e); - } finally { - try { - stream.close(); - } catch (IOException e1) { - // unlikely but if - // we can't close it, we can't close it - } - } - - } - - //TODO clear up the parameter list below to make it smaller if - // possible - /** - * This method will create A DOM containing all the semantic information - * that it can extract from a C++ header file. - * - * @param methods - * a list of methods that are going into the DOM - * @param source - * the header file the methods came from - * @param serviceName - * the name of the service - * @referenceName the name of the reference - * @nameOfSorR the non null one of the two parameters above - * @headerClassName the name of the header class - * @param moduleXmlFileImplHeaderNameWithPathAndExt - * the source filename - * @param moduleXmlFileHeaderNoExtorPath - * the shortname of the source file - * @param implClass - * the implementation class - * @param intfClass - * the interface we are turning into a service - * @return - */ - private static Document createDOMofMethods(List methods, File source, - String serviceName, String referenceName, String nameOfSorR, - String headerClassName, - String componentTypeXmlFileIntfHeaderNameWithPathAndExt, - String moduleXmlFileImplHeaderNameWithPathAndExt, - String moduleXmlFileHeaderNoExtorPath, String intfNamespace, - String intfClass, String implClass) { - - if (methods == null) { - return null; - } - - // Create a DOM of the methods - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - Document document = null; - try { - DocumentBuilder builder = factory.newDocumentBuilder(); - document = builder.newDocument(); - - Element root = (Element) document.createElement(CPP_HEADER); - - root.setAttribute(HEADER_NAME_ATTR, source.getPath()); - - document.appendChild(root); - - Element intf = (Element) document.createElement(SCA_SERVICE); - root.appendChild(intf); - - // Go through all the signatures we have collected... - Signature s = null; - for (Iterator iter = methods.iterator(); iter.hasNext();) { - s = (Signature) iter.next(); - - // Each signature is an operation - Element op = document.createElement(SCA_OPERATION); - op.setAttribute(OPERATION_NAME_ATTR, s.getMethodName()); - intf.appendChild(op); - - Parameter[] parms = s.getParameters(); - if (parms != null) { - - for (int i = 0; i < parms.length; i++) { - Element parm = (Element) document - .createElement(SCA_OPERATION_PARAMETER); - String type_string = parms[i].getTypeWithoutConst() - .toString(); - - type_string = type_string.replaceAll(":: ", "::"); - - Text text = document.createTextNode(type_string); - parm.appendChild(text); - parm.setAttribute(SCA_OPERATION_PARAMETER_NAME_ATTR, - parms[i].getName()); - - if (parms[i].getTypeWithoutConst().intern() != parms[i] - .getType().intern()) { - parm.setAttribute( - SCA_OPERATION_PARAMETER_CONST_ATTR, "true"); - } - - op.appendChild(parm); - // TO DO only really stores the value - // unsafely/temporarily - // which is fine while we handle everything at the - // end of parsing the "leaf" that represents that actual - // interface/service but the below will cause the second - // service - // processed to overwite the first one in the DOM. I we - // wish - // to do some overall processing at the end we will have - // to - // use a better more XPath like key that varies by - // instance - // of the service. - intf.setAttribute(SCA_INTERFACE_NAME_ATTR, s - .getTrimClassName()); - } - } - - Element rc = document.createElement(SCA_OPERATION_RETURN_TYPE); - rc.appendChild(document.createTextNode(s.getReturnType() - .toString().replaceAll(":: ", "::"))); - op.appendChild(rc); - - root.appendChild(intf); - } - - // Set the name of the Service - // here, if we are not passed one we use - // the classname from the last header function signature... - if (serviceName == null && s != null) { - serviceName = s.getTrimClassName(); - } - - // this is used for the proxy file name but we need to - // use the reference name if this is pulled in due to it - // being a reference!!! - if (serviceName != null) - root.setAttribute("serviceName", serviceName); - if (referenceName != null) - root.setAttribute("referenceName", referenceName); - if (nameOfSorR != null) - root.setAttribute("nameOfSorR", nameOfSorR); - - if (implClass != null) { - root.setAttribute("implClass", implClass); - } else { - root.setAttribute("implClass", moduleXmlFileHeaderNoExtorPath); - } - - // default class name to the name of the header... - if (headerClassName == null && source != null) { - headerClassName = source.getName().replaceAll( - "\\.h|\\.hpp|\\.h++", ""); - } - root.setAttribute("headerClassName", headerClassName); - - if (null == intfClass) { - intfClass = headerClassName; - } - - if (null != intfNamespace) { - root.setAttribute("namespace", intfNamespace); - if (null != intfClass && !intfClass.startsWith(intfNamespace)) { - intfClass = intfNamespace + "::" + intfClass; - } - } - - root.setAttribute("intfClass", intfClass); - - if (componentTypeXmlFileIntfHeaderNameWithPathAndExt == null) { - componentTypeXmlFileIntfHeaderNameWithPathAndExt = "componentTypeHeader"; - } - root.setAttribute("componentTypeHeader", - componentTypeXmlFileIntfHeaderNameWithPathAndExt); - - if (moduleXmlFileImplHeaderNameWithPathAndExt == null) { - moduleXmlFileImplHeaderNameWithPathAndExt = "moduleXmlFileImplHeader"; - } - root.setAttribute("moduleXmlFileHeader", - moduleXmlFileImplHeaderNameWithPathAndExt); - - if (moduleXmlFileHeaderNoExtorPath == null) { - moduleXmlFileHeaderNoExtorPath = "moduleXmlFileHeaderNoExt"; - } - root.setAttribute("moduleXmlFileHeaderNoExt", - moduleXmlFileHeaderNoExtorPath); - - } catch (ParserConfigurationException pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - } - - return document; - - } - -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java deleted file mode 100644 index 047e1ab3f1..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * - * 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. - */ -package org.apache.tuscany.sca.cpp.tools.services; - -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; - -import org.apache.tuscany.sca.cpp.tools.common.FileActor; -import org.apache.tuscany.sca.cpp.tools.common.Utils; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * The purpose of this abstract class is to provide a home for the standard - * processing that is involved in turning a XML file into an internal DOM. - */ -public abstract class XMLFileActor implements FileActor { - - protected static Map handlers = new HashMap(); - - protected static Map parameters = new HashMap(); - - public boolean failed; - - private int filesActedOn=0; - - protected static TransformerFactory transformerFactory = TransformerFactory - .newInstance(); - - /** - * This method is the main FileActor method - * - * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM - * and kick off the processing (using the handler map that has been set - * up by the concrete subclass). - * - * @param moduleXML - * the sca.module or fragment file - * @param target - * the target directory - * @param depth - * not uesed here but in the - * @see FileActor#actOnFile(File, File, int) interface to allow for - * recursive diving into a directory structure. - */ - public void actOnFile(File moduleXML, File target, int depth) - throws Exception { - - if (null == moduleXML || null == target) { - return; - } - - filesActedOn++; - - parameters.put("sourceFile", moduleXML); - parameters.put("targetFile", target); - - if (transformerFactory.getFeature(DOMSource.FEATURE) - && transformerFactory.getFeature(DOMResult.FEATURE)) { - Document dom = createDomFromXMLFile(moduleXML); - if (dom != null) { - parameters.put("targetDirectoryFile", target); - DomHandler.handleDom(dom, handlers, parameters); - } - } - } - - /** - * This method builds an in memory DOM from an XML file - * - * @param xmlSourceFile - * the XML file we are handling - * @return the resulting document - */ - protected Document createDomFromXMLFile(File xmlSourceFile) { - Document dom = null; - DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); - //We do not validate via f.setValidating(true); - f.setNamespaceAware(true); - - try { - DocumentBuilder parser = f.newDocumentBuilder(); - dom = parser.parse(xmlSourceFile); - } catch (SAXException sxe) { - String path; - try { - path = xmlSourceFile.getCanonicalPath(); - } catch (IOException e) { - path = xmlSourceFile.getPath(); - } - Utils.screenMessage("There has been a SAXException of type " - + sxe.getLocalizedMessage()); - if (null != xmlSourceFile) { - Utils.screenMessage(" when processing file " + path); - } else { - Utils.screenMessage(" as the input file is null."); - } - -// Leave for possible future debug option -// Utils.screenMessage(" The returned Java exception is below."); -// if (sxe.getException() != null) -// sxe.getException().printStackTrace(); -// else -// sxe.printStackTrace(); - } catch (ParserConfigurationException pce) { - String path; - try { - path = xmlSourceFile.getCanonicalPath(); - } catch (IOException e) { - path = xmlSourceFile.getPath(); - } - Utils - .screenMessage("There has been a ParserConfigurationException of type " - + pce.getLocalizedMessage()); - if (null != xmlSourceFile) { - Utils.screenMessage(" when processing file " + path); - } else { - Utils.screenMessage(" as the input file is null."); - } - -// Leave for possible future debug option -// Utils.screenMessage(" The returned Java exception is below."); -// pce.printStackTrace(); - - } catch (IOException ioe) { - String path; - try { - path = xmlSourceFile.getCanonicalPath(); - } catch (IOException e) { - path = xmlSourceFile.getPath(); - } - - Utils.screenMessage("Unable to open file " + path); - Utils.screenMessage(this.getContextMessage()); - - - - } - - return dom; - } - - /** - * @return an error message - usually over-ridden. - */ - private String getContextMessage() { - return "Check the file exists and can be read."; - } - - /** - * Set a parameter - * - * @param name - * @param value - */ - public void setParameter(String name, Object value) { - parameters.put(name, value); - } - - /** - * Get a parameter - * - * @param name - * @param value - * @return the value of the parameter - */ - public Object getParameter(String name, Object value) { - return parameters.get(name); - } - - - - /** - * @return Returns the filesActedOn. - */ - public int getFilesActedOn() { - return filesActedOn; - } -} \ No newline at end of file diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html deleted file mode 100644 index 316e4cd56e..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html +++ /dev/null @@ -1,140 +0,0 @@ - - - -Design documentation for org\apache\tuscany\sca\cpp\tools\services - - - - -
          - -

          Overview

          - - - -

          This package contains classes that generate C++ wrappers and -proxies for C++ implementations of SCA services.

          - -

          What the package does

          - -

          The Scagen class main method will take in an input and -output directory name. The input directory is taken to be the SCA module root -directory.  The tool will generate the wrapper and proxy headers and methods -bodies in the output directory.

          - -

          These proxies and wrappers enable the SCA for C++ runtime to -act as a conduit for SCA C++ calls in a type free manner. Client code can call -the type specific functions that are in the generated proxy classes. The call -is marshalled into a generic format and a SCA for C++ runtime function with a -standard signature is invoked. The details of the call are passed as data.

          - -

          On the other end of the runtime, a generated function with a -standard signature is called, this function will inspect the data that -represents the call’s method name and call the appropriate type specific -function in the C++ implementation.

          - -

          The Input Data Used

          - -

          The input directory passed to the Scagen method is taken to -be the SCA module root directory. All the sca.module and .fragment files in -that directory are inspected to resolve all the <component/> elements -within them.

          - -

          Each <component/> element found is inspected to see if -it has a <implementation.cpp/> element within it.

          - -

          Each <implementation.cpp/> element should have a -header attribute that represents a C++ header file that contains function -prototypes for the C++ implementation of the service. An optional class -attribute can be used to select one class if more than one that is present in -the header file. The default class is the one with the same name as the header -file. The tool will verify that the implementation header contains an -appropriate class prototype.

          - - - -

          The directory that contains the implementation header should -also contain a matching .componentType file for the equivalent SCA component. So -for example, a MyServiceImpl.h file would have a corresponding MyServiceImpl.componentType -file in the same directory.

          - - - -

          Each componentType file is inspected for <service/> -and <reference/> elements. For each <service/> element that is -found that contains a <interface.cpp/> element within it,

          - -

          the header attribute of the <interface.cpp/> is taken -as the filename of the C++ interface header for the SCA service.  This C++ -header file is opened and used as a means for specifying the SCA service -resulting in an appropriate wrapper and proxy being generated for this service -interface. Both method bodies and headers are generated in the given output -directory. The processing of a <reference/> element is the same except -that only a proxy header and implementation are generated.

          - - - - - -

          Outline Design: How it Works

          - - - -

          The basic approach is to scan in the XML files by first -creating a DOM document tree of them and then recursively rifling through the DOM  -with some generic code in the XMLFileActorClass by default this processing will -build up a map which maps the XPath location of attributes to their values. -Additionally subclasses can add to a “handlers map” which maps from the name of -a particular element to an object that implements the DomNodeHandler interface. -If the XMLFileActor code comes across any element that has an equivalent handler -in the handler map the objects handleNode method will be called.

          - -

          Typically the DomNodeHandler’s handle node interface will -use XPath to pull out the parameters that it is interested in from the -parameters map that is being built up by the generic code.

          - -

          This design was chosen as the Java level specified for the -original implementation did not have direct XPath query of XML data but it was -known that this would be available in Java 1.5 onwards. The design allows the -DOM and parameters map handling to be replaced in the future with JRE 1.5 code -with less impact on the rest of the code.

          - - - -

          The processing leads to the parsing of the C++ interface -files using the org\apache\tuscany\sca\cpp\tools\common package. This results -in a Headers object

          - -

          that contains a List of Signature objects, each one -representing a function prototype found in the header.

          - - - -

          We are aiming to get all the semantic data we want to use -into a DOM document (this represents the model of our input data) and then use -XSLT to create the 4 different views of this data:

          - -

          Proxy C++ header

          - -

          Proxy C++  body

          - -

          Wrapper C++ header

          - -

          Wrapper C++ body

          - - - -

          So we prepopulate the DOM with parameter data that comes -from the XML files and then iterate through the Signatures that are returned -from the C++ header parser transferring the useful data into the DOM.

          - - - -

          We than use 4 XSLT stylesheets to generate the C++ output -files as required.

          - -
          - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl deleted file mode 100644 index bc98f3a970..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - -/* - * 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 "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; - - - - - - - - - - _ - - _Proxy - - -extern "C" -{ - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - -* - -_Factory(ServiceWrapper* target) - { - return new (target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void - -_Destructor(void* proxy) - { - delete (*)proxy; - } -} - - -::(ServiceWrapper* targ) : target(targ) -{ -} - -::~() -{ - if (target) - delete target; -} - - - - - - - - - - - - _ - - _Proxy - -#include " - -.h" - - - - - - - - - - - _ - - _Proxy - - - - - - - -:: -( - -) -{ - - -} - - - - - - -) -{ - - -} - - - - - - - - - - - const - - - - - ) -{ - - -} - - - - , - - - - - - - - - - - - - - - -0 - - - - - - - - Operation operation(" - - ", - - ); - - - - - - - - - - target->invoke(operation); - - - - - - - - - - Operation operation(" - - ", - - ); - - - - target->invoke(operation); - - - - - - - - - - - - return; - - - - - - - return *(*)operation.getReturnValue(); - - - - return ()operation.getReturnValue(); - - - - return ret; - - - - return ret; - - - - - - - - - - - - return; - - - - - - - return *(*)operation.getReturnValue(); - - - - return ()operation.getReturnValue(); - - - - return ret; - - - - return ret; - - - - - - - - - - - - - - - - - - - - - commonj::sdo::DataObjectPtr ret = 0; - operation.setReturnValue((void*)&ret); - - - - - - ret; - - operation.setReturnValue((void*)&ret); - - - - - - - - - - - - - - - - - - - - commonj::sdo::DataObjectPtr ret = 0; - operation.setReturnValue((void*)&ret); - - - - - - ret; - - operation.setReturnValue((void*)&ret); - - - - - - - - - - - - - operation.setParameter(, (void*) -& - -); - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl deleted file mode 100644 index 3df2f83d53..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -/* - * 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 _h - - - - #define _h - - - - - - - - - - #include "" - - - - #include "tuscany/sca/core/ServiceWrapper.h" - - - - - - - - - - -class - - : public - -{ -public: - (tuscany::sca::ServiceWrapper*); - - virtual ~(); - - - -private: - tuscany::sca::ServiceWrapper* target; -}; - - - - - - - -#endif // _h - - - - - - - - - - - - - - - virtual - - -( - - - - - - - - const - - - - - - - , - - - -); - - - - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl deleted file mode 100644 index 912df6cf03..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -/* - * 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 "osoa/sca/sca.h" -using namespace osoa::sca; -using namespace tuscany::sca; - - - - - - - - - - - - - - - _ - - _Wrapper - -extern "C" -{ - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - -* - -_Factory(tuscany::sca::model::Service* target) - { - return new (target); - } -} - - -::(Service* target) : ComponentServiceWrapper(target) -{ - impl = (*)getImplementation(); -} - - -::~() -{ - releaseImplementation(); -} - -void* -::newImplementation() -{ - return new ; -} - -void -::deleteImplementation() -{ - delete impl; -} - -void ::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - - - - - throw ServiceRuntimeException("Invalid operation"); - -} - - - - - - _ - - _Wrapper - -#include " - -.h" - - - - - - - - - if (operationName == " - -") - { - - - - } - - - - - - - - - - - - - - - - - - return; - - - - - - - - - - - - - - - - p = *( - *)operation.getParameter(); - - - - const - p = ( - const - - )operation.getParameter(); - - - - DataObjectPtr& p = *(DataObjectPtr*)operation.getParameter(); - - - const & p = *( - const - - *)operation.getParameter(); - - - - - - - - - - - - - - - ; - - - ret = ; - - operation.setReturnValue((void*)&ret); - - - - operation.setReturnValue((void*) ); - - - *(DataObjectPtr*)operation.getReturnValue() = ; - - - *(*)operation.getReturnValue() = ; - - - - - - impl->( - - - - - - - - - -) - - - -p - - - - , - - - - - - - diff --git a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl b/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl deleted file mode 100644 index 72dc1fc5a6..0000000000 --- a/tags/cpp-sca-20060405/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -/* - * 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 _h - - - - #define _h - - - - - - - - - - #include "" - - - - #include "tuscany/sca/core/ComponentServiceWrapper.h" - - - - - - - - - - -class - - : public tuscany::sca::ComponentServiceWrapper -{ -public: - (tuscany::sca::model::Service* target); - - virtual ~(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); - -private: - - * impl; -}; - - - - - - - -#endif // _h - - - - - - - - - diff --git a/tags/cpp-sca-20060405/xsd/readme.txt b/tags/cpp-sca-20060405/xsd/readme.txt deleted file mode 100644 index 7252f56a11..0000000000 --- a/tags/cpp-sca-20060405/xsd/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -The XSDs describing the SCA model - diff --git a/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd b/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd deleted file mode 100644 index 293c63e83a..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-binding-sca.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd b/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd deleted file mode 100644 index 95052a52aa..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-binding-webservice.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-core.xsd b/tags/cpp-sca-20060405/xsd/sca-core.xsd deleted file mode 100644 index 48fac92913..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-core.xsd +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd b/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd deleted file mode 100644 index 970549176f..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-implementation-cpp.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd b/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd deleted file mode 100644 index 7745b4ffb7..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-implementation-java.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd b/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd deleted file mode 100644 index dd286afef6..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-interface-cpp.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd b/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd deleted file mode 100644 index a1955a2795..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-interface-java.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd b/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd deleted file mode 100644 index e857a77d84..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca-interface-wsdl.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-sca-20060405/xsd/sca.xsd b/tags/cpp-sca-20060405/xsd/sca.xsd deleted file mode 100644 index 619c38aaac..0000000000 --- a/tags/cpp-sca-20060405/xsd/sca.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-sca-20060405/xsd/tuscany.xsd b/tags/cpp-sca-20060405/xsd/tuscany.xsd deleted file mode 100644 index 335db42475..0000000000 --- a/tags/cpp-sca-20060405/xsd/tuscany.xsd +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3