From a1a3b2928198f75ef6609d582d2b814bb894f4fa Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 19 Nov 2009 17:58:53 +0000 Subject: Removing obsolete release candidate tag git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882227 13f79535-47bb-0310-9956-ffa450edef68 --- tags/cpp-1.0-incubating-M2-RC3/build.sh | 50 - tags/cpp-1.0-incubating-M2-RC3/build.txt | 107 - .../build_tuscany_sca.bat | 209 - .../build_tuscany_sdo.bat | 151 - tags/cpp-1.0-incubating-M2-RC3/etc/svn-config | 136 - tags/cpp-1.0-incubating-M2-RC3/etc/svn-ignore | 29 - tags/cpp-1.0-incubating-M2-RC3/sca/AUTHORS | 0 tags/cpp-1.0-incubating-M2-RC3/sca/COPYING | 203 - tags/cpp-1.0-incubating-M2-RC3/sca/ChangeLog | 0 .../sca/Developers Guide.txt | 346 - .../sca/GettingStarted.html | 396 - tags/cpp-1.0-incubating-M2-RC3/sca/INSTALL | 2 - tags/cpp-1.0-incubating-M2-RC3/sca/LICENSE | 177 - tags/cpp-1.0-incubating-M2-RC3/sca/Makefile.am | 53 - tags/cpp-1.0-incubating-M2-RC3/sca/NEWS | 0 tags/cpp-1.0-incubating-M2-RC3/sca/NOTICE | 2 - tags/cpp-1.0-incubating-M2-RC3/sca/README | 74 - tags/cpp-1.0-incubating-M2-RC3/sca/autogen.sh | 31 - tags/cpp-1.0-incubating-M2-RC3/sca/build.bat | 32 - tags/cpp-1.0-incubating-M2-RC3/sca/build.sh | 63 - tags/cpp-1.0-incubating-M2-RC3/sca/configure.ac | 212 - .../sca/doc/Axis2CWSService.html | 395 - .../sca/doc/CPPComponents.html | 333 - .../sca/doc/PythonExtension.html | 314 - .../sca/doc/RubyExtension.html | 308 - .../sca/doc/css/maven-base.css | 168 - .../sca/doc/css/maven-theme.css | 166 - tags/cpp-1.0-incubating-M2-RC3/sca/makebindist.sh | 70 - tags/cpp-1.0-incubating-M2-RC3/sca/makedist.sh | 70 - .../sca/projects/tuscany_sca/Build/Build.dsp | 63 - .../sca/projects/tuscany_sca/Build/Build.mak | 259 - .../sca/projects/tuscany_sca/build.cmd | 23 - .../sca/projects/tuscany_sca/tuscany_sca.dsw | 152 - .../sca/projects/tuscany_sca/tuscany_sca.ncb | Bin 1328128 -> 0 bytes .../sca/projects/tuscany_sca/tuscany_sca.opt | Bin 86016 -> 0 bytes .../tuscany_sca/tuscany_sca/tuscany_sca.dsp | 449 - .../tuscany_sca/tuscany_sca/tuscany_sca.mak | 570 -- .../tuscany_sca_cpp/tuscany_sca_cpp.dsp | 241 - .../tuscany_sca_cpp/tuscany_sca_cpp.mak | 390 - .../tuscany_sca_python/tuscany_sca_python.dsp | 205 - .../tuscany_sca_python/tuscany_sca_python.mak | 360 - .../tuscany_sca_ruby/tuscany_sca_ruby.dsp | 185 - .../tuscany_sca_ruby/tuscany_sca_ruby.mak | 340 - .../tuscany_sca_ws_dispatcher.dsp | 121 - .../tuscany_sca_ws_dispatcher.mak | 230 - .../tuscany_sca_ws_reference.dsp | 149 - .../tuscany_sca_ws_reference.mak | 300 - .../tuscany_sca_ws_service.dsp | 153 - .../tuscany_sca_ws_service.mak | 338 - .../sca/projectsvc7/tuscany_sca/tuscany_sca.sln | 73 - .../tuscany_sca/tuscany_sca/tuscany_sca.vcproj | 989 --- .../tuscany_sca_cpp/tuscany_sca_cpp.vcproj | 472 -- .../tuscany_sca_python/tuscany_sca_python.vcproj | 193 - .../tuscany_sca_ruby/tuscany_sca_ruby.vcproj | 184 - .../tuscany_sca_ws_dispatcher.vcproj | 143 - .../tuscany_sca_ws_reference.vcproj | 252 - .../tuscany_sca_ws_service.vcproj | 252 - .../sca/runtime/Makefile.am | 18 - .../sca/runtime/core/Makefile.am | 18 - .../sca/runtime/core/deploy.bat | 72 - .../sca/runtime/core/src/Makefile.am | 74 - .../core/src/tuscany/sca/core/Operation.cpp | 372 - .../runtime/core/src/tuscany/sca/core/Operation.h | 198 - .../core/src/tuscany/sca/core/SCARuntime.cpp | 487 -- .../runtime/core/src/tuscany/sca/core/SCARuntime.h | 262 - .../core/src/tuscany/sca/core/ServiceProxy.cpp | 51 - .../core/src/tuscany/sca/core/ServiceProxy.h | 81 - .../core/src/tuscany/sca/core/ServiceWrapper.cpp | 52 - .../core/src/tuscany/sca/core/ServiceWrapper.h | 79 - .../core/src/tuscany/sca/core/TuscanyRuntime.cpp | 111 - .../core/src/tuscany/sca/core/TuscanyRuntime.h | 95 - .../sca/runtime/core/src/tuscany/sca/export.h | 41 - .../sca/extension/ImplementationExtension.cpp | 48 - .../sca/extension/ImplementationExtension.h | 80 - .../tuscany/sca/extension/InterfaceExtension.cpp | 48 - .../src/tuscany/sca/extension/InterfaceExtension.h | 77 - .../sca/extension/ReferenceBindingExtension.cpp | 47 - .../sca/extension/ReferenceBindingExtension.h | 81 - .../sca/extension/ServiceBindingExtension.cpp | 47 - .../sca/extension/ServiceBindingExtension.h | 80 - .../runtime/core/src/tuscany/sca/model/Binding.cpp | 46 - .../runtime/core/src/tuscany/sca/model/Binding.h | 83 - .../core/src/tuscany/sca/model/Component.cpp | 146 - .../runtime/core/src/tuscany/sca/model/Component.h | 184 - .../core/src/tuscany/sca/model/ComponentType.cpp | 261 - .../core/src/tuscany/sca/model/ComponentType.h | 181 - .../core/src/tuscany/sca/model/Composite.cpp | 198 - .../runtime/core/src/tuscany/sca/model/Composite.h | 199 - .../src/tuscany/sca/model/CompositeReference.cpp | 67 - .../src/tuscany/sca/model/CompositeReference.h | 82 - .../src/tuscany/sca/model/CompositeService.cpp | 69 - .../core/src/tuscany/sca/model/CompositeService.h | 86 - .../core/src/tuscany/sca/model/Contract.cpp | 47 - .../runtime/core/src/tuscany/sca/model/Contract.h | 88 - .../core/src/tuscany/sca/model/Interface.cpp | 47 - .../runtime/core/src/tuscany/sca/model/Interface.h | 91 - .../core/src/tuscany/sca/model/ModelLoader.cpp | 1815 ---- .../core/src/tuscany/sca/model/ModelLoader.h | 129 - .../core/src/tuscany/sca/model/Reference.cpp | 72 - .../runtime/core/src/tuscany/sca/model/Reference.h | 129 - .../src/tuscany/sca/model/ReferenceBinding.cpp | 47 - .../core/src/tuscany/sca/model/ReferenceBinding.h | 95 - .../core/src/tuscany/sca/model/ReferenceType.cpp | 82 - .../core/src/tuscany/sca/model/ReferenceType.h | 139 - .../runtime/core/src/tuscany/sca/model/Service.cpp | 56 - .../runtime/core/src/tuscany/sca/model/Service.h | 103 - .../core/src/tuscany/sca/model/ServiceBinding.cpp | 47 - .../core/src/tuscany/sca/model/ServiceBinding.h | 89 - .../core/src/tuscany/sca/model/ServiceType.cpp | 58 - .../core/src/tuscany/sca/model/ServiceType.h | 109 - .../core/src/tuscany/sca/model/WSDLDefinition.cpp | 448 - .../core/src/tuscany/sca/model/WSDLDefinition.h | 143 - .../core/src/tuscany/sca/model/WSDLInterface.cpp | 102 - .../core/src/tuscany/sca/model/WSDLInterface.h | 100 - .../core/src/tuscany/sca/model/WSDLOperation.cpp | 58 - .../core/src/tuscany/sca/model/WSDLOperation.h | 147 - .../runtime/core/src/tuscany/sca/model/Wire.cpp | 48 - .../sca/runtime/core/src/tuscany/sca/model/Wire.h | 95 - .../core/src/tuscany/sca/util/DefaultLogWriter.cpp | 45 - .../core/src/tuscany/sca/util/DefaultLogWriter.h | 48 - .../core/src/tuscany/sca/util/Exceptions.cpp | 213 - .../runtime/core/src/tuscany/sca/util/Exceptions.h | 190 - .../sca/runtime/core/src/tuscany/sca/util/File.cpp | 224 - .../sca/runtime/core/src/tuscany/sca/util/File.h | 135 - .../core/src/tuscany/sca/util/FileLogWriter.cpp | 51 - .../core/src/tuscany/sca/util/FileLogWriter.h | 55 - .../runtime/core/src/tuscany/sca/util/Library.cpp | 160 - .../runtime/core/src/tuscany/sca/util/Library.h | 99 - .../core/src/tuscany/sca/util/LogWriter.cpp | 34 - .../runtime/core/src/tuscany/sca/util/LogWriter.h | 49 - .../runtime/core/src/tuscany/sca/util/Logger.cpp | 109 - .../sca/runtime/core/src/tuscany/sca/util/Logger.h | 91 - .../runtime/core/src/tuscany/sca/util/Logging.h | 67 - .../runtime/core/src/tuscany/sca/util/Utils.cpp | 562 -- .../sca/runtime/core/src/tuscany/sca/util/Utils.h | 69 - .../sca/runtime/core/test/Makefile.am | 19 - .../sca/runtime/extensions/Makefile.am | 44 - .../sca/runtime/extensions/cpp/Makefile.am | 24 - .../sca/runtime/extensions/cpp/deploy.bat | 74 - .../sca/runtime/extensions/cpp/src/Makefile.am | 48 - .../cpp/src/osoa/sca/ComponentContext.cpp | 139 - .../extensions/cpp/src/osoa/sca/ComponentContext.h | 114 - .../cpp/src/osoa/sca/CompositeContext.cpp | 113 - .../extensions/cpp/src/osoa/sca/CompositeContext.h | 98 - .../cpp/src/osoa/sca/ServiceRuntimeException.h | 101 - .../runtime/extensions/cpp/src/osoa/sca/export.h | 42 - .../sca/runtime/extensions/cpp/src/osoa/sca/sca.h | 31 - .../cpp/src/tuscany/sca/cpp/CPPExtension.cpp | 74 - .../cpp/src/tuscany/sca/cpp/CPPExtension.h | 57 - .../tuscany/sca/cpp/CPPImplementationExtension.cpp | 105 - .../tuscany/sca/cpp/CPPImplementationExtension.h | 72 - .../src/tuscany/sca/cpp/CPPInterfaceExtension.cpp | 74 - .../src/tuscany/sca/cpp/CPPInterfaceExtension.h | 72 - .../cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp | 193 - .../cpp/src/tuscany/sca/cpp/CPPServiceProxy.h | 116 - .../cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp | 198 - .../cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h | 162 - .../src/tuscany/sca/cpp/ComponentContextImpl.cpp | 163 - .../cpp/src/tuscany/sca/cpp/ComponentContextImpl.h | 123 - .../src/tuscany/sca/cpp/CompositeContextImpl.cpp | 106 - .../cpp/src/tuscany/sca/cpp/CompositeContextImpl.h | 93 - .../tuscany/sca/cpp/model/CPPImplementation.cpp | 82 - .../src/tuscany/sca/cpp/model/CPPImplementation.h | 150 - .../cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp | 62 - .../cpp/src/tuscany/sca/cpp/model/CPPInterface.h | 121 - .../tuscany/sca/cpp/model/CPPReferenceBinding.cpp | 59 - .../tuscany/sca/cpp/model/CPPReferenceBinding.h | 99 - .../tuscany/sca/cpp/model/CPPServiceBinding.cpp | 52 - .../src/tuscany/sca/cpp/model/CPPServiceBinding.h | 81 - .../extensions/cpp/xsd/sca-implementation-cpp.xsd | 49 - .../extensions/cpp/xsd/sca-interface-cpp.xsd | 43 - .../sca/runtime/extensions/php/Makefile.am | 24 - .../sca/runtime/extensions/php/src/Makefile.am | 45 - .../php/src/osoa/sca/ServiceRuntimeException.h | 115 - .../runtime/extensions/php/src/osoa/sca/export.h | 42 - .../php/src/tuscany/sca/php/PHPExtension.cpp | 73 - .../php/src/tuscany/sca/php/PHPExtension.h | 57 - .../tuscany/sca/php/PHPImplementationExtension.cpp | 78 - .../tuscany/sca/php/PHPImplementationExtension.h | 72 - .../php/src/tuscany/sca/php/PHPServiceWrapper.cpp | 405 - .../php/src/tuscany/sca/php/PHPServiceWrapper.h | 110 - .../tuscany/sca/php/model/PHPImplementation.cpp | 87 - .../src/tuscany/sca/php/model/PHPImplementation.h | 98 - .../tuscany/sca/php/model/PHPServiceBinding.cpp | 58 - .../src/tuscany/sca/php/model/PHPServiceBinding.h | 81 - .../extensions/php/xsd/sca-implementation-php.xsd | 39 - .../sca/runtime/extensions/python/Makefile.am | 24 - .../sca/runtime/extensions/python/deploy.bat | 77 - .../sca/runtime/extensions/python/src/Makefile.am | 62 - .../sca/runtime/extensions/python/src/deploy.cmd | 28 - .../sca/runtime/extensions/python/src/deploy.sh | 26 - .../src/tuscany/sca/python/PythonExtension.cpp | 75 - .../src/tuscany/sca/python/PythonExtension.h | 57 - .../sca/python/PythonImplementationExtension.cpp | 91 - .../sca/python/PythonImplementationExtension.h | 73 - .../sca/python/PythonInterfaceExtension.cpp | 122 - .../tuscany/sca/python/PythonInterfaceExtension.h | 72 - .../src/tuscany/sca/python/PythonServiceProxy.cpp | 99 - .../src/tuscany/sca/python/PythonServiceProxy.h | 86 - .../sca/python/PythonServiceRuntimeException.h | 100 - .../tuscany/sca/python/PythonServiceWrapper.cpp | 950 --- .../src/tuscany/sca/python/PythonServiceWrapper.h | 143 - .../python/src/tuscany/sca/python/export.h | 41 - .../sca/python/model/PythonImplementation.cpp | 87 - .../sca/python/model/PythonImplementation.h | 129 - .../tuscany/sca/python/model/PythonInterface.cpp | 52 - .../src/tuscany/sca/python/model/PythonInterface.h | 84 - .../sca/python/model/PythonReferenceBinding.cpp | 59 - .../sca/python/model/PythonReferenceBinding.h | 95 - .../sca/python/model/PythonServiceBinding.cpp | 58 - .../sca/python/model/PythonServiceBinding.h | 82 - .../python/src/tuscany/sca/python/sca_module.cpp | 380 - .../python/src/tuscany/sca/python/sca_proxy.py | 56 - .../python/src/tuscany/sca/python/sca_setup.py | 60 - .../python/xsd/sca-implementation-python.xsd | 49 - .../extensions/python/xsd/sca-interface-python.xsd | 62 - .../sca/runtime/extensions/ruby/Makefile.am | 24 - .../sca/runtime/extensions/ruby/deploy.bat | 64 - .../sca/runtime/extensions/ruby/src/Makefile.am | 54 - .../sca/runtime/extensions/ruby/src/deploy.cmd | 28 - .../sca/runtime/extensions/ruby/src/deploy.sh | 26 - .../extensions/ruby/src/tuscany/sca/ruby/Ruby.h | 39 - .../src/tuscany/sca/ruby/RubyCompositeContext.cpp | 77 - .../ruby/src/tuscany/sca/ruby/RubyExtension.cpp | 72 - .../ruby/src/tuscany/sca/ruby/RubyExtension.h | 58 - .../sca/ruby/RubyImplementationExtension.cpp | 79 - .../tuscany/sca/ruby/RubyImplementationExtension.h | 72 - .../ruby/src/tuscany/sca/ruby/RubyServiceProxy.cpp | 374 - .../ruby/src/tuscany/sca/ruby/RubyServiceProxy.h | 117 - .../src/tuscany/sca/ruby/RubyServiceWrapper.cpp | 724 -- .../ruby/src/tuscany/sca/ruby/RubyServiceWrapper.h | 96 - .../extensions/ruby/src/tuscany/sca/ruby/export.h | 38 - .../tuscany/sca/ruby/model/RubyImplementation.cpp | 154 - .../tuscany/sca/ruby/model/RubyImplementation.h | 140 - .../sca/ruby/model/RubyReferenceBinding.cpp | 59 - .../tuscany/sca/ruby/model/RubyReferenceBinding.h | 96 - .../tuscany/sca/ruby/model/RubyServiceBinding.cpp | 52 - .../tuscany/sca/ruby/model/RubyServiceBinding.h | 78 - .../ruby/xsd/sca-implementation-ruby.xsd | 39 - .../sca/runtime/extensions/sca/Makefile.am | 23 - .../runtime/extensions/sca/reference/Makefile.am | 18 - .../extensions/sca/reference/axis2c/Makefile.am | 18 - .../sca/reference/axis2c/src/Makefile.am | 38 - .../sca/binding/SCAServiceBindingExtension.cpp | 97 - .../sca/binding/SCAServiceBindingExtension.h | 74 - .../sca/binding/model/SCAServiceBinding.cpp | 46 - .../tuscany/sca/binding/model/SCAServiceBinding.h | 72 - .../sca/runtime/extensions/sca/service/Makefile.am | 18 - .../extensions/sca/service/axis2c/Makefile.am | 18 - .../extensions/sca/service/axis2c/src/Makefile.am | 38 - .../sca/binding/SCAReferenceBindingExtension.cpp | 97 - .../sca/binding/SCAReferenceBindingExtension.h | 74 - .../sca/binding/model/SCAReferenceBinding.cpp | 47 - .../sca/binding/model/SCAReferenceBinding.h | 71 - .../runtime/extensions/sca/xsd/sca-binding-sca.xsd | 37 - .../sca/runtime/extensions/ws/Makefile.am | 23 - .../sca/runtime/extensions/ws/deploy.bat | 45 - .../runtime/extensions/ws/reference/Makefile.am | 18 - .../extensions/ws/reference/axis2c/Makefile.am | 18 - .../extensions/ws/reference/axis2c/src/Makefile.am | 49 - .../axis2c/src/tuscany/sca/ws/Axis2Client.cpp | 717 -- .../axis2c/src/tuscany/sca/ws/Axis2Client.h | 67 - .../tuscany/sca/ws/WSServiceBindingExtension.cpp | 108 - .../src/tuscany/sca/ws/WSServiceBindingExtension.h | 75 - .../axis2c/src/tuscany/sca/ws/WSServiceWrapper.cpp | 110 - .../axis2c/src/tuscany/sca/ws/WSServiceWrapper.h | 67 - .../src/tuscany/sca/ws/model/WSServiceBinding.cpp | 134 - .../src/tuscany/sca/ws/model/WSServiceBinding.h | 137 - .../sca/runtime/extensions/ws/reference/deploy.bat | 65 - .../sca/runtime/extensions/ws/service/Makefile.am | 18 - .../extensions/ws/service/axis2c/Makefile.am | 18 - .../extensions/ws/service/axis2c/src/Makefile.am | 86 - .../extensions/ws/service/axis2c/src/axis2.xml | 181 - .../extensions/ws/service/axis2c/src/deploy.cmd | 39 - .../extensions/ws/service/axis2c/src/deploy.sh | 47 - .../extensions/ws/service/axis2c/src/module.xml | 25 - .../extensions/ws/service/axis2c/src/services.xml | 25 - .../axis2c/src/tuscany/sca/ws/Axis2Dispatcher.cpp | 176 - .../src/tuscany/sca/ws/Axis2DispatcherModule.cpp | 149 - .../axis2c/src/tuscany/sca/ws/Axis2Service.cpp | 506 -- .../axis2c/src/tuscany/sca/ws/Axis2Utils.cpp | 72 - .../service/axis2c/src/tuscany/sca/ws/Axis2Utils.h | 46 - .../tuscany/sca/ws/WSReferenceBindingExtension.cpp | 108 - .../tuscany/sca/ws/WSReferenceBindingExtension.h | 74 - .../axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp | 587 -- .../axis2c/src/tuscany/sca/ws/WSServiceProxy.h | 96 - .../tuscany/sca/ws/model/WSReferenceBinding.cpp | 139 - .../src/tuscany/sca/ws/model/WSReferenceBinding.h | 153 - .../sca/runtime/extensions/ws/service/deploy.bat | 73 - .../runtime/extensions/ws/service/deploymodule.bat | 69 - .../extensions/ws/xsd/sca-binding-webservice.xsd | 55 - tags/cpp-1.0-incubating-M2-RC3/sca/samples/AUTHORS | 0 .../sca/samples/BigBank/Makefile.am | 21 - .../sca/samples/BigBank/README | 30 - .../sca/samples/BigBank/README.html | 427 - .../BigBank/bigbank.account/AccountDataService.h | 64 - .../AccountDataServiceImpl.componentType | 28 - .../bigbank.account/AccountDataServiceImpl.cpp | 136 - .../bigbank.account/AccountDataServiceImpl.h | 61 - .../BigBank/bigbank.account/AccountService.h | 52 - .../BigBank/bigbank.account/AccountService.wsdl | 126 - .../AccountServiceImpl.componentType | 40 - .../BigBank/bigbank.account/AccountServiceImpl.cpp | 130 - .../BigBank/bigbank.account/AccountServiceImpl.h | 44 - .../samples/BigBank/bigbank.account/Makefile.am | 59 - .../BigBank/bigbank.account/StockQuoteService.h | 36 - .../StockQuoteServiceImpl.componentType | 29 - .../bigbank.account/StockQuoteServiceImpl.cpp | 72 - .../bigbank.account/StockQuoteServiceImpl.h | 36 - .../BigBank/bigbank.account/StockQuoteTypes.xsd | 37 - .../BigBank/bigbank.account/StockQuoteWebService.h | 40 - .../bigbank.account/StockQuoteWebService.wsdl | 165 - .../bigbank.account/bigbank.account.composite | 49 - .../BigBank/bigbank.account/runwsserver.bat | 51 - .../samples/BigBank/bigbank.account/runwsserver.sh | 48 - .../BigBank/bigbank.accountmanagement.composite | 30 - .../BigBank/bigbank.client/AccountClient.cpp | 129 - .../sca/samples/BigBank/bigbank.client/Makefile.am | 49 - .../samples/BigBank/bigbank.client/runclient.bat | 50 - .../samples/BigBank/bigbank.client/runclient.sh | 48 - .../bigbank.phpwsclient/AccountService.wsdl | 126 - .../BigBank/bigbank.phpwsclient/Makefile.am | 22 - .../sca/samples/BigBank/bigbank.phpwsclient/README | 137 - .../BigBank/bigbank.phpwsclient/bigaccount.php | 113 - .../BigBank/bigbank.phpwsclient/bigwelcome.php | 44 - .../BigBank/bigbank.wsclient/AccountWSClient.cpp | 184 - .../samples/BigBank/bigbank.wsclient/Makefile.am | 44 - .../bigbank.wsclient/axis2_Account_stub.cpp | 111 - .../BigBank/bigbank.wsclient/axis2_Account_stub.h | 71 - .../BigBank/bigbank.wsclient/runwsclient.bat | 32 - .../BigBank/bigbank.wsclient/runwsclient.sh | 31 - .../sca/samples/BigBank/deploy.bat | 67 - .../sca/samples/BigBank/deployclient.bat | 63 - .../sca/samples/BigBank/deploywsclient.bat | 63 - tags/cpp-1.0-incubating-M2-RC3/sca/samples/COPYING | 203 - .../sca/samples/Calculator/Makefile.am | 21 - .../sca/samples/Calculator/README | 23 - .../sca/samples/Calculator/README.html | 254 - .../sca/samples/Calculator/deploy.bat | 67 - .../sca/samples/Calculator/deployclient.bat | 63 - .../sca/samples/Calculator/deploywsclient.bat | 63 - .../sample.calculator.client/CalculatorClient.cpp | 160 - .../sample.calculator.client/Makefile.am | 55 - .../sample.calculator.client/runclient.bat | 48 - .../sample.calculator.client/runclient.sh | 47 - .../sample.calculator.solution.composite | 29 - .../CalculatorWSClient.cpp | 186 - .../sample.calculator.wsclient/Makefile.am | 48 - .../axis2_Calculator_stub.cpp | 178 - .../axis2_Calculator_stub.h | 85 - .../sample.calculator.wsclient/runwsclient.bat | 32 - .../sample.calculator.wsclient/runwsclient.sh | 30 - .../Calculator/sample.calculator/Calculator.h | 36 - .../Calculator/sample.calculator/Calculator.wsdl | 161 - .../sample.calculator/CalculatorImpl.componentType | 31 - .../sample.calculator/CalculatorImpl.cpp | 89 - .../Calculator/sample.calculator/CalculatorImpl.h | 41 - .../samples/Calculator/sample.calculator/Divide.h | 34 - .../sample.calculator/DivideImpl.componentType | 27 - .../Calculator/sample.calculator/DivideImpl.cpp | 47 - .../Calculator/sample.calculator/DivideImpl.h | 39 - .../Calculator/sample.calculator/Makefile.am | 55 - .../Calculator/sample.calculator/runwsserver.bat | 49 - .../Calculator/sample.calculator/runwsserver.sh | 48 - .../sample.calculator/sample.calculator.composite | 39 - .../sca/samples/ChangeLog | 0 .../sca/samples/GettingStarted.html | 133 - tags/cpp-1.0-incubating-M2-RC3/sca/samples/INSTALL | 2 - tags/cpp-1.0-incubating-M2-RC3/sca/samples/LICENSE | 177 - .../sca/samples/Makefile.am | 36 - .../sca/samples/MyValue/Client/Makefile.am | 28 - .../sca/samples/MyValue/Client/MyValueClient.cpp | 184 - .../sca/samples/MyValue/Makefile.am | 39 - .../MyValue/MyValueComposite/CustomerInfo.fragment | 39 - .../MyValueComposite/CustomerInfo/CustomerInfo.h | 32 - .../CustomerInfo/CustomerInfoImpl.componentType | 33 - .../CustomerInfo/CustomerInfoImpl.cpp | 81 - .../CustomerInfo/CustomerInfoImpl.h | 38 - .../MyValueComposite/CustomerInfo/Makefile.am | 32 - .../samples/MyValue/MyValueComposite/Makefile.am | 27 - .../MyValue/MyValueComposite/MyValue/Makefile.am | 34 - .../MyValue/MyValueComposite/MyValue/MyValue.h | 34 - .../MyValue/MyValueImpl.componentType | 39 - .../MyValueComposite/MyValue/MyValueImpl.cpp | 147 - .../MyValue/MyValueComposite/MyValue/MyValueImpl.h | 37 - .../MyValueComposite/MyValue/MyValueService.wsdl | 84 - .../MyValueComposite/MyValue/MyValueService.xsd | 42 - .../StockQuoteService/StockQuoteService.h | 34 - .../StockQuoteService/StockQuoteService.wsdl | 157 - .../samples/MyValue/MyValueComposite/sca.composite | 55 - .../samples/MyValue/MyValueSubsystem/sca.subsystem | 30 - .../sca/samples/MyValue/runMyValueClient.sh | 53 - .../sca/samples/MyValue/server.wsdd | 40 - tags/cpp-1.0-incubating-M2-RC3/sca/samples/NEWS | 0 tags/cpp-1.0-incubating-M2-RC3/sca/samples/NOTICE | 2 - .../sca/samples/PythonCalculator/Makefile.am | 21 - .../sca/samples/PythonCalculator/README | 24 - .../sca/samples/PythonCalculator/README.html | 268 - .../sca/samples/PythonCalculator/deploy.cmd | 57 - .../sample.calculator.client/Makefile.am | 23 - .../sample.calculator.client/calculator_client.py | 50 - .../sample.calculator.client/runclient.bat | 50 - .../sample.calculator.client/runclient.sh | 49 - .../sample.calculator.solution.composite | 32 - .../sample.calculator.wsclient/Calculator.wsdl | 114 - .../sample.calculator.wsclient/Makefile.am | 23 - .../calculator_wsclient.py | 50 - .../sample.calculator.wsclient/runwsclient.bat | 50 - .../sample.calculator.wsclient/runwsclient.sh | 49 - .../sample.calculator.wsclient.composite | 30 - .../sample.calculator/Calculator.wsdl | 161 - .../sample.calculator/CalculatorImpl.componentType | 32 - .../sample.calculator/CalculatorImpl.py | 56 - .../sample.calculator/DivideImpl.componentType | 31 - .../sample.calculator/DivideImpl.py | 65 - .../PythonCalculator/sample.calculator/Makefile.am | 24 - .../sample.calculator/runwsserver.bat | 50 - .../sample.calculator/runwsserver.sh | 49 - .../sample.calculator/sample.calculator.composite | 40 - tags/cpp-1.0-incubating-M2-RC3/sca/samples/README | 2 - .../sca/samples/RubyBank/Makefile.am | 21 - .../sca/samples/RubyBank/README | 22 - .../sca/samples/RubyBank/README.html | 251 - .../bigbank.account/AccountDataServiceImpl.rb | 72 - .../RubyBank/bigbank.account/AccountService.wsdl | 126 - .../RubyBank/bigbank.account/AccountServiceImpl.rb | 94 - .../samples/RubyBank/bigbank.account/Makefile.am | 24 - .../bigbank.account/StockQuoteServiceImpl.rb | 41 - .../RubyBank/bigbank.account/StockQuoteTypes.xsd | 40 - .../bigbank.account/StockQuoteWebService.wsdl | 165 - .../bigbank.account/bigbank.account.composite | 53 - .../RubyBank/bigbank.account/runwsserver.bat | 51 - .../RubyBank/bigbank.account/runwsserver.sh | 48 - .../RubyBank/bigbank.accountmanagement.composite | 29 - .../RubyBank/bigbank.client/AccountClient.rb | 26 - .../samples/RubyBank/bigbank.client/Makefile.am | 23 - .../samples/RubyBank/bigbank.client/runclient.bat | 51 - .../samples/RubyBank/bigbank.client/runclient.sh | 49 - .../sca/samples/RubyBank/deploy.cmd | 53 - .../sca/samples/RubyCalculator/Makefile.am | 21 - .../sca/samples/RubyCalculator/README | 23 - .../sca/samples/RubyCalculator/README.html | 265 - .../sca/samples/RubyCalculator/deploy.cmd | 56 - .../sample.calculator.client/CalculatorClient.rb | 25 - .../sample.calculator.client/Makefile.am | 23 - .../sample.calculator.client/runclient.bat | 49 - .../sample.calculator.client/runclient.sh | 49 - .../sample.calculator.solution.composite | 32 - .../sample.calculator.wsclient/Calculator.wsdl | 114 - .../CalculatorWSClient.rb | 25 - .../sample.calculator.wsclient/Makefile.am | 23 - .../sample.calculator.wsclient/runwsclient.bat | 49 - .../sample.calculator.wsclient/runwsclient.sh | 48 - .../sample.calculator.wsclient.composite | 29 - .../sample.calculator/Calculator.wsdl | 114 - .../sample.calculator/CalculatorImpl.rb | 48 - .../RubyCalculator/sample.calculator/DivideImpl.rb | 39 - .../RubyCalculator/sample.calculator/Makefile.am | 24 - .../sample.calculator/runwsserver.bat | 49 - .../sample.calculator/runwsserver.sh | 48 - .../sample.calculator/sample.calculator.composite | 40 - .../supplychain.demo.solution.composite | 34 - .../supplychain.demo/DemoClientImpl.componentType | 33 - .../supplychain.demo/supplychain.demo.composite | 41 - .../supplychain.logging/LoggerImpl.componentType | 28 - .../supplychain.logging/LoggingFacility.wsdl | 37 - .../supplychain.logging.composite | 34 - .../supplychain.manufacturer/Manufacturer.wsdl | 39 - .../ManufacturerImpl.componentType | 39 - .../WarehouseCallback.wsdl | 38 - .../supplychain.manufacturer.composite | 50 - .../supplychain.manufacturerA.solution.composite | 30 - .../supplychain.manufacturerB.solution.composite | 30 - .../supplychain.manufacturerC.solution.composite | 30 - .../supplychain.retailer.solution.composite | 66 - .../SupplyChain/supplychain.retailer/Retailer.wsdl | 39 - .../RetailerImpl.componentType | 37 - .../supplychain.retailer.composite | 46 - .../supplychain.warehouse/Warehouse.wsdl | 38 - .../WarehouseCallbackImpl.componentType | 34 - .../WarehouseImpl.componentType | 39 - .../supplychain.warehouse.composite | 62 - .../sca/samples/autogen.sh | 31 - .../cpp-1.0-incubating-M2-RC3/sca/samples/build.sh | 62 - .../sca/samples/configure.ac | 168 - .../BigBank/AccountClient/AccountClient.dsp | 116 - .../BigBank/AccountClient/AccountClient.mak | 214 - .../projects/BigBank/Accounts/Accounts.dsp | 253 - .../projects/BigBank/Accounts/Accounts.mak | 344 - .../ides/devstudio6/projects/BigBank/BigBank.dsw | 77 - .../ides/devstudio6/projects/BigBank/BigBank.ncb | Bin 164864 -> 0 bytes .../ides/devstudio6/projects/BigBank/BigBank.opt | Bin 64512 -> 0 bytes .../devstudio6/projects/BigBank/Build/Build.dsp | 63 - .../devstudio6/projects/BigBank/Build/Build.mak | 152 - .../BigBank/WSAccountClient/WSAccountClient.dsp | 120 - .../BigBank/WSAccountClient/WSAccountClient.mak | 189 - .../ides/devstudio6/projects/BigBank/build.cmd | 24 - .../devstudio6/projects/Calculator/Build/Build.dsp | 63 - .../devstudio6/projects/Calculator/Build/Build.mak | 155 - .../devstudio6/projects/Calculator/Calculator.dsw | 77 - .../devstudio6/projects/Calculator/Calculator.ncb | Bin 148480 -> 0 bytes .../devstudio6/projects/Calculator/Calculator.opt | Bin 64512 -> 0 bytes .../projects/Calculator/Calculator/Calculator.dsp | 197 - .../projects/Calculator/Calculator/Calculator.mak | 328 - .../projects/Calculator/Client/Client.dsp | 113 - .../projects/Calculator/Client/Client.mak | 214 - .../projects/Calculator/WSClient/WSClient.dsp | 120 - .../projects/Calculator/WSClient/WSClient.mak | 222 - .../ides/devstudio6/projects/Calculator/build.cmd | 24 - .../ides/devstudio6/projects/Calculator/deploy.cmd | 73 - .../devstudio6/projects/Calculator/wsdeploy.cmd | 64 - .../BigBank/AccountClient/AccountClient.vcproj | 157 - .../projects/BigBank/Accounts/Accounts.vcproj | 270 - .../ides/devstudio7/projects/BigBank/BigBank.sln | 37 - .../BigBank/WSAccountClient/WSAccountClient.vcproj | 163 - .../devstudio7/projects/Calculator/Calculator.sln | 39 - .../devstudio7/projects/Calculator/Calculator.suo | Bin 13312 -> 0 bytes .../Calculator/Calculator/Calculator.vcproj | 224 - .../projects/Calculator/Client/Client.vcproj | 157 - .../projects/Calculator/WSClient/WSClient.vcproj | 166 - .../sca/samples/scagen.bat | 37 - tags/cpp-1.0-incubating-M2-RC3/sca/scatest.bat | 47 - tags/cpp-1.0-incubating-M2-RC3/sca/scatest.sh | 53 - tags/cpp-1.0-incubating-M2-RC3/sca/test/AUTHORS | 0 tags/cpp-1.0-incubating-M2-RC3/sca/test/COPYING | 203 - tags/cpp-1.0-incubating-M2-RC3/sca/test/ChangeLog | 0 tags/cpp-1.0-incubating-M2-RC3/sca/test/INSTALL | 10 - tags/cpp-1.0-incubating-M2-RC3/sca/test/LICENSE | 177 - .../cpp-1.0-incubating-M2-RC3/sca/test/Makefile.am | 18 - tags/cpp-1.0-incubating-M2-RC3/sca/test/NEWS | 0 tags/cpp-1.0-incubating-M2-RC3/sca/test/NOTICE | 2 - tags/cpp-1.0-incubating-M2-RC3/sca/test/README | 0 .../WSEntryPointTestRPCClient.c | 148 - .../WSEntryPointTestRPCClient.vcproj | 135 - .../WSEntryPointTestRPC.h | 30 - .../WSEntryPointTestRPC.wsdl | 62 - .../WSEntryPointTestRPCComposite.vcproj | 170 - .../WSEntryPointTestRPCImpl.componentType | 10 - .../WSEntryPointTestRPCImpl.cpp | 38 - .../WSEntryPointTestRPCImpl.h | 36 - ...estRPCImpl_WSEntryPointTestRPCService_Proxy.cpp | 63 - ...tTestRPCImpl_WSEntryPointTestRPCService_Proxy.h | 34 - ...tRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp | 70 - ...estRPCImpl_WSEntryPointTestRPCService_Wrapper.h | 36 - .../WSEntryPointTestRPCComposite/sca.composite | 19 - .../WSEntryPointTestRPCComposite/services.xml | 30 - .../WSEntryPointTestRPCSubsystem/sca.subsystem | 23 - .../WSEntryPointTestRPCSubsystem/sca.subsystem | 23 - .../WSEntryPointTestRPC.h | 30 - .../WSEntryPointTestRPC.wsdl | 62 - .../WSEntryPointTestRPCImpl.componentType | 10 - .../WSEntryPointTestRPCImpl.h | 36 - .../WSEntryPointTestRPCComposite/sca.composite | 19 - tags/cpp-1.0-incubating-M2-RC3/sca/test/autogen.sh | 31 - tags/cpp-1.0-incubating-M2-RC3/sca/test/build.sh | 42 - .../sca/test/configure.ac | 34 - .../sca/test/ws.binding.service/deploy.cmd | 57 - .../ws.binding.service.client/TestClient.c | 414 - .../ws.binding.service.client/runclient.bat | 33 - .../ws.binding.service.client.vcproj | 138 - .../test/ws.binding.service/ws.binding.service.sln | 37 - .../ws.binding.service/ws.binding.service/Test.h | 50 - .../ws.binding.service/Test.wsdl | 531 -- .../ws.binding.service/TestImpl.componentType | 8 - .../ws.binding.service/TestImpl.cpp | 158 - .../ws.binding.service/TestImpl.h | 54 - .../ws.binding.service/services.xml | 62 - .../ws.binding.service.composite | 16 - .../ws.binding.service.solution.composite | 27 - .../ws.binding.service/ws.binding.service.vcproj | 170 - .../sca/test/ws.service.interop/Makefile.am | 25 - .../sca/test/ws.service.interop/deploy.cmd | 58 - .../test/ws.service.interop/resources/Makefile.am | 25 - .../ws.service.interop/resources/datagraph.xsd | 77 - .../ws.service.interop/resources/importschema.xsd | 30 - .../test/ws.service.interop/resources/interop.wsdl | 1814 ---- .../ws.service.interop/resources/interop01-in.xml | 22 - .../ws.service.interop/resources/interop01.xsd | 33 - .../ws.service.interop/resources/interop02-in.xml | 27 - .../ws.service.interop/resources/interop02.xsd | 36 - .../ws.service.interop/resources/interop03-in.xml | 22 - .../ws.service.interop/resources/interop03.xsd | 31 - .../ws.service.interop/resources/interop04-in.xml | 20 - .../ws.service.interop/resources/interop04.xsd | 29 - .../ws.service.interop/resources/interop06-in.xml | 21 - .../ws.service.interop/resources/interop06.xsd | 23 - .../ws.service.interop/resources/interop07-in.xml | 21 - .../ws.service.interop/resources/interop07.xsd | 28 - .../ws.service.interop/resources/interop08-in.xml | 21 - .../ws.service.interop/resources/interop08.xsd | 35 - .../ws.service.interop/resources/interop09-in.xml | 21 - .../ws.service.interop/resources/interop09.xsd | 30 - .../ws.service.interop/resources/interop10-in.xml | 21 - .../ws.service.interop/resources/interop10.xsd | 32 - .../ws.service.interop/resources/interop11-in.xml | 23 - .../ws.service.interop/resources/interop11.xsd | 34 - .../ws.service.interop/resources/interop12-in.xml | 21 - .../ws.service.interop/resources/interop12.xsd | 33 - .../ws.service.interop/resources/interop13-in.xml | 21 - .../ws.service.interop/resources/interop13.xsd | 36 - .../ws.service.interop/resources/interop14-in.xml | 23 - .../ws.service.interop/resources/interop14.xsd | 33 - .../ws.service.interop/resources/interop15-in.xml | 23 - .../ws.service.interop/resources/interop15.xsd | 33 - .../ws.service.interop/resources/interop16-in.xml | 23 - .../ws.service.interop/resources/interop16.xsd | 33 - .../ws.service.interop/resources/interop17-in.xml | 22 - .../ws.service.interop/resources/interop17.xsd | 42 - .../ws.service.interop/resources/interop18-in.xml | 21 - .../ws.service.interop/resources/interop18.xsd | 30 - .../ws.service.interop/resources/interop19-in.xml | 23 - .../ws.service.interop/resources/interop19.xsd | 34 - .../ws.service.interop/resources/interop20-in.xml | 23 - .../ws.service.interop/resources/interop20.xsd | 36 - .../ws.service.interop/resources/interop21-in.xml | 23 - .../ws.service.interop/resources/interop21.xsd | 35 - .../ws.service.interop/resources/interop22-in.xml | 24 - .../ws.service.interop/resources/interop22.xsd | 44 - .../ws.service.interop/resources/interop23-in.xml | 23 - .../ws.service.interop/resources/interop23.xsd | 35 - .../ws.service.interop/resources/interop24-in.xml | 24 - .../ws.service.interop/resources/interop24.xsd | 40 - .../ws.service.interop/resources/interop25-in.xml | 23 - .../ws.service.interop/resources/interop26-in.xml | 23 - .../ws.service.interop/resources/interop26.xsd | 41 - .../ws.service.interop/resources/interop27-in.xml | 23 - .../ws.service.interop/resources/interop28-in.xml | 26 - .../ws.service.interop/resources/interop28.xsd | 36 - .../ws.service.interop/resources/interop29-in.xml | 23 - .../ws.service.interop/resources/interop29.xsd | 37 - .../ws.service.interop/resources/interop30-in.xml | 28 - .../ws.service.interop/resources/interop30.xsd | 36 - .../ws.service.interop/resources/interop31-in.xml | 23 - .../ws.service.interop/resources/interop31.xsd | 39 - .../ws.service.interop/resources/interop32-in.xml | 32 - .../ws.service.interop/resources/interop32.xsd | 56 - .../ws.service.interop/resources/interop33-in.xml | 31 - .../ws.service.interop/resources/interop33.xsd | 46 - .../ws.service.interop/resources/interop34-in.xml | 21 - .../ws.service.interop/resources/interop34.xsd | 29 - .../ws.service.interop/resources/interop35-in.xml | 23 - .../ws.service.interop/resources/interop35.xsd | 29 - .../ws.service.interop/resources/interop36-in.xml | 21 - .../ws.service.interop/resources/interop36.xsd | 28 - .../ws.service.interop/resources/interop37-in.xml | 22 - .../ws.service.interop/resources/interop37.xsd | 45 - .../ws.service.interop/resources/interop38-in.xml | 24 - .../ws.service.interop/resources/interop38.xsd | 37 - .../ws.service.interop/resources/interop39-in.xml | 22 - .../ws.service.interop/resources/interop40-in.xml | 39 - .../ws.service.interop/resources/interop40.xsd | 49 - .../ws.service.interop/resources/interop41-in.xml | 23 - .../ws.service.interop/resources/interop41.xsd | 28 - .../ws.service.interop/resources/interop42-in.xml | 23 - .../ws.service.interop/resources/interop42.xsd | 28 - .../ws.service.interop/resources/interop43-in.xml | 23 - .../ws.service.interop/resources/interop43.xsd | 29 - .../ws.service.interop/resources/interop44-in.xml | 23 - .../ws.service.interop/resources/interop44.xsd | 29 - .../ws.service.interop/resources/interop45-in.xml | 23 - .../ws.service.interop/resources/interop45.xsd | 30 - .../ws.service.interop/resources/interop46-in.xml | 23 - .../ws.service.interop/resources/interop46.xsd | 30 - .../ws.service.interop/resources/interop47-in.xml | 25 - .../ws.service.interop/resources/interop47.xsd | 31 - .../ws.service.interop/resources/interop50-in.xml | 78 - .../ws.service.interop/resources/interop50.xsd | 79 - .../sca/test/ws.service.interop/runtest.sh | 31 - .../ws.service.interop.client/Makefile.am | 51 - .../ws.service.interop.client/TestClient.cpp | 375 - .../ws.service.interop.client/runclient.bat | 32 - .../ws.service.interop.client/runclient.sh | 42 - .../ws.service.interop.client.vcproj | 139 - .../test/ws.service.interop/ws.service.interop.sln | 30 - .../ws.service.interop/Makefile.am | 53 - .../ws.service.interop/ws.service.interop/Test.h | 82 - .../ws.service.interop/TestImpl.componentType | 8 - .../ws.service.interop/TestImpl.cpp | 509 -- .../ws.service.interop/TestImpl.h | 84 - .../ws.service.interop/runwsserver.bat | 49 - .../ws.service.interop/runwsserver.sh | 49 - .../ws.service.interop.composite | 16 - .../ws.service.interop.solution.composite | 27 - .../ws.service.interop/ws.service.interop.vcproj | 170 - .../sca/tools/Makefile.am | 18 - .../sca/tools/scagen/META-INF/LICENSE | 177 - .../sca/tools/scagen/META-INF/NOTICE | 2 - .../sca/tools/scagen/META-INF/README | 19 - .../sca/tools/scagen/Makefile.am | 36 - .../sca/tools/scagen/build.xml | 155 - .../sca/cpp/tools/junit/CalculatorTest.java | 32 - .../sca/cpp/tools/junit/EnvHandlerTest.java | 47 - ...mplClassWithNameSpaceButNotInClassAttrTest.java | 90 - .../tools/junit/ImplClassWithNameSpaceTest.java | 47 - ...ntfClassWithNameSpaceButNotInClassAttrTest.java | 47 - .../tools/junit/IntfClassWithNameSpaceTest.java | 47 - .../junit/MissingCompositeAndFragmentTest.java | 47 - .../junit/SimplePublicPrivateProtectedTest.java | 48 - .../sca/cpp/tools/junit/TestAllCompositesTest.java | 88 - .../sca/cpp/tools/junit/TestDeployAssistTool.java | 96 - .../sca/cpp/tools/junit/TuscanyTestCase.java | 340 - .../junit/scripts_for_standalone_testing/go.cmd | 20 - .../go_no_dir_option.cmd | 19 - .../go_no_input_dir.cmd | 19 - .../go_no_output_dir.cmd | 19 - .../refresh-tools-jar.cmd | 19 - .../CalculatorCompositeAndComponent/Calculator.h | 36 - .../CalculatorImpl.componentType | 25 - .../CalculatorImpl.h | 37 - .../CalculatorCompositeAndComponent/sca.composite | 28 - .../otherSubFolder/CalculatorBack.h | 36 - .../otherSubFolder/CalculatorForward.h | 35 - .../CalculatorSlashDirectionTest/sca.composite | 31 - .../subFolder/CalculatorBackImpl.componentType | 26 - .../subFolder/CalculatorBackImpl.h | 37 - .../subFolder/CalculatorForwardImpl.componentType | 25 - .../subFolder/CalculatorForwardImpl.h | 37 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 98 - .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 38 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 94 - .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 47 - .../MyValueServiceComposite/CustomerInfo.fragment | 39 - .../MyValueServiceComposite/CustomerInfo.h | 36 - .../CustomerInfoImpl.componentType | 33 - .../MyValueServiceComposite/CustomerInfoImpl.h | 49 - .../composites/MyValueServiceComposite/MyValue.h | 40 - .../MyValueImpl.componentType | 39 - .../MyValueServiceComposite/MyValueImpl.hpp | 43 - .../MyValueImpl_stockQuote_Proxy.h | 38 - .../MyValueServiceComposite/StockQuoteService.h | 37 - .../MyValueServiceComposite/sca.composite | 60 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 41 - .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 52 - .../MyValue.h | 40 - .../MyValueImpl.componentType | 39 - .../MyValueImpl.hpp | 43 - .../MyValueImpl_stockQuote_Proxy.h | 38 - .../StockQuoteService.h | 37 - .../sca.composite | 60 - .../MyValue.h | 75 - .../MyValueImpl.componentType | 56 - .../MyValueImpl.hpp | 89 - .../sca.composite | 96 - .../MyValue.h | 43 - .../MyValueImpl.componentType | 29 - .../MyValueImpl.hpp | 43 - .../sca.composite | 49 - .../MyValue.h | 41 - .../MyValueImpl.componentType | 29 - .../MyValueImpl.hpp | 43 - .../sca.composite | 49 - .../CustomerInfo.fragmentX | 38 - .../sca.compositeX | 60 - .../CustomerInfo.fragment | 39 - .../CustomerInfo.h | 41 - .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 49 - .../MyValueServiceCompositeTwoClasses/MyValue.h | 40 - .../MyValueImpl.componentType | 39 - .../MyValueImpl.hpp | 43 - .../MyValueImpl_stockQuote_Proxy.h | 38 - .../StockQuoteService.h | 37 - .../sca.composite | 60 - .../CustomerInfo.fragment | 40 - .../CustomerInfo.h | 45 - .../CustomerInfoImpl.componentType | 33 - .../CustomerInfoImpl.h | 39 - .../CalculatorImpl_CalculatorService_Proxy.cpp | 67 - .../CalculatorImpl_CalculatorService_Proxy.h | 41 - .../CalculatorImpl_CalculatorService_Wrapper.cpp | 76 - .../CalculatorImpl_CalculatorService_Wrapper.h | 43 - .../CalculatorBackImpl_CalculatorService_Proxy.cpp | 78 - .../CalculatorBackImpl_CalculatorService_Proxy.h | 42 - ...alculatorBackImpl_CalculatorService_Wrapper.cpp | 83 - .../CalculatorBackImpl_CalculatorService_Wrapper.h | 43 - ...lculatorForwardImpl_CalculatorService_Proxy.cpp | 78 - ...CalculatorForwardImpl_CalculatorService_Proxy.h | 42 - ...ulatorForwardImpl_CalculatorService_Wrapper.cpp | 83 - ...lculatorForwardImpl_CalculatorService_Wrapper.h | 43 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 596 -- .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 90 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 414 - .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 43 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 506 -- .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 86 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 342 - .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 43 - ...CustomerInfoImpl2_CustomerInfoService_Proxy.cpp | 66 - .../CustomerInfoImpl2_CustomerInfoService_Proxy.h | 41 - ...stomerInfoImpl2_CustomerInfoService_Wrapper.cpp | 75 - ...CustomerInfoImpl2_CustomerInfoService_Wrapper.h | 43 - .../MyValueImpl_MyValueService_Proxy.cpp | 94 - .../MyValueImpl_MyValueService_Proxy.h | 44 - .../MyValueImpl_MyValueService_Wrapper.cpp | 94 - .../MyValueImpl_MyValueService_Wrapper.h | 43 - .../MyValueImpl_customerInfo_Proxy.cpp | 66 - .../MyValueImpl_customerInfo_Proxy.h | 41 - .../MyValueImpl_stockQuote_Proxy.cpp | 66 - .../expected_output/MyValueImpl_stockQuote_Proxy.h | 41 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 66 - .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 41 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 75 - .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 43 - .../MyValueImpl_MyValueService_Proxy.cpp | 94 - .../MyValueImpl_MyValueService_Proxy.h | 44 - .../MyValueImpl_MyValueService_Wrapper.cpp | 94 - .../MyValueImpl_MyValueService_Wrapper.h | 43 - .../MyValueImpl_customerInfo_Proxy.cpp | 66 - .../MyValueImpl_customerInfo_Proxy.h | 41 - .../MyValueImpl_stockQuote_Proxy.cpp | 66 - .../expected_output/MyValueImpl_stockQuote_Proxy.h | 41 - .../MyValueImpl_MyValueService_Proxy.cpp | 184 - .../MyValueImpl_MyValueService_Proxy.h | 84 - .../MyValueImpl_MyValueService_Wrapper.cpp | 184 - .../MyValueImpl_MyValueService_Wrapper.h | 82 - .../MyValueImpl_MyValueService_Proxy.cpp | 94 - .../MyValueImpl_MyValueService_Proxy.h | 44 - .../MyValueImpl_MyValueService_Wrapper.cpp | 94 - .../MyValueImpl_MyValueService_Wrapper.h | 43 - .../MyValueImpl_MyValueService_Proxy.cpp | 94 - .../MyValueImpl_MyValueService_Proxy.h | 44 - .../MyValueImpl_MyValueService_Wrapper.cpp | 94 - .../MyValueImpl_MyValueService_Wrapper.h | 43 - ...CustomerInfoImpl2_CustomerInfoService_Proxy.cpp | 66 - .../CustomerInfoImpl2_CustomerInfoService_Proxy.h | 41 - ...stomerInfoImpl2_CustomerInfoService_Wrapper.cpp | 73 - ...CustomerInfoImpl2_CustomerInfoService_Wrapper.h | 43 - .../MyValueImpl_MyValueService_Proxy.cpp | 94 - .../MyValueImpl_MyValueService_Proxy.h | 41 - .../MyValueImpl_MyValueService_Wrapper.cpp | 92 - .../MyValueImpl_MyValueService_Wrapper.h | 43 - .../MyValueImpl_customerInfo_Proxy.cpp | 66 - .../MyValueImpl_customerInfo_Proxy.h | 41 - .../MyValueImpl_stockQuote_Proxy.cpp | 66 - .../expected_output/MyValueImpl_stockQuote_Proxy.h | 41 - .../CustomerInfoImpl_CustomerInfoService_Proxy.cpp | 89 - .../CustomerInfoImpl_CustomerInfoService_Proxy.h | 43 - ...ustomerInfoImpl_CustomerInfoService_Wrapper.cpp | 90 - .../CustomerInfoImpl_CustomerInfoService_Wrapper.h | 43 - .../sca/tools/scagen/lib/readme.txt | 4 - .../sca/tools/scagen/scagen.cmd | 19 - .../sca/tools/scagen/scagen.sh | 21 - .../tuscany/sca/cpp/tools/common/BodyPart.java | 96 - .../tuscany/sca/cpp/tools/common/CParsingTool.java | 124 - .../sca/cpp/tools/common/Configuration.java | 132 - .../sca/cpp/tools/common/DirectoryTree.java | 105 - .../tuscany/sca/cpp/tools/common/FileActor.java | 37 - .../tuscany/sca/cpp/tools/common/FilePart.java | 80 - .../tuscany/sca/cpp/tools/common/Headers.java | 167 - .../sca/cpp/tools/common/InputCppSourceCode.java | 425 - .../tuscany/sca/cpp/tools/common/MacroPart.java | 87 - .../tuscany/sca/cpp/tools/common/MethodPart.java | 133 - .../tuscany/sca/cpp/tools/common/Options.java | 164 - .../tuscany/sca/cpp/tools/common/Parameter.java | 216 - .../sca/cpp/tools/common/ParsingException.java | 48 - .../sca/cpp/tools/common/PrototypePart.java | 56 - .../tuscany/sca/cpp/tools/common/Signature.java | 506 -- .../apache/tuscany/sca/cpp/tools/common/Utils.java | 548 -- .../tuscany/sca/cpp/tools/common/package.html | 58 - .../tools/services/ComponentDomNodeHandler.java | 366 - .../tools/services/ComponentTypeFileHandler.java | 130 - .../services/CompositeOrFragmentFileHandler.java | 91 - .../sca/cpp/tools/services/DirectoryScanner.java | 93 - .../tuscany/sca/cpp/tools/services/DomHandler.java | 83 - .../sca/cpp/tools/services/DomNodeHandler.java | 46 - .../cpp/tools/services/GenericDomNodeHandler.java | 220 - .../sca/cpp/tools/services/LittleClass.java | 33 - .../tools/services/ReferenceDomNodeHandler.java | 73 - .../tuscany/sca/cpp/tools/services/Scagen.java | 176 - .../cpp/tools/services/ServiceDomNodeHandler.java | 68 - .../sca/cpp/tools/services/ServicesGenerator.java | 831 -- .../sca/cpp/tools/services/XMLFileActor.java | 208 - .../tuscany/sca/cpp/tools/services/package.html | 159 - .../cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl | 281 - .../tools/services/xsl/SCA4CPPIntfProxyHeader.xsl | 228 - .../tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl | 292 - .../services/xsl/SCA4CPPIntfWrapperHeader.xsl | 191 - .../cpp-1.0-incubating-M2-RC3/sca/xsd/sca-core.xsd | 182 - .../sca/xsd/sca-implementation-composite.xsd | 38 - .../sca/xsd/sca-implementation-java.xsd | 38 - .../sca/xsd/sca-interface-java.xsd | 39 - .../sca/xsd/sca-interface-wsdl.xsd | 39 - tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca.xsd | 31 - tags/cpp-1.0-incubating-M2-RC3/sca/xsd/tuscany.xsd | 50 - tags/cpp-1.0-incubating-M2-RC3/sdo/AUTHORS | 0 tags/cpp-1.0-incubating-M2-RC3/sdo/COPYING | 203 - tags/cpp-1.0-incubating-M2-RC3/sdo/ChangeLog | 0 .../sdo/Committers Guide.txt | 69 - .../sdo/GettingStarted.html | 288 - tags/cpp-1.0-incubating-M2-RC3/sdo/INSTALL | 2 - tags/cpp-1.0-incubating-M2-RC3/sdo/LICENSE | 177 - tags/cpp-1.0-incubating-M2-RC3/sdo/Makefile.am | 50 - tags/cpp-1.0-incubating-M2-RC3/sdo/NEWS | 0 tags/cpp-1.0-incubating-M2-RC3/sdo/NOTICE | 2 - tags/cpp-1.0-incubating-M2-RC3/sdo/README | 97 - tags/cpp-1.0-incubating-M2-RC3/sdo/autogen.sh | 31 - tags/cpp-1.0-incubating-M2-RC3/sdo/build.bat | 44 - tags/cpp-1.0-incubating-M2-RC3/sdo/build.sh | 44 - tags/cpp-1.0-incubating-M2-RC3/sdo/configure.ac | 69 - .../sdo/doc/BuildingSTDCXX.html | 145 - .../sdo/doc/css/maven-base.css | 168 - .../sdo/doc/css/maven-theme.css | 166 - tags/cpp-1.0-incubating-M2-RC3/sdo/makebindist.sh | 43 - tags/cpp-1.0-incubating-M2-RC3/sdo/makedist.sh | 49 - .../sdo/projects/tuscany_sdo/Build/Build.dep | 2 - .../sdo/projects/tuscany_sdo/Build/Build.dsp | 63 - .../sdo/projects/tuscany_sdo/Build/Build.mak | 181 - .../sdo/projects/tuscany_sdo/build.cmd | 23 - .../projects/tuscany_sdo/sdo_axiom/sdo_axiom.dsp | 125 - .../projects/tuscany_sdo/sdo_axiom/sdo_axiom.mak | 270 - .../tuscany_sdo/sdo_axiom_test/sdo_axiom_test.dsp | 108 - .../tuscany_sdo/sdo_axiom_test/sdo_axiom_test.mak | 264 - .../tuscany_sdo/sdo_runtime/sdo_runtime.dsp | 751 -- .../tuscany_sdo/sdo_runtime/sdo_runtime.mak | 972 --- .../tuscany_sdo/sdo_runtime/tuscany_sdo.ilk | Bin 2617388 -> 0 bytes .../sdo/projects/tuscany_sdo/sdo_test/sdo_test.dsp | 124 - .../sdo/projects/tuscany_sdo/sdo_test/sdo_test.mak | 352 - .../sdo/projects/tuscany_sdo/tuscany_sdo.dsw | 101 - .../sdo/projects/tuscany_sdo/tuscany_sdo.ncb | Bin 5645312 -> 0 bytes .../sdo/projects/tuscany_sdo/tuscany_sdo.opt | Bin 70144 -> 0 bytes .../tuscany_sdo/sdo_axiom/sdo_axiom.vcproj | 179 - .../sdo_axiom_test/sdo_axiom_test.vcproj | 161 - .../tuscany_sdo/sdo_interop/sdo_interop.vcproj | 129 - .../tuscany_sdo/sdo_runtime/sdo_runtime.vcproj | 817 -- .../tuscany_sdo/sdo_samples/sdo_samples.vcproj | 169 - .../tuscany_sdo/sdo_test/sdo_test.vcproj | 298 - .../sdo/projectsvc7/tuscany_sdo/tuscany_sdo.sln | 50 - .../sdo/projectsvc7/tuscany_sdo/tuscany_sdo.suo | Bin 17408 -> 0 bytes .../sdo/runtime/Makefile.am | 18 - .../sdo/runtime/core/Makefile.am | 18 - .../sdo/runtime/core/interop/interop.cpp | 198 - .../sdo/runtime/core/interop/interop.h | 32 - .../sdo/runtime/core/interop/main.cpp | 88 - .../sdo/runtime/core/interop/runinterop.bat | 25 - .../sdo/runtime/core/sdo_axiom/Makefile.am | 39 - .../sdo/runtime/core/sdo_axiom/deploy.bat | 49 - .../sdo/runtime/core/sdo_axiom/sdo_axiom.cpp | 275 - .../sdo/runtime/core/sdo_axiom/sdo_axiom.h | 90 - .../sdo/runtime/core/sdo_axiom/sdo_axiom_export.h | 39 - .../sdo/runtime/core/sdo_axiom_test/Makefile.am | 41 - .../runtime/core/sdo_axiom_test/sdo_axiom_test.cpp | 134 - .../runtime/core/sdo_axiom_test/sdo_axiom_test.h | 38 - .../sdo/runtime/core/src/.cdtbuild | 43 - .../sdo/runtime/core/src/.cdtproject | 15 - .../sdo/runtime/core/src/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../sdo/runtime/core/src/Makefile.am | 21 - .../sdo/runtime/core/src/commonj/Makefile.am | 18 - .../runtime/core/src/commonj/sdo/ChangeSummary.cpp | 30 - .../runtime/core/src/commonj/sdo/ChangeSummary.h | 209 - .../core/src/commonj/sdo/ChangeSummaryBuilder.cpp | 1148 --- .../core/src/commonj/sdo/ChangeSummaryBuilder.h | 303 - .../core/src/commonj/sdo/ChangeSummaryImpl.cpp | 1592 ---- .../core/src/commonj/sdo/ChangeSummaryImpl.h | 405 - .../core/src/commonj/sdo/ChangedDataObjectList.h | 93 - .../src/commonj/sdo/ChangedDataObjectListImpl.cpp | 248 - .../src/commonj/sdo/ChangedDataObjectListImpl.h | 99 - .../runtime/core/src/commonj/sdo/CopyHelper.cpp | 266 - .../sdo/runtime/core/src/commonj/sdo/CopyHelper.h | 71 - .../runtime/core/src/commonj/sdo/DASProperty.cpp | 34 - .../sdo/runtime/core/src/commonj/sdo/DASProperty.h | 48 - .../sdo/runtime/core/src/commonj/sdo/DASType.cpp | 34 - .../sdo/runtime/core/src/commonj/sdo/DASType.h | 55 - .../sdo/runtime/core/src/commonj/sdo/DASValue.cpp | 59 - .../sdo/runtime/core/src/commonj/sdo/DASValue.h | 56 - .../sdo/runtime/core/src/commonj/sdo/DASValues.cpp | 70 - .../sdo/runtime/core/src/commonj/sdo/DASValues.h | 59 - .../runtime/core/src/commonj/sdo/DataFactory.cpp | 53 - .../sdo/runtime/core/src/commonj/sdo/DataFactory.h | 806 -- .../core/src/commonj/sdo/DataFactoryImpl.cpp | 2192 ----- .../runtime/core/src/commonj/sdo/DataFactoryImpl.h | 703 -- .../sdo/runtime/core/src/commonj/sdo/DataGraph.cpp | 35 - .../sdo/runtime/core/src/commonj/sdo/DataGraph.h | 105 - .../runtime/core/src/commonj/sdo/DataGraphImpl.cpp | 147 - .../runtime/core/src/commonj/sdo/DataGraphImpl.h | 112 - .../runtime/core/src/commonj/sdo/DataObject.cpp | 33 - .../sdo/runtime/core/src/commonj/sdo/DataObject.h | 591 -- .../core/src/commonj/sdo/DataObjectImpl.cpp | 4014 --------- .../runtime/core/src/commonj/sdo/DataObjectImpl.h | 719 -- .../core/src/commonj/sdo/DataObjectInstance.cpp | 71 - .../core/src/commonj/sdo/DataObjectInstance.h | 64 - .../core/src/commonj/sdo/DataObjectList.cpp | 43 - .../runtime/core/src/commonj/sdo/DataObjectList.h | 199 - .../core/src/commonj/sdo/DataObjectListImpl.cpp | 1138 --- .../core/src/commonj/sdo/DataObjectListImpl.h | 212 - .../core/src/commonj/sdo/DefaultLogWriter.cpp | 55 - .../core/src/commonj/sdo/DefaultLogWriter.h | 54 - .../core/src/commonj/sdo/EqualityHelper.cpp | 372 - .../runtime/core/src/commonj/sdo/EqualityHelper.h | 99 - .../core/src/commonj/sdo/GroupDefinition.cpp | 36 - .../runtime/core/src/commonj/sdo/GroupDefinition.h | 59 - .../runtime/core/src/commonj/sdo/GroupEvent.cpp | 65 - .../sdo/runtime/core/src/commonj/sdo/GroupEvent.h | 70 - .../core/src/commonj/sdo/HelperProvider.cpp | 49 - .../runtime/core/src/commonj/sdo/HelperProvider.h | 67 - .../sdo/runtime/core/src/commonj/sdo/LogWriter.cpp | 34 - .../sdo/runtime/core/src/commonj/sdo/LogWriter.h | 46 - .../sdo/runtime/core/src/commonj/sdo/Logger.cpp | 102 - .../sdo/runtime/core/src/commonj/sdo/Logger.h | 71 - .../sdo/runtime/core/src/commonj/sdo/Logging.h | 171 - .../sdo/runtime/core/src/commonj/sdo/Makefile.am | 103 - .../core/src/commonj/sdo/ParserErrorSetter.cpp | 40 - .../core/src/commonj/sdo/ParserErrorSetter.h | 50 - .../sdo/runtime/core/src/commonj/sdo/Property.cpp | 44 - .../sdo/runtime/core/src/commonj/sdo/Property.h | 207 - .../core/src/commonj/sdo/PropertyDefinition.cpp | 323 - .../core/src/commonj/sdo/PropertyDefinition.h | 135 - .../src/commonj/sdo/PropertyDefinitionImpl.cpp | 46 - .../core/src/commonj/sdo/PropertyDefinitionImpl.h | 89 - .../runtime/core/src/commonj/sdo/PropertyImpl.cpp | 583 -- .../runtime/core/src/commonj/sdo/PropertyImpl.h | 293 - .../runtime/core/src/commonj/sdo/PropertyList.cpp | 95 - .../runtime/core/src/commonj/sdo/PropertyList.h | 89 - .../core/src/commonj/sdo/PropertySetting.cpp | 44 - .../runtime/core/src/commonj/sdo/PropertySetting.h | 63 - .../core/src/commonj/sdo/RefCountingObject.cpp | 83 - .../core/src/commonj/sdo/RefCountingObject.h | 67 - .../core/src/commonj/sdo/RefCountingPointer.cpp | 155 - .../core/src/commonj/sdo/RefCountingPointer.h | 198 - .../runtime/core/src/commonj/sdo/SAX2Attribute.cpp | 51 - .../runtime/core/src/commonj/sdo/SAX2Attribute.h | 66 - .../core/src/commonj/sdo/SAX2Attributes.cpp | 128 - .../runtime/core/src/commonj/sdo/SAX2Attributes.h | 80 - .../core/src/commonj/sdo/SAX2Namespaces.cpp | 95 - .../runtime/core/src/commonj/sdo/SAX2Namespaces.h | 69 - .../runtime/core/src/commonj/sdo/SAX2Parser.cpp | 518 -- .../sdo/runtime/core/src/commonj/sdo/SAX2Parser.h | 117 - .../sdo/runtime/core/src/commonj/sdo/SDO.h | 62 - .../sdo/runtime/core/src/commonj/sdo/SDODate.cpp | 54 - .../sdo/runtime/core/src/commonj/sdo/SDODate.h | 79 - .../core/src/commonj/sdo/SDORuntimeException.cpp | 230 - .../core/src/commonj/sdo/SDORuntimeException.h | 519 -- .../runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp | 1490 ---- .../runtime/core/src/commonj/sdo/SDOSAX2Parser.h | 172 - .../sdo/runtime/core/src/commonj/sdo/SDOSPI.h | 27 - .../core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp | 1416 ---- .../core/src/commonj/sdo/SDOSchemaSAX2Parser.h | 237 - .../sdo/runtime/core/src/commonj/sdo/SDOString.h | 31 - .../sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp | 252 - .../sdo/runtime/core/src/commonj/sdo/SDOUtils.h | 66 - .../core/src/commonj/sdo/SDOXMLBufferWriter.cpp | 57 - .../core/src/commonj/sdo/SDOXMLBufferWriter.h | 53 - .../core/src/commonj/sdo/SDOXMLFileWriter.cpp | 46 - .../core/src/commonj/sdo/SDOXMLFileWriter.h | 54 - .../core/src/commonj/sdo/SDOXMLStreamWriter.cpp | 52 - .../core/src/commonj/sdo/SDOXMLStreamWriter.h | 56 - .../runtime/core/src/commonj/sdo/SDOXMLString.cpp | 234 - .../runtime/core/src/commonj/sdo/SDOXMLString.h | 94 - .../runtime/core/src/commonj/sdo/SDOXMLWriter.cpp | 1232 --- .../runtime/core/src/commonj/sdo/SDOXMLWriter.h | 121 - .../core/src/commonj/sdo/SDOXSDBufferWriter.cpp | 55 - .../core/src/commonj/sdo/SDOXSDBufferWriter.h | 54 - .../core/src/commonj/sdo/SDOXSDFileWriter.cpp | 45 - .../core/src/commonj/sdo/SDOXSDFileWriter.h | 53 - .../core/src/commonj/sdo/SDOXSDStreamWriter.cpp | 53 - .../core/src/commonj/sdo/SDOXSDStreamWriter.h | 57 - .../runtime/core/src/commonj/sdo/SDOXSDWriter.cpp | 842 -- .../runtime/core/src/commonj/sdo/SDOXSDWriter.h | 77 - .../runtime/core/src/commonj/sdo/SchemaInfo.cpp | 38 - .../sdo/runtime/core/src/commonj/sdo/SchemaInfo.h | 61 - .../sdo/runtime/core/src/commonj/sdo/SdoCheck.cpp | 29 - .../sdo/runtime/core/src/commonj/sdo/SdoCheck.h | 35 - .../runtime/core/src/commonj/sdo/SdoRuntime.cpp | 66 - .../sdo/runtime/core/src/commonj/sdo/SdoRuntime.h | 76 - .../sdo/runtime/core/src/commonj/sdo/Sequence.cpp | 39 - .../sdo/runtime/core/src/commonj/sdo/Sequence.h | 311 - .../runtime/core/src/commonj/sdo/SequenceImpl.cpp | 987 --- .../runtime/core/src/commonj/sdo/SequenceImpl.h | 377 - .../sdo/runtime/core/src/commonj/sdo/Setting.cpp | 305 - .../sdo/runtime/core/src/commonj/sdo/Setting.h | 151 - .../runtime/core/src/commonj/sdo/SettingList.cpp | 115 - .../sdo/runtime/core/src/commonj/sdo/SettingList.h | 77 - .../sdo/runtime/core/src/commonj/sdo/Type.cpp | 38 - .../sdo/runtime/core/src/commonj/sdo/Type.h | 232 - .../core/src/commonj/sdo/TypeDefinition.cpp | 256 - .../runtime/core/src/commonj/sdo/TypeDefinition.h | 121 - .../core/src/commonj/sdo/TypeDefinitionImpl.cpp | 45 - .../core/src/commonj/sdo/TypeDefinitionImpl.h | 83 - .../core/src/commonj/sdo/TypeDefinitions.cpp | 82 - .../runtime/core/src/commonj/sdo/TypeDefinitions.h | 64 - .../core/src/commonj/sdo/TypeDefinitionsImpl.cpp | 41 - .../core/src/commonj/sdo/TypeDefinitionsImpl.h | 56 - .../sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp | 3617 -------- .../sdo/runtime/core/src/commonj/sdo/TypeImpl.h | 326 - .../sdo/runtime/core/src/commonj/sdo/TypeList.cpp | 86 - .../sdo/runtime/core/src/commonj/sdo/TypeList.h | 58 - .../runtime/core/src/commonj/sdo/XMLDocument.cpp | 33 - .../sdo/runtime/core/src/commonj/sdo/XMLDocument.h | 151 - .../core/src/commonj/sdo/XMLDocumentImpl.cpp | 87 - .../runtime/core/src/commonj/sdo/XMLDocumentImpl.h | 102 - .../sdo/runtime/core/src/commonj/sdo/XMLHelper.cpp | 36 - .../sdo/runtime/core/src/commonj/sdo/XMLHelper.h | 184 - .../runtime/core/src/commonj/sdo/XMLHelperImpl.cpp | 488 -- .../runtime/core/src/commonj/sdo/XMLHelperImpl.h | 188 - .../sdo/runtime/core/src/commonj/sdo/XMLQName.cpp | 86 - .../sdo/runtime/core/src/commonj/sdo/XMLQName.h | 68 - .../sdo/runtime/core/src/commonj/sdo/XSDHelper.cpp | 37 - .../sdo/runtime/core/src/commonj/sdo/XSDHelper.h | 147 - .../runtime/core/src/commonj/sdo/XSDHelperImpl.cpp | 652 -- .../runtime/core/src/commonj/sdo/XSDHelperImpl.h | 165 - .../core/src/commonj/sdo/XSDPropertyInfo.cpp | 55 - .../runtime/core/src/commonj/sdo/XSDPropertyInfo.h | 61 - .../runtime/core/src/commonj/sdo/XSDTypeInfo.cpp | 54 - .../sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.h | 54 - .../runtime/core/src/commonj/sdo/XpathHelper.cpp | 88 - .../sdo/runtime/core/src/commonj/sdo/XpathHelper.h | 57 - .../runtime/core/src/commonj/sdo/disable_warn.h | 29 - .../sdo/runtime/core/src/commonj/sdo/export.h | 49 - .../sdo/runtime/core/src/deploy.bat | 49 - .../sdo/runtime/core/test/.cdtbuild | 59 - .../sdo/runtime/core/test/.cdtproject | 15 - .../sdo/runtime/core/test/.project | 19 - .../org.eclipse.cdt.managedbuilder.core.prefs | 9 - .../sdo/runtime/core/test/47293Catalog.xml | 22 - .../sdo/runtime/core/test/47293Catalog.xsd | 35 - .../sdo/runtime/core/test/47293Customer.xsd | 50 - .../sdo/runtime/core/test/47293Order.xsd | 67 - .../sdo/runtime/core/test/48601.xsd | 46 - .../sdo/runtime/core/test/48686.xml | 31 - .../sdo/runtime/core/test/48686.xsd | 42 - .../sdo/runtime/core/test/48736.xml | 30 - .../sdo/runtime/core/test/48736.xsd | 49 - .../sdo/runtime/core/test/48736_xml.txt | 42 - .../sdo/runtime/core/test/48736_xsd.txt | 29 - .../sdo/runtime/core/test/Atom1.0.xsd | 205 - .../sdo/runtime/core/test/BadElement.xml | 29 - .../sdo/runtime/core/test/BadElement.xsd | 102 - .../sdo/runtime/core/test/Catalog.xsd | 34 - .../sdo/runtime/core/test/Customer.xsd | 47 - .../sdo/runtime/core/test/Makefile.am | 33 - .../sdo/runtime/core/test/OddChars.xml | 27 - .../sdo/runtime/core/test/OddChars.xsd | 103 - .../sdo/runtime/core/test/Order.xsd | 59 - .../sdo/runtime/core/test/Readme.txt | 108 - .../sdo/runtime/core/test/SdoGenerate.cpp | 169 - .../sdo/runtime/core/test/StockQuoteService.wsdl | 176 - .../sdo/runtime/core/test/Style1.xsd | 72 - .../sdo/runtime/core/test/Style2.xsd | 74 - .../sdo/runtime/core/test/Style3.xsd | 74 - .../sdo/runtime/core/test/Style4.xsd | 80 - .../sdo/runtime/core/test/TravelBookingSchema.xsd | 103 - .../runtime/core/test/TravelBookingUsingSchema.xml | 67 - .../sdo/runtime/core/test/axis.xsd | 40 - .../sdo/runtime/core/test/b46617b.xml | 27 - .../sdo/runtime/core/test/b46617b.xsd | 79 - .../sdo/runtime/core/test/b46633.txt | 8 - .../sdo/runtime/core/test/b46634_out.txt | 2 - .../sdo/runtime/core/test/b46693.xsd | 176 - .../sdo/runtime/core/test/b47137.txt | 6 - .../sdo/runtime/core/test/b47137.xsd | 32 - .../sdo/runtime/core/test/b47137b.txt | 31 - .../sdo/runtime/core/test/b47137b.xsd | 59 - .../sdo/runtime/core/test/b47293.txt | 27 - .../sdo/runtime/core/test/b48602.xsd | 29 - .../sdo/runtime/core/test/b48633.xml | 29 - .../sdo/runtime/core/test/b48633.xsd | 41 - .../sdo/runtime/core/test/b48633_xml.txt | 10 - .../sdo/runtime/core/test/b48633b.xsd | 26 - .../sdo/runtime/core/test/b48633b_xsd.txt | 31 - .../sdo/runtime/core/test/b48636.xml | 29 - .../sdo/runtime/core/test/b48636.xsd | 36 - .../sdo/runtime/core/test/b48636_xml.txt | 36 - .../sdo/runtime/core/test/b48636_xsd.txt | 26 - .../sdo/runtime/core/test/b48686.xml | 30 - .../sdo/runtime/core/test/b48686.xsd | 41 - .../sdo/runtime/core/test/b48686_xml.txt | 46 - .../sdo/runtime/core/test/b48686_xsd.txt | 28 - .../sdo/runtime/core/test/badelement.txt | 2 - .../sdo/runtime/core/test/bothgroups.xsd | 44 - .../sdo/runtime/core/test/bothgroups_xsd.txt | 29 - .../sdo/runtime/core/test/bothgroupssamename.xsd | 44 - .../runtime/core/test/bothgroupssamename_xsd.txt | 29 - .../sdo/runtime/core/test/bug2.txt | 9 - .../sdo/runtime/core/test/bug45933-output.txt | 2 - .../sdo/runtime/core/test/bug48300.xml | 174 - .../sdo/runtime/core/test/bug48300.xsd | 84 - .../sdo/runtime/core/test/bug48300_xml.txt | 424 - .../sdo/runtime/core/test/bug48300_xsd.txt | 58 - .../sdo/runtime/core/test/bugs/1/company.xml | 41 - .../sdo/runtime/core/test/bugs/1/company.xsd | 64 - .../sdo/runtime/core/test/bugs/1/include.xsd | 69 - .../sdo/runtime/core/test/bugs/1/ok1.xsd | 34 - .../sdo/runtime/core/test/bugs/1/ok2.xsd | 33 - .../sdo/runtime/core/test/bugs/1/ok3.xsd | 32 - .../sdo/runtime/core/test/bunique-out.txt | 1 - .../sdo/runtime/core/test/bunique-out.xsd_safe.txt | 53 - .../sdo/runtime/core/test/bunique-outxml.txt | 2 - .../sdo/runtime/core/test/buniqueread-out.txt | 2 - .../sdo/runtime/core/test/calculator.xsd | 32 - .../sdo/runtime/core/test/calculator2.wsdl | 90 - .../sdo/runtime/core/test/calculator2a.wsdl | 88 - .../sdo/runtime/core/test/carotest3.txt | 36 - .../sdo/runtime/core/test/company.xsd | 50 - .../runtime/core/test/company_with_nillable_SN.xml | 30 - .../runtime/core/test/company_with_nillable_SN.xsd | 49 - .../sdo/runtime/core/test/companyabs.xsd | 64 - .../sdo/runtime/core/test/companyref.xsd | 67 - .../sdo/runtime/core/test/companysubs.xsd | 64 - .../sdo/runtime/core/test/csload-output.txt | 2 - .../sdo/runtime/core/test/csload2-output.txt | 2 - .../sdo/runtime/core/test/csload3-output.txt | 2 - .../sdo/runtime/core/test/cssave-output.txt | 2 - .../sdo/runtime/core/test/cssave2-output.txt | 2 - .../sdo/runtime/core/test/datetest.txt | 4 - .../sdo/runtime/core/test/defaults.txt | 10 - .../sdo/runtime/core/test/doctest.txt | 2 - .../sdo/runtime/core/test/doctest.xml | 27 - .../sdo/runtime/core/test/doctest.xsd | 48 - .../sdo/runtime/core/test/employee.xsd | 45 - .../sdo/runtime/core/test/emptycs1.txt | 2 - .../sdo/runtime/core/test/emptycs2.txt | 2 - .../sdo/runtime/core/test/emptycs3.txt | 2 - .../sdo/runtime/core/test/error1.xml | 30 - .../sdo/runtime/core/test/error1.xsd | 49 - .../sdo/runtime/core/test/extension.xsd | 58 - .../sdo/runtime/core/test/g/gCustomer.xsd | 50 - .../sdo/runtime/core/test/g/gOrder.xml | 21 - .../sdo/runtime/core/test/g/gOrder.xsd | 58 - .../sdo/runtime/core/test/g3.xsd | 41 - .../sdo/runtime/core/test/getproptest.txt | 8 - .../sdo/runtime/core/test/graham1.xsd | 40 - .../sdo/runtime/core/test/graham2.xsd | 39 - .../sdo/runtime/core/test/graham3.xsd | 41 - .../sdo/runtime/core/test/groupingroup.xsd | 45 - .../sdo/runtime/core/test/groupingroup_xsd.txt | 25 - .../sdo/runtime/core/test/grouprefingroup.xsd | 45 - .../sdo/runtime/core/test/grouprefingroup_xsd.txt | 29 - .../sdo/runtime/core/test/grouptoolate.xsd | 37 - .../sdo/runtime/core/test/grouptoolate_xsd.txt | 26 - .../sdo/runtime/core/test/groupwithprefix.xsd | 37 - .../sdo/runtime/core/test/groupwithprefix_xsd.txt | 26 - .../sdo/runtime/core/test/groupwrongname.xsd | 38 - .../sdo/runtime/core/test/inc1.txt | 22 - .../sdo/runtime/core/test/inc2.txt | 21 - .../sdo/runtime/core/test/include.xsd | 34 - .../sdo/runtime/core/test/include1.xsd | 38 - .../sdo/runtime/core/test/include2.xsd | 37 - .../sdo/runtime/core/test/includeother3.xsd | 34 - .../sdo/runtime/core/test/jira490.txt | 53 - .../sdo/runtime/core/test/jira705.xsd | 31 - .../sdo/runtime/core/test/jira705_out.txt | 5 - .../sdo/runtime/core/test/list1.xml | 32 - .../sdo/runtime/core/test/list1.xsd | 40 - .../sdo/runtime/core/test/list1_xml.txt | 70 - .../sdo/runtime/core/test/list1_xsd.txt | 28 - .../sdo/runtime/core/test/loadload-output.txt | 2 - .../sdo/runtime/core/test/main.cpp | 179 - .../sdo/runtime/core/test/maintest.txt | 188 - .../sdo/runtime/core/test/many.xml | 33 - .../sdo/runtime/core/test/many.xsd | 21 - .../sdo/runtime/core/test/matttest1.txt | 2 - .../sdo/runtime/core/test/merle1.txt | 10 - .../sdo/runtime/core/test/my-core.xsd | 40 - .../core/test/my-implementation-local-java.xsd | 43 - .../sdo/runtime/core/test/my.xsd | 31 - .../sdo/runtime/core/test/notns.txt | 2 - .../sdo/runtime/core/test/nulltest.txt | 91 - .../sdo/runtime/core/test/oddchars.txt | 22 - .../sdo/runtime/core/test/openloadNS.xml | 32 - .../sdo/runtime/core/test/openloadNS.xsd | 53 - .../sdo/runtime/core/test/openloadNS2.xml | 32 - .../sdo/runtime/core/test/openloadNS2.xsd | 28 - .../sdo/runtime/core/test/openloadNSout.txt | 2 - .../sdo/runtime/core/test/openseq.txt | 3 - .../sdo/runtime/core/test/order1.txt | 19 - .../sdo/runtime/core/test/order2.txt | 20 - .../sdo/runtime/core/test/partial.xml | 33 - .../sdo/runtime/core/test/pete.xml | 40 - .../sdo/runtime/core/test/pete.xsd | 42 - .../sdo/runtime/core/test/querytest.txt | 17 - .../sdo/runtime/core/test/saveopen-output.txt | 2 - .../sdo/runtime/core/test/sca-binding-sca.xsd | 41 - .../runtime/core/test/sca-binding-webservice.xsd | 40 - .../sdo/runtime/core/test/sca-binding-ws.xsd | 41 - .../sdo/runtime/core/test/sca-core.xsd | 233 - .../runtime/core/test/sca-implementation-dll.xsd | 41 - .../runtime/core/test/sca-implementation-java.xsd | 41 - .../core/test/sca-implementation-local-java.xsd | 43 - .../sdo/runtime/core/test/sca-interface-cpp.xsd | 68 - .../sdo/runtime/core/test/sca-interface-java.xsd | 44 - .../sdo/runtime/core/test/sca-interface-wsdl.xsd | 43 - .../sdo/runtime/core/test/sca-property-java.xsd | 43 - .../sdo/runtime/core/test/sca-property-xsd.xsd | 41 - .../sdo/runtime/core/test/sca.xsd | 41 - .../sdo/runtime/core/test/scenario1.txt | 10 - .../sdo/runtime/core/test/scenario2.txt | 8 - .../sdo/runtime/core/test/scenario3.txt | 22 - .../sdo/runtime/core/test/scenario4.txt | 108 - .../sdo/runtime/core/test/scenario5.txt | 8 - .../sdo/runtime/core/test/sdotest.cpp | 8928 -------------------- .../sdo/runtime/core/test/sdotest.h | 197 - .../sdo/runtime/core/test/sdotest2.cpp | 1474 ---- .../sdo/runtime/core/test/sequence.txt | 45 - .../sdo/runtime/core/test/setmany.txt | 24 - .../sdo/runtime/core/test/setnull.txt | 42 - .../sdo/runtime/core/test/showdefault1.txt | 15 - .../sdo/runtime/core/test/showdefault2.txt | 18 - .../sdo/runtime/core/test/simple.txt | 8 - .../sdo/runtime/core/test/simple.xml | 21 - .../sdo/runtime/core/test/simple.xsd | 23 - .../sdo/runtime/core/test/stock.wsdl | 407 - .../sdo/runtime/core/test/stock.xml | 45 - .../sdo/runtime/core/test/stock_wsdl.txt | 47 - .../sdo/runtime/core/test/stock_xml.txt | 127 - .../sdo/runtime/core/test/t2/include3.xsd | 34 - .../sdo/runtime/core/test/t2/includeother.xsd | 34 - .../sdo/runtime/core/test/t2/includeother1.xsd | 38 - .../sdo/runtime/core/test/t2/includeother2.xsd | 37 - .../sdo/runtime/core/test/test/include3.xsd | 35 - .../sdo/runtime/core/test/test/includeother.xsd | 34 - .../sdo/runtime/core/test/test/includeother1.xsd | 38 - .../sdo/runtime/core/test/test/includeother2.xsd | 37 - .../sdo/runtime/core/test/test2/includeother3.xsd | 35 - .../sdo/runtime/core/test/testabstract.txt | 5 - .../sdo/runtime/core/test/testerrors.txt | 7 - .../sdo/runtime/core/test/testinc2.txt | 21 - .../sdo/runtime/core/test/testopen.txt | 24 - .../sdo/runtime/core/test/testopen3.xml | 21 - .../sdo/runtime/core/test/testorder.txt | 19 - .../sdo/runtime/core/test/teststyles.txt | 93 - .../sdo/runtime/core/test/testsubsload.txt | 7 - .../sdo/runtime/core/test/testutils.txt | 100 - .../sdo/runtime/core/test/testwsdl.txt | 2 - .../sdo/runtime/core/test/testwsdl.xml | 22 - .../sdo/runtime/core/test/travel.txt | 146 - .../sdo/runtime/core/test/userdata.txt | 10 - .../sdo/runtime/core/test/utils.cpp | 553 -- .../sdo/runtime/core/test/xhtml1.xsd | 2245 ----- .../sdo/runtime/core/test/xhtml_in.xml | 60 - .../sdo/runtime/core/test/xhtml_out.txt | 41 - tags/cpp-1.0-incubating-M2-RC3/sdo/samples/AUTHORS | 0 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/COPYING | 203 - .../sdo/samples/ChangeLog | 0 .../sdo/samples/GettingStarted.html | 237 - tags/cpp-1.0-incubating-M2-RC3/sdo/samples/INSTALL | 2 - tags/cpp-1.0-incubating-M2-RC3/sdo/samples/LICENSE | 177 - .../sdo/samples/Makefile.am | 20 - tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NEWS | 0 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NOTICE | 2 - tags/cpp-1.0-incubating-M2-RC3/sdo/samples/README | 2 - .../sdo/samples/autogen.sh | 31 - .../sdo/samples/build.bat | 32 - .../cpp-1.0-incubating-M2-RC3/sdo/samples/build.sh | 35 - .../sdo/samples/configure.ac | 47 - .../ides/devstudio6/projects/misc/build.cmd | 26 - .../samples/ides/devstudio6/projects/misc/misc.dsw | 29 - .../samples/ides/devstudio6/projects/misc/misc.ncb | Bin 82944 -> 0 bytes .../samples/ides/devstudio6/projects/misc/misc.opt | Bin 48640 -> 0 bytes .../devstudio6/projects/misc/sdo_misc/sdo_misc.dsp | 152 - .../devstudio6/projects/misc/sdo_misc/sdo_misc.mak | 262 - .../samples/ides/devstudio7/projects/misc/misc.sln | 29 - .../samples/ides/devstudio7/projects/misc/misc.suo | Bin 9216 -> 0 bytes .../projects/misc/sdo_misc/sdo_misc.vcproj | 326 - .../sdo/samples/misc/ChangeSummarySave.cpp | 188 - .../sdo/samples/misc/ChangeSummarySave.xsd | 49 - .../sdo/samples/misc/Makefile.am | 41 - .../sdo/samples/misc/ObjectCreation.cpp | 251 - .../sdo/samples/misc/Query.cpp | 178 - .../sdo/samples/misc/Substitutes.cpp | 121 - .../sdo/samples/misc/XSDLoading.cpp | 110 - .../sdo/samples/misc/XSDLoading.xml | 30 - .../sdo/samples/misc/XSDLoading.xsd | 48 - .../sdo/samples/misc/companysubs.xsd | 63 - .../sdo/samples/misc/deploy.bat | 52 - .../sdo/samples/misc/samples.cpp | 36 - .../sdo/samples/misc/samples.h | 54 - tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.bat | 45 - tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.sh | 35 - 1374 files changed, 155758 deletions(-) delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/build.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/build.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sca.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sdo.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/etc/svn-config delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/etc/svn-ignore delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/AUTHORS delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/COPYING delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/ChangeLog delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/Developers Guide.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/GettingStarted.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/INSTALL delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/LICENSE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/NEWS delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/NOTICE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/README delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/autogen.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/build.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/build.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/configure.ac delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/doc/Axis2CWSService.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/doc/CPPComponents.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/doc/PythonExtension.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/doc/RubyExtension.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-base.css delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-theme.css delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/makebindist.sh delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/makedist.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/build.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.dsw delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.ncb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.opt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_python/tuscany_sca_python.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Exceptions.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logging.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Utils.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Utils.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/test/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ServiceRuntimeException.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/sca.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-implementation-cpp.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-interface-cpp.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/ServiceRuntimeException.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/xsd/sca-implementation-php.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.cmd delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceRuntimeException.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_proxy.py delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_setup.py delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-implementation-python.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-interface-python.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.cmd delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/Ruby.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyCompositeContext.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/xsd/sca-implementation-ruby.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/axis2.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.cmd delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/module.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/services.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Dispatcher.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2DispatcherModule.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploymodule.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/xsd/sca-binding-webservice.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/AUTHORS delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/bigbank.account.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.accountmanagement.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/AccountClient.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deployclient.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploywsclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/COPYING delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deployclient.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploywsclient.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/CalculatorClient.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/CalculatorWSClient.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Divide.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/sample.calculator.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ChangeLog delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/GettingStarted.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/INSTALL delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/LICENSE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/Makefile.am delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/MyValueClient.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Makefile.am delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/Makefile.am delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValue.h delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.componentType delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/sca.composite delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueSubsystem/sca.subsystem delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/runMyValueClient.sh delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/server.wsdd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/NEWS delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/NOTICE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/deploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountService.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/bigbank.account.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.accountmanagement.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/AccountClient.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/deploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/deploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/DemoClientImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/supplychain.demo.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggerImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggingFacility.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/supplychain.logging.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/Manufacturer.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/ManufacturerImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/WarehouseCallback.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/supplychain.manufacturer.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerA.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerB.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerC.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/Retailer.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/RetailerImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/supplychain.retailer.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/Warehouse.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseCallbackImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/supplychain.warehouse.composite delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/autogen.sh delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/samples/build.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/configure.ac delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.dsw delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.ncb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.opt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/build.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/build.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/AccountClient/AccountClient.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/Accounts/Accounts.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/BigBank.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/WSAccountClient/WSAccountClient.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/samples/scagen.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/scatest.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/scatest.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/AUTHORS delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/COPYING delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ChangeLog delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/INSTALL delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/LICENSE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/NEWS delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/NOTICE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCComposite.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/services.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/configuration/WSEntryPointTestRPCSubsystem/sca.subsystem delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/sca.composite delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/autogen.sh delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/build.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/configure.ac delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/deploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/TestClient.c delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/runclient.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/ws.binding.service.client.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/services.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/deploy.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/datagraph.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/importschema.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop25-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop27-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop39-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50-in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50.xsd delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/runtest.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/ws.service.interop.client.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Test.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.solution.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/Makefile.am delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/LICENSE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/NOTICE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/README delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/build.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingCompositeAndFragmentTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllCompositesTest.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/Calculator.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.fragment delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.hpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/StockQuoteService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.fragment delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.hpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/StockQuoteService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.hpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/CustomerInfo.fragmentX delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/sca.compositeX delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.fragment delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.hpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/StockQuoteService.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/sca.composite delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/lib/readme.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.cmd delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-core.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-composite.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-wsdl.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sca/xsd/tuscany.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/AUTHORS delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/COPYING delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/ChangeLog delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/Committers Guide.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/GettingStarted.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/INSTALL delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/LICENSE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/NEWS delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/NOTICE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/README delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/autogen.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/build.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/build.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/configure.ac delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/doc/BuildingSTDCXX.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-base.css delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-theme.css delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/makebindist.sh delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/makedist.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dep delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/build.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/tuscany_sdo.ilk delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.dsw delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.ncb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.opt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom/sdo_axiom.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_interop/sdo_interop.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_runtime/sdo_runtime.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_samples/sdo_samples.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_test/sdo_test.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.suo delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/main.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/runinterop.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom_export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtbuild delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtproject delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.project delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logging.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingObject.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingObject.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDO.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSPI.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOString.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOUtils.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/disable_warn.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/export.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtbuild delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtproject delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.project delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Customer.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Order.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48601.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Atom1.0.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Catalog.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Customer.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Order.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Readme.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/SdoGenerate.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/StockQuoteService.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style4.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingSchema.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingUsingSchema.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/axis.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46633.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46634_out.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46693.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47293.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48602.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/badelement.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug45933-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/include.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.xsd_safe.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-outxml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/buniqueread-out.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2a.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/carotest3.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyabs.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyref.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companysubs.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload2-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload3-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave2-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/datetest.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/defaults.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/employee.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs3.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/extension.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gCustomer.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/getproptest.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwrongname.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/includeother3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira490.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705_out.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xsd.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/loadload-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/main.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/maintest.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/matttest1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/merle1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-core.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-implementation-local-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/notns.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/nulltest.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/oddchars.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNSout.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openseq.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/partial.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/querytest.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/saveopen-output.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-sca.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-webservice.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-ws.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-core.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-dll.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-local-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-cpp.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-wsdl.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-java.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-xsd.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario3.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario4.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario5.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest2.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sequence.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setmany.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setnull.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault1.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.wsdl delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_wsdl.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_xml.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/include3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/include3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother2.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test2/includeother3.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testabstract.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testerrors.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testinc2.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen3.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testorder.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/teststyles.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testsubsload.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testutils.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/travel.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/userdata.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/utils.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml1.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_in.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_out.txt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/AUTHORS delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/COPYING delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ChangeLog delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/GettingStarted.html delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/INSTALL delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/LICENSE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NEWS delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NOTICE delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/README delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/autogen.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.sh delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/configure.ac delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/build.cmd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.dsw delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.ncb delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.opt delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.dsp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.mak delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.sln delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.suo delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/sdo_misc/sdo_misc.vcproj delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Makefile.am delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ObjectCreation.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Query.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Substitutes.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xml delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/companysubs.xsd delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/deploy.bat delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.cpp delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.h delete mode 100644 tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.bat delete mode 100755 tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.sh (limited to 'tags') diff --git a/tags/cpp-1.0-incubating-M2-RC3/build.sh b/tags/cpp-1.0-incubating-M2-RC3/build.sh deleted file mode 100755 index da0169b8e8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/build.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -TOPDIR=`pwd` - -if [ x$LIBXML2_INCLUDE = x ]; then -echo "LIBXML2_INCLUDE not set" -exit; -fi -if [ x$LIBXML2_LIB = x ]; then -echo "LIBXML2_LIB not set" -exit; -fi - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -# Build SDO -cd sdo -./build.sh -cd $TOPDIR - -# Build SCA - -if [ x$TUSCANY_SDOCPP = x ]; then - export TUSCANY_SDOCPP=$TOPDIR/sdo/deploy -fi - -cd sca -./build.sh -cd $TOPDIR diff --git a/tags/cpp-1.0-incubating-M2-RC3/build.txt b/tags/cpp-1.0-incubating-M2-RC3/build.txt deleted file mode 100644 index 2158457d6e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/build.txt +++ /dev/null @@ -1,107 +0,0 @@ -Tuscany C++ Build Instructions for Developers -============================================= - -Download the source from http://svn.apache.org/repos/asf/incubator/tuscany/cpp -The download location is - -Linux Build -=========== - -Prereqs: -- Axis2C (version 0.92) -- libxml2 (version 2.6.20 or whichever version is prereq'd by axis2c) - -Environment: -- export LIBXML2_INCLUDE= -- export LIBXML2_LIB= -- export AXIS2C_HOME= - - -Build: -- cd -- ./build.sh - -This first builds the SDO subproject then SCA. The results are installed in - /sdo/deploy - /sca/deploy - -SDO Test --------- - -Run: -- cd /sdo -- ./sdotest.sh - - -SCA Test --------- - -Run: -- cd /sca -- ./scatest.sh - -Linux distribution build -======================== -To build the distro zips for linux: - -1. Download the source from http://svn.apache.org/repos/asf/incubator/tuscany/cpp -The download location is - -2. cd /sdo - -3. set the environment - - export LIBXML2_INCLUDE= - - export LIBXML2_LIB= - - export AXIS2C_HOME= - -4. ./makedist.sh - This produces a src and bin zip for Tuscany SDO - -5. cd /sca - -6. set the environment - - export TUSCANY_SDOCPP=/sdo/tucany_sdo-bin-${PACKAGE-VERSION} - -7. ./makedist.sh - This produces a src and bin zip for Tuscany SCA - - -Windows Build -============= - -Microsoft Visual Studio 6.x projects are provided for building on Windows. - -SDO ---- - -Prereqs: - -- libxml2 (tested with version 2.6.19) -- Axis2C (version 0.92) - -Set the following environment variables to point to the location of the dependencies: - LIBXML2_INCLUDE= - LIBXML2_LIB= - AXIS2C_HOME= - -Open the build workspace tuscany\cpp\sdo\runtime\projects\tuscany_sdo\tuscany_sdo.dsw -and follow the build instructions. - -Note for users of Microsoft Visual Studio 7.x ---------------------------------------------- -You can convert the projects supplied to a solution for Studio 7 by opening them in VS 7.x and selecting to convert. There are a number of small differences between VC6 and VC7 which may require additional changes to get the SDO code to compile, link and run. - -All the projects must be built multi-threaded: Project Properties/Configuration properties/C/C++/Code Generation/Runtime Library - select MultiThreaded Debug DLL /MDd (for debug build). - -The test project runs in the projects directory, where in C6 it ran in the Debug directory, so all the -test comparison files are in the wrong place. You can copy the entire contents of runtime/core/test/Debug to projects/tuscany_sdo/sdo_test - - - -SCA ---- - -Set the environment variable TUSCANY_SDOCPP to the path of an SDO build - -Open the build workspace tuscany\cpp\sca\projects\tuscany_sca\tuscany_sca.dsw -and follow the instructions. diff --git a/tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sca.bat b/tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sca.bat deleted file mode 100644 index 243c229735..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sca.bat +++ /dev/null @@ -1,209 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal -if "%LIBXML2_HOME%" == "" ( -echo "LIBXML2_HOME not set" -goto end -) -echo using LIBXML2: %LIBXML2_HOME% - -if "%ICONV_HOME%" == "" ( -echo "ICONV_HOME not set" -goto end -) -echo using ICONV: %ICONV_HOME%" - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C: %AXIS2C_HOME%" - -call vcvars32 - -echo Build of SCA started.... -set PACKAGE=tuscany_sca_cpp -set VERSION=1.0-incubator-M2 -set SRC_PACKAGE=%PACKAGE%-%VERSION%-src -set BIN_PACKAGE=%PACKAGE%-%VERSION%-bin - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -set TUSCANY_SDOCPP=%CD%\tuscany_sdo_cpp-%VERSION%-bin -) - -echo using TUSCANY_SDOCPP: %TUSCANY_SDOCPP% - -set FROM_DIR=%cd%\sca -set TO_SRC=%cd% - -set TO_BIN=%cd% - -echo Copying SCA source... - -if not exist %TO_SRC% mkdir %TO_SRC% - -rmdir /S /Q %TO_SRC%\%SRC_PACKAGE% -if not exist %TO_SRC%\%SRC_PACKAGE% mkdir %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\INSTALL %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\LICENSE %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\COPYING %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\NOTICE %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\README %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\GettingStarted.html %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\build.bat %TO_SRC%\%SRC_PACKAGE% - -if not exist %TO_SRC%\%SRC_PACKAGE%\deploy mkdir %TO_SRC%\%SRC_PACKAGE%\deploy -xcopy /t /e %FROM_DIR%\deploy %TO_SRC%\%SRC_PACKAGE%\deploy - -if not exist %TO_SRC%\%SRC_PACKAGE%\projects mkdir %TO_SRC%\%SRC_PACKAGE%\projects -xcopy/s %FROM_DIR%\projects %TO_SRC%\%SRC_PACKAGE%\projects - -if not exist %TO_SRC%\%SRC_PACKAGE%\projectsvc7 mkdir %TO_SRC%\%SRC_PACKAGE%\projectsvc7 -xcopy/s %FROM_DIR%\projectsvc7 %TO_SRC%\%SRC_PACKAGE%\projectsvc7 - -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime mkdir %TO_SRC%\%SRC_PACKAGE%\runtime -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime\core mkdir %TO_SRC%\%SRC_PACKAGE%\runtime\core -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime\extensions mkdir %TO_SRC%\%SRC_PACKAGE%\runtime\extensions -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\cpp mkdir %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\cpp -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\ws mkdir %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\ws -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\python mkdir %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\python -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\ruby mkdir %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\ruby - -xcopy/s %FROM_DIR%\runtime\core %TO_SRC%\%SRC_PACKAGE%\runtime\core -xcopy/s %FROM_DIR%\runtime\extensions\cpp %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\cpp -xcopy/s %FROM_DIR%\runtime\extensions\ws %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\ws -xcopy/s %FROM_DIR%\runtime\extensions\python %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\python -xcopy/s %FROM_DIR%\runtime\extensions\ruby %TO_SRC%\%SRC_PACKAGE%\runtime\extensions\ruby - -if not exist %TO_SRC%\%SRC_PACKAGE%\tools mkdir %TO_SRC%\%SRC_PACKAGE%\tools -xcopy/s %FROM_DIR%\tools %TO_SRC%\%SRC_PACKAGE%\tools - -if not exist %TO_SRC%\%SRC_PACKAGE%\doc mkdir %TO_SRC%\%SRC_PACKAGE%\doc -xcopy/s %FROM_DIR%\doc %TO_SRC%\%SRC_PACKAGE%\doc - -if not exist %TO_SRC%\%SRC_PACKAGE%\samples mkdir %TO_SRC%\%SRC_PACKAGE%\samples -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\BigBank mkdir %TO_SRC%\%SRC_PACKAGE%\samples\BigBank -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\Calculator mkdir %TO_SRC%\%SRC_PACKAGE%\samples\Calculator -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\ides mkdir %TO_SRC%\%SRC_PACKAGE%\samples\ides -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\PythonCalculator mkdir %TO_SRC%\%SRC_PACKAGE%\samples\PythonCalculator -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\RubyCalculator mkdir %TO_SRC%\%SRC_PACKAGE%\samples\RubyCalculator -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\RubyBank mkdir %TO_SRC%\%SRC_PACKAGE%\samples\RubyBank - -xcopy/s %FROM_DIR%\samples\BigBank %TO_SRC%\%SRC_PACKAGE%\samples\BigBank -xcopy/s %FROM_DIR%\samples\Calculator %TO_SRC%\%SRC_PACKAGE%\samples\Calculator -xcopy/s %FROM_DIR%\samples\ides %TO_SRC%\%SRC_PACKAGE%\samples\ides -xcopy/s %FROM_DIR%\samples\PythonCalculator %TO_SRC%\%SRC_PACKAGE%\samples\PythonCalculator -xcopy/s %FROM_DIR%\samples\RubyCalculator %TO_SRC%\%SRC_PACKAGE%\samples\RubyCalculator -xcopy/s %FROM_DIR%\samples\RubyBank %TO_SRC%\%SRC_PACKAGE%\samples\RubyBank -copy %FROM_DIR%\samples\scagen.bat %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\INSTALL %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\LICENSE %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\COPYING %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\NOTICE %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\README %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\GettingStarted.html %TO_SRC%\%SRC_PACKAGE%\samples - -if not exist %TO_SRC%\%SRC_PACKAGE%\xsd mkdir %TO_SRC%\%SRC_PACKAGE%\xsd -xcopy/s %FROM_DIR%\xsd %TO_SRC%\%SRC_PACKAGE%\xsd - -cd %TO_SRC%\%SRC_PACKAGE% -del /S Makefile.am - -echo Building SCA.... - -set TUSCANY_SCACPP=%FROM_DIR%\deploy -cd %FROM_DIR% -call build - -copy %FROM_DIR%\tools\scagen\bld\scagen.jar %FROM_DIR%\deploy\bin -copy %FROM_DIR%\tools\scagen\bld\scagen.cmd %FROM_DIR%\deploy\bin - -echo Installing SCA.... - -if not exist %TO_BIN% mkdir %TO_BIN% -rmdir /S /Q %TO_BIN%\%BIN_PACKAGE% -if not exist %TO_BIN%\%BIN_PACKAGE% mkdir %TO_BIN%\%BIN_PACKAGE% -if not exist %TO_BIN%\%BIN_PACKAGE%\doc mkdir %TO_BIN%\%BIN_PACKAGE%\doc - -xcopy/s %FROM_DIR%\deploy %TO_BIN%\%BIN_PACKAGE% -xcopy/s %FROM_DIR%\doc %TO_BIN%\%BIN_PACKAGE%\doc -copy %FROM_DIR%\INSTALL %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\LICENSE %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\COPYING %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\NOTICE %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\README %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\GettingStarted.html %TO_BIN%\%BIN_PACKAGE% - -set TUSCANY_SCACPP=%FROM_DIR%\deploy -echo Building calculator.... -cd %FROM_DIR%\samples\ides\devstudio6\projects\Calculator -call build - -echo Building bigbank.... -cd %FROM_DIR%\samples\ides\devstudio6\projects\BigBank -call build - -set TUSCANY_SCACPP=%TO_BIN%\%BIN_PACKAGE% -echo Deploying Python & Ruby samples.... -cd %FROM_DIR%\samples\PythonCalculator -call deploy -cd %FROM_DIR%\samples\RubyCalculator -call deploy -cd %FROM_DIR%\samples\RubyBank -call deploy - - -if not exist %TO_BIN%\%BIN_PACKAGE%\samples mkdir %TO_BIN%\%BIN_PACKAGE%\samples -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\ides mkdir %TO_BIN%\%BIN_PACKAGE%\samples\ides -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\Calculator mkdir %TO_BIN%\%BIN_PACKAGE%\samples\Calculator -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\PythonCalculator mkdir %TO_BIN%\%BIN_PACKAGE%\samples\PythonCalculator -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\RubyCalculator mkdir %TO_BIN%\%BIN_PACKAGE%\samples\RubyCalculator -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\BigBank mkdir %TO_BIN%\%BIN_PACKAGE%\samples\BigBank -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\RubyBank mkdir %TO_BIN%\%BIN_PACKAGE%\samples\RubyBank - -xcopy/s %FROM_DIR%\samples\ides %TO_BIN%\%BIN_PACKAGE%\samples\ides -xcopy/s %FROM_DIR%\samples\Calculator %TO_BIN%\%BIN_PACKAGE%\samples\Calculator -xcopy/s %FROM_DIR%\samples\PythonCalculator %TO_BIN%\%BIN_PACKAGE%\samples\PythonCalculator -xcopy/s %FROM_DIR%\samples\RubyCalculator %TO_BIN%\%BIN_PACKAGE%\samples\RubyCalculator -xcopy/s %FROM_DIR%\samples\BigBank %TO_BIN%\%BIN_PACKAGE%\samples\BigBank -xcopy/s %FROM_DIR%\samples\RubyBank %TO_BIN%\%BIN_PACKAGE%\samples\RubyBank - -xcopy/s %FROM_DIR%\deploy\samples\Calculator %TO_BIN%\%BIN_PACKAGE%\samples\Calculator -xcopy/s %FROM_DIR%\deploy\samples\BigBank %TO_BIN%\%BIN_PACKAGE%\samples\BigBank - -copy %FROM_DIR%\samples\INSTALL %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\LICENSE %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\COPYING %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\NOTICE %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\README %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\GettingStarted.html %TO_BIN%\%BIN_PACKAGE%\samples - -cd %TO_BIN%\%BIN_PACKAGE% -del /S Makefile.am - -echo Creating zip file: %TO_SRC%\%SRC_PACKAGE%.zip -jar -cMf %TO_SRC%\%SRC_PACKAGE%.zip -C %TO_SRC% %SRC_PACKAGE% -echo Creating zip file: %TO_BIN%\%BIN_PACKAGE%.zip -jar -cMf %TO_BIN%\%BIN_PACKAGE%.zip -C %TO_BIN% %BIN_PACKAGE% - -:end -echo SCA Build complete. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sdo.bat b/tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sdo.bat deleted file mode 100644 index dd9df08d44..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/build_tuscany_sdo.bat +++ /dev/null @@ -1,151 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal -if "%LIBXML2_HOME%" == "" ( -echo "LIBXML2_HOME not set" -goto end -) -echo using LIBXML2: %LIBXML2_HOME% - -if "%ICONV_HOME%" == "" ( -echo "ICONV_HOME not set" -goto end -) -echo using ICONV: %ICONV_HOME%" - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) - -echo using AXIS2C: %AXIS2C_HOME% - -call vcvars32 - -echo Build of SDO started.... -set PACKAGE=tuscany_sdo_cpp -set VERSION=1.0-incubator-M2 -set SRC_PACKAGE=%PACKAGE%-%VERSION%-src -set BIN_PACKAGE=%PACKAGE%-%VERSION%-bin - -set FROM_DIR=%cd%\sdo -set TO_SRC=%cd% -set TO_BIN=%cd% - -echo Copying SDO source... %TO_SRC%\%SRC_PACKAGE% - -if not exist %TO_SRC% mkdir %TO_SRC% -rmdir /S /Q %TO_SRC%\%SRC_PACKAGE% -if not exist %TO_SRC%\%SRC_PACKAGE% mkdir %TO_SRC%\%SRC_PACKAGE% -if not exist %TO_SRC%\%SRC_PACKAGE%\projects mkdir %TO_SRC%\%SRC_PACKAGE%\projects -if not exist %TO_SRC%\%SRC_PACKAGE%\projectsvc7 mkdir %TO_SRC%\%SRC_PACKAGE%\projectsvc7 -if not exist %TO_SRC%\%SRC_PACKAGE%\runtime mkdir %TO_SRC%\%SRC_PACKAGE%\runtime -if not exist %TO_SRC%\%SRC_PACKAGE%\deploy mkdir %TO_SRC%\%SRC_PACKAGE%\deploy -if not exist %TO_SRC%\%SRC_PACKAGE%\doc mkdir %TO_SRC%\%SRC_PACKAGE%\doc - -xcopy /t /e %FROM_DIR%\deploy %TO_SRC%\%SRC_PACKAGE%\deploy -xcopy/s %FROM_DIR%\runtime %TO_SRC%\%SRC_PACKAGE%\runtime -xcopy/s %FROM_DIR%\projectsvc7 %TO_SRC%\%SRC_PACKAGE%\projectsvc7 -xcopy/s %FROM_DIR%\doc %TO_SRC%\%SRC_PACKAGE%\doc - -xcopy/s %FROM_DIR%\projects %TO_SRC%\%SRC_PACKAGE%\projects -copy %FROM_DIR%\INSTALL %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\LICENSE %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\COPYING %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\NOTICE %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\README %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\GettingStarted.html %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\build.bat %TO_SRC%\%SRC_PACKAGE% -copy %FROM_DIR%\sdotest.bat %TO_SRC%\%SRC_PACKAGE% - - -if not exist %TO_SRC%\%SRC_PACKAGE%\samples mkdir %TO_SRC%\%SRC_PACKAGE%\samples -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\misc mkdir %TO_SRC%\%SRC_PACKAGE%\samples\misc -if not exist %TO_SRC%\%SRC_PACKAGE%\samples\ides mkdir %TO_SRC%\%SRC_PACKAGE%\samples\ides -copy %FROM_DIR%\samples\INSTALL %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\LICENSE %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\COPYING %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\NOTICE %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\README %TO_SRC%\%SRC_PACKAGE%\samples -copy %FROM_DIR%\samples\GettingStarted.html %TO_SRC%\%SRC_PACKAGE%\samples - -xcopy /s /e %FROM_DIR%\samples\misc %TO_SRC%\%SRC_PACKAGE%\samples\misc -xcopy/s %FROM_DIR%\samples\ides %TO_SRC%\%SRC_PACKAGE%\samples\ides - -cd %TO_SRC%\%SRC_PACKAGE% -del /S Makefile.am - -echo Building SDO.... - -cd %FROM_DIR% -call build - -echo Installing SDO.... - -if not exist %TO_BIN% mkdir %TO_BIN% -rmdir /S /Q %TO_BIN%\%BIN_PACKAGE% -if not exist %TO_BIN%\%BIN_PACKAGE% mkdir %TO_BIN%\%BIN_PACKAGE% -if not exist %TO_BIN%\%BIN_PACKAGE%\doc mkdir %TO_BIN%\%BIN_PACKAGE%\doc - -xcopy/s %FROM_DIR%\deploy %TO_BIN%\%BIN_PACKAGE% -xcopy/s %FROM_DIR%\doc %TO_BIN%\%BIN_PACKAGE%\doc -copy %FROM_DIR%\INSTALL %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\LICENSE %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\COPYING %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\NOTICE %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\README %TO_BIN%\%BIN_PACKAGE% -copy %FROM_DIR%\GettingStarted.html %TO_BIN%\%BIN_PACKAGE% - - -echo Building samples - -set TUSCANY_SDOCPP=%FROM_DIR%\deploy -cd %FROM_DIR%\samples\ides\devstudio6\projects\misc - -call build - -if not exist %TO_BIN%\%BIN_PACKAGE%\samples mkdir %TO_BIN%\%BIN_PACKAGE%\samples -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\ides mkdir %TO_BIN%\%BIN_PACKAGE%\samples\ides -if not exist %TO_BIN%\%BIN_PACKAGE%\samples\misc mkdir %TO_BIN%\%BIN_PACKAGE%\samples\misc - -xcopy/s %FROM_DIR%\samples\ides %TO_BIN%\%BIN_PACKAGE%\samples\ides -xcopy/s /Y %FROM_DIR%\samples\misc %TO_BIN%\%BIN_PACKAGE%\samples\misc - -xcopy/s %FROM_DIR%\deploy\samples\misc %TO_BIN%\%BIN_PACKAGE%\samples\misc - -copy %FROM_DIR%\samples\INSTALL %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\LICENSE %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\COPYING %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\NOTICE %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\README %TO_BIN%\%BIN_PACKAGE%\samples -copy %FROM_DIR%\samples\GettingStarted.html %TO_BIN%\%BIN_PACKAGE%\samples - -cd %TO_BIN%\%BIN_PACKAGE% -del /S Makefile.am - -echo Creating zip file: %TO_SRC%\%SRC_PACKAGE%.zip -jar -cMf %TO_SRC%\%SRC_PACKAGE%.zip -C %TO_SRC% %SRC_PACKAGE% -echo Creating zip file: %TO_BIN%\%BIN_PACKAGE%.zip -jar -cMf %TO_BIN%\%BIN_PACKAGE%.zip -C %TO_BIN% %BIN_PACKAGE% - -:end -echo SDO Build complete. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/etc/svn-config b/tags/cpp-1.0-incubating-M2-RC3/etc/svn-config deleted file mode 100644 index 4f8cb41685..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/etc/svn-config +++ /dev/null @@ -1,136 +0,0 @@ -### This file configures various client-side behaviors. -### -### The commented-out examples below are intended to demonstrate -### how to use this file. - -### Section for authentication and authorization customizations. -[auth] -### Set store-passwords to 'no' to avoid storing passwords in the -### auth/ area of your config directory. It defaults to 'yes'. -### Note that this option only prevents saving of *new* passwords; -### it doesn't invalidate existing passwords. (To do that, remove -### the cache files by hand as described in the Subversion book.) -# store-passwords = no -### Set store-auth-creds to 'no' to avoid storing any subversion -### credentials in the auth/ area of your config directory. -### It defaults to 'yes'. Note that this option only prevents -### saving of *new* credentials; it doesn't invalidate existing -### caches. (To do that, remove the cache files by hand.) -# store-auth-creds = no - -### Section for configuring external helper applications. -[helpers] -### Set editor to the command used to invoke your text editor. -### This will override the environment variables that Subversion -### examines by default to find this information ($EDITOR, -### et al). -# editor-cmd = editor (vi, emacs, notepad, etc.) -### Set diff-cmd to the absolute path of your 'diff' program. -### This will override the compile-time default, which is to use -### Subversion's internal diff implementation. -# diff-cmd = diff_program (diff, gdiff, etc.) -### Set diff3-cmd to the absolute path of your 'diff3' program. -### This will override the compile-time default, which is to use -### Subversion's internal diff3 implementation. -# diff3-cmd = diff3_program (diff3, gdiff3, etc.) -### Set diff3-has-program-arg to 'true' or 'yes' if your 'diff3' -### program accepts the '--diff-program' option. -# diff3-has-program-arg = [true | false] - -### Section for configuring tunnel agents. -[tunnels] -### Configure svn protocol tunnel schemes here. By default, only -### the 'ssh' scheme is defined. You can define other schemes to -### be used with 'svn+scheme://hostname/path' URLs. A scheme -### definition is simply a command, optionally prefixed by an -### environment variable name which can override the command if it -### is defined. The command (or environment variable) may contain -### arguments, using standard shell quoting for arguments with -### spaces. The command will be invoked as: -### svnserve -t -### (If the URL includes a username, then the hostname will be -### passed to the tunnel agent as @.) If the -### built-in ssh scheme were not predefined, it could be defined -### as: -# ssh = $SVN_SSH ssh -### If you wanted to define a new 'rsh' scheme, to be used with -### 'svn+rsh:' URLs, you could do so as follows: -# rsh = rsh -### Or, if you wanted to specify a full path and arguments: -# rsh = /path/to/rsh -l myusername -### On Windows, if you are specifying a full path to a command, -### use a forward slash (/) or a paired backslash (\\) as the -### path separator. A single backslash will be treated as an -### escape for the following character. - -### Section for configuring miscelleneous Subversion options. -[miscellany] -### Set global-ignores to a set of whitespace-delimited globs -### which Subversion will ignore in its 'status' output. -# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store -### Set log-encoding to the default encoding for log messages -# log-encoding = latin1 -### Set use-commit-times to make checkout/update/switch/revert -### put last-committed timestamps on every file touched. -# use-commit-times = yes -### Set no-unlock to prevent 'svn commit' from automatically -### releasing locks on files. -# no-unlock = yes -### Set enable-auto-props to 'yes' to enable automatic properties -### for 'svn add' and 'svn import', it defaults to 'no'. -### Automatic properties are defined in the section 'auto-props'. -enable-auto-props = yes - -### Section for configuring automatic properties. -[auto-props] -### The format of the entries is: -### file-name-pattern = propname[=value][;propname[=value]...] -### The file-name-pattern can contain wildcards (such as '*' and -### '?'). All entries which match will be applied to the file. -### Note that auto-props functionality must be enabled, which -### is typically done by setting the 'enable-auto-props' option. -# *.c = svn:eol-style=native -# *.cpp = svn:eol-style=native -# *.h = svn:eol-style=native -# *.dsp = svn:eol-style=CRLF -# *.dsw = svn:eol-style=CRLF -# *.sh = svn:eol-style=native;svn:executable -# *.txt = svn:eol-style=native -# *.png = svn:mime-type=image/png -# *.jpg = svn:mime-type=image/jpeg -# Makefile = svn:eol-style=native - -*.c = svn:eol-style=native;svn:keywords=Rev Date -*.cpp = svn:eol-style=native;svn:keywords=Rev Date -*.h = svn:eol-style=native;svn:keywords=Rev Date -*.dsp = svn:eol-style=CRLF -*.dsw = svn:eol-style=CRLF -*.sh = svn:eol-style=native;svn:executable;svn:keywords=Rev Date -*.bat = svn:eol-style=native;svn:keywords=Rev Date -*.txt = svn:eol-style=native;svn:keywords=Rev Date -*.png = svn:mime-type=image/png -*.jpg = svn:mime-type=image/jpeg -*.am = svn:eol-style=native;svn:keywords=Rev Date -*.ac = svn:eol-style=native;svn:keywords=Rev Date -*.xml = svn:eol-style=native;svn:keywords=Rev Date -*.xsd = svn:eol-style=native;svn:keywords=Rev Date -*.html = svn:eol-style=native;svn:keywords=Rev Date -*.wsdl = svn:eol-style=native;svn:keywords=Rev Date -*.xsd = svn:eol-style=native;svn:keywords=Rev Date -*.composite = svn:eol-style=native;svn:keywords=Rev Date -*.componentType = svn:eol-style=native;svn:keywords=Rev Date -*.rb = svn:eol-style=native;svn:keywords=Rev Date -*.py = svn:eol-style=native;svn:keywords=Rev Date -*.php = svn:eol-style=native;svn:keywords=Rev Date -*.js = svn:eol-style=native;svn:keywords=Rev Date -*.java = svn:eol-style=native;svn:keywords=Rev Date -*.properties = svn:eol-style=native;svn:keywords=Rev Date -*.jelly = svn:eol-style=native;svn:keywords=Rev Date -*.ipr = svn:eol-style=native -*.iml = svn:eol-style=native -*.project = svn:eol-style=native -*.classpath = svn:eol-style=native -README = svn:eol-style=native;svn:keywords=Rev Date -LICENSE = svn:eol-style=native -NOTICE = svn:eol-style=native - diff --git a/tags/cpp-1.0-incubating-M2-RC3/etc/svn-ignore b/tags/cpp-1.0-incubating-M2-RC3/etc/svn-ignore deleted file mode 100644 index 38a7548cb7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/etc/svn-ignore +++ /dev/null @@ -1,29 +0,0 @@ -configure -Makefile.in -config.log -depcomp -config.guess -config.h -config.sub -ltmain.sh -Makefile -config.status -stamp-h1 -config.h.in -libtool -autom4te.cache -missing -aclocal.m4 -install-sh -.deps -*.dat -.libs -tmp -bld -.project -.cdtproject -.settings -*_Proxy.cpp -*_Proxy.h -*_Wrapper.cpp -*_Wrapper.h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/AUTHORS b/tags/cpp-1.0-incubating-M2-RC3/sca/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/COPYING b/tags/cpp-1.0-incubating-M2-RC3/sca/COPYING deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/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-1.0-incubating-M2-RC3/sca/ChangeLog b/tags/cpp-1.0-incubating-M2-RC3/sca/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/Developers Guide.txt b/tags/cpp-1.0-incubating-M2-RC3/sca/Developers Guide.txt deleted file mode 100644 index db7797b277..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/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:\mycomposites\composite1 -output c:\mycomposites\bld\composite1 - -What scagen does ----------------- - -The input directory passed to the scagen tools as -the -dir parameter method is taken to be the SCA -composite root directory. All the sca.composite 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 .composite 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.composite/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 CompositeOrFragmentFileHandler.java) that are the classes that tie this -package to the ...common package and which are called by the -DirectoryTree walker. - -Walking the composite root input directory ---------------------------------------- - -The main method of the scagen class creates an instance of -"DirectoryScanner" and registers with it a file handler of -type "CompositeOrFragmentFileHandler" for all files that end -in ".composite" or ".fragment". On calling the "walkTree" method -on the scanner it will in turn call the actOnFile method on the -CompositeOrFragmentFileHandler for appropriate files. - -Scanning the .composite and .fragment files ----------------------------------------- - -The scanning of these files by the respective "CompositeOrFragmentFileHandler" -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 "/composite/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) composite 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.composite/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/TestAllCompositesTest.java - -will dynamically look for all the subdirectores of the directory -path given by TuscanyTestCase.junit_composites and run the scagen -tool on them as if they were composites 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 composites 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/composites/ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/GettingStarted.html b/tags/cpp-1.0-incubating-M2-RC3/sca/GettingStarted.html deleted file mode 100644 index a236126928..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/GettingStarted.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - Tuscany - Getting Started - - - -
-
-
-

Tuscany - Getting Started - SCA C++ Milestone release 2

- -

Tuscany SCA C++ provides a runtime implementation for the Service Component - Architecture 0.96 Assembly specification and the 0.95 C++ Client & Implementation specification - (found here), - written in C++ and currently supports C++, Python and Ruby - component implementation types. This page describes what is needed to install and run Tuscany - SCA for C++.
If you haven't already done so, the first - step is to download the SCA C++ Milestone release 2 of Apache Tuscany from our - download page.
-

-
- - - - -
-

System Requirements

- -

In order to run Tuscany SCA there are some - minimum requirements:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SoftwareNotes and Download Link
Operating systems: -
    - -
  • Windows XP SP2
  • -
  • Linux
  • -
-
- Linux distributions tested on include Redhat Enterprise Linux v3, Redhat Enterprise Linux v4, - Ubuntu 6.06 LTS and Fedora Core 5. -
Axis2C Release 0.94 - http://ws.apache.org/axis2/c/download.cgi
- Please download and follow the installation instructions. Ensure you can run the Axis2C samples -
Tuscany SDO for C++ Milestone Release 2 - http://incubator.apache.org/tuscany/download.html
- Please download and follow the installation instructions -
Optional: Java SDK 1.4 or later - http://java.sun.com/javase/downloads/index.jsp
- This is required for building and running the SCAGEN code generation tool, which is used - when developing Tuscany SCA C++ components. This is not required when only developing - Python or Ruby SCA components. -
Optional: Apache Ant 1.6 or later - http://ant.apache.org
- This is required for building the SCAGEN code generation tool, which is used - when developing Tuscany SCA C++ components. This is only required when building - a source distribution of Tuscany SCA C++. -
Optional: Python version 2.4 - http://www.python.org/download/
- This is required for building or running the Tuscany SCA Python extension - (see below). - Please download and follow the installation instructions. You can build - the Tuscany SCA Python Extension with other versions of Python - versions 2.3.4 - and higher have been tested. -
Optional: Ruby version 1.8.x - http://www.ruby-lang.org
- This is required for building or running the Tuscany SCA Ruby extension - (see below). - Please download and follow the installation instructions. You should - be able to build the Tuscany SCA Ruby Extension with other versions of Ruby. -
-
-
-

Installing Tuscany SCA for C++

-

Getting Tuscany SCA for C++ working with the binary release on Linux

-
    -
  1. Extract the binary tar package to a folder
  2. -
  3. Set the TUSCANY_SCACPP environment variable to point to the directory that was just extracted
  4. -
  5. Add the <tuscany_sca_install_dir>/lib directory to the LD_LIBRARY_PATH environment variable
  6. -
-

Getting Tuscany SCA for C++ working with the source release on Linux

-
    -
  1. Extract the source tar package to a folder <tuscany_sca_install_dir>
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  4. -
  5. The following environment variables are optional if you wish to build the Python or Ruby extensions - (see the Python extension and - Ruby extension documentation): -
      -
    • PYTHON_LIB=<path to Python libraries>
    • -
    • PYTHON_INCLUDE=<path to Python includes>
    • -
    • PYTHON_VERSION=<name of the Python version>
      - Note: If you are using a default installation of Python 2.3 these are usually:
      - PYTHON_LIB=/usr/lib
      - PYTHON_INCLUDE=/usr/include/python2.3
      - PYTHON_VERSION=python2.3
    • -
    • RUBY_LIB=<path to Ruby libraries>
    • -
    • RUBY_INCLUDE=<path to Ruby includes>
      - Note: If you are using a default installation of Ruby these are usually:
      - RUBY_LIB=/usr/lib
      - RUBY_INCLUDE=/usr/lib/ruby/1.8/i386-linux
    • -
  6. -
  7. Build the source with the following command sequence: -
      -
    • ./configure --prefix=<tuscany_sca_install_dir>/deploy --enable-static=no
    • -
    • make
    • -
    • make install
    • -
    - NOTE: If you don't provide a --prefix configure option, it will by default install into - /usr/local/tuscany/sca. Use ./configure --help to see all the available options
  8. -
  9. Set the TUSCANY_SCACPP environment variable to point to the <tuscany_sca_install_dir>/deploy - directory that contains the built Tuscany SCA distribution
  10. -
- -

Getting Tuscany SCA for C++ working with the binary release on Windows

-
    -
  1. Unzip the supplied zip file to a folder
  2. -
  3. Set the TUSCANY_SCACPP environment variable to point to the directory that was just unzipped
  4. -
  5. Add the <tuscany_sca_install_dir>\bin directory to the PATH environment variable
  6. -
-

Getting Tuscany SCA for C++ working with the source release on Windows

-
    -
  1. Unzip the supplied source zip file
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  4. -
  5. The following environment variables are optional if you wish to build the Python or Ruby extensions - (see the Python extension and - Ruby extension documentation): -
      -
    • PYTHON_HOME=<path to installed Python> -
    • RUBY_HOME=<path to installed Ruby>
    • -
  6. -
  7. You must have set up the environment for Microsoft Visual C++ tools. The build command - will call vcvars32 to set the environment. Ensure the directory containing this is on your path. - This will be where you installed the compiler.
  8. -
  9. Build the source: -
      -
    • cd <to where you unzipped the source>
    • -
    • build
    • -
    - This will build all the projects and put the required output into the 'deploy' directory

    - Alternatively, open the workspace at <tuscany_sca_install_dir>/projects/tuscany_sca/tuscany_sca.dsw - in Visual Studio 6 or at at <tuscany_sca_install_dir>/projectsvc7/tuscany_sca/tuscany_sca.sln - in Visual Studio 7.1 - you can build projects individually - or build them all in one step
  10. -
  11. Set the TUSCANY_SCACPP environment variable to point to the 'deploy' directory that was just created
  12. -
-
- -
-

Tuscany SCA Extensions

-

Tuscany SCA is composed of two distinct areas: the core and extensions. The core provides the - implementation of the - Service - Component Architecture Assembly Model specification, reading composite files, loading the - appropriate extensions and invoking components via references and services during runtime. The - extensions provide the functionality required to call a component implementation (e.g. a C++ class - compiled into a dll) or invoke a binding (e.g. make a Web Services call). -

-

The table below details the extensions that are included with TuscanySCA for C++ Milestone - Release 2. -

- - - - - - - - - - - - - - - - - - - - - - - -
ExtensionDetails
C++ - Provides the SCA C++ client API and enables C++ component implementations - and interfaces. See the - SCA - C++ Client and Implementation specification for more details about the SCA C++ - Programming Model and the Creating C++ SCA Components - document for a step-by-step example. -
Axis2C Web Services - Provides the Web Service bindings enabling Tuscany to call SCA references via - Web Services or expose SCA services as Web Services. See the - SCA - Web Service bindings specification for more details about SCA Web Service support - and the Enabling Web Service - access to SCA Components document for a step-by-step example. -
- Python - Provides a Python SCA client API and enables Python component implementations. - This extension is disabled by default and must be enabled to be used. - See the Python extension documentation for - more details. -
- Ruby - Provides a Ruby SCA client API and enables Ruby component implementations. - This extension is disabled by default and must be enabled to be used. - See the Ruby extension documentation for - more details. -
-
- -
-

Samples

- - - - - - - -
SCA Technology samples - Simple samples that emphasize how to to use - Service Component Architecture technology. Follow the - instructions on the samples Getting Started - page to build and run the Tuscany SCA samples -
-
-
-
-

User Guide Documents

- - - - - - - - - - - - - - - - - - - -
Creating and building a Tuscany SCA C++ component - A document that describes how to create, build and run a Tuscany SCA C++ component. -
Enabling Web Service access to your Tuscany SCA component - A document that describes how to expose a Tuscany SCA C++ component as a Web Service via the Tuscany Axis2C Web Service support. -
The Tuscany SCA Python Programming Model - A document that describes how to create and run a Tuscany SCA Python component. -
The Tuscany SCA Ruby Programming Model - A document that describes how to create and run a Tuscany SCA Ruby component. -
-
-
-
-

Getting Help

- -

The first place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

- - -

 

- -

 

- -

 

- - - - - - -
- -

Thank you for your interest in Tuscany.

-The - Tuscany Development Team -
-
-
-
- - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/INSTALL b/tags/cpp-1.0-incubating-M2-RC3/sca/INSTALL deleted file mode 100644 index 9e0a0b758a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -Please read the GettingStarted.html document for information on -building and installing Tuscany SCA for C++ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/LICENSE b/tags/cpp-1.0-incubating-M2-RC3/sca/LICENSE deleted file mode 100755 index f433b1a53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/LICENSE +++ /dev/null @@ -1,177 +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 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/Makefile.am deleted file mode 100644 index 08fe50d708..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = tools runtime -DIST_SUBDIRS = tools runtime samples -datadir=$(prefix) - -data_DATA = INSTALL README LICENSE COPYING NOTICE GettingStarted.html -nobase_data_DATA = xsd/*.* -EXTRA_DIST = LICENSE COPYING INSTALL README NOTICE GettingStarted.html xsd doc -dist-hook: - rm -rf `find $(distdir)/ -type d -name .svn` - rm -rf `find $(distdir)/ -type d -name .deps` - -install-data-hook: - rm -rf $(prefix)/samples - cp -r samples $(prefix) - rm -rf `find $(prefix)/samples -type d -name .svn` - rm -rf `find $(prefix)/samples -type d -name .deps` - rm -rf $(prefix)/doc - cp -r doc $(prefix) - rm -rf `find $(prefix)/doc -type d -name .svn` - rm -rf `find $(prefix)/doc -type d -name .deps` - - -bindist: dist - rm -rf ${PACKAGE}-${PACKAGE_VERSION} - rm -rf ${PACKAGE}-${PACKAGE_VERSION}-src - rm -rf ${PACKAGE}-${PACKAGE_VERSION}-bin - gunzip -f ${PACKAGE}-${PACKAGE_VERSION}.tar.gz - tar -xf ${PACKAGE}-${PACKAGE_VERSION}.tar - mv ${PACKAGE}-${PACKAGE_VERSION} ${PACKAGE}-${PACKAGE_VERSION}-src - tar -cf - ${PACKAGE}-${PACKAGE_VERSION}-src | gzip -c > ${PACKAGE}-${PACKAGE_VERSION}-src.tar.gz - cd ${PACKAGE}-${PACKAGE_VERSION}-src \ - && sh ../makebindist.sh - mkdir ${PACKAGE}-${PACKAGE_VERSION}-bin - cp -r ${PACKAGE}-${PACKAGE_VERSION}-src/deploy/* ${PACKAGE}-${PACKAGE_VERSION}-bin - tar -cf - ${PACKAGE}-${PACKAGE_VERSION}-bin | gzip -c > ${PACKAGE}-${PACKAGE_VERSION}-bin.tar.gz - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/NEWS b/tags/cpp-1.0-incubating-M2-RC3/sca/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/NOTICE b/tags/cpp-1.0-incubating-M2-RC3/sca/NOTICE deleted file mode 100644 index bfb81409ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/README b/tags/cpp-1.0-incubating-M2-RC3/sca/README deleted file mode 100644 index f61ed9af27..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/README +++ /dev/null @@ -1,74 +0,0 @@ -Apache Tuscany C++ M2 build (October, 2006) -=========================================== - -http://incubator.apache.org/tuscany - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - - -Getting Started -=============== - -Documentation describing the system requirements and the steps to install -Tuscany SCA C++ and run the samples can be found in the GettingStarted.html -file. - - -About Tuscany SCA C++ -===================== - -Tuscany SCA C++ provides a runtime implementation for the for the Service -Component Architecture 0.96 Assembly specification and the 0.95 C++ Client -& Implementation Model specification, written in C++ and will currently -support C++, Python and Ruby component implementation types. - -The specifications can be found at -http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications - -It is possible to interoperate with Tuscany SCA Java via the Web Service bindings -for services and references but restrictions apply. 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 the SCA C++ Client and - Implementation Model specification. - * Component implementations written in Python. See the doc/PythonExtension.html - documentation. - * Component implementations written in Python. See the doc/RubyExtension.html - documentation. - * Component interfaces described by C++ classes. See SCA Client and - Implementation Model specification. - -Supported service and reference 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 yet supported). - -Known restrictions - * Local service interfaces cannot use overloaded operations (the SCA - specification limits remote service interfaces to not using overloaded - operations). - * 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. - - - -Thank you for using Tuscany! - -The Tuscany Team. diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/autogen.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/autogen.sh deleted file mode 100755 index af38864985..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/autogen.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -for i in "libtoolize --force" 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-1.0-incubating-M2-RC3/sca/build.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/build.bat deleted file mode 100644 index 750d234152..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/build.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -@setlocal - -echo building Java code -cd tools\scagen -call ant - -echo building C++ code -call vcvars32 -cd ..\..\projects\tuscany_sca -build.cmd - -@endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/build.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/build.sh deleted file mode 100755 index 1be3833384..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/build.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$PYTHON_LIB = x ]; then -echo "PYTHON_LIB not set. Python extension will not be built" -elif [ x$PYTHON_INCLUDE = x ]; then -echo "PYTHON_INCLUDE not set. Python extension will not be built" -elif [ x$PYTHON_VERSION = x ]; then -echo "PYTHON_VERSION not set. Python extension will not be built" -else -echo "Building PYTHON extension with Python $PYTHON_VERSION installed at $PYTHON_LIB, $PYTHON_INCLUDE" -ENABLE_PYTHON=--enable-python -fi - -if [ x$RUBY_LIB = x ]; then -echo "RUBY_LIB not set. Ruby extension will not be built" -elif [ x$RUBY_INCLUDE = x ]; then -echo "RUBY_INCLUDE not set. Ruby extension will not be built" -else -echo "Building Ruby extension with Ruby installed at $RUBY_LIB, $RUBY_INCLUDE" -ENABLE_RUBY=--enable-ruby -fi - -cd ${TUSCANY_SCACPP_HOME}/samples -./autogen.sh - -cd $TUSCANY_SCACPP_HOME -./autogen.sh - -./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no ${ENABLE_RUBY} ${ENABLE_PYTHON} -make -make install - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/configure.ac b/tags/cpp-1.0-incubating-M2-RC3/sca/configure.ac deleted file mode 100644 index 983ff2510c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/configure.ac +++ /dev/null @@ -1,212 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -dnl run autogen.sh to generate the configure script. - -AC_PREREQ(2.59) -AC_INIT(tuscany_sca_cpp, 1.0-incubator-M2) -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AC_PREFIX_DEFAULT(/usr/local/tuscany/sca) - -# 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 - -# Check for dynamic library suffixes -AC_MSG_CHECKING([checking for dynamic library suffix]) -AC_CHECK_HEADER([sys/appleapiopts.h], - [AC_SUBST([libsuffix],[".dylib"]) AC_MSG_RESULT([using .dylib])], - [AC_SUBST([libsuffix],[".so"]) AC_MSG_RESULT([using .so])] -) - -# 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_SUBDIRS([samples]) - -AC_MSG_CHECKING(whether to build all component type and binding extensions) -AC_ARG_ENABLE(all-extensions, [AS_HELP_STRING([--enable-all-extensions],[build all runtime extensions [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_all=false - ;; - *) - AC_MSG_RESULT(yes) - want_all=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_all=false ] -) -AM_CONDITIONAL([WANT_ALL], [test x$want_all = xtrue]) - -AC_MSG_CHECKING(whether to build C++ component type extension) -AC_ARG_ENABLE(cpp, [AS_HELP_STRING([--enable-cpp],[build C++ component type extension [default=yes]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_cpp=false - ;; - *) - AC_MSG_RESULT(yes) - want_cpp=true - ;; - esac ], -[ AC_MSG_RESULT(yes) - want_cpp=true ] -) -AM_CONDITIONAL([WANT_CPP], [test x$want_cpp = xtrue]) - -AC_MSG_CHECKING(whether to build Web Service binding extension) -AC_ARG_ENABLE(wsbinding, [AS_HELP_STRING([--enable-wsbinding],[build Web Service binding extension [default=yes]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_wsbinding=false - ;; - *) - AC_MSG_RESULT(yes) - want_wsbinding=true - ;; - esac ], -[ AC_MSG_RESULT(yes) - want_wsbinding=true ] -) -AM_CONDITIONAL([WANT_WSBINDING], [test x$want_wsbinding = xtrue]) - -AC_MSG_CHECKING(whether to build SCA default binding extension) -AC_ARG_ENABLE(scabinding, [AS_HELP_STRING([--enable-scabinding],[build SCA default binding extension [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_scabinding=false - ;; - *) - AC_MSG_RESULT(yes) - want_scabinding=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_scabinding=false ] -) -AM_CONDITIONAL([WANT_SCABINDING], [test x$want_scabinding = xtrue]) - -AC_MSG_CHECKING(whether to build Python component type extension) -AC_ARG_ENABLE(python, [AS_HELP_STRING([--enable-python],[build Python component type extension [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_python=false - ;; - *) - AC_MSG_RESULT(yes) - want_python=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_python=false ] -) -AM_CONDITIONAL([WANT_PYTHON], [test x$want_python = xtrue]) - -AC_MSG_CHECKING(whether to build Ruby component type extension) -AC_ARG_ENABLE(ruby, [AS_HELP_STRING([--enable-ruby],[build Ruby component type extension [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_ruby=false - ;; - *) - AC_MSG_RESULT(yes) - want_ruby=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_ruby=false ] -) -AM_CONDITIONAL([WANT_RUBY], [test x$want_ruby = xtrue]) - -AC_MSG_CHECKING(whether to build PHP component type extension) -AC_ARG_ENABLE(php, [AS_HELP_STRING([--enable-php],[build PHP component type extension [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_php=false - ;; - *) - AC_MSG_RESULT(yes) - want_php=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_php=false ] -) -AM_CONDITIONAL([WANT_PHP], [test x$want_php = xtrue]) - -AC_CONFIG_FILES([Makefile - tools/Makefile - tools/scagen/Makefile - runtime/Makefile - runtime/core/Makefile - runtime/core/src/Makefile - runtime/extensions/Makefile - runtime/extensions/cpp/Makefile - runtime/extensions/cpp/src/Makefile - runtime/extensions/ws/Makefile - runtime/extensions/ws/reference/Makefile - runtime/extensions/ws/reference/axis2c/Makefile - runtime/extensions/ws/reference/axis2c/src/Makefile - runtime/extensions/ws/service/Makefile - runtime/extensions/ws/service/axis2c/Makefile - runtime/extensions/ws/service/axis2c/src/Makefile - runtime/extensions/sca/Makefile - runtime/extensions/sca/reference/Makefile - runtime/extensions/sca/reference/axis2c/Makefile - runtime/extensions/sca/reference/axis2c/src/Makefile - runtime/extensions/sca/service/Makefile - runtime/extensions/sca/service/axis2c/Makefile - runtime/extensions/sca/service/axis2c/src/Makefile - runtime/extensions/python/Makefile - runtime/extensions/python/src/Makefile - runtime/extensions/ruby/Makefile - runtime/extensions/ruby/src/Makefile - runtime/extensions/php/Makefile - runtime/extensions/php/src/Makefile - ]) -AC_OUTPUT - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/Axis2CWSService.html b/tags/cpp-1.0-incubating-M2-RC3/sca/doc/Axis2CWSService.html deleted file mode 100644 index 201ee10e26..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/Axis2CWSService.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ - Enabling Axis2C Web Services - - - -
-
-
-

Tuscany SCA for C++ - Enabling Axis2C Web Services

- -

This document describes the deployment and use of the Axis2C Web Service - (binding.ws) service support in the Apache Tuscany SCA C++ runtime. -

-

The WS service code is based on Apache - Axis2C version 0.94 and allows SCA components to be invoked via Web - Service calls. -

-

WS service currently supports Document/literal Wrapped style Web Services - only. There are also restrictions about the parameter and return types of the - operations in SCA components that can be exposed as Web Services, see below - for more details. -

-

See the SCA - Web Service binding specification for more details about SCA Web - Service support. -

-

Also, see the samples for various - demonstrations of the use of the binding.ws service support. -

-
- - - - -
-

Deploying the Tuscany Web Service support to Axis2C

-

Deploying via scripts

-

Tuscany provides simple shell scripts to deploy the Web Service support to Axis2C. - However, the script will overwrite your Axis2C axis.xml file, so if you - have altered your axis2.xml from the default provided by the Axis2C distribution, it is - recommended that you follow the manual deployment steps - outlined below. -

-

To automatically deploy Tuscany Web Service support to Axis2C on Linux: -

    -
  1. The AXIS2C_HOME environment variable is required: -
      -
    • set AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. -
  3. Use the following command sequence to run the deploy script: -
      -
    • cd <tuscany_sca_install_dir>/extensions/ws/service
    • -
    • ./deploy.sh
    • -
    -
  4. -
-

-

To automatically deploy Tuscany Web Service support to Axis2C on Windows: -

    -
  1. The AXIS2C_HOME environment variable is required: -
      -
    • export AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. -
  3. Use the following command sequence to run the deploy script: -
      -
    • cd <tuscany_sca_install_dir>\extensions\ws\service
    • -
    • deploy.cmd
    • -
    -
  4. -
-

- - -

Deploying manually

-

To deploy Tuscany Web Service support to Axis2C manually, use the following steps: -

-
    -
  1. - Linux: -
      -
    1. cd <axis2c version 0.94>/services
    2. -
    3. ln -sf <tuscany_sca_install_dir>/extensions/ws/service/services/tuscany
    4. -
    5. cd <axis2c version 0.94>/modules
    6. -
    7. ln -sf <tuscany_sca_install_dir>/extensions/ws/service/modules/tuscany
    8. -
    - Windows: -
      -
    1. Create a <axis2c version 0.94>\services\tuscany directory -
    2. -
    3. Copy all the files in <tuscany_sca_install_dir>\extensions\ws\service\services\tuscany - to the directory created above -
    4. -
    5. Create a <axis2c version 0.94>\modules\tuscany directory -
    6. -
    7. Copy all the files in <tuscany_sca_install_dir>\extensions\ws\service\modules\tuscany - to the directory created above -
    8. -
    -
  2. -
  3. Edit the <axis2c version 0.94>/axis2.xml file to add a <ref module="tuscany"> - element. This will register the above module. E.g.: -
    ...
    -    <!-- ================================================= -->
    -    <!-- Global Modules  -->
    -    <!-- ================================================= -->
    -    <!-- Comment this to disable Addressing -->
    -    <module ref="addressing"/>
    -
    -    <module ref="tuscany"/>
    -
    -...              
    -
  4. - -
-
- -
-

Defining an SCA Composite with a WS service

- -

In this section we will use the Calculator sample as a worked example. - The Calculator code and files can be found at - <tuscany_sca_install_dir>samples/Calculator. -

-

Pre-requisites: -

    -
  • At least one working component within a composite and solution - composite. The component(s) can be implemented in C++, Ruby or Python. - If this includes C++ components, the SCAGEN generated Proxy and Wrapper - classes and the component class files must have been compiled into a - .dll or .so library. The *.composite and *.componentType files must - also be available and working. -
  • -
-

-
    -
  1. Optionally, create the WSDL that defines the interface of your SCA component. See the - table XML Schema Type to C++ Type Mapping and - Notes on creating WSDL below - for mapping the parameters and return types of the component operations to XML - schema types in the WSDL. This file will need to be accessible from the component, - so place it in the same directory as the component or in a subdirectory. -
    - See the <tuscany_sca_install_dir>/samples/Calculator/sample.calculator/Calculator.wsdl - file as an example. -
    - If you do not provide a WSDL file describing the service interface then the service will - accept any incoming document/literal wrapped XML request that matches an operation on the - target service (the wrapper element name and types of the sub-elements must match the operation - name and its parameter types). Additionally, if the target component is a Python or Ruby - scripting component, it will accept any parameter type so you can pretty much pass whatever - data you want, as long at the incoming XML request matches to an operation name with the - correct number of parameters on the target service. -
  2. -
  3. Add a service definition to the component .composite file. If you have created a WSDL - definition, set the interface.wsdl interface attribute to the namespace and port name - specified in the WSDL, in the form: "<namespace>#wsdl.interface(<port-name>)". - Link a reference from this service definition to your - component, give the service a name and set the multiplicity if required. -
    - E.g. for the Calculator component, based on the Calculator.wsdl file: -
    <service name="CalculatorService">
    -    <interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/>
    -    <binding.ws/>
    -    <reference>CalculatorComponent/CalculatorService</reference>
    -</service>
    - If the Calculator.wsdl file were not included, the service definition would simply - be as follows: -
    <service name="CalculatorService">
    -    <binding.ws/>
    -    <reference>CalculatorComponent/CalculatorService</reference>
    -</service>
    -
  4. -
  5. You are now ready to start the Axis2C HTTP server. Remember you will need to have the - TUSCANY_SCACPP, TUSCANY_SDOCPP and AXIS2C_HOME environment variables set, - as well as the SCA and SDO bin directories and the Axis2C lib directory on - your PATH on Windows or the SCA, SDO and Axis2C lib directories on - your LD_LIBRARY_PATH on Linux. You will also need to set the TUSCANY_SCACPP_SYSTEM_ROOT - and TUSCANY_SCACPP_DEFAULT_COMPONENT environment variables to the - path to your SCA component directory structure and the default component respectively. - E.g. on Windows run the following commands: -
      -
    • set TUSCANY_SCACPP=C:/tuscany_sca
    • -
    • set TUSCANY_SDOCPP=C:/tuscany_sdo
    • -
    • set AXIS2C_HOME=C:/axis2c-bin-0.94-win32
    • -
    • set PATH=%PATH%;C:/tuscany_sca/bin;C:/tuscany_sdo/bin;C:/axis2c-bin-0.94-win32/lib
    • -
    • set TUSCANY_SCACPP_SYSTEM_ROOT=C:/tuscany_sca/samples/Calculator/deploy
    • -
    • set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent
    • -
    • cd %AXIS2C_HOME%/bin/
    • -
    • ./axis2_http_server.exe
    • -
    -
  6. -
  7. Optionally, enable Tuscany logging by setting the TUSCANY_SCACPP_LOGGING - environment variable with the level you wish to log at (0 for minimal - logging, up to 9 for more detailed logging) and the TUSCANY_SCACPP_LOG - environment variable to define the file to log to (if this is not set, - logging will go to the console). E.g. on Windows run the following - commands: -
      -
    • set TUSCANY_SCACPP_LOGGING=5
    • -
    • set TUSCANY_SCACPP_LOG=C:/tuscany/mylogfile.txt
    • -
    -
  8. -
-

Your component should now be exposed as an Axis2C Web Service, via the WS - service you created. See the Axis2C documentation for writing clients to - invoke the Web Service, or you can use any other Web Service client platform - (e.g. Axis2 for Java), or you can - invoke your service from another SCA application by using Tuscany's WS - reference support. -

- -
- -
-

XML Schema Type to C++ Type Mapping

-

To help define the WSDL that describes the interface of your component, the - table below lists how incoming XML data in Web Service messages is mapped to - C++ types used in the parameters and return types of your component operations. -

-

This lists the only C++ types that can currently be used on the operations of a - component exposed as a Web Service. For other types, use an SDO DataObject to - wrap the data, and define that wrapping as a complexType in the WSDL. See the - SDO - specifications for the C++ types that SDO supports. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
XML Schema TypeC++ Type
stringstd::string
intlong
integerlong
shortshort
floatfloat
doublelong double
booleanbool
hexBinarychar*
base64Binarychar*
bytechar
complexTypecommonj::sdo::DataObjectPtr
anycommonj::sdo::DataObjectPtr with OpenDataObjectType
-
- -
-

Notes on creating WSDL

-

Currently only Document/literal Wrapped style Web Services are supported by - WS EntryPoint, support for RPC style Web Services is planned for future - releases. -

-

See this article - for an explanation of Document/literal Wrapped style WSDL and Web Services -

-

Document/literal Wrapped services require that the operation name is used as - the name of the incoming element that wraps the operation parameters. Additionally, - operation parameter and return messages that are defined in the WSDL must be - XML Schema elements containing a complexType. -

-

For example, a component operation defined in C++ as: -

long myOperation(std::string arg1, short arg2, DataObjectPtr arg3);
- will need to be described in WSDL with messages like: -
<wsdl:message name="myOperationRequestMsg">                                               
-  <wsdl:part element="tns:myOperation" name="myOperationRequestPart"/>                    
-</wsdl:message>                                                                           
-<wsdl:message name="myOperationResponseMsg">                                              
-  <wsdl:part element="tns:myOperationResponse" name="myOperationResponsePart"/>           
-</wsdl:message>
- and will need an XML schema to define the types like: -
<xsd:element name="myOperation">                                                          
- <xsd:complexType>                                                                       
-   <xsd:sequence>                                                                        
-     <xsd:element name="arg1" type="xsd:string" minOccurs="1"/>                          
-     <xsd:element name="arg2" type="xsd:short" minOccurs="1"/>                           
-     <xsd:element name="arg3" minOccurs="1">                                             
-       <xsd:complexType>                                                                 
-         <xsd:sequence>                                                                  
-           <xsd:element name="dataObjectFloatData" type="xsd:float"/>                    
-           <xsd:element name="dataObjectStringData" type="xsd:string"/>                  
-           <xsd:element name="dataObjectIntData" type="xsd:int"/>                        
-         </xsd:sequence>                                                                 
-       </xsd:complexType>                                                                
-     </xsd:element>                                                                      
-   </xsd:sequence>                                                                       
- </xsd:complexType>                                                                      
-</xsd:element>                                                                            
-                                                                                         
-<xsd:element name="myOperationResponse">                                                  
- <xsd:complexType>                                                                       
-   <xsd:sequence>                                                                        
-     <xsd:element name="result" type="xsd:int" minOccurs="1"/>                           
-   </xsd:sequence>                                                                       
- </xsd:complexType>                                                                      
-</xsd:element>
-
- -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/CPPComponents.html b/tags/cpp-1.0-incubating-M2-RC3/sca/doc/CPPComponents.html deleted file mode 100644 index 4994d4c610..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/CPPComponents.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ - Creating C++ SCA Components - - - -
-
-
-

Tuscany SCA for C++ - Creating C++ SCA Components

- -

This document describes how to create and run SCA components in Tuscany SCA C++ - milestone release 2. -

-

See the SCA - C++ Client and Implementation specification for more details about the SCA C++ - programming model. -

-

See Calculator or - BigBank for samples that - demonstrate the use of C++ components -

-
-
-

Creating and deploying an SCA C++ Component

-

Each SCA C++ component needs: -

-
    -
  • A service header file that defines the operations that can be invoked on the - component -
  • -
  • An implementation header file that defines the implementation and extends - the service header file -
  • -
  • A C++ implementation of the service that implements the operations defined - in the service header file -
  • -
  • Proxy and wrapper header and implementation files generated by the Tuscany - C++ SCAGEN tool -
  • -
  • A service definition in a .componentType file -
  • -
  • An SCDL component definition within an SCDL composite file. Usually this - composite file will contain multiple components configured and assembled together. -
  • -
-

Once these items are in place for each component in your composite, you will need to - deploy this composite to your SCA system. In this release we are - using the SCA recursive composition model to do this. You simply create another - SCDL component definition in a separate composite file that will represent the composite - you created above in the SCA system. Follow the steps below to see each of these items - being created and used. -

-

In this section we will use the Calculator sample as a worked example. - The Calculator code and files can be found at samples/Calculator and has been - developed further than the details specified below. In the interests of - readability, the example used below takes the simplest path. -

-
    -
  1. Create the service header file that defines the operations your component - will implement. E.g. Calculator.h contains the following:
    -
    #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
    -
  2. -
  3. Create the implementation header file that extends the service header file. - E.g. CalculatorImpl.h contains the following:
    -
    #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
    -
  4. -
  5. Create the implementation for the component based on the implementation - header file. E.g. CalculatorImpl.cpp contains the following code:
    -
    #include "CalculatorImpl.h"
    -#include 
    -
    -CalculatorImpl::CalculatorImpl()
    -{
    -}
    -    
    -CalculatorImpl::~CalculatorImpl()
    -{
    -}
    -
    -// Calculator interface
    -float CalculatorImpl::add(float arg1, float arg2)
    -{
    -    float result = arg1 + arg2;
    -
    -    printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result);
    -    return result;
    -}
    -
    -float CalculatorImpl::sub(float arg1, float arg2)
    -{
    -    float result = arg1 - arg2;
    -    printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result);
    -    return result;
    -}
    -
    -float CalculatorImpl::div(float arg1, float arg2)
    -{
    -    float result = arg1 / arg2;
    -    printf("CalculatorImpl::div %f / %f = %f\n", arg1, arg2, result);
    -    return result;
    -}
    -	
    -float CalculatorImpl::mul(float arg1, float arg2)
    -{
    -    float result = arg1 * arg2;
    -    printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result);
    -    return result;
    -}
    -
  6. -
  7. Create the componentType file for your component to define the service that - your component provides. The file must be named after your implementation - class and specifies the name of the service and the service header file - (which describes the service operations). E.g. CalculatorImpl.componentType - contains the following XML:
    -
    <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
    -
    -	<service name="CalculatorService">
    -		<interface.cpp header="Calculator.h"/>
    -	</service>
    -
    -</componentType>
    -
  8. -
  9. Create a sample.calculator.composite file for your composite and define your - component within it. The component definition specifies the implementation - library to use (a .dll file on Windows and a .so file on Linux) and the - implementation header file (which describes the implementation class). Component - properties and references to other services can also be specified here. E.g. the - Calculator sample.calculator.composite file contains the following XML:
    -
    <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 
    -	name="sample.calculator">
    -
    -	<component name="CalculatorComponent">
    -		<implementation.cpp library="Calculator" header="CalculatorImpl.h"/>
    -	</component>
    -
    -</composite>
    -
  10. -
  11. Generate the proxy and wrapper classes and header files using the SCAGEN - tool. These classes are used by the Tuscany SCA C++ runtime to enable - service implementations to be invoked from a client or another component. - Run the SCAGEN tool, specifying the directory where your header files, - sca.composite and componentType file are and the directory where you - want the generated files to be placed. E.g. on Windows, the - following command is run from the directory where Tuscany SCA is deployed:
    -
    ./bin/scagen.cmd -dir ./samples/Calculator/sample.calculator -output ./samples/Calculator/sample.calculator
    - which produces the following files: -
      -
    • CalculatorImpl_CalculatorService_Proxy.h
    • -
    • CalculatorImpl_CalculatorService_Proxy.cpp
    • -
    • CalculatorImpl_CalculatorService_Wrapper.h
    • -
    • CalculatorImpl_CalculatorService_Wrapper.cpp
    • -
    -
  12. -
  13. Compile and link the code that has been written and generated. This will - produce a .dll or .so library file. The name should match the library name - specified in the sample.calculator.composite file. -
  14. -
  15. Create the sample.calculator.solution.composite file and define the Calculator composite - as a component within it. This is used to include the Calculator composite in the SCA system - and should specify the composite name used in the sample.calculator.composite file. - E.g. the Calculator sample.calculator.solution.composite - file contains the following XML:
    -
    <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
    -	name="sample.calculator.solution">
    -	
    -        <component name="sample.calculator.CalculatorComponent">
    -        	<implementation.composite name="sample.calculator" />
    -       	</component>
    -
    -</composite>
    -
  16. -
  17. Deploy the various files into the SCA directory structure, as follows: -
      -
    • <deploy_root>/CompositeName/CompositeName.composite
    • -
    • <deploy_root>/CompositeName/Implementation.componentType
    • -
    • <deploy_root>/CompositeName/Implementation.dll (or .so on Linux)
    • -
    • <deploy_root>/SolutionName.composite
    • -
    - E.g. for the Calculator sample the structure is: -
      -
    • samples/Calculator/deploy/sample.calculator/Calculator.h
    • -
    • samples/Calculator/deploy/sample.calculator/CalculatorImpl.h
    • -
    • samples/Calculator/deploy/sample.calculator/sample.calculator.composite
    • -
    • samples/Calculator/deploy/sample.calculator/CalculatorImpl.componentType
    • -
    • samples/Calculator/deploy/sample.calculator/Calculator.dll
    • -
    • samples/Calculator/deploy/sample.calculator.solution.composite
    • -
    -
  18. -
  19. Your component, composite and subsystem are now ready to be invoked. Create a - client that will call the service. E.g. the Calculator client (in the - CalculatorClient.cpp file) contains code similar to the following:
    -
    try
    -{
    -    // Locate the service
    -    CompositeContext myContext = CompositeContext::getCurrent();
    -    Calculator *calcService = (Calculator*) myContext.locateService("CalculatorComponent/CalculatorService");
    -    if (calcService == 0)
    -    {
    -        cout << "calculator_client: Unable to find Calculator service" << endl;
    -    }
    -    else
    -    {
    -        float result = calcService->add(arg1, arg2);
    -        cout << "calculator_client add(" << arg1 << "," << arg2 << ") = " << result << endl; 
    -    }
    -}
    -catch (ServiceRuntimeException& ex)
    -{
    -    cout << "calculator_client: Error whilst invoking Tuscany: " << 
    -            ex.getMessageText() << endl; 
    -}
    -
    -
  20. -
  21. Compile, link and run the client that has been created. You should - (hopefully!) see your component invoked. Remember you will need to have the - TUSCANY_SCACPP, TUSCANY_SDOCPP and AXIS2C_HOME environment variables set, - as well as the SCA and SDO bin directories and the Axis2C lib directory on - your PATH on Windows or the SCA, SDO and Axis2C lib directories on - your LD_LIBRARY_PATH on Linux. You will also need to set the TUSCANY_SCACPP_SYSTEM_ROOT - and TUSCANY_SCACPP_DEFAULT_COMPONENT environment variables to the - path to your SCA component directory structure and the default component respectively. - TUSCANY_SCACPP_SYSTEM_ROOT is the directory where the SCA runtime will look for any - .composite files and TUSCANY_SCACPP_DEFAULT_COMPONENT is the name of the base component - to be used by SCA clients or containers when finding services - this component must be - an instance of a composite (i.e. contain an <implementation.composite> element). -
    - E.g. on Windows run the following commands: -
      -
    • set TUSCANY_SCACPP=C:/tuscany_sca
    • -
    • set TUSCANY_SDOCPP=C:/tuscany_sdo
    • -
    • set AXIS2C_HOME=C:/axis2c-bin-0.94-win32
    • -
    • set PATH=%PATH%;C:/tuscany_sca/bin;C:/tuscany_sdo/bin;C:/axis2c-bin-0.94-win32/lib
    • -
    • set TUSCANY_SCACPP_SYSTEM_ROOT=C:/tuscany_sca/samples/Calculator/deploy
    • -
    • set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent
    • -
    • ./calculator_client.exe
    • -
    -
  22. -
  23. Optionally, enable Tuscany logging by setting the TUSCANY_SCACPP_LOGGING - environment variable with the level you wish to log at (0 for minimal - logging, up to 9 for more detailed logging) and the TUSCANY_SCACPP_LOG - environment variable to define the file to log to (if this is not set, - logging will go to the console). E.g. on Windows run the following - commands: -
      -
    • set TUSCANY_SCACPP_LOGGING=5
    • -
    • set TUSCANY_SCACPP_LOG=C:/tuscany/mylogfile.txt
    • -
    -
  24. -
-

The Calculator sample has been developed further than the details specified - above. In particular, it demonstrates how two services can be wired together - such that one references and invokes the other. It also demonstrates how to - expose the Calculator component service as an Axis2C Web Service. -

-
-
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/PythonExtension.html b/tags/cpp-1.0-incubating-M2-RC3/sca/doc/PythonExtension.html deleted file mode 100644 index a53826a597..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/PythonExtension.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ - Python Extension - - - -
-
-
-

Tuscany SCA for C++ - Python Extension

- -

The Tuscany Python extension allows Python scripts to be used as components in - SCA composites and as clients that can invoke SCA services. -

-

See PythonCalculator for - a sample that demonstrates the use of the Python extension. -

-
- -
-

System Requirements

- -

In order to install and use the Tuscany SCA Python Extension there are some - extra requirements in addition to the Tuscany - SCA requirements:

- - - - - - - - - - - - - -
SoftwareDownload Link
Python version 2.4 - http://www.python.org/download/
- Please download and follow the installation instructions. You can build - the Tuscany SCA Python Extension with other versions of Python - versions 2.3.4 - and higher have been tested. -
-
- -
-

Installing the Tuscany SCA Python Extension

-

Getting the Tuscany SCA Python Extension working with the binary release on Linux

-
    -
  1. Extract the binary tar package to a folder
  2. -
  3. Set the TUSCANY_SCACPP environment variable to point to the directory that was just extracted
  4. -
  5. Add the <tuscany_sca_install_dir>/lib directory to the LD_LIBRARY_PATH environment variable
  6. -
  7. Add the <tuscany_sca_install_dir>/extensions/python/lib directory to the PYTHONPATH environment variable
  8. -
  9. Use the following command sequence to enable the extension: -
      -
    • cd <tuscany_sca_install_dir>/extensions/python
    • -
    • ./deploy.sh
    • -
    -
  10. -
-

Getting the Tuscany SCA Python Extension working with the source release on Linux

-
    -
  1. You will need the Tuscany SCA and SDO libraries - follow the instructions - here to build the SCA libraries and default extensions
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to built Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • PYTHON_LIB=<path to Python libraries>
    • -
    • PYTHON_INCLUDE=<path to Python includes>
    • -
    • PYTHON_VERSION=<name of the Python version>
      - Note: If you are using a default installation of Python 2.3 these are usually:
      - PYTHON_LIB=/usr/lib
      - PYTHON_INCLUDE=/usr/include/python2.3
      - PYTHON_VERSION=python2.3
    • -
  4. -
  5. Build the Python source only with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>
    • -
    • ./configure --prefix=$TUSCANY_SCACPP --enable-python --enable-cpp=no
    • -
    • make
    • -
    • make install
    • -
    - NOTE: If you don't provide a --prefix configure option, it will by default install into - /usr/local/tuscany/sca
  6. -
  7. You will now need to follow the instructions above to enable - and use the extension.
  8. -
- -

Getting the Tuscany SCA Python Extension working with the binary release on Windows

-
    -
  1. Unzip the supplied zip file to a folder
  2. -
  3. Set the TUSCANY_SCACPP environment variable to point to the directory that was just unzipped
  4. -
  5. Add the <tuscany_sca_install_dir>\bin directory to the PATH environment variable
  6. -
  7. Add the <tuscany_sca_install_dir>\extensions\python\bin directory to the PYTHONPATH environment variable
  8. -
  9. Use the following command sequence to enable the extension: -
      -
    • cd <tuscany_sca_install_dir>\extensions\python
    • -
    • deploy.cmd
    • -
    -
  10. -
-

Getting the Tuscany SCA Python Extension working with the source release on Windows

-
    -
  1. Unzip the supplied source zip file
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to built Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • PYTHON_HOME=<path to installed Python> -
  4. -
  5. You must have set up the environment for Microsoft Visual C++ tools. The build command - will call vcvars32 to set the environment. Ensure the directory containing this is on your path. - This will be where you installed the compiler.
  6. -
  7. Build the source: -
      -
    • cd <to where you unzipped the source>
    • -
    • build
    • -
    - This will build all the projects and put the required output into the 'deploy' directory

    - Alternatively, open the workspace at <tuscany_sca_install_dir>/projects/tuscany_sca/tuscany_sca.dsw - in Visual Studio 6 or at at <tuscany_sca_install_dir>/projectsvc7/tuscany_sca/tuscany_sca.sln - in Visual Studio 7.1 - you can build projects individually -
  8. Set the TUSCANY_SCACPP environment variable to point to the 'deploy' directory that was just created
  9. -
  10. You will now need to follow the instructions above to enable - and use the extension.
  11. -
-
- - -
-

The Tuscany Python Programming Model

-

This section will explain - the Tuscany Python programming model to help you to write your own Python - components and clients. -

-

The Tuscany Python component and client support comes from a Python extension - package that is built in the <tuscany_sca_install_dir>/extensions/python/bin - directory on Windows and <tuscany_sca_install_dir>/extensions/python/lib on - Linux. This package must be made available to your Python environment by - adding this directory to your PYTHONPATH environment variable. This makes the sca - module available for use by clients and allows references and properties to be - used in your Python components -

-

Clients

-

Using the sca module, a Python client can search for an SCA service with: -

-
import sca
-
-calculator = sca.locateservice("CalculatorComponent/CalculatorService")
-
-

This finds the component and service as defined in the composite and componentType - side files and returns a proxy object that can call the SCA service. You can then - simply call a business method on "calculator", like this: -

-
result = calculator.add(12.3, 45.6)
-

-

Components

-

Python component implementations are standard Python scripts, where class-level - functions or module-level functions can be invoked by the Tuscany runtime. To - use a Python component implementation, use the implementation.python element in - your .composite file. For example, the following snippet will use the Python script - at path/to/module/PythonModuleName.py, where the path is relative to the location of - the composite file: -

-
<implementation.python module="PythonModuleName" path="path/to/module"/>
-
-

To instantiate a class instance and use a class-level function, the Python class must - have a default constructor (an __init__ method that takes no arguments besides - 'self') and the class attribute must be defined in the implementation.python element - in your composite, like so: -

-
<implementation.python module="PythonModuleName" path="relative/path/to/module" class="PythonClassName"/>
-
-

Tuscany currently only supports passing simple types (strings, ints, floats, etc) into - and out of Python components. Support for more complex types, such as Service Data Objects, - will be added in later releases. -

-

Additionally, Tuscany currently requires a componentType file that corresponds to the - name of the Python module, e.g. for the Python Calculator sample, the module name is - 'CalculatorImpl' and the componentType file is 'CalculatorImpl.componentType'. The - componentType file specifies what services are available on the component and which - references are called by the component. For example, CalculatorImpl.componentType - contains the following: -

-
<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
-    <service name="CalculatorService">
-        <interface.python/>
-    </service>
-    <reference name="divideService">
-        <interface.python/>
-    </reference>
-</componentType>
-
-

References

-

References are automatically added to your Python component implementation when - the runtime loads the implementation script, so they can be used like so: -

-
# The module-level div function
-def div(val1, val2):
-    # Use the divideService reference
-    result = divideService.divide(val1, val2)
-    return result
-
-

and in your composite file: -

-
<component name="CalculatorComponent">
-    <implementation.python module="CalculatorImpl"/>
-    <reference name="divideService">DivideComponent/DivideService</reference>
-</component>
-
-

Properties

-

A composite with a property defined for a component like so: -

-
<component name="DivideComponent">
-    <implementation.python module="DivideImpl"/>
-    <property name="doRounding">true</property>
-</component>
-
-

and in the associated .componentType file like so: -

-
<componentType ...
-...
-    <property name="doRounding" type="xsd:boolean"/>
-</componentType>
-
-

means the property is automatically instantiated and assigned the - property value in the Python component implementation, so it can be - used like so: -

-
def divide(val1, val2):
-    result = float(val1) / float(val2)
-    print "Python - DivideImpl.divide " + str(val1) + " / " + str(val2) + " = " + str(result)
-
-    # Use the doRounding property
-    if doRounding:
-        result = round(result)
-        print "Python - DivideImpl.divide is rounding the result to " + str(result)
-
-    return result
-
-

-
- -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/RubyExtension.html b/tags/cpp-1.0-incubating-M2-RC3/sca/doc/RubyExtension.html deleted file mode 100644 index 6cd500e14e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/RubyExtension.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ - Ruby Extension - - - -
-
-
-

Tuscany SCA for C++ - Ruby Extension

- -

The Tuscany Ruby extension allows Ruby scripts to be used as components in - SCA composites and as clients that can invoke SCA services. -

-

See RubyCalculator and - RubyBank for - two samples that demonstrate the use of the Ruby extension. -

-
- -
-

System Requirements

- -

In order to install and use the Tuscany SCA Ruby Extension there are some - extra requirements in addition to the Tuscany - SCA requirements:

- - - - - - - - - - - - - -
SoftwareDownload Link
Ruby version 1.8.x - http://www.ruby-lang.org
- Please download and follow the installation instructions. You should - be able to build the Tuscany SCA Ruby Extension with other versions of Ruby. -
-
- -
-

Installing the Tuscany SCA Ruby Extension

-

Getting the Tuscany SCA Ruby Extension working with the binary release on Linux

-
    -
  1. Extract the binary tar package to a folder
  2. -
  3. Set the TUSCANY_SCACPP environment variable to point to the directory that was just extracted
  4. -
  5. Add the <tuscany_sca_install_dir>/lib directory to the LD_LIBRARY_PATH environment variable
  6. -
  7. Use the following command sequence to enable the extension: -
      -
    • cd <tuscany_sca_install_dir>/extensions/python
    • -
    • ./deploy.sh
    • -
    -
  8. - -
-

Getting the Tuscany SCA Ruby Extension working with the source release on Linux

-
    -
  1. You will need the Tuscany SCA and SDO libraries - follow the instructions - here to build the SCA libraries and default extensions
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to built Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • RUBY_LIB=<path to Ruby libraries>
    • -
    • RUBY_INCLUDE=<path to Ruby includes>
      - Note: If you are using a default installation of Ruby these are usually:
      - RUBY_LIB=/usr/lib
      - RUBY_INCLUDE=/usr/lib/ruby/1.8/i386-linux
    • -
  4. -
  5. Build the Ruby source only with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>
    • -
    • ./configure --prefix=$TUSCANY_SCACPP --enable-ruby --enable-cpp=no
    • -
    • make
    • -
    • make install
    • -
    - NOTE: If you don't provide a --prefix configure option, it will by default install into - /usr/local/tuscany/sca
  6. -
  7. You will now need to follow the instructions above to enable - and use the extension.
  8. - -
- -

Getting the Tuscany SCA Ruby Extension working with the binary release on Windows

-
    -
  1. Unzip the supplied zip file to a folder
  2. -
  3. Set the TUSCANY_SCACPP environment variable to point to the directory that was just unzipped
  4. -
  5. Add the <tuscany_sca_install_dir>\bin directory to the PATH environment variable
  6. -
  7. Use the following command sequence to enable the extension: -
      -
    • cd <tuscany_sca_install_dir>\extensions\ruby
    • -
    • deploy.cmd
    • -
    -
  8. -
-

Getting the Tuscany SCA Ruby Extension working with the source release on Windows

-
    -
  1. Unzip the supplied source zip file
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to built Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • RUBY_HOME=<path to installed Ruby> -
  4. -
  5. You must have set up the environment for Microsoft Visual C++ tools. The build command - will call vcvars32 to set the environment. Ensure the directory containing this is on your path. - This will be where you installed the compiler.
  6. -
  7. Build the source: -
      -
    • cd <to where you unzipped the source>
    • -
    • build
    • -
    - This will build all the projects and put the required output into the 'deploy' directory

    - Alternatively, open the workspace at <tuscany_sca_install_dir>/projects/tuscany_sca/tuscany_sca.dsw - in Visual Studio 6 or at at <tuscany_sca_install_dir>/projectsvc7/tuscany_sca/tuscany_sca.sln - in Visual Studio 7.1 - you can build projects individually - or build the samples to rebuild all the projects
  8. -
  9. Set the TUSCANY_SCACPP environment variable to point to the 'deploy' directory that was just created
  10. -
  11. You will now need to follow the instructions above to enable - and use the extension.
  12. - -
-
- - -
-

The Tuscany Ruby Programming Model

-

This section will explain the Tuscany Ruby programming model to help you to - write your own Ruby components and clients. -

-

The Tuscany Ruby component and client support comes from a Ruby extension - library that is built in the <tuscany_sca_install_dir>/extensions/ruby/bin - directory on Windows and <tuscany_sca_install_dir>/extensions/ruby/lib on - Linux. -

-

Clients

-

Using the Ruby SCA extension library, a Ruby client can search for an SCA service with: -

-
require("libtuscany_sca_ruby")
-
-calculator = SCA::locateService("CalculatorComponent/CalculatorService")
-
-

This finds the component and service as defined in the composite and componentType - side files and returns a proxy object that can call the SCA service. You can then - simply call a business method on "calculator", like this: -

-
result = calculator.add(12.3, 45.6)
-

-

Components

-

Ruby component implementations are standard Ruby scripts, where class-level - functions or module-level functions can be invoked by the Tuscany runtime. To - use a Ruby component implementation, use the implementation.ruby element in - your .composite file. For example: -

-
<implementation.ruby script="CalculatorImpl.rb"/>
-
-

To instantiate a class instance and use a class-level function, the Ruby class must - have a default constructor (an initialize() method that takes no arguments) and the - class attribute must be definde in the implementation.ruby element - in your composite, like so: -

-
<implementation.ruby script="CalculatorImpl.rb" class="CalculatorImpl"/>
-
-

Tuscany currently supports passing simple types (strings, ints, floats, etc) as well - as Service Data Objects into and out of Ruby components. Service Data Objects are represented - in Ruby as REXML Document objects (see the RubyBank - sample for a demonstration). -

-

You can write a componentType file for your Ruby component, but you don't have to - the Ruby - extension introspects Ruby component implementation classes for you and binds public - attributes to references and properties. -

-

References

-

References can be invoked from Ruby component implementations by the use of public - attributes in the component implementation classes, like this: -

-
class CalculatorImpl
-
-  # Define the public attribute that corresponds to the divideService reference
-  attr_writer :divideService
-
-...	
-
-  def div(arg1, arg2)
-    print "Ruby - CalculatorImpl.div\n"
-    # Invoke the divideService reference
-    @divideService.divide(arg1.to_f, arg2.to_f)
-  end
-
-...
-end
-
-

and in your composite file: -

-
<component name="CalculatorComponent">
-    <implementation.ruby script="CalculatorImpl.rb"/>
-    <reference name="divideService">DivideComponent/DivideService</reference>
-</component>
-
-

Properties

-

A composite with a property defined for a component like so: -

-
<component name="DivideComponent">
-    <implementation.ruby script="DivideImpl.rb" class="DivideImpl"/>
-    <property name="round">true</property>
-</component>
-
-

allows a public attribute of a Ruby component implementation class to be - assigned the property value, so it can be used like so: -

-
class DivideImpl
-
-  # Define the public attribute that corresponds to the round property
-  attr_writer :round           
-
-...	
-
-  def divide(arg1, arg2)
-    print "Ruby - DivideImpl.divide ", arg1, " / ", arg2, "\n"
-    res = arg1.to_f / arg2.to_f
-    # Use the round property
-    if @round then
-      res = res.round
-      print "DivideImpl.divide rounding\n"
-    end
-    print "DivideImpl.divide ", res, "\n"
-    res
-  end
-end
-
-

-
- -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-base.css b/tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-base.css deleted file mode 100644 index f2c4be6f4e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-base.css +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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:$ */ - -body { - margin: 0px; - padding: 0px; -} -img { - border:none; -} -table { - padding:0px; - width: 100%; - margin-left: -2px; - margin-right: -2px; -} -acronym { - cursor: help; - border-bottom: 1px dotted #feb; -} -table.bodyTable th, table.bodyTable td { - padding: 2px 4px 2px 4px; - vertical-align: top; -} -div.clear{ - clear:both; - visibility: hidden; -} -div.clear hr{ - display: none; -} -#bannerLeft, #bannerRight { - font-size: xx-large; - font-weight: bold; -} -#bannerLeft img, #bannerRight img { - margin: 0px; -} -.xleft, #bannerLeft img { - float:left; - text-shadow: #7CFC00; -} -.xright, #bannerRight img { - float:right; - text-shadow: #7CFC00; -} -#banner { - padding: 0px; -} -#banner img { - border: none; -} -#breadcrumbs { - padding: 3px 10px 3px 10px; -} -#leftColumn { - width: 150px; - float:left; -} -#bodyColumn { - margin-right: 1.5em; - margin-left: 177px; -} -#legend { - padding: 8px 0 8px 0; -} -#navcolumn { - padding: 8px 4px 0 8px; -} -#navcolumn h5 { - margin: 0; - padding: 0; - font-size: small; -} -#navcolumn ul { - margin: 0; - padding: 0; - font-size: small; -} -#navcolumn li { - list-style-type: none; - background-image: none; - background-repeat: no-repeat; - background-position: 0 0.4em; - padding-left: 16px; - list-style-position: ouside; - line-height: 1.2em; - font-size: smaller; -} -#navcolumn li.expanded { - background-image: url(../images/expanded.gif); -} -#navcolumn li.collapsed { - background-image: url(../images/collapsed.gif); -} -#poweredBy { - text-align: center; -} -#navcolumn img { - margin-top: 10px; - margin-bottom: 3px; -} -#poweredBy img { - display:block; - margin: 20px 0 20px 17px; - border: 1px solid black; - width: 90px; - height: 30px; -} -#search img { - margin: 0px; - display: block; -} -#search #q, #search #btnG { - border: 1px solid #999; - margin-bottom:10px; -} -#search form { - margin: 0px; -} -#lastPublished { - font-size: x-small; -} -.navSection { - margin-bottom: 2px; - padding: 8px; -} -.navSectionHead { - font-weight: bold; - font-size: x-small; -} -.section { - padding: 4px; -} -#footer { - padding: 3px 10px 3px 10px; - font-size: x-small; -} -#breadcrumbs { - font-size: x-small; - margin: 0pt; -} -.source { - padding: 12px; - margin: 1em 7px 1em 7px; -} -.source pre { - margin: 0px; - padding: 0px; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-theme.css b/tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-theme.css deleted file mode 100644 index f0c0a9ac48..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/doc/css/maven-theme.css +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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:$ */ - -body { - padding: 0px 0px 10px 0px; -} -body, td, select, input, li{ - font-family: Verdana, Helvetica, Arial, sans-serif; - font-size: 13px; - padding: 4px 4px 4px 4px; - line-height: 1.5em; -} -code{ - font-family: Courier, monospace; - font-size: 13px; -} -a { - text-decoration: none; -} -a:link { - color:#36a; -} -a:visited { - color:#47a; -} -a:active, a:hover { - color:#69c; -} -#legend li.externalLink { - background: url(../images/external.png) left top no-repeat; - padding-left: 18px; -} -a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover { - background: url(../images/external.png) right center no-repeat; - padding-right: 18px; -} -#legend li.newWindow { - background: url(../images/newwindow.png) left top no-repeat; - padding-left: 18px; -} -a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover { - background: url(../images/newwindow.png) right center no-repeat; - padding-right: 18px; -} -h2 { - padding: 4px 4px 4px 6px; - border: 1px solid #999; - color: #900; - background-color: #ddd; - font-weight:900; - font-size: x-large; -} -h3 { - padding: 4px 4px 4px 6px; - border: 1px solid #aaa; - color: #900; - background-color: #eee; - font-weight: normal; - font-size: large; -} -h4 { - padding: 4px 4px 4px 6px; - border: 1px solid #bbb; - color: #900; - background-color: #fff; - font-weight: normal; - font-size: large; -} -h5 { - padding: 4px 4px 4px 6px; - color: #900; - font-size: normal; -} -p { - line-height: 1.5em; - font-size: small; -} -#breadcrumbs { - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - background-color: #ccc; -} -#leftColumn { - margin: 10px 0 0 5px; - border: 1px solid #999; - background-color: #eee; -} -#navcolumn h5 { - font-size: smaller; - border-bottom: 1px solid #aaaaaa; - padding-top: 2px; - color: #000; -} - -table.bodyTable th { - color: white; - background-color: #bbb; - text-align: left; - font-weight: bold; -} - -table.bodyTable th, table.bodyTable td { - font-size: 1em; -} - -table.bodyTable tr.a { - background-color: #ddd; -} - -table.bodyTable tr.b { - background-color: #eee; -} - -.source { - border: 1px solid #999; -} -dl { - padding: 4px 4px 4px 6px; - border: 1px solid #aaa; - background-color: #ffc; -} -dt { - color: #900; -} -#organizationLogo img, #projectLogo img, #projectLogo span{ - margin: 8px; -} -#banner { - border-bottom: 1px solid #fff; -} -.sourcecode { - border: 1px solid #999; - font-family: Courier, monospace; - font-size: 13px; - white-space: pre; - padding: 4px 4px 4px 6px; - margin: 4px 4px 4px 6px; -} -pre { - border: 1px solid #999; - font-family: Courier, monospace; - font-size: 13px; - white-space: pre; - padding: 4px 4px 4px 6px; - margin: 4px 4px 4px 6px; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/makebindist.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/makebindist.sh deleted file mode 100755 index 8daee57fc8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/makebindist.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$PYTHON_LIB = x ]; then -echo "PYTHON_LIB not set. Python extension will not be built" -elif [ x$PYTHON_INCLUDE = x ]; then -echo "PYTHON_INCLUDE not set. Python extension will not be built" -elif [ x$PYTHON_VERSION = x ]; then -echo "PYTHON_VERSION not set. Python extension will not be built" -else -echo "Building PYTHON extension with Python $PYTHON_VERSION installed at $PYTHON_LIB, $PYTHON_INCLUDE" -ENABLE_PYTHON=--enable-python -fi - -if [ x$RUBY_LIB = x ]; then -echo "RUBY_LIB not set. Ruby extension will not be built" -elif [ x$RUBY_INCLUDE = x ]; then -echo "RUBY_INCLUDE not set. Ruby extension will not be built" -else -echo "Building Ruby extension with Ruby installed at $RUBY_LIB, $RUBY_INCLUDE" -ENABLE_RUBY=--enable-ruby -fi - -cd $TUSCANY_SCACPP_HOME -./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no ${ENABLE_RUBY} ${ENABLE_PYTHON} -make -make install - -cd ${TUSCANY_SCACPP_HOME}/samples -export TUSCANY_SCACPP=${TUSCANY_SCACPP_HOME}/deploy -./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no ${ENABLE_RUBY} ${ENABLE_PYTHON} -make -make install - -cd ${TUSCANY_SCACPP_HOME}/deploy -for i in `find . -name "*.la"` -do - rm $i -done - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/makedist.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/makedist.sh deleted file mode 100755 index bc4f36c1a2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/makedist.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$PYTHON_INCLUDE = x ]; then -echo "PYTHON_INCLUDE not set" -exit; -fi -if [ x$PYTHON_LIB = x ]; then -echo "PYTHON_LIB not set" -exit; -fi -if [ x$PYTHON_VERSION = x ]; then -echo "PYTHON_VERSION not set" -exit; -fi -echo "Building PYTHON extension with Python $PYTHON_VERSION installed at $PYTHON_LIB, $PYTHON_INCLUDE" - -if [ x$RUBY_INCLUDE = x ]; then -echo "RUBY_INCLUDE not set" -exit; -fi -if [ x$RUBY_LIB = x ]; then -echo "RUBY_LIB not set" -exit; -fi -echo "Building Ruby extension with Ruby installed at $RUBY_LIB, $RUBY_INCLUDE" - -cd ${TUSCANY_SCACPP_HOME}/samples -./autogen.sh -./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no --enable-python=yes --enable-ruby=yes - -cd $TUSCANY_SCACPP_HOME -./autogen.sh -./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no --enable-python=yes --enable-ruby=yes - -make bindist - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.dsp deleted file mode 100644 index 9a8320cefb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Build" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=Build - 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 "Build.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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - 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)" == "Build - 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)" == "Build - 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 "Build - Win32 Release" -# Name "Build - Win32 Debug" -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.mak deleted file mode 100644 index 80499ebc51..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/Build/Build.mak +++ /dev/null @@ -1,259 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Build.dsp -!IF "$(CFG)" == "" -CFG=Build - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Build - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Build - Win32 Release" && "$(CFG)" != "Build - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -OUTDIR=.\Release -INTDIR=.\Release - -!IF "$(RECURSE)" == "0" - -ALL : - -!ELSE - -ALL : "tuscany_sca_ruby - Win32 Release" "tuscany_sca_python - Win32 Release" "tuscany_sca_ws_dispatcher - Win32 Release" "tuscany_sca_ws_service - Win32 Release" "tuscany_sca_ws_reference - Win32 Release" "tuscany_sca_cpp - Win32 Release" "tuscany_sca - Win32 Release" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" "tuscany_sca_cpp - Win32 ReleaseCLEAN" "tuscany_sca_ws_reference - Win32 ReleaseCLEAN" "tuscany_sca_ws_service - Win32 ReleaseCLEAN" "tuscany_sca_ws_dispatcher - Win32 ReleaseCLEAN" "tuscany_sca_python - Win32 ReleaseCLEAN" "tuscany_sca_ruby - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -!IF "$(CFG)" == "Build - Win32 Release" - -MTL=midl.exe -MTL_PROJ= - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -MTL=midl.exe -MTL_PROJ= - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Build.dep") -!INCLUDE "Build.dep" -!ELSE -!MESSAGE Warning: cannot find "Build.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Build - Win32 Release" || "$(CFG)" == "Build - Win32 Debug" - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca - Win32 Release" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" - cd "..\Build" - -"tuscany_sca - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca - Win32 Debug" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" - cd "..\Build" - -"tuscany_sca - Win32 DebugCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca_cpp - Win32 Release" : - cd "..\tuscany_sca_cpp" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_cpp.mak CFG="tuscany_sca_cpp - Win32 Release" - cd "..\Build" - -"tuscany_sca_cpp - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_cpp" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_cpp.mak CFG="tuscany_sca_cpp - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca_cpp - Win32 Debug" : - cd "..\tuscany_sca_cpp" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_cpp.mak CFG="tuscany_sca_cpp - Win32 Debug" - cd "..\Build" - -"tuscany_sca_cpp - Win32 DebugCLEAN" : - cd "..\tuscany_sca_cpp" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_cpp.mak CFG="tuscany_sca_cpp - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca_ws_reference - Win32 Release" : - cd "..\tuscany_sca_ws_reference" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_reference.mak CFG="tuscany_sca_ws_reference - Win32 Release" - cd "..\Build" - -"tuscany_sca_ws_reference - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_ws_reference" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_reference.mak CFG="tuscany_sca_ws_reference - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca_ws_reference - Win32 Debug" : - cd "..\tuscany_sca_ws_reference" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_reference.mak CFG="tuscany_sca_ws_reference - Win32 Debug" - cd "..\Build" - -"tuscany_sca_ws_reference - Win32 DebugCLEAN" : - cd "..\tuscany_sca_ws_reference" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_reference.mak CFG="tuscany_sca_ws_reference - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca_ws_service - Win32 Release" : - cd "..\tuscany_sca_ws_service" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Release" - cd "..\Build" - -"tuscany_sca_ws_service - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_ws_service" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca_ws_service - Win32 Debug" : - cd "..\tuscany_sca_ws_service" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Debug" - cd "..\Build" - -"tuscany_sca_ws_service - Win32 DebugCLEAN" : - cd "..\tuscany_sca_ws_service" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca_ws_dispatcher - Win32 Release" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Release" - cd "..\Build" - -"tuscany_sca_ws_dispatcher - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca_ws_dispatcher - Win32 Debug" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Debug" - cd "..\Build" - -"tuscany_sca_ws_dispatcher - Win32 DebugCLEAN" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca_python - Win32 Release" : - cd "..\tuscany_sca_python" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_python.mak CFG="tuscany_sca_python - Win32 Release" - cd "..\Build" - -"tuscany_sca_python - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_python" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_python.mak CFG="tuscany_sca_python - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca_python - Win32 Debug" : - cd "..\tuscany_sca_python" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_python.mak CFG="tuscany_sca_python - Win32 Debug" - cd "..\Build" - -"tuscany_sca_python - Win32 DebugCLEAN" : - cd "..\tuscany_sca_python" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_python.mak CFG="tuscany_sca_python - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"tuscany_sca_ruby - Win32 Release" : - cd "..\tuscany_sca_ruby" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ruby.mak CFG="tuscany_sca_ruby - Win32 Release" - cd "..\Build" - -"tuscany_sca_ruby - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_ruby" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ruby.mak CFG="tuscany_sca_ruby - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"tuscany_sca_ruby - Win32 Debug" : - cd "..\tuscany_sca_ruby" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ruby.mak CFG="tuscany_sca_ruby - Win32 Debug" - cd "..\Build" - -"tuscany_sca_ruby - Win32 DebugCLEAN" : - cd "..\tuscany_sca_ruby" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ruby.mak CFG="tuscany_sca_ruby - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/build.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/build.cmd deleted file mode 100644 index 561a03aea7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/build.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal -cd Build -nmake -f Build.mak CFG="Build - Win32 Release" -cd .. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.dsw b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.dsw deleted file mode 100644 index 2d7d7f29ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.dsw +++ /dev/null @@ -1,152 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Build"=.\Build\Build.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_cpp - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_ws_reference - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_ws_service - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_ws_dispatcher - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_python - End Project Dependency - Begin Project Dependency - Project_Dep_Name tuscany_sca_ruby - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca"=.\tuscany_sca\tuscany_sca.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "tuscany_sca_cpp"=.\tuscany_sca_cpp\tuscany_sca_cpp.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_python"=.\tuscany_sca_python\tuscany_sca_python.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_ruby"=.\tuscany_sca_ruby\tuscany_sca_ruby.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_ws_dispatcher"=.\tuscany_sca_ws_dispatcher\tuscany_sca_ws_dispatcher.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "tuscany_sca_ws_reference"=.\tuscany_sca_ws_reference\tuscany_sca_ws_reference.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name tuscany_sca - End Project Dependency -}}} - -############################################################################### - -Project: "tuscany_sca_ws_service"=.\tuscany_sca_ws_service\tuscany_sca_ws_service.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_ws_dispatcher - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.ncb b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.ncb deleted file mode 100644 index cbdf2a3778..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.ncb and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.opt b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.opt deleted file mode 100644 index 0f1ec83a3c..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca.opt and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp deleted file mode 100644 index 78a7ebf40e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp +++ /dev/null @@ -1,449 +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 "$(AXIS2C_HOME)/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 axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /machine:I386 /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\core\deploy.bat ..\..\..\ Release -# 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 "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /GZ /c -# SUBTRACT CPP /X -# 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 axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\core\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca - Win32 Release" -# Name "tuscany_sca - Win32 Debug" -# Begin Group "tuscany/sca" - -# PROP Default_Filter "" -# Begin Group "core" - -# PROP Default_Filter "" -# 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\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 -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.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\ComponentType.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ComponentType.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Composite.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Composite.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CompositeReference.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CompositeReference.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CompositeService.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CompositeService.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Contract.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Contract.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\Reference.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Reference.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ReferenceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ReferenceBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ReferenceType.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ReferenceType.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\ServiceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceType.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceType.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\WSDLDefinition.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSDLDefinition.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSDLInterface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSDLInterface.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.cpp -# 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 "extension" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ImplementationExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ImplementationExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\InterfaceExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\InterfaceExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ReferenceBindingExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ReferenceBindingExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ServiceBindingExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ServiceBindingExtension.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\export.h -# End Source File -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\xsd\sca-core.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-implementation-composite.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\xsd\sca-implementation-java.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 -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak deleted file mode 100644 index c68fa3519a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak +++ /dev/null @@ -1,570 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca - Win32 Release" && "$(CFG)" != "tuscany_sca - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\tuscany_sca.dll" - - -CLEAN : - -@erase "$(INTDIR)\Binding.obj" - -@erase "$(INTDIR)\Component.obj" - -@erase "$(INTDIR)\ComponentType.obj" - -@erase "$(INTDIR)\Composite.obj" - -@erase "$(INTDIR)\CompositeReference.obj" - -@erase "$(INTDIR)\CompositeService.obj" - -@erase "$(INTDIR)\Contract.obj" - -@erase "$(INTDIR)\DefaultLogWriter.obj" - -@erase "$(INTDIR)\Exceptions.obj" - -@erase "$(INTDIR)\File.obj" - -@erase "$(INTDIR)\FileLogWriter.obj" - -@erase "$(INTDIR)\ImplementationExtension.obj" - -@erase "$(INTDIR)\Interface.obj" - -@erase "$(INTDIR)\InterfaceExtension.obj" - -@erase "$(INTDIR)\Library.obj" - -@erase "$(INTDIR)\Logger.obj" - -@erase "$(INTDIR)\LogWriter.obj" - -@erase "$(INTDIR)\ModelLoader.obj" - -@erase "$(INTDIR)\Operation.obj" - -@erase "$(INTDIR)\Reference.obj" - -@erase "$(INTDIR)\ReferenceBinding.obj" - -@erase "$(INTDIR)\ReferenceBindingExtension.obj" - -@erase "$(INTDIR)\ReferenceType.obj" - -@erase "$(INTDIR)\SCARuntime.obj" - -@erase "$(INTDIR)\Service.obj" - -@erase "$(INTDIR)\ServiceBinding.obj" - -@erase "$(INTDIR)\ServiceBindingExtension.obj" - -@erase "$(INTDIR)\ServiceProxy.obj" - -@erase "$(INTDIR)\ServiceType.obj" - -@erase "$(INTDIR)\ServiceWrapper.obj" - -@erase "$(INTDIR)\TuscanyRuntime.obj" - -@erase "$(INTDIR)\Utils.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\Wire.obj" - -@erase "$(INTDIR)\WSDLDefinition.obj" - -@erase "$(INTDIR)\WSDLInterface.obj" - -@erase "$(INTDIR)\WSDLOperation.obj" - -@erase "$(OUTDIR)\tuscany_sca.dll" - -@erase "$(OUTDIR)\tuscany_sca.exp" - -@erase "$(OUTDIR)\tuscany_sca.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca.dll" /implib:"$(OUTDIR)\tuscany_sca.lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\Operation.obj" \ - "$(INTDIR)\SCARuntime.obj" \ - "$(INTDIR)\ServiceProxy.obj" \ - "$(INTDIR)\ServiceWrapper.obj" \ - "$(INTDIR)\TuscanyRuntime.obj" \ - "$(INTDIR)\Binding.obj" \ - "$(INTDIR)\Component.obj" \ - "$(INTDIR)\ComponentType.obj" \ - "$(INTDIR)\Composite.obj" \ - "$(INTDIR)\CompositeReference.obj" \ - "$(INTDIR)\CompositeService.obj" \ - "$(INTDIR)\Contract.obj" \ - "$(INTDIR)\Interface.obj" \ - "$(INTDIR)\ModelLoader.obj" \ - "$(INTDIR)\Reference.obj" \ - "$(INTDIR)\ReferenceBinding.obj" \ - "$(INTDIR)\ReferenceType.obj" \ - "$(INTDIR)\Service.obj" \ - "$(INTDIR)\ServiceBinding.obj" \ - "$(INTDIR)\ServiceType.obj" \ - "$(INTDIR)\Wire.obj" \ - "$(INTDIR)\WSDLDefinition.obj" \ - "$(INTDIR)\WSDLInterface.obj" \ - "$(INTDIR)\WSDLOperation.obj" \ - "$(INTDIR)\DefaultLogWriter.obj" \ - "$(INTDIR)\Exceptions.obj" \ - "$(INTDIR)\File.obj" \ - "$(INTDIR)\FileLogWriter.obj" \ - "$(INTDIR)\Library.obj" \ - "$(INTDIR)\Logger.obj" \ - "$(INTDIR)\LogWriter.obj" \ - "$(INTDIR)\Utils.obj" \ - "$(INTDIR)\ImplementationExtension.obj" \ - "$(INTDIR)\InterfaceExtension.obj" \ - "$(INTDIR)\ReferenceBindingExtension.obj" \ - "$(INTDIR)\ServiceBindingExtension.obj" - -"$(OUTDIR)\tuscany_sca.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sca.dll" - ..\..\..\runtime\core\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\tuscany_sca.dll" - - -CLEAN : - -@erase "$(INTDIR)\Binding.obj" - -@erase "$(INTDIR)\Component.obj" - -@erase "$(INTDIR)\ComponentType.obj" - -@erase "$(INTDIR)\Composite.obj" - -@erase "$(INTDIR)\CompositeReference.obj" - -@erase "$(INTDIR)\CompositeService.obj" - -@erase "$(INTDIR)\Contract.obj" - -@erase "$(INTDIR)\DefaultLogWriter.obj" - -@erase "$(INTDIR)\Exceptions.obj" - -@erase "$(INTDIR)\File.obj" - -@erase "$(INTDIR)\FileLogWriter.obj" - -@erase "$(INTDIR)\ImplementationExtension.obj" - -@erase "$(INTDIR)\Interface.obj" - -@erase "$(INTDIR)\InterfaceExtension.obj" - -@erase "$(INTDIR)\Library.obj" - -@erase "$(INTDIR)\Logger.obj" - -@erase "$(INTDIR)\LogWriter.obj" - -@erase "$(INTDIR)\ModelLoader.obj" - -@erase "$(INTDIR)\Operation.obj" - -@erase "$(INTDIR)\Reference.obj" - -@erase "$(INTDIR)\ReferenceBinding.obj" - -@erase "$(INTDIR)\ReferenceBindingExtension.obj" - -@erase "$(INTDIR)\ReferenceType.obj" - -@erase "$(INTDIR)\SCARuntime.obj" - -@erase "$(INTDIR)\Service.obj" - -@erase "$(INTDIR)\ServiceBinding.obj" - -@erase "$(INTDIR)\ServiceBindingExtension.obj" - -@erase "$(INTDIR)\ServiceProxy.obj" - -@erase "$(INTDIR)\ServiceType.obj" - -@erase "$(INTDIR)\ServiceWrapper.obj" - -@erase "$(INTDIR)\TuscanyRuntime.obj" - -@erase "$(INTDIR)\Utils.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\Wire.obj" - -@erase "$(INTDIR)\WSDLDefinition.obj" - -@erase "$(INTDIR)\WSDLInterface.obj" - -@erase "$(INTDIR)\WSDLOperation.obj" - -@erase "$(OUTDIR)\tuscany_sca.dll" - -@erase "$(OUTDIR)\tuscany_sca.exp" - -@erase "$(OUTDIR)\tuscany_sca.ilk" - -@erase "$(OUTDIR)\tuscany_sca.lib" - -@erase "$(OUTDIR)\tuscany_sca.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca.dll" /implib:"$(OUTDIR)\tuscany_sca.lib" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\Operation.obj" \ - "$(INTDIR)\SCARuntime.obj" \ - "$(INTDIR)\ServiceProxy.obj" \ - "$(INTDIR)\ServiceWrapper.obj" \ - "$(INTDIR)\TuscanyRuntime.obj" \ - "$(INTDIR)\Binding.obj" \ - "$(INTDIR)\Component.obj" \ - "$(INTDIR)\ComponentType.obj" \ - "$(INTDIR)\Composite.obj" \ - "$(INTDIR)\CompositeReference.obj" \ - "$(INTDIR)\CompositeService.obj" \ - "$(INTDIR)\Contract.obj" \ - "$(INTDIR)\Interface.obj" \ - "$(INTDIR)\ModelLoader.obj" \ - "$(INTDIR)\Reference.obj" \ - "$(INTDIR)\ReferenceBinding.obj" \ - "$(INTDIR)\ReferenceType.obj" \ - "$(INTDIR)\Service.obj" \ - "$(INTDIR)\ServiceBinding.obj" \ - "$(INTDIR)\ServiceType.obj" \ - "$(INTDIR)\Wire.obj" \ - "$(INTDIR)\WSDLDefinition.obj" \ - "$(INTDIR)\WSDLInterface.obj" \ - "$(INTDIR)\WSDLOperation.obj" \ - "$(INTDIR)\DefaultLogWriter.obj" \ - "$(INTDIR)\Exceptions.obj" \ - "$(INTDIR)\File.obj" \ - "$(INTDIR)\FileLogWriter.obj" \ - "$(INTDIR)\Library.obj" \ - "$(INTDIR)\Logger.obj" \ - "$(INTDIR)\LogWriter.obj" \ - "$(INTDIR)\Utils.obj" \ - "$(INTDIR)\ImplementationExtension.obj" \ - "$(INTDIR)\InterfaceExtension.obj" \ - "$(INTDIR)\ReferenceBindingExtension.obj" \ - "$(INTDIR)\ServiceBindingExtension.obj" - -"$(OUTDIR)\tuscany_sca.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sca.dll" - ..\..\..\runtime\core\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca.dep") -!INCLUDE "tuscany_sca.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca - Win32 Release" || "$(CFG)" == "tuscany_sca - Win32 Debug" -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.cpp - -"$(INTDIR)\Operation.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.cpp - -"$(INTDIR)\SCARuntime.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.cpp - -"$(INTDIR)\ServiceProxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.cpp - -"$(INTDIR)\ServiceWrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.cpp - -"$(INTDIR)\TuscanyRuntime.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.cpp - -"$(INTDIR)\Binding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.cpp - -"$(INTDIR)\Component.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ComponentType.cpp - -"$(INTDIR)\ComponentType.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Composite.cpp - -"$(INTDIR)\Composite.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CompositeReference.cpp - -"$(INTDIR)\CompositeReference.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CompositeService.cpp - -"$(INTDIR)\CompositeService.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Contract.cpp - -"$(INTDIR)\Contract.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.cpp - -"$(INTDIR)\Interface.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.cpp - -"$(INTDIR)\ModelLoader.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Reference.cpp - -"$(INTDIR)\Reference.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ReferenceBinding.cpp - -"$(INTDIR)\ReferenceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ReferenceType.cpp - -"$(INTDIR)\ReferenceType.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.cpp - -"$(INTDIR)\Service.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceBinding.cpp - -"$(INTDIR)\ServiceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceType.cpp - -"$(INTDIR)\ServiceType.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.cpp - -"$(INTDIR)\Wire.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSDLDefinition.cpp - -"$(INTDIR)\WSDLDefinition.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSDLInterface.cpp - -"$(INTDIR)\WSDLInterface.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSDLOperation.cpp - -"$(INTDIR)\WSDLOperation.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.cpp - -"$(INTDIR)\DefaultLogWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Exceptions.cpp - -"$(INTDIR)\Exceptions.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.cpp - -"$(INTDIR)\File.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.cpp - -"$(INTDIR)\FileLogWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.cpp - -"$(INTDIR)\Library.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.cpp - -"$(INTDIR)\Logger.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.cpp - -"$(INTDIR)\LogWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.cpp - -"$(INTDIR)\Utils.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ImplementationExtension.cpp - -"$(INTDIR)\ImplementationExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\InterfaceExtension.cpp - -"$(INTDIR)\InterfaceExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ReferenceBindingExtension.cpp - -"$(INTDIR)\ReferenceBindingExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\tuscany\sca\extension\ServiceBindingExtension.cpp - -"$(INTDIR)\ServiceBindingExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.dsp deleted file mode 100644 index a371552c8d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.dsp +++ /dev/null @@ -1,241 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_cpp" - 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_cpp - 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_cpp.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_cpp.mak" CFG="tuscany_sca_cpp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_cpp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_cpp - 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_cpp - 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_CPP_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/cpp/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_CPP_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 tuscany_sca.lib tuscany_sdo.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 /dll /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\cpp\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_cpp - 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_CPP_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/cpp/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_CPP_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 tuscany_sca.lib tuscany_sdo.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 /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\cpp\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_cpp - Win32 Release" -# Name "tuscany_sca_cpp - Win32 Debug" -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\cpp\xsd\sca-implementation-cpp.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\cpp\xsd\sca-interface-cpp.xsd" -# End Source File -# End Group -# Begin Group "osoa/sca" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\ComponentContext.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\ComponentContext.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\CompositeContext.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\CompositeContext.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\export.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\sca.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\ServiceRuntimeException.h -# End Source File -# End Group -# Begin Group "tuscany/sca/cpp" - -# PROP Default_Filter "" -# Begin Group "model" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPImplementation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPImplementation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPInterface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPInterface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPReferenceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPReferenceBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPServiceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPServiceBinding.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\ComponentContextImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\ComponentContextImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CompositeContextImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CompositeContextImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPImplementationExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPImplementationExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPInterfaceExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPInterfaceExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPServiceProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPServiceProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPServiceWrapper.h -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.mak deleted file mode 100644 index b027cea266..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.mak +++ /dev/null @@ -1,390 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_cpp.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca_cpp - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca_cpp - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca_cpp - Win32 Release" && "$(CFG)" != "tuscany_sca_cpp - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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_cpp.mak" CFG="tuscany_sca_cpp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_cpp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_cpp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_cpp - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_cpp.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_cpp.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\ComponentContext.obj" - -@erase "$(INTDIR)\ComponentContextImpl.obj" - -@erase "$(INTDIR)\CompositeContext.obj" - -@erase "$(INTDIR)\CompositeContextImpl.obj" - -@erase "$(INTDIR)\CPPExtension.obj" - -@erase "$(INTDIR)\CPPImplementation.obj" - -@erase "$(INTDIR)\CPPImplementationExtension.obj" - -@erase "$(INTDIR)\CPPInterface.obj" - -@erase "$(INTDIR)\CPPInterfaceExtension.obj" - -@erase "$(INTDIR)\CPPReferenceBinding.obj" - -@erase "$(INTDIR)\CPPServiceBinding.obj" - -@erase "$(INTDIR)\CPPServiceProxy.obj" - -@erase "$(INTDIR)\CPPServiceWrapper.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\tuscany_sca_cpp.dll" - -@erase "$(OUTDIR)\tuscany_sca_cpp.exp" - -@erase "$(OUTDIR)\tuscany_sca_cpp.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/cpp/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_CPP_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_cpp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=tuscany_sca.lib tuscany_sdo.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 /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_cpp.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_cpp.dll" /implib:"$(OUTDIR)\tuscany_sca_cpp.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" -LINK32_OBJS= \ - "$(INTDIR)\ComponentContext.obj" \ - "$(INTDIR)\CompositeContext.obj" \ - "$(INTDIR)\CPPImplementation.obj" \ - "$(INTDIR)\CPPInterface.obj" \ - "$(INTDIR)\CPPReferenceBinding.obj" \ - "$(INTDIR)\CPPServiceBinding.obj" \ - "$(INTDIR)\ComponentContextImpl.obj" \ - "$(INTDIR)\CompositeContextImpl.obj" \ - "$(INTDIR)\CPPExtension.obj" \ - "$(INTDIR)\CPPImplementationExtension.obj" \ - "$(INTDIR)\CPPInterfaceExtension.obj" \ - "$(INTDIR)\CPPServiceProxy.obj" \ - "$(INTDIR)\CPPServiceWrapper.obj" \ - "..\tuscany_sca\Release\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_cpp.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_cpp.dll" - ..\..\..\runtime\extensions\cpp\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca_cpp - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_cpp.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_cpp.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\ComponentContext.obj" - -@erase "$(INTDIR)\ComponentContextImpl.obj" - -@erase "$(INTDIR)\CompositeContext.obj" - -@erase "$(INTDIR)\CompositeContextImpl.obj" - -@erase "$(INTDIR)\CPPExtension.obj" - -@erase "$(INTDIR)\CPPImplementation.obj" - -@erase "$(INTDIR)\CPPImplementationExtension.obj" - -@erase "$(INTDIR)\CPPInterface.obj" - -@erase "$(INTDIR)\CPPInterfaceExtension.obj" - -@erase "$(INTDIR)\CPPReferenceBinding.obj" - -@erase "$(INTDIR)\CPPServiceBinding.obj" - -@erase "$(INTDIR)\CPPServiceProxy.obj" - -@erase "$(INTDIR)\CPPServiceWrapper.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\tuscany_sca_cpp.dll" - -@erase "$(OUTDIR)\tuscany_sca_cpp.exp" - -@erase "$(OUTDIR)\tuscany_sca_cpp.ilk" - -@erase "$(OUTDIR)\tuscany_sca_cpp.lib" - -@erase "$(OUTDIR)\tuscany_sca_cpp.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/cpp/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_CPP_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_cpp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=tuscany_sca.lib tuscany_sdo.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 /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_cpp.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_cpp.dll" /implib:"$(OUTDIR)\tuscany_sca_cpp.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" -LINK32_OBJS= \ - "$(INTDIR)\ComponentContext.obj" \ - "$(INTDIR)\CompositeContext.obj" \ - "$(INTDIR)\CPPImplementation.obj" \ - "$(INTDIR)\CPPInterface.obj" \ - "$(INTDIR)\CPPReferenceBinding.obj" \ - "$(INTDIR)\CPPServiceBinding.obj" \ - "$(INTDIR)\ComponentContextImpl.obj" \ - "$(INTDIR)\CompositeContextImpl.obj" \ - "$(INTDIR)\CPPExtension.obj" \ - "$(INTDIR)\CPPImplementationExtension.obj" \ - "$(INTDIR)\CPPInterfaceExtension.obj" \ - "$(INTDIR)\CPPServiceProxy.obj" \ - "$(INTDIR)\CPPServiceWrapper.obj" \ - "..\tuscany_sca\Debug\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_cpp.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_cpp.dll" - ..\..\..\runtime\extensions\cpp\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca_cpp.dep") -!INCLUDE "tuscany_sca_cpp.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca_cpp.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca_cpp - Win32 Release" || "$(CFG)" == "tuscany_sca_cpp - Win32 Debug" -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\ComponentContext.cpp - -"$(INTDIR)\ComponentContext.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\osoa\sca\CompositeContext.cpp - -"$(INTDIR)\CompositeContext.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPImplementation.cpp - -"$(INTDIR)\CPPImplementation.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPInterface.cpp - -"$(INTDIR)\CPPInterface.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPReferenceBinding.cpp - -"$(INTDIR)\CPPReferenceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\model\CPPServiceBinding.cpp - -"$(INTDIR)\CPPServiceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\ComponentContextImpl.cpp - -"$(INTDIR)\ComponentContextImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CompositeContextImpl.cpp - -"$(INTDIR)\CompositeContextImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPExtension.cpp - -"$(INTDIR)\CPPExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPImplementationExtension.cpp - -"$(INTDIR)\CPPImplementationExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPInterfaceExtension.cpp - -"$(INTDIR)\CPPInterfaceExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPServiceProxy.cpp - -"$(INTDIR)\CPPServiceProxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\cpp\src\tuscany\sca\cpp\CPPServiceWrapper.cpp - -"$(INTDIR)\CPPServiceWrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "tuscany_sca_cpp - Win32 Release" - -"tuscany_sca - Win32 Release" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" - cd "..\tuscany_sca_cpp" - -"tuscany_sca - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN - cd "..\tuscany_sca_cpp" - -!ELSEIF "$(CFG)" == "tuscany_sca_cpp - Win32 Debug" - -"tuscany_sca - Win32 Debug" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" - cd "..\tuscany_sca_cpp" - -"tuscany_sca - Win32 DebugCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN - cd "..\tuscany_sca_cpp" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.dsp deleted file mode 100644 index b7d6cba094..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.dsp +++ /dev/null @@ -1,205 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_python" - 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_python - 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_python.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_python.mak" CFG="tuscany_sca_python - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_python - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_python - 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_python - 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_PYTHON_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/python/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(PYTHON_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_PYTHON_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 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(PYTHON_HOME)\libs" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\python\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_python - 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_PYTHON_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/python/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(PYTHON_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_PYTHON_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 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(PYTHON_HOME)\libs" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\python\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_python - Win32 Release" -# Name "tuscany_sca_python - Win32 Debug" -# Begin Group "tuscany/sca/python" - -# PROP Default_Filter "" -# Begin Group "model" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonImplementation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonImplementation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonInterface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonInterface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonReferenceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonReferenceBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonServiceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonServiceBinding.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\export.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonImplementationExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonImplementationExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonInterfaceExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonInterfaceExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceRuntimeException.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceWrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\sca_module.cpp -# End Source File -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\python\xsd\sca-implementation-python.xsd" -# End Source File -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\python\xsd\sca-interface-python.xsd" -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.mak deleted file mode 100644 index 0cd48c14f5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_python/tuscany_sca_python.mak +++ /dev/null @@ -1,360 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_python.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca_python - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca_python - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca_python - Win32 Release" && "$(CFG)" != "tuscany_sca_python - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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_python.mak" CFG="tuscany_sca_python - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_python - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_python - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_python - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_python.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_python.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\PythonExtension.obj" - -@erase "$(INTDIR)\PythonImplementation.obj" - -@erase "$(INTDIR)\PythonImplementationExtension.obj" - -@erase "$(INTDIR)\PythonInterface.obj" - -@erase "$(INTDIR)\PythonInterfaceExtension.obj" - -@erase "$(INTDIR)\PythonReferenceBinding.obj" - -@erase "$(INTDIR)\PythonServiceBinding.obj" - -@erase "$(INTDIR)\PythonServiceProxy.obj" - -@erase "$(INTDIR)\PythonServiceWrapper.obj" - -@erase "$(INTDIR)\sca_module.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\tuscany_sca_python.dll" - -@erase "$(OUTDIR)\tuscany_sca_python.exp" - -@erase "$(OUTDIR)\tuscany_sca_python.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/python/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(PYTHON_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_PYTHON_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_python.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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:no /pdb:"$(OUTDIR)\tuscany_sca_python.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_python.dll" /implib:"$(OUTDIR)\tuscany_sca_python.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(PYTHON_HOME)\libs" -LINK32_OBJS= \ - "$(INTDIR)\PythonImplementation.obj" \ - "$(INTDIR)\PythonInterface.obj" \ - "$(INTDIR)\PythonReferenceBinding.obj" \ - "$(INTDIR)\PythonServiceBinding.obj" \ - "$(INTDIR)\PythonExtension.obj" \ - "$(INTDIR)\PythonImplementationExtension.obj" \ - "$(INTDIR)\PythonInterfaceExtension.obj" \ - "$(INTDIR)\PythonServiceProxy.obj" \ - "$(INTDIR)\PythonServiceWrapper.obj" \ - "$(INTDIR)\sca_module.obj" \ - "..\tuscany_sca\Release\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_python.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_python.dll" - ..\..\..\runtime\extensions\python\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca_python - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_python.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_python.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\PythonExtension.obj" - -@erase "$(INTDIR)\PythonImplementation.obj" - -@erase "$(INTDIR)\PythonImplementationExtension.obj" - -@erase "$(INTDIR)\PythonInterface.obj" - -@erase "$(INTDIR)\PythonInterfaceExtension.obj" - -@erase "$(INTDIR)\PythonReferenceBinding.obj" - -@erase "$(INTDIR)\PythonServiceBinding.obj" - -@erase "$(INTDIR)\PythonServiceProxy.obj" - -@erase "$(INTDIR)\PythonServiceWrapper.obj" - -@erase "$(INTDIR)\sca_module.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\tuscany_sca_python.dll" - -@erase "$(OUTDIR)\tuscany_sca_python.exp" - -@erase "$(OUTDIR)\tuscany_sca_python.ilk" - -@erase "$(OUTDIR)\tuscany_sca_python.lib" - -@erase "$(OUTDIR)\tuscany_sca_python.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/python/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(PYTHON_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_PYTHON_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_python.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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:"$(OUTDIR)\tuscany_sca_python.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_python.dll" /implib:"$(OUTDIR)\tuscany_sca_python.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(PYTHON_HOME)\libs" -LINK32_OBJS= \ - "$(INTDIR)\PythonImplementation.obj" \ - "$(INTDIR)\PythonInterface.obj" \ - "$(INTDIR)\PythonReferenceBinding.obj" \ - "$(INTDIR)\PythonServiceBinding.obj" \ - "$(INTDIR)\PythonExtension.obj" \ - "$(INTDIR)\PythonImplementationExtension.obj" \ - "$(INTDIR)\PythonInterfaceExtension.obj" \ - "$(INTDIR)\PythonServiceProxy.obj" \ - "$(INTDIR)\PythonServiceWrapper.obj" \ - "$(INTDIR)\sca_module.obj" \ - "..\tuscany_sca\Debug\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_python.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_python.dll" - ..\..\..\runtime\extensions\python\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca_python.dep") -!INCLUDE "tuscany_sca_python.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca_python.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca_python - Win32 Release" || "$(CFG)" == "tuscany_sca_python - Win32 Debug" -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonImplementation.cpp - -"$(INTDIR)\PythonImplementation.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonInterface.cpp - -"$(INTDIR)\PythonInterface.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonReferenceBinding.cpp - -"$(INTDIR)\PythonReferenceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\model\PythonServiceBinding.cpp - -"$(INTDIR)\PythonServiceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonExtension.cpp - -"$(INTDIR)\PythonExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonImplementationExtension.cpp - -"$(INTDIR)\PythonImplementationExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonInterfaceExtension.cpp - -"$(INTDIR)\PythonInterfaceExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceProxy.cpp - -"$(INTDIR)\PythonServiceProxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\PythonServiceWrapper.cpp - -"$(INTDIR)\PythonServiceWrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\python\src\tuscany\sca\python\sca_module.cpp - -"$(INTDIR)\sca_module.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "tuscany_sca_python - Win32 Release" - -"tuscany_sca - Win32 Release" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" - cd "..\tuscany_sca_python" - -"tuscany_sca - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN - cd "..\tuscany_sca_python" - -!ELSEIF "$(CFG)" == "tuscany_sca_python - Win32 Debug" - -"tuscany_sca - Win32 Debug" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" - cd "..\tuscany_sca_python" - -"tuscany_sca - Win32 DebugCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN - cd "..\tuscany_sca_python" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.dsp deleted file mode 100644 index ccba80b6bf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.dsp +++ /dev/null @@ -1,185 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_ruby" - 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_ruby - 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_ruby.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_ruby.mak" CFG="tuscany_sca_ruby - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ruby - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ruby - 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_ruby - 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_ruby_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ruby/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(RUBY_HOME)\lib\ruby\1.8\i386-mswin32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_RUBY_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 msvcrt-ruby18.lib /nologo /dll /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(RUBY_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ruby\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_ruby - 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_ruby_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ruby/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(RUBY_HOME)\lib\ruby\1.8\i386-mswin32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_RUBY_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 msvcrt-ruby18.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(RUBY_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ruby\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_ruby - Win32 Release" -# Name "tuscany_sca_ruby - Win32 Debug" -# Begin Group "tuscany/sca/ruby" - -# PROP Default_Filter "" -# Begin Group "model" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\RubyImplementation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\rubyImplementation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\RubyReferenceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\rubyReferenceBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\RubyServiceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\rubyServiceBinding.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\export.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\Ruby.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyCompositeContext.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\rubyExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyImplementationExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\rubyImplementationExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyServiceProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\rubyServiceProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\rubyServiceWrapper.h -# End Source File -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\ruby\xsd\sca-implementation-ruby.xsd" -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.mak deleted file mode 100644 index 140b842c47..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.mak +++ /dev/null @@ -1,340 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_ruby.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca_ruby - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca_ruby - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca_ruby - Win32 Release" && "$(CFG)" != "tuscany_sca_ruby - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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_ruby.mak" CFG="tuscany_sca_ruby - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ruby - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ruby - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_ruby - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_ruby.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ruby.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\RubyCompositeContext.obj" - -@erase "$(INTDIR)\RubyExtension.obj" - -@erase "$(INTDIR)\RubyImplementation.obj" - -@erase "$(INTDIR)\RubyImplementationExtension.obj" - -@erase "$(INTDIR)\RubyReferenceBinding.obj" - -@erase "$(INTDIR)\RubyServiceBinding.obj" - -@erase "$(INTDIR)\RubyServiceProxy.obj" - -@erase "$(INTDIR)\RubyServiceWrapper.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\tuscany_sca_ruby.dll" - -@erase "$(OUTDIR)\tuscany_sca_ruby.exp" - -@erase "$(OUTDIR)\tuscany_sca_ruby.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ruby/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(RUBY_HOME)\lib\ruby\1.8\i386-mswin32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_RUBY_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ruby.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 msvcrt-ruby18.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_ruby.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ruby.dll" /implib:"$(OUTDIR)\tuscany_sca_ruby.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(RUBY_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\RubyImplementation.obj" \ - "$(INTDIR)\RubyReferenceBinding.obj" \ - "$(INTDIR)\RubyServiceBinding.obj" \ - "$(INTDIR)\RubyCompositeContext.obj" \ - "$(INTDIR)\RubyExtension.obj" \ - "$(INTDIR)\RubyImplementationExtension.obj" \ - "$(INTDIR)\RubyServiceProxy.obj" \ - "$(INTDIR)\RubyServiceWrapper.obj" \ - "..\tuscany_sca\Release\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_ruby.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ruby.dll" - ..\..\..\runtime\extensions\ruby\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca_ruby - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_ruby.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ruby.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\RubyCompositeContext.obj" - -@erase "$(INTDIR)\RubyExtension.obj" - -@erase "$(INTDIR)\RubyImplementation.obj" - -@erase "$(INTDIR)\RubyImplementationExtension.obj" - -@erase "$(INTDIR)\RubyReferenceBinding.obj" - -@erase "$(INTDIR)\RubyServiceBinding.obj" - -@erase "$(INTDIR)\RubyServiceProxy.obj" - -@erase "$(INTDIR)\RubyServiceWrapper.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\tuscany_sca_ruby.dll" - -@erase "$(OUTDIR)\tuscany_sca_ruby.exp" - -@erase "$(OUTDIR)\tuscany_sca_ruby.ilk" - -@erase "$(OUTDIR)\tuscany_sca_ruby.lib" - -@erase "$(OUTDIR)\tuscany_sca_ruby.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ruby/src" /I "../../../deploy/include" /I "$(TUSCANY_SDOCPP)/include" /I "$(RUBY_HOME)\lib\ruby\1.8\i386-mswin32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_RUBY_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ruby.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 msvcrt-ruby18.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_ruby.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ruby.dll" /implib:"$(OUTDIR)\tuscany_sca_ruby.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(RUBY_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\RubyImplementation.obj" \ - "$(INTDIR)\RubyReferenceBinding.obj" \ - "$(INTDIR)\RubyServiceBinding.obj" \ - "$(INTDIR)\RubyCompositeContext.obj" \ - "$(INTDIR)\RubyExtension.obj" \ - "$(INTDIR)\RubyImplementationExtension.obj" \ - "$(INTDIR)\RubyServiceProxy.obj" \ - "$(INTDIR)\RubyServiceWrapper.obj" \ - "..\tuscany_sca\Debug\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_ruby.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ruby.dll" - ..\..\..\runtime\extensions\ruby\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca_ruby.dep") -!INCLUDE "tuscany_sca_ruby.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca_ruby.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca_ruby - Win32 Release" || "$(CFG)" == "tuscany_sca_ruby - Win32 Debug" -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\RubyImplementation.cpp - -"$(INTDIR)\RubyImplementation.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\RubyReferenceBinding.cpp - -"$(INTDIR)\RubyReferenceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\model\RubyServiceBinding.cpp - -"$(INTDIR)\RubyServiceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyCompositeContext.cpp - -"$(INTDIR)\RubyCompositeContext.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyExtension.cpp - -"$(INTDIR)\RubyExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyImplementationExtension.cpp - -"$(INTDIR)\RubyImplementationExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyServiceProxy.cpp - -"$(INTDIR)\RubyServiceProxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ruby\src\tuscany\sca\ruby\RubyServiceWrapper.cpp - -"$(INTDIR)\RubyServiceWrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "tuscany_sca_ruby - Win32 Release" - -"tuscany_sca - Win32 Release" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" - cd "..\tuscany_sca_ruby" - -"tuscany_sca - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN - cd "..\tuscany_sca_ruby" - -!ELSEIF "$(CFG)" == "tuscany_sca_ruby - Win32 Debug" - -"tuscany_sca - Win32 Debug" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" - cd "..\tuscany_sca_ruby" - -"tuscany_sca - Win32 DebugCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN - cd "..\tuscany_sca_ruby" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.dsp deleted file mode 100644 index 8c47830df3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.dsp +++ /dev/null @@ -1,121 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_ws_dispatcher" - 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_ws_dispatcher - 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_ws_dispatcher.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_ws_dispatcher.mak" CFG="tuscany_sca_ws_dispatcher - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ws_dispatcher - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ws_dispatcher - 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_ws_dispatcher - 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_ws_dispatcher_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_DISPATCHER_EXPORTS" /FD /c -# SUBTRACT CPP /u /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 axis2_util.lib axiom.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 axis2_engine.lib /nologo /dll /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ws\service\deploymodule.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_dispatcher - 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_ws_dispatcher_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_DISPATCHER_EXPORTS" /FD /GZ /c -# SUBTRACT CPP /u /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 axis2_util.lib axiom.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 axis2_engine.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ws\service\deploymodule.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_ws_dispatcher - Win32 Release" -# Name "tuscany_sca_ws_dispatcher - Win32 Debug" -# Begin Group "tuscany/sca/ws" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Dispatcher.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2DispatcherModule.cpp -# End Source File -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\ws\xsd\sca-binding-webservice.xsd" -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.mak deleted file mode 100644 index 20b6cc0564..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.mak +++ /dev/null @@ -1,230 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_ws_dispatcher.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca_ws_dispatcher - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca_ws_dispatcher - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca_ws_dispatcher - Win32 Release" && "$(CFG)" != "tuscany_sca_ws_dispatcher - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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_ws_dispatcher.mak" CFG="tuscany_sca_ws_dispatcher - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ws_dispatcher - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ws_dispatcher - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_ws_dispatcher - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" - - -CLEAN : - -@erase "$(INTDIR)\Axis2Dispatcher.obj" - -@erase "$(INTDIR)\Axis2DispatcherModule.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.exp" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_DISPATCHER_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_dispatcher.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_ws_dispatcher.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_dispatcher.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\Axis2Dispatcher.obj" \ - "$(INTDIR)\Axis2DispatcherModule.obj" - -"$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" - ..\..\..\runtime\extensions\ws\service\deploymodule.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_dispatcher - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" - - -CLEAN : - -@erase "$(INTDIR)\Axis2Dispatcher.obj" - -@erase "$(INTDIR)\Axis2DispatcherModule.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.exp" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.ilk" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.lib" - -@erase "$(OUTDIR)\tuscany_sca_ws_dispatcher.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_DISPATCHER_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_dispatcher.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_ws_dispatcher.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_dispatcher.lib" /pdbtype:sept /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\Axis2Dispatcher.obj" \ - "$(INTDIR)\Axis2DispatcherModule.obj" - -"$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sca_ws_dispatcher.dll" - ..\..\..\runtime\extensions\ws\service\deploymodule.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca_ws_dispatcher.dep") -!INCLUDE "tuscany_sca_ws_dispatcher.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca_ws_dispatcher.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca_ws_dispatcher - Win32 Release" || "$(CFG)" == "tuscany_sca_ws_dispatcher - Win32 Debug" -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Dispatcher.cpp - -"$(INTDIR)\Axis2Dispatcher.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2DispatcherModule.cpp - -"$(INTDIR)\Axis2DispatcherModule.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.dsp deleted file mode 100644 index 27827f86da..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.dsp +++ /dev/null @@ -1,149 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_ws_reference" - 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_ws_reference - 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_ws_reference.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_ws_reference.mak" CFG="tuscany_sca_ws_reference - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ws_reference - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ws_reference - 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_ws_reference - 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_WS_REFERENCE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ws/reference/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_REFERENCE_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 axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib axis2_parser.lib /nologo /dll /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ws\reference\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_reference - 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_WS_REFERENCE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ws/reference/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_REFERENCE_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 axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib axis2_parser.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ws\reference\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_ws_reference - Win32 Release" -# Name "tuscany_sca_ws_reference - Win32 Debug" -# Begin Group "tuscany/sca/ws" - -# PROP Default_Filter "" -# Begin Group "model" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\model\WSServiceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\model\WSServiceBinding.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\Axis2Client.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\Axis2Client.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\WSServiceBindingExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\WSServiceBindingExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\WSServiceWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\WSServiceWrapper.h -# End Source File -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\ws\xsd\sca-binding-webservice.xsd" -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.mak deleted file mode 100644 index 7c937e0b1b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.mak +++ /dev/null @@ -1,300 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_ws_reference.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca_ws_reference - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca_ws_reference - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca_ws_reference - Win32 Release" && "$(CFG)" != "tuscany_sca_ws_reference - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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_ws_reference.mak" CFG="tuscany_sca_ws_reference - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ws_reference - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ws_reference - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_ws_reference - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_ws_reference.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ws_reference.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\Axis2Client.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\WSServiceBinding.obj" - -@erase "$(INTDIR)\WSServiceBindingExtension.obj" - -@erase "$(INTDIR)\WSServiceWrapper.obj" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.dll" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.exp" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ws/reference/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_REFERENCE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_reference.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib axis2_parser.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_ws_reference.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_reference.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_reference.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\WSServiceBinding.obj" \ - "$(INTDIR)\Axis2Client.obj" \ - "$(INTDIR)\WSServiceBindingExtension.obj" \ - "$(INTDIR)\WSServiceWrapper.obj" \ - "..\tuscany_sca\Release\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_ws_reference.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ws_reference.dll" - ..\..\..\runtime\extensions\ws\reference\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_reference - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_ws_reference.dll" - -!ELSE - -ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ws_reference.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\Axis2Client.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\WSServiceBinding.obj" - -@erase "$(INTDIR)\WSServiceBindingExtension.obj" - -@erase "$(INTDIR)\WSServiceWrapper.obj" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.dll" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.exp" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.ilk" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.lib" - -@erase "$(OUTDIR)\tuscany_sca_ws_reference.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ws/reference/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_REFERENCE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_reference.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib axis2_parser.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_ws_reference.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_reference.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_reference.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\WSServiceBinding.obj" \ - "$(INTDIR)\Axis2Client.obj" \ - "$(INTDIR)\WSServiceBindingExtension.obj" \ - "$(INTDIR)\WSServiceWrapper.obj" \ - "..\tuscany_sca\Debug\tuscany_sca.lib" - -"$(OUTDIR)\tuscany_sca_ws_reference.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ws_reference.dll" - ..\..\..\runtime\extensions\ws\reference\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca_ws_reference.dep") -!INCLUDE "tuscany_sca_ws_reference.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca_ws_reference.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca_ws_reference - Win32 Release" || "$(CFG)" == "tuscany_sca_ws_reference - Win32 Debug" -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\model\WSServiceBinding.cpp - -"$(INTDIR)\WSServiceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\Axis2Client.cpp - -"$(INTDIR)\Axis2Client.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\WSServiceBindingExtension.cpp - -"$(INTDIR)\WSServiceBindingExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\reference\axis2c\src\tuscany\sca\ws\WSServiceWrapper.cpp - -"$(INTDIR)\WSServiceWrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "tuscany_sca_ws_reference - Win32 Release" - -"tuscany_sca - Win32 Release" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" - cd "..\tuscany_sca_ws_reference" - -"tuscany_sca - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN - cd "..\tuscany_sca_ws_reference" - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_reference - Win32 Debug" - -"tuscany_sca - Win32 Debug" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" - cd "..\tuscany_sca_ws_reference" - -"tuscany_sca - Win32 DebugCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN - cd "..\tuscany_sca_ws_reference" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp deleted file mode 100644 index 8ddf85e4d9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp +++ /dev/null @@ -1,153 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tuscany_sca_ws_service" - 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_ws_service - 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_ws_service.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_ws_service.mak" CFG="tuscany_sca_ws_service - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ws_service - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ws_service - 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_ws_service - 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_WS_SERVICE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_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 axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ws\service\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - 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_WS_SERVICE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_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 axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\extensions\ws\service\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "tuscany_sca_ws_service - Win32 Release" -# Name "tuscany_sca_ws_service - Win32 Debug" -# Begin Group "tuscany/sca/ws" - -# PROP Default_Filter "" -# Begin Group "model" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\model\WSReferenceBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\model\WSReferenceBinding.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Service.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Utils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Utils.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\WSReferenceBindingExtension.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\WSReferenceBindingExtension.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\WSServiceProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\WSServiceProxy.h -# End Source File -# End Group -# Begin Group "xsd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\..\runtime\extensions\ws\xsd\sca-binding-webservice.xsd" -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak deleted file mode 100644 index ea0dbe2aeb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak +++ /dev/null @@ -1,338 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_ws_service.dsp -!IF "$(CFG)" == "" -CFG=tuscany_sca_ws_service - Win32 Debug -!MESSAGE No configuration specified. Defaulting to tuscany_sca_ws_service - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "tuscany_sca_ws_service - Win32 Release" && "$(CFG)" != "tuscany_sca_ws_service - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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_ws_service.mak" CFG="tuscany_sca_ws_service - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tuscany_sca_ws_service - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "tuscany_sca_ws_service - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_ws_service.dll" - -!ELSE - -ALL : "tuscany_sca_ws_dispatcher - Win32 Release" "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ws_service.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" "tuscany_sca_ws_dispatcher - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\Axis2Service.obj" - -@erase "$(INTDIR)\Axis2Utils.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\WSReferenceBinding.obj" - -@erase "$(INTDIR)\WSReferenceBindingExtension.obj" - -@erase "$(INTDIR)\WSServiceProxy.obj" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.dll" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.exp" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_service.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_ws_service.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_service.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_service.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\WSReferenceBinding.obj" \ - "$(INTDIR)\Axis2Service.obj" \ - "$(INTDIR)\Axis2Utils.obj" \ - "$(INTDIR)\WSReferenceBindingExtension.obj" \ - "$(INTDIR)\WSServiceProxy.obj" \ - "..\tuscany_sca\Release\tuscany_sca.lib" \ - "..\tuscany_sca_ws_dispatcher\Release\tuscany_sca_ws_dispatcher.lib" - -"$(OUTDIR)\tuscany_sca_ws_service.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca_ws_dispatcher - Win32 Release" "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ws_service.dll" - ..\..\..\runtime\extensions\ws\service\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sca_ws_service.dll" - -!ELSE - -ALL : "tuscany_sca_ws_dispatcher - Win32 Debug" "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ws_service.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"tuscany_sca - Win32 DebugCLEAN" "tuscany_sca_ws_dispatcher - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\Axis2Service.obj" - -@erase "$(INTDIR)\Axis2Utils.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\WSReferenceBinding.obj" - -@erase "$(INTDIR)\WSReferenceBindingExtension.obj" - -@erase "$(INTDIR)\WSServiceProxy.obj" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.dll" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.exp" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.ilk" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.lib" - -@erase "$(OUTDIR)\tuscany_sca_ws_service.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/extensions/ws/service/axis2c/src" /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_service.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_ws_service.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_service.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_service.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\WSReferenceBinding.obj" \ - "$(INTDIR)\Axis2Service.obj" \ - "$(INTDIR)\Axis2Utils.obj" \ - "$(INTDIR)\WSReferenceBindingExtension.obj" \ - "$(INTDIR)\WSServiceProxy.obj" \ - "..\tuscany_sca\Debug\tuscany_sca.lib" \ - "..\tuscany_sca_ws_dispatcher\Debug\tuscany_sca_ws_dispatcher.lib" - -"$(OUTDIR)\tuscany_sca_ws_service.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "tuscany_sca_ws_dispatcher - Win32 Debug" "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ws_service.dll" - ..\..\..\runtime\extensions\ws\service\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("tuscany_sca_ws_service.dep") -!INCLUDE "tuscany_sca_ws_service.dep" -!ELSE -!MESSAGE Warning: cannot find "tuscany_sca_ws_service.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release" || "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug" -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\model\WSReferenceBinding.cpp - -"$(INTDIR)\WSReferenceBinding.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Service.cpp - -"$(INTDIR)\Axis2Service.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\Axis2Utils.cpp - -"$(INTDIR)\Axis2Utils.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\WSReferenceBindingExtension.cpp - -"$(INTDIR)\WSReferenceBindingExtension.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\extensions\ws\service\axis2c\src\tuscany\sca\ws\WSServiceProxy.cpp - -"$(INTDIR)\WSServiceProxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release" - -"tuscany_sca - Win32 Release" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" - cd "..\tuscany_sca_ws_service" - -"tuscany_sca - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN - cd "..\tuscany_sca_ws_service" - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug" - -"tuscany_sca - Win32 Debug" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" - cd "..\tuscany_sca_ws_service" - -"tuscany_sca - Win32 DebugCLEAN" : - cd "..\tuscany_sca" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN - cd "..\tuscany_sca_ws_service" - -!ENDIF - -!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release" - -"tuscany_sca_ws_dispatcher - Win32 Release" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Release" - cd "..\tuscany_sca_ws_service" - -"tuscany_sca_ws_dispatcher - Win32 ReleaseCLEAN" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Release" RECURSE=1 CLEAN - cd "..\tuscany_sca_ws_service" - -!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug" - -"tuscany_sca_ws_dispatcher - Win32 Debug" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Debug" - cd "..\tuscany_sca_ws_service" - -"tuscany_sca_ws_dispatcher - Win32 DebugCLEAN" : - cd "..\tuscany_sca_ws_dispatcher" - $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_dispatcher.mak CFG="tuscany_sca_ws_dispatcher - Win32 Debug" RECURSE=1 CLEAN - cd "..\tuscany_sca_ws_service" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca.sln b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca.sln deleted file mode 100644 index 6121273475..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca.sln +++ /dev/null @@ -1,73 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca", "tuscany_sca\tuscany_sca.vcproj", "{02DBB555-DFF3-448A-BC35-569640FE73D9}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_cpp", "tuscany_sca_cpp\tuscany_sca_cpp.vcproj", "{61C87D0D-B2C9-4951-8296-CE2CFCC420A1}" - ProjectSection(ProjectDependencies) = postProject - {02DBB555-DFF3-448A-BC35-569640FE73D9} = {02DBB555-DFF3-448A-BC35-569640FE73D9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_ws_reference", "tuscany_sca_ws_reference\tuscany_sca_ws_reference.vcproj", "{7F4E797F-6BDC-472D-A51D-C81C8152DAF6}" - ProjectSection(ProjectDependencies) = postProject - {02DBB555-DFF3-448A-BC35-569640FE73D9} = {02DBB555-DFF3-448A-BC35-569640FE73D9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_ws_service", "tuscany_sca_ws_service\tuscany_sca_ws_service.vcproj", "{5DFDD169-BF84-4132-B87F-52AC601C8678}" - ProjectSection(ProjectDependencies) = postProject - {02DBB555-DFF3-448A-BC35-569640FE73D9} = {02DBB555-DFF3-448A-BC35-569640FE73D9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_python", "tuscany_sca_python\tuscany_sca_python.vcproj", "{C3DE6545-380A-45AE-9D55-0DE04AB7613C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_ws_dispatcher", "tuscany_sca_ws_dispatcher\tuscany_sca_ws_dispatcher.vcproj", "{639AFB7F-A88C-4BCE-A2FC-A4E60CA5BCF5}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_ruby", "tuscany_sca_ruby\tuscany_sca_ruby.vcproj", "{68D0C3C2-BBB8-470F-936B-5C91C318BF13}" - ProjectSection(ProjectDependencies) = postProject - {02DBB555-DFF3-448A-BC35-569640FE73D9} = {02DBB555-DFF3-448A-BC35-569640FE73D9} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {02DBB555-DFF3-448A-BC35-569640FE73D9}.Debug.ActiveCfg = Debug|Win32 - {02DBB555-DFF3-448A-BC35-569640FE73D9}.Debug.Build.0 = Debug|Win32 - {02DBB555-DFF3-448A-BC35-569640FE73D9}.Release.ActiveCfg = Release|Win32 - {02DBB555-DFF3-448A-BC35-569640FE73D9}.Release.Build.0 = Release|Win32 - {61C87D0D-B2C9-4951-8296-CE2CFCC420A1}.Debug.ActiveCfg = Debug|Win32 - {61C87D0D-B2C9-4951-8296-CE2CFCC420A1}.Debug.Build.0 = Debug|Win32 - {61C87D0D-B2C9-4951-8296-CE2CFCC420A1}.Release.ActiveCfg = Release|Win32 - {61C87D0D-B2C9-4951-8296-CE2CFCC420A1}.Release.Build.0 = Release|Win32 - {7F4E797F-6BDC-472D-A51D-C81C8152DAF6}.Debug.ActiveCfg = Debug|Win32 - {7F4E797F-6BDC-472D-A51D-C81C8152DAF6}.Debug.Build.0 = Debug|Win32 - {7F4E797F-6BDC-472D-A51D-C81C8152DAF6}.Release.ActiveCfg = Release|Win32 - {7F4E797F-6BDC-472D-A51D-C81C8152DAF6}.Release.Build.0 = Release|Win32 - {5DFDD169-BF84-4132-B87F-52AC601C8678}.Debug.ActiveCfg = Debug|Win32 - {5DFDD169-BF84-4132-B87F-52AC601C8678}.Debug.Build.0 = Debug|Win32 - {5DFDD169-BF84-4132-B87F-52AC601C8678}.Release.ActiveCfg = Release|Win32 - {5DFDD169-BF84-4132-B87F-52AC601C8678}.Release.Build.0 = Release|Win32 - {C3DE6545-380A-45AE-9D55-0DE04AB7613C}.Debug.ActiveCfg = Debug|Win32 - {C3DE6545-380A-45AE-9D55-0DE04AB7613C}.Debug.Build.0 = Debug|Win32 - {C3DE6545-380A-45AE-9D55-0DE04AB7613C}.Release.ActiveCfg = Release|Win32 - {C3DE6545-380A-45AE-9D55-0DE04AB7613C}.Release.Build.0 = Release|Win32 - {639AFB7F-A88C-4BCE-A2FC-A4E60CA5BCF5}.Debug.ActiveCfg = Debug|Win32 - {639AFB7F-A88C-4BCE-A2FC-A4E60CA5BCF5}.Debug.Build.0 = Debug|Win32 - {639AFB7F-A88C-4BCE-A2FC-A4E60CA5BCF5}.Release.ActiveCfg = Release|Win32 - {639AFB7F-A88C-4BCE-A2FC-A4E60CA5BCF5}.Release.Build.0 = Release|Win32 - {68D0C3C2-BBB8-470F-936B-5C91C318BF13}.Debug.ActiveCfg = Debug|Win32 - {68D0C3C2-BBB8-470F-936B-5C91C318BF13}.Debug.Build.0 = Debug|Win32 - {68D0C3C2-BBB8-470F-936B-5C91C318BF13}.Release.ActiveCfg = Release|Win32 - {68D0C3C2-BBB8-470F-936B-5C91C318BF13}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj deleted file mode 100644 index 95cbab7df7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj +++ /dev/null @@ -1,989 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.vcproj deleted file mode 100644 index 73802bd5f1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_cpp/tuscany_sca_cpp.vcproj +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_python/tuscany_sca_python.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_python/tuscany_sca_python.vcproj deleted file mode 100644 index a9ca8290d6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_python/tuscany_sca_python.vcproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.vcproj deleted file mode 100644 index 72eac9aa24..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ruby/tuscany_sca_ruby.vcproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.vcproj deleted file mode 100644 index 8093234c80..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_dispatcher/tuscany_sca_ws_dispatcher.vcproj +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.vcproj deleted file mode 100644 index 844732078c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_reference/tuscany_sca_ws_reference.vcproj +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj deleted file mode 100644 index ec65df0c2e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/Makefile.am deleted file mode 100644 index 8b13058152..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = core extensions diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/Makefile.am deleted file mode 100644 index 2b9491ec1c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/deploy.bat deleted file mode 100644 index 178ffb7b39..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/deploy.bat +++ /dev/null @@ -1,72 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set srcdir=%rootdir%\runtime\core\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - - -if not exist %deploydir% mkdir %deploydir% -if not exist %deploydir%\bin mkdir %deploydir%\bin -if not exist %deploydir%\lib mkdir %deploydir%\lib -if not exist %deploydir%\include mkdir %deploydir%\include -if not exist %deploydir%\include\tuscany mkdir %deploydir%\include\tuscany -if not exist %deploydir%\include\tuscany\sca mkdir %deploydir%\include\tuscany\sca -if not exist %deploydir%\include\tuscany\sca\core mkdir %deploydir%\include\tuscany\sca\core -if not exist %deploydir%\include\tuscany\sca\extension mkdir %deploydir%\include\tuscany\sca\extension -if not exist %deploydir%\include\tuscany\sca\model mkdir %deploydir%\include\tuscany\sca\model -if not exist %deploydir%\include\tuscany\sca\util mkdir %deploydir%\include\tuscany\sca\util -if not exist %deploydir%\xsd mkdir %deploydir%\xsd - -del %deploydir%\bin\tuscany_sca.* -del %deploydir%\lib\*.lib - -copy %srcdir%\tuscany\sca\*.h %deploydir%\include\tuscany\sca -copy %srcdir%\tuscany\sca\core\*.h %deploydir%\include\tuscany\sca\core -copy %srcdir%\tuscany\sca\extension\*.h %deploydir%\include\tuscany\sca\extension -copy %srcdir%\tuscany\sca\model\*.h %deploydir%\include\tuscany\sca\model -copy %srcdir%\tuscany\sca\util\*.h %deploydir%\include\tuscany\sca\util - -copy %rootdir%\xsd\*.* %deploydir%\xsd - -copy %inpath%\tuscany_sca.lib %deploydir%\lib -copy %inpath%\tuscany_sca.dll %deploydir%\bin - -if exist %inpath%\tuscany_sca.pdb copy %inpath%\tuscany_sca.pdb %deploydir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/Makefile.am deleted file mode 100644 index ce28bed32e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/Makefile.am +++ /dev/null @@ -1,74 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -lib_LTLIBRARIES = libtuscany_sca.la - -nobase_include_HEADERS = \ -tuscany/sca/*.h \ -tuscany/sca/core/*.h \ -tuscany/sca/model/*.h \ -tuscany/sca/util/*.h \ -tuscany/sca/extension/*.h - -## To list the source files execute the following: -## ls -1 tuscany/sca/util/*.cpp tuscany/sca/extension/*.cpp tuscany/sca/model/*.cpp tuscany/sca/core/*.cpp tuscany/sca/cpp/*.cpp tuscany/sca/ws/*.cpp | awk '{ print $1 " \\" }' -## and copy/paste the output below -libtuscany_sca_la_SOURCES = \ -tuscany/sca/core/Operation.cpp \ -tuscany/sca/core/SCARuntime.cpp \ -tuscany/sca/core/ServiceProxy.cpp \ -tuscany/sca/core/ServiceWrapper.cpp \ -tuscany/sca/core/TuscanyRuntime.cpp \ -tuscany/sca/extension/ImplementationExtension.cpp \ -tuscany/sca/extension/InterfaceExtension.cpp \ -tuscany/sca/extension/ReferenceBindingExtension.cpp \ -tuscany/sca/extension/ServiceBindingExtension.cpp \ -tuscany/sca/model/Binding.cpp \ -tuscany/sca/model/Component.cpp \ -tuscany/sca/model/ComponentType.cpp \ -tuscany/sca/model/Composite.cpp \ -tuscany/sca/model/CompositeReference.cpp \ -tuscany/sca/model/CompositeService.cpp \ -tuscany/sca/model/Contract.cpp \ -tuscany/sca/model/Interface.cpp \ -tuscany/sca/model/ModelLoader.cpp \ -tuscany/sca/model/ReferenceBinding.cpp \ -tuscany/sca/model/Reference.cpp \ -tuscany/sca/model/ReferenceType.cpp \ -tuscany/sca/model/ServiceBinding.cpp \ -tuscany/sca/model/Service.cpp \ -tuscany/sca/model/ServiceType.cpp \ -tuscany/sca/model/Wire.cpp \ -tuscany/sca/model/WSDLDefinition.cpp \ -tuscany/sca/model/WSDLInterface.cpp \ -tuscany/sca/model/WSDLOperation.cpp \ -tuscany/sca/util/DefaultLogWriter.cpp \ -tuscany/sca/util/Exceptions.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 - -libtuscany_sca_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.cpp deleted file mode 100644 index aa030a1ce7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.cpp +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/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) - { - LOGENTRY(1,"Operation::constructor"); - - if (operationName != 0) - { - name = operationName; - } - - LOGEXIT(1,"Operation::constructor"); - } - - // ========== - // Destructor - // ========== - Operation::~Operation() - { - LOGENTRY(1,"Operation::destructor"); - clean(); - LOGEXIT(1,"Operation::destructor"); - } - - // ========== - // Copy Constructor - // ========== - Operation::Operation(const Operation& op) - { - LOGENTRY(1,"Operation::copy contructor"); - copy(op); - LOGEXIT(1,"Operation::copy contructor"); - } - - // ========== - // operator= - // ========== - Operation& Operation::operator=(const Operation& op) - { - LOGENTRY(1,"Operation::operator="); - if (&op != this) - { - copy(op); - } - LOGEXIT(1,"Operation::operator="); - return *this; - } - - // ========== - // Clean - // ========== - void Operation::clean() - { - LOGENTRY(1,"Operation::clean"); - for (unsigned int i = 0; i < getNParms(); i++) - { - const Parameter& parm = getParameter(i); - if (parm.getType() == DATAOBJECT) - { - delete (DataObjectPtr*)parm.getValue(); - } - } - - parameters.empty(); - - if (getReturnType() == DATAOBJECT) - { - delete (DataObjectPtr*)getReturnValue(); - } - - LOGEXIT(1,"Operation::clean"); - } - - // ========== - // Copy - // ========== - void Operation::copy(const Operation& op) - { - LOGENTRY(1,"Operation::copy"); - clean(); - for (unsigned int i = 0; i < op.getNParms(); i++) - { - const Parameter& parm = op.getParameter(i); - if (parm.getType() == DATAOBJECT) - { - addParameter((const DataObject*)parm.getValue()); - } - else - { - parameters.insert(parameters.end(), parm); - } - } - - if (getReturnType() == DATAOBJECT) - { - setReturnValue((const DataObjectPtr*)op.getReturnValue()); - } - else - { - returnValue = op.returnValue; - } - - LOGEXIT(1,"Operation::copy"); - } - - // ============================================== - // getParameter: return parameter at position pos - // ============================================== - void* Operation::getParameterValue(unsigned int pos) const - { - if (pos < parameters.size()) - { - return parameters[pos].getValue(); - } - - return 0; - } - - // ============================================== - // getParameter: return of parameter - // ============================================== - const Operation::Parameter& Operation::getParameter(unsigned int pos) const - { - if (pos < parameters.size()) - { - return parameters[pos]; - } - - throw "index out of range"; - } - - - // ============================================== - // getParameterType: return type of parameter - // ============================================== - Operation::ParameterType Operation::getParameterType(unsigned int pos) const - { - if (pos < parameters.size()) - { - return parameters[pos].getType(); - } - - return VOID_TYPE; - } - - // =========================================== - // addParameter: set parameter at position pos - // =========================================== - void Operation::addParameter(const void *parm) - { - LOGINFO(4, "Operation::addParameter(void*)"); - parameters.insert(parameters.end(), Parameter((void*)parm, VOID_TYPE)); - } - - void Operation::addParameter(const bool *parm) - { - LOGINFO(4, "Operation::addParameter(bool)"); - parameters.insert(parameters.end(), Parameter((void*)parm, BOOL)); - } - - void Operation::addParameter(const short *parm) - { - LOGINFO(4, "Operation::addParameter(short)"); - parameters.insert(parameters.end(), Parameter((void*)parm, SHORT)); - } - - void Operation::addParameter(const int *parm) - { - LOGINFO(4, "Operation::addParameter(int)"); - parameters.insert(parameters.end(), Parameter((void*)parm, INT)); - } - - void Operation::addParameter(const long *parm) - { - LOGINFO(4, "Operation::addParameter(long)"); - parameters.insert(parameters.end(), Parameter((void*)parm, LONG)); - } - - void Operation::addParameter(const unsigned short *parm) - { - LOGINFO(4, "Operation::addParameter(unsigned short)"); - parameters.insert(parameters.end(), Parameter((void*)parm, USHORT)); - } - - void Operation::addParameter(const unsigned int *parm) - { - LOGINFO(4, "Operation::addParameter(unsigned int)"); - parameters.insert(parameters.end(), Parameter((void*)parm, UINT)); - } - - void Operation::addParameter(const unsigned long *parm) - { - LOGINFO(4, "Operation::addParameter(unsigned long)"); - parameters.insert(parameters.end(), Parameter((void*)parm, ULONG)); - } - - void Operation::addParameter(const float *parm) - { - LOGINFO(4, "Operation::addParameter(float)"); - parameters.insert(parameters.end(), Parameter((void*)parm, FLOAT)); - } - - void Operation::addParameter(const double *parm) - { - LOGINFO(4, "Operation::addParameter(double)"); - parameters.insert(parameters.end(), Parameter((void*)parm, DOUBLE)); - } - - void Operation::addParameter(const long double *parm) - { - LOGINFO(4, "Operation::addParameter(long double)"); - parameters.insert(parameters.end(), Parameter((void*)parm, LONGDOUBLE)); - } - - void Operation::addParameter(const char* *parm) - { - LOGINFO(4, "Operation::addParameter(char*)"); - parameters.insert(parameters.end(), Parameter((void*)parm, CHARS)); - } - - void Operation::addParameter(const char *parm) - { - LOGINFO(4, "Operation::addParameter(char)"); - parameters.insert(parameters.end(), Parameter((void*)parm, CHAR)); - } - - void Operation::addParameter(const string *parm) - { - LOGINFO(4, "Operation::addParameter(string)"); - parameters.insert(parameters.end(), Parameter((void*)parm, STRING)); - } - - void Operation::addParameter(const DataObjectPtr *parm) - { - LOGINFO(4, "Operation::addParameter(DataObjectPtr)"); - parameters.insert(parameters.end(), Parameter((void*)new DataObjectPtr(*parm), DATAOBJECT)); - } - - Operation::Parameter::Parameter(void* val, Operation::ParameterType typ) - : value(val), type(typ) - { - } - - // =========================================== - // setReturnValue - // =========================================== - void Operation::setReturnValue(const void *parm) - { - LOGINFO(4, "Operation::setReturnValue(void*)"); - returnValue = Parameter((void*)parm, VOID_TYPE); - } - - void Operation::setReturnValue(const bool *parm) - { - LOGINFO(4, "Operation::setReturnValue(bool*)"); - returnValue = Parameter((void*)parm, BOOL); - } - - void Operation::setReturnValue(const short *parm) - { - LOGINFO(4, "Operation::setReturnValue(short*)"); - returnValue = Parameter((void*)parm, SHORT); - } - - void Operation::setReturnValue(const int *parm) - { - LOGINFO(4, "Operation::setReturnValue(int)"); - returnValue = Parameter((void*)parm, INT); - } - - void Operation::setReturnValue(const long *parm) - { - LOGINFO(4, "Operation::setReturnValue(long*)"); - returnValue = Parameter((void*)parm, LONG); - } - - void Operation::setReturnValue(const unsigned short *parm) - { - LOGINFO(4, "Operation::setReturnValue(unsigned short*)"); - returnValue = Parameter((void*)parm, USHORT); - } - - void Operation::setReturnValue(const unsigned int *parm) - { - LOGINFO(4, "Operation::setReturnValue(unsigned int)"); - returnValue = Parameter((void*)parm, UINT); - } - - void Operation::setReturnValue(const unsigned long *parm) - { - LOGINFO(4, "Operation::setReturnValue(unsigned long*)"); - returnValue = Parameter((void*)parm, ULONG); - } - - void Operation::setReturnValue(const float *parm) - { - LOGINFO(4, "Operation::setReturnValue(float*)"); - returnValue = Parameter((void*)parm, FLOAT); - } - - void Operation::setReturnValue(const double *parm) - { - LOGINFO(4, "Operation::setReturnValue(double*)"); - returnValue = Parameter((void*)parm, DOUBLE); - } - - void Operation::setReturnValue(const long double *parm) - { - LOGINFO(4, "Operation::setReturnValue(long double*)"); - returnValue = Parameter((void*)parm, LONGDOUBLE); - } - - void Operation::setReturnValue(const char *parm) - { - LOGINFO(4, "Operation::setReturnValue(char)"); - returnValue = Parameter((void*)parm, CHAR); - } - - void Operation::setReturnValue(const char* *parm) - { - LOGINFO(4, "Operation::setReturnValue(char*)"); - returnValue = Parameter((void*)parm, CHARS); - } - - void Operation::setReturnValue(const string *parm) - { - LOGINFO(4, "Operation::setReturnValue(string*)"); - returnValue = Parameter((void*)parm, STRING); - } - - void Operation::setReturnValue(const DataObjectPtr *parm) - { - LOGINFO(4, "Operation::setReturnValue(DataObjectPtr*)"); - returnValue = Parameter((void*)new DataObjectPtr(*parm), DATAOBJECT); - } - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.h deleted file mode 100644 index 84338ae9e8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/Operation.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_core_operation_h -#define tuscany_sca_core_operation_h -#include "tuscany/sca/export.h" -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; -#include -using std::string; -#include -using std::vector; - -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 = 0); - - /** - * Destructor. - */ - SCA_API virtual ~Operation(); - - /** - * Copy constructor. - */ - SCA_API Operation(const Operation& op); - - /** - * Assignment operator. - */ - SCA_API Operation& operator=(const Operation& op); - - /** - * Return the operation name. - * @return The name of the operation. - */ - SCA_API const string& getName() const {return name;} - - - enum ParameterType - { - UNSET = 0, - VOID_TYPE, - BOOL, - SHORT, - INT, - LONG, - USHORT, - UINT, - ULONG, - FLOAT, - DOUBLE, - LONGDOUBLE, - CHARS, - CHAR, - STRING, - DATAOBJECT - }; - - class Parameter - { - public: - SCA_API Parameter(void* value = NULL, ParameterType type = VOID_TYPE); - SCA_API void* getValue() const {return value;} - SCA_API ParameterType getType() const {return type;} - - private: - void* value; - ParameterType type; - }; - - /** - * Set a return value for the operation. - * @param retVal Pointer to the return value. - */ - SCA_API void setReturnValue(const void *retVal); - SCA_API void setReturnValue(const bool *retVal); - SCA_API void setReturnValue(const short *retVal); - SCA_API void setReturnValue(const int *retVal); - SCA_API void setReturnValue(const long *retVal); - SCA_API void setReturnValue(const unsigned short *retVal); - SCA_API void setReturnValue(const unsigned int *retVal); - SCA_API void setReturnValue(const unsigned long *retVal); - SCA_API void setReturnValue(const float *retVal); - SCA_API void setReturnValue(const double *retVal); - SCA_API void setReturnValue(const long double *retVal); - SCA_API void setReturnValue(const char *retVal); - SCA_API void setReturnValue(const char* *retVal); - SCA_API void setReturnValue(const string *retVal); - SCA_API void setReturnValue(const DataObjectPtr *retVal); - - /** - * 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 addParameter(const void *parm); - SCA_API void addParameter(const bool *parm); - SCA_API void addParameter(const short *parm); - SCA_API void addParameter(const int *parm); - SCA_API void addParameter(const long *parm); - SCA_API void addParameter(const unsigned short *parm); - SCA_API void addParameter(const unsigned int *parm); - SCA_API void addParameter(const unsigned long *parm); - SCA_API void addParameter(const float *parm); - SCA_API void addParameter(const double *parm); - SCA_API void addParameter(const long double *parm); - SCA_API void addParameter(const char *parm); - SCA_API void addParameter(const char* *parm); - SCA_API void addParameter(const string *parm); - SCA_API void addParameter(const DataObjectPtr *parm); - - SCA_API unsigned int getNParms() const {return parameters.size();} - - /** - * 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 const Parameter& getParameter(unsigned int pos) const; - - /** - * Get a parameter type 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 ParameterType getParameterType(unsigned int pos) const; - - /** - * 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* getParameterValue(unsigned int pos) const; - - SCA_API ParameterType getReturnType() const {return returnValue.getType();} - SCA_API void* getReturnValue() const {return returnValue.getValue();} - - private: - /** - * Operation name (method name). - */ - string name; - - /** - * Array of parameters. - */ - typedef std::vector PARAMETER_VECTOR; - - PARAMETER_VECTOR parameters; - - Parameter returnValue; - - void clean(); - void copy(const Operation& op); - - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_operation_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp deleted file mode 100644 index 49ec646bb1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/core/SCARuntime.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/ModelLoader.h" -#include "tuscany/sca/util/File.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.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_COMPONENT = "TUSCANY_SCACPP_DEFAULT_COMPONENT"; - - static const char* TUSCANY_SCACPP_ROOT = "TUSCANY_SCACPP_ROOT"; - static const char* TUSCANY_SCACPP_COMPONENT = "TUSCANY_SCACPP_COMPONENT"; - static const char* TUSCANY_SCACPP_PATH = "TUSCANY_SCACPP_PATH"; - - // ========================================================== - // Initialize static class member to not pointing at anything - // ========================================================== - SCARuntime* SCARuntime::instance = 0; - string SCARuntime::systemRoot = ""; - string SCARuntime::systemPath = ""; - string SCARuntime::defaultComponentName = ""; - - - // ========================================================== - // Set the system configuration root - // ========================================================== - void SCARuntime::setSystemRoot(const string& root) - { - LOGENTRY(1, "SCARuntime::setSystemRoot"); - systemRoot = root; - LOGINFO_1(3, "SCARuntime::setSystemRoot - set to %s", root.c_str()); - LOGEXIT(1, "SCARuntime::setSystemRoot"); - } - - // ========================================================== - // Set the system configuration root - // ========================================================== - void SCARuntime::setSystemPath(const string& path) - { - LOGENTRY(1, "SCARuntime::setSystemPath"); - systemPath = path; - LOGINFO_1(3, "SCARuntime::setSystemPath - set to %s", path.c_str()); - LOGEXIT(1, "SCARuntime::setSystemPath"); - } - - // ========================================================== - // Set the default component name - // ========================================================== - void SCARuntime::setDefaultComponentName(const string& componentName) - { - LOGENTRY(1, "SCARuntime::setDefaultComponentName"); - defaultComponentName = componentName; - LOGINFO_1(3, "SCARuntime::setDefaultComponentName - set to %s", componentName.c_str()); - LOGEXIT(1, "SCARuntime::setDefaultComponentName"); - } - - // =================================================================== - // Constructor for the SCARuntime class. This will be a singleton that - // holds all the information about the current runtime. - // =================================================================== - SCARuntime::SCARuntime() : system(0), defaultComponent(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"); - } - - // =================================================================== - // Destructor for the SCARuntime class. - // =================================================================== - SCARuntime::~SCARuntime() - { - LOGENTRY(1, "SCARuntime::destructor"); - - if (system) - { - delete system; - } - - LOGEXIT(1, "SCARuntime::destructor"); - } - - // ============================================================= - // 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 extensions - instance->loadExtensions(); - - if (systemRoot == "") - { - // Get root from environment variable TUSCANY_SCACPP_ROOT - char* systemRootEnv = getenv(TUSCANY_SCACPP_ROOT); - if (systemRootEnv == 0) - { - // Get root from environment variable TUSCANY_SCACPP_SYSTEM_ROOT - systemRootEnv = getenv(TUSCANY_SCACPP_SYSTEM_ROOT); - } - if (systemRootEnv == 0) - { - string msg = TUSCANY_SCACPP_ROOT; - msg += " environment variable not set"; - throw SystemConfigurationException(msg.c_str()); - } - - systemRoot = systemRootEnv; - } - if (systemPath == "") - { - - // Get system path from environment variable TUSCANY_SCACPP_PATH - char* systemPathEnv = getenv(TUSCANY_SCACPP_PATH); - if (systemPathEnv == 0) - { - // Make the path optional for now -// string msg = TUSCANY_SCACPP_PATH; -// msg += " environment variable not set"; -// throw SystemConfigurationException(msg.c_str()); - } - else - { - systemPath = systemPathEnv; - } - } - } - - LOGEXIT(1, "SCARuntime::getInstance"); - - return instance; - - } - - - // ============================================================= - // Release the instance of the runtime. - // ============================================================= - void SCARuntime::releaseInstance() - { - LOGENTRY(1, "SCARuntime::releaseInstance"); - - if (instance) - { - delete instance; - instance = 0; - systemRoot = ""; - systemPath = ""; - defaultComponentName = ""; - } - - LOGEXIT(1, "SCARuntime::releaseInstance"); - } - - // ====================================== - // Load up all the details of the runtime - // ====================================== - void SCARuntime::load() - { - LOGENTRY(1, "SCARuntime::load"); - - LOGINFO_1(2,"configuration root: %s", systemRoot.c_str()); - LOGINFO_1(2,"configuration path: %s", systemPath.c_str()); - - // Load the system composite - ModelLoader loader(system); - loader.load(systemRoot, systemPath); - - LOGEXIT(1, "SCARuntime::load"); - } - - - // ====================================== - // Load up extensions to the runtime - // ====================================== - void SCARuntime::loadExtensions() - { - LOGENTRY(1, "SCARuntime::loadExtensions"); - - string extensionsRoot = SCARoot + "/extensions"; - -#if defined(WIN32) || defined (_WINDOWS) - string pattern = "*.dll"; -#else - string pattern = "*.so"; -#endif - - Files files(extensionsRoot, pattern, true); - for (unsigned int i=0; i < files.size(); i++) - { - try - { - Library lib = Library( files[i].getDirectory() + "/" + files[i].getFileName()); - extensionsList.push_back(lib); - TUSCANY_IMPLEMENTATION_EXTENSION_INITIALIZE extension = - (TUSCANY_IMPLEMENTATION_EXTENSION_INITIALIZE)lib.getSymbol("tuscany_sca_extension_initialize"); - if (extension) - { - extension(); - } - } - catch (TuscanyRuntimeException& ex) - { - LOGERROR_3(0, "SCARuntime::loadExtensions failed to load extension library: %s: %s: %s", - files[i].getFileName().c_str(), ex.getEClassName(), ex.getMessageText()); - } - } - - LOGEXIT(1, "SCARuntime::loadExtensions"); - } - - - // ====================================== - // register an interfaceExtension - // ====================================== - void SCARuntime::registerInterfaceExtension(InterfaceExtension* extension) - { - LOGENTRY(1, "SCARuntime::registerInterfaceExtension"); - if (extension) - { - interfaceExtensions[extension->getExtensionTypeQName()] = extension; - } - LOGEXIT(1, "SCARuntime::registerInterfaceExtension"); - } - - // ====================================== - // find an InterfaceExtension - // ====================================== - InterfaceExtension* SCARuntime::getInterfaceExtension(const string& extensionTypeQName) - { - return interfaceExtensions[extensionTypeQName]; - } - - // ====================================== - // register an implementationExtension - // ====================================== - void SCARuntime::registerImplementationExtension(ImplementationExtension* extension) - { - LOGENTRY(1, "SCARuntime::registerImplementationExtension"); - if (extension) - { - implementationExtensions[extension->getExtensionTypeQName()] = extension; - } - LOGEXIT(1, "SCARuntime::registerImplementationExtension"); - } - - // ====================================== - // find an implementationExtension - // ====================================== - ImplementationExtension* SCARuntime::getImplementationExtension(const string& extensionTypeQName) - { - return implementationExtensions[extensionTypeQName]; - } - - // ====================================== - // register a referenceBindingExtension - // ====================================== - void SCARuntime::registerReferenceBindingExtension(ReferenceBindingExtension* extension) - { - LOGENTRY(1, "SCARuntime::registerReferenceBindingExtension"); - if (extension) - { - referenceBindingExtensions[extension->getExtensionTypeQName()] = extension; - } - LOGEXIT(1, "SCARuntime::registerReferenceBindingExtension"); - } - - // ====================================== - // find a referenceBindingExtension - // ====================================== - ReferenceBindingExtension* SCARuntime::getReferenceBindingExtension(const string& extensionTypeQName) - { - return referenceBindingExtensions[extensionTypeQName]; - } - - // ====================================== - // register a serviceBindingExtension - // ====================================== - void SCARuntime::registerServiceBindingExtension(ServiceBindingExtension* extension) - { - LOGENTRY(1, "SCARuntime::registerServiceBindingExtension"); - if (extension) - { - serviceBindingExtensions[extension->getExtensionTypeQName()] = extension; - } - LOGEXIT(1, "SCARuntime::registerServiceBindingExtension"); - } - - // ====================================== - // find a serviceBindingExtension - // ====================================== - ServiceBindingExtension* SCARuntime::getServiceBindingExtension(const string& extensionTypeQName) - { - return serviceBindingExtensions[extensionTypeQName]; - } - - - // =================================== - // Return the top of the runtime model - // =================================== - Composite* SCARuntime::getSystem() - { - if (!system) - { - system = new Composite("tuscany/sca/system", ""); - load(); - } - 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; - } - - } - - // =========================================== - // getCurrentCompositeComponent: return the current composite component - // =========================================== - Component* SCARuntime::getDefaultComponent() - { - - // ---------------------- - // Get the default Component - // ---------------------- - if (!defaultComponent) - { - // ------------------------------------------- - // Get the default component name from the environment - // ------------------------------------------- - if (defaultComponentName == "") - { - const char* defComp = getenv(TUSCANY_SCACPP_COMPONENT); - if (!defComp) - { - defComp = getenv(TUSCANY_SCACPP_DEFAULT_COMPONENT); - } - if (!defComp) - { - string message = TUSCANY_SCACPP_COMPONENT; - message += " environment variable not set"; - throw SystemConfigurationException(message.c_str()); - } - defaultComponentName = defComp; - } - - defaultComponent = getSystem()->findComponent(defaultComponentName); - if (!defaultComponent) - { - string message = "Component \'" + defaultComponentName + "\' not found"; - throw SystemConfigurationException(message.c_str()); - } - } - return defaultComponent; - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h deleted file mode 100644 index ef78296480..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_core_scaruntime_h -#define tuscany_sca_core_scaruntime_h - -#include "tuscany/sca/export.h" - -#include "tuscany/sca/extension/InterfaceExtension.h" -#include "tuscany/sca/extension/ImplementationExtension.h" -#include "tuscany/sca/extension/ReferenceBindingExtension.h" -#include "tuscany/sca/extension/ServiceBindingExtension.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/util/Library.h" - -#if defined(WIN32) || defined (_WINDOWS) -#include -#else -#include -#endif - -#include -#include -#include -#include -using namespace std; - -using namespace tuscany::sca::model; - - -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(); - - /** - * Release the single instance. - */ - SCA_API static void releaseInstance(); - - /** - * Load the SCA configuration from the scdl files (sca.composite, - * *.fragment, etc). - * This will create the runtime model from which the SCA runtime - * will operate. - */ - SCA_API void load(); - - /** - * Set the system root - * @param root The path to the system configuration. - */ - static void setSystemRoot(const string& root); - - /** - * Set the search path for composites. - * @param path The search path for composites. - */ - static void setSystemPath(const string& path); - - /** - * Set the default Component for the system - * @param componentName The name of the default component. - */ - static void setDefaultComponentName(const string& componentName); - - /** - * 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. - */ - SCA_API Composite* getSystem(); - - /** - * The directory in which the Tuscany runtime has been installed. - */ - SCA_API const string& getInstallRoot() {return SCARoot;} - - /** - * Return the current component for this thread. - * @return The current component for this thread. - */ - SCA_API Component* getCurrentComponent(); - - /** - * Get the default component set for this runtime. - * @return The default composite. - */ - SCA_API Component* getDefaultComponent(); - - /** - * Register an implementation extension - */ - SCA_API void registerImplementationExtension(ImplementationExtension* extension); - - /** - * Returns the implementation extension associated with - * the specified qname - */ - SCA_API ImplementationExtension* getImplementationExtension(const string& typeQname); - - /** - * Register a reference binding extension - */ - SCA_API void registerReferenceBindingExtension(ReferenceBindingExtension* extension); - - /** - * Returns the reference binding extension associated with - * the specified qname - */ - SCA_API ReferenceBindingExtension* getReferenceBindingExtension(const string& typeQname); - - /** - * Register a service binding extension - */ - SCA_API void registerServiceBindingExtension(ServiceBindingExtension* extension); - - /** - * Returns the service binding extension associated with - * the specified qname - */ - SCA_API ServiceBindingExtension* getServiceBindingExtension(const string& typeQname); - - /** - * Register an interface extension - */ - SCA_API void registerInterfaceExtension(InterfaceExtension* extension); - - /** - * Returns the interface extension associated with - * the specified qname - */ - SCA_API InterfaceExtension* getInterfaceExtension(const string& typeQname); - - private: - /** - * Default constructor is private to prevent more than one instance. - */ - SCARuntime(); - - virtual ~SCARuntime(); - - /** - * The single instance of this class. - */ - static SCARuntime* instance; - - /** - * Pointer to the top of the runtime model. - */ - Composite* system; - - /** - * The installed path of the Tuscany runtime. - */ - string SCARoot; - - /** - * The path to the system configuration - */ - static string systemRoot; - - /** - * The search path for composites. - */ - static string systemPath; - - /** - * The default CompositeComponent. - */ - static string defaultComponentName; - - /** - * The default component set for this runtime. - */ - Component* defaultComponent; - - - 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; - - typedef map IMPLEMENTATION_EXTENSIONS_MAP; - IMPLEMENTATION_EXTENSIONS_MAP implementationExtensions; - - typedef map REFERENCE_BINDING_EXTENSIONS_MAP; - REFERENCE_BINDING_EXTENSIONS_MAP referenceBindingExtensions; - - typedef map SERVICE_BINDING_EXTENSIONS_MAP; - SERVICE_BINDING_EXTENSIONS_MAP serviceBindingExtensions; - - typedef map INTERFACE_EXTENSIONS_MAP; - INTERFACE_EXTENSIONS_MAP interfaceExtensions; - - // Runtime Extensions - void loadExtensions(); - - typedef list EXTENSIONS_LIST; - EXTENSIONS_LIST extensionsList; - - }; - - } // End namespace sca -} // End namespace tuscany - -typedef void (* TUSCANY_IMPLEMENTATION_EXTENSION_INITIALIZE) (); - -#endif // tuscany_sca_core_scaruntime_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp deleted file mode 100644 index f835b53267..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/core/ServiceProxy.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" - -namespace tuscany -{ - namespace sca - { - // ============================ - // Constructor: Create a proxy - // ============================ - ServiceProxy::ServiceProxy(Reference* reference) - : reference(reference) - { - LOGENTRY(1,"ServiceProxy::constructor"); - LOGEXIT(1,"ServiceProxy::constructor"); - - } - - // ========== - // Destructor - // ========== - ServiceProxy::~ServiceProxy() - { - LOGENTRY(1,"ServiceProxy::destructor"); - LOGEXIT(1,"ServiceProxy::destructor"); - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h deleted file mode 100644 index 69af373062..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_core_serviceproxy_h -#define tuscany_sca_core_serviceproxy_h - -#include "tuscany/sca/export.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -#include -using std::vector; - -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 SCA_API ServiceProxy - { - public: - /** - * Create a new service proxy for a reference. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The reference on the source component. - * @param target The wrapper of the service which is wired to this reference. - */ - ServiceProxy(Reference* reference); - - /** - * Destructor. - */ - virtual ~ServiceProxy(); - - /** - * Returns the reference represented by this proxy. - * @return The Reference represented by this proxy. - */ - Reference* getReference() const { return reference; }; - - private: - - /** - * The reference represented by this proxy. - */ - Reference* reference; - - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_serviceproxy_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp deleted file mode 100644 index 51ee4f02b7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/core/ServiceWrapper.h" -#include "tuscany/sca/util/Logging.h" - -namespace tuscany -{ - namespace sca - { - - // =========== - // Constructor - // =========== - ServiceWrapper::ServiceWrapper(Service* service) - : service(service) - { - 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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h deleted file mode 100644 index 816e1d06f4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_core_servicewrapper_h -#define tuscany_sca_core_servicewrapper_h - -#include "tuscany/sca/export.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Service.h" - -using namespace tuscany::sca::model; - - -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(Service* service); - - /** - * Destructor. - */ - virtual ~ServiceWrapper(); - - /** - * Get the service represented by this wrapper. - * @return The service represented by this wrapper. - */ - Service* getService() const { return service; } - - /** - * 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. - */ - Service* service; - - }; - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_core_servicewrapper_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp deleted file mode 100644 index 5e6cd4a197..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/core/TuscanyRuntime.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/core/SCARuntime.h" - -namespace tuscany -{ - namespace sca - { - - // ========================================================== - // Set the system configuration root path - // ========================================================== - void TuscanyRuntime::setSystemRoot(const string& root) - { - LOGENTRY(1, "TuscanyRuntime::setSystemRoot"); - systemRoot = root; - LOGINFO_1(3, "TuscanyRuntime::setSystemRoot - set to %s", root.c_str()); - LOGEXIT(1, "TuscanyRuntime::setSystemRoot"); - } - - // ========================================================== - // Set the search path for composites - // ========================================================== - void TuscanyRuntime::setSystemPath(const string& path) - { - LOGENTRY(1, "TuscanyRuntime::setSystemPath"); - systemPath = path; - LOGINFO_1(3, "TuscanyRuntime::setSystemPath - set to %s", path.c_str()); - LOGEXIT(1, "TuscanyRuntime::setSystemPath"); - } - - // ========================================================== - // Set the default component name - // ========================================================== - void TuscanyRuntime::setDefaultComponentName(const string& componentName) - { - LOGENTRY(1, "TuscanyRuntime::setDefaultComponentName"); - defaultComponentName = componentName; - LOGINFO_1(3, "TuscanyRuntime::setDefaultComponentName - set to %s", componentName.c_str()); - LOGEXIT(1, "TuscanyRuntime::setDefaultComponentName"); - } - - // =================================================================== - // Constructor for the TuscanyRuntime class. - // =================================================================== - TuscanyRuntime::TuscanyRuntime(const string& componentName, const string& root, const string& path) - { - LOGENTRY(1, "TuscanyRuntime::constructor"); - setSystemRoot(root); - setSystemPath(path); - setDefaultComponentName(componentName); - LOGEXIT(1, "TuscanyRuntime::constructor"); - } - - // =================================================================== - // Destructor for the TuscanyRuntime class. - // =================================================================== - TuscanyRuntime::~TuscanyRuntime() - { - LOGENTRY(1, "TuscanyRuntime::destructor");; - LOGEXIT(1, "TuscanyRuntime::destructor"); - } - - // =================================================================== - // Start the runtime. - // =================================================================== - void TuscanyRuntime::start() - { - LOGENTRY(1, "TuscanyRuntime::start"); - SCARuntime::setSystemRoot(systemRoot); - SCARuntime::setSystemPath(systemPath); - SCARuntime::setDefaultComponentName(defaultComponentName); - SCARuntime::getInstance(); - LOGEXIT(1, "TuscanyRuntime::start"); - } - - // =================================================================== - // Stop the runtime. - // =================================================================== - void TuscanyRuntime::stop() - { - LOGENTRY(1, "TuscanyRuntime::stop"); - SCARuntime::releaseInstance(); - LOGEXIT(1, "TuscanyRuntime::stop"); - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h deleted file mode 100644 index f1ac59f357..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_core_tuscanyruntime_h -#define tuscany_sca_core_tuscanyruntime_h - -#include "tuscany/sca/export.h" -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - - /** - * A singleton which represents the executing SCA runtime. - */ - class SCA_API TuscanyRuntime - { - public: - /** - * Default constructor - */ - TuscanyRuntime(const string& defaultComponentName = "", - const string& root = "", const string& path = ""); - - /** - * Destructor - */ - virtual ~TuscanyRuntime(); - - - /** - * Set the system root configuration path - * @param root The path to the system configuration. - */ - void setSystemRoot(const string& root); - - /** - * Set the system composite search path - * @param root The search path for composites. - */ - void setSystemPath(const string& path); - - /** - * Set the default component for the system - * @param componentName The name of the default component. - */ - void setDefaultComponentName(const string& componentName); - - /** - * start the runtime - */ - void start(); - - /** - * stop the runtime - */ - void stop(); - - - private: - string systemRoot; - string systemPath; - string defaultComponentName; - }; - - - } // End namespace sca -} // End namespace tuscany - - - - -#endif // tuscany_sca_core_tuscanyruntime_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/export.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/export.h deleted file mode 100644 index 79b02fe4cf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/export.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_export_h -#define tuscany_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 // tuscany_sca_export_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.cpp deleted file mode 100644 index 21eab40c72..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/extension/ImplementationExtension.h" -#include "tuscany/sca/util/Logging.h" -namespace tuscany -{ - namespace sca - { - // =================================================================== - // Constructor for the ImplementationExtension class. - // =================================================================== - ImplementationExtension::ImplementationExtension() - { - LOGENTRY(1, "ImplementationExtension::constructor"); - LOGEXIT(1, "ImplementationExtension::constructor"); - } - - // =================================================================== - // Destructor for the ImplementationExtension class. - // =================================================================== - ImplementationExtension::~ImplementationExtension() - { - LOGENTRY(1, "ImplementationExtension::destructor");; - LOGEXIT(1, "ImplementationExtension::destructor"); - } - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h deleted file mode 100644 index 4744a5b14c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_implementationextension_h -#define tuscany_sca_extension_implementationextension_h - -#include "tuscany/sca/export.h" -#include -using std::string; - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" - -#include "commonj/sdo/SDO.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - class SCA_API ImplementationExtension - { - public: - /** - * Default constructor - */ - ImplementationExtension(); - - /** - * Destructor - */ - virtual ~ImplementationExtension(); - - /** - * return the name of the extension (e.g. "cpp" "php") - */ - virtual const string& getExtensionName() = 0; - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#implementation.cpp") - */ - virtual const string& getExtensionTypeQName() = 0; - - /** - * Get an implementation from a DataObject representing - * an SCDL implementation element - */ - virtual ComponentType* getImplementation(Composite* composite, commonj::sdo::DataObjectPtr scdlImplementation) = 0; - - }; - - - } // End namespace sca -} // End namespace tuscany - - -#endif // tuscany_sca_extension_implementationextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.cpp deleted file mode 100644 index f0cb0b1b2d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/extension/InterfaceExtension.h" -#include "tuscany/sca/util/Logging.h" -namespace tuscany -{ - namespace sca - { - // =================================================================== - // Constructor for the InterfaceExtension class. - // =================================================================== - InterfaceExtension::InterfaceExtension() - { - LOGENTRY(1, "InterfaceExtension::constructor"); - LOGEXIT(1, "InterfaceExtension::constructor"); - } - - // =================================================================== - // Destructor for the InterfaceExtension class. - // =================================================================== - InterfaceExtension::~InterfaceExtension() - { - LOGENTRY(1, "InterfaceExtension::destructor");; - LOGEXIT(1, "InterfaceExtension::destructor"); - } - - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h deleted file mode 100644 index 545eb92caa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_interfaceextension_h -#define tuscany_sca_extension_interfaceextension_h - -#include "tuscany/sca/export.h" -#include -using std::string; - -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/model/Composite.h" -#include "commonj/sdo/SDO.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - class SCA_API InterfaceExtension - { - public: - /** - * Default constructor - */ - InterfaceExtension(); - - /** - * Destructor - */ - virtual ~InterfaceExtension(); - - /** - * return the name of the extension (e.g. "cpp" "php") - */ - virtual const string& getExtensionName() = 0; - - /** - * return the QName of schema elemant for this interface extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#interface.cpp") - */ - virtual const string& getExtensionTypeQName() = 0; - - /** - * Get an interface from a DataObject representing an - * SCDL interface - */ - virtual Interface* getInterface(Composite *composite, commonj::sdo::DataObjectPtr scdlInterface) = 0; - - }; - - - } // End namespace sca -} // End namespace tuscany - - -#endif // tuscany_sca_extension_interfaceextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.cpp deleted file mode 100644 index 9797cb33a9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/extension/ReferenceBindingExtension.h" -#include "tuscany/sca/util/Logging.h" -namespace tuscany -{ - namespace sca - { - // =================================================================== - // Constructor for the ReferenceBindingExtension class. - // =================================================================== - ReferenceBindingExtension::ReferenceBindingExtension() - { - LOGENTRY(1, "ReferenceBindingExtension::constructor"); - LOGEXIT(1, "ReferenceBindingExtension::constructor"); - } - - // =================================================================== - // Destructor for the ReferenceBindingExtension class. - // =================================================================== - ReferenceBindingExtension::~ReferenceBindingExtension() - { - LOGENTRY(1, "ReferenceBindingExtension::destructor");; - LOGEXIT(1, "ReferenceBindingExtension::destructor"); - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h deleted file mode 100644 index 1af89e6c5a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_referencebindingextension_h -#define tuscany_sca_extension_referencebindingextension_h - -#include "tuscany/sca/export.h" - -#include -using std::string; - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ReferenceBinding.h" - -#include "commonj/sdo/SDO.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - class SCA_API ReferenceBindingExtension - { - public: - /** - * Default constructor - */ - ReferenceBindingExtension(); - - /** - * Destructor - */ - virtual ~ReferenceBindingExtension(); - - /** - * return the name of the extension (e.g. "cpp" "php") - */ - virtual const string& getExtensionName() = 0; - - /** - * return the QName of schema elemant for this binding extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws") - */ - virtual const string& getExtensionTypeQName() = 0; - - /** - * Get a reference binding from a DataObject representing - * an SCDL binding element - */ - virtual ReferenceBinding* getReferenceBinding(Composite* composite, Reference* reference, commonj::sdo::DataObjectPtr scdlBinding) = 0; - - }; - - - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_referencebindingextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.cpp deleted file mode 100644 index 9ffb4d10d1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/extension/ServiceBindingExtension.h" -#include "tuscany/sca/util/Logging.h" -namespace tuscany -{ - namespace sca - { - // =================================================================== - // Constructor for the ServiceBindingExtension class. - // =================================================================== - ServiceBindingExtension::ServiceBindingExtension() - { - LOGENTRY(1, "ServiceBindingExtension::constructor"); - LOGEXIT(1, "ServiceBindingExtension::constructor"); - } - - // =================================================================== - // Destructor for the ServiceBindingExtension class. - // =================================================================== - ServiceBindingExtension::~ServiceBindingExtension() - { - LOGENTRY(1, "ServiceBindingExtension::destructor");; - LOGEXIT(1, "ServiceBindingExtension::destructor"); - } - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h deleted file mode 100644 index 9d65a7441a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_servicebindingextension_h -#define tuscany_sca_extension_servicebindingextension_h - -#include "tuscany/sca/export.h" -#include -using std::string; - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceBinding.h" - -#include "commonj/sdo/SDO.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - class SCA_API ServiceBindingExtension - { - public: - /** - * Default constructor - */ - ServiceBindingExtension(); - - /** - * Destructor - */ - virtual ~ServiceBindingExtension(); - - /** - * return the name of the extension (e.g. "cpp" "php") - */ - virtual const string& getExtensionName() = 0; - - /** - * return the QName of schema elemant for this binding extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws") - */ - virtual const string& getExtensionTypeQName() = 0; - - /** - * Get a reference binding from a DataObject representing - * an SCDL binding element - */ - virtual ServiceBinding* getServiceBinding(Composite* composite, Service* service, commonj::sdo::DataObjectPtr scdlBinding) = 0; - - }; - - - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_servicebindingextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.cpp deleted file mode 100644 index af7aa2ff6f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/Binding.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Binding::Binding(const string& uri) : uri(uri) - { - } - - // Destructor - Binding::~Binding() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.h deleted file mode 100644 index b68529020d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Binding.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_binding_h -#define tuscany_sca_model_binding_h -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Represents a binding. - * Bindings are used by services and references. References use bindings - * to describe the access mechanism used to call an external service (which can - * be a service provided by another SCA composite). Services use bindings to describe - * the access mechanism that clients (which can be a client from another SCA composite) - * have to use to call the service. - * This interface will typically be extended by binding implementations to allow - * specification of binding/transport specific information. - */ - class Binding - { - - public: - - /** - * Constructor to create a new binding. - * @param uri The binding URI. - */ - SCA_API Binding(const string& uri); - - /** - * Destructor. - */ - SCA_API virtual ~Binding(); - - /** - * Returns the binding type - * @return The binding type. - */ - SCA_API virtual string getType() = 0; - - /** - * Returns the binding URI. - * @return The binding URI. - */ - SCA_API const string& getURI() const { return uri; }; - - private: - - /** - * The binding URI. - */ - string uri; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_binding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.cpp deleted file mode 100644 index 905d8c3555..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/ComponentType.h" - -using namespace commonj::sdo; -#include -using namespace std; -namespace tuscany -{ - namespace sca - { - namespace model - { - // Constructor - Component::Component(Composite* composite, const std::string& componentName, ComponentType *componentType) - : name(componentName), composite(composite), type(componentType) - { - LOGENTRY(1, "Component::constructor"); - LOGINFO_1(3, "Component::constructor: Component name: %s", name.c_str()); - - // Initialize the component from its component type - componentType->initializeComponent(this); - - LOGEXIT(1, "Component::constructor"); - } - - Component::~Component() - { - } - - void Component::addService(Service* service) - { - services[service->getType()->getName()] = service; - } - - Service* Component::findService(const string& serviceName) - { - // If serviceName is empty then return the ONLY service - if (serviceName == "" - && services.size() == 1) - { - return services.begin()->second; - } - else - { - Service* service = services[serviceName]; - if (service == NULL) - { - // A service with an empty name will match any service name - service = services[""]; - } - return service; - } - } - - void Component::addReference(Reference* reference) - { - references[reference->getType()->getName()] = reference; - } - - Reference* Component::findReference(const std::string& referenceName) - { - return references[referenceName]; - } - - DataObjectPtr Component::getProperties() - { - if (!properties) - { - properties = type->getPropertyDataFactory()->create("org/osoa/sca", "Properties"); - } - return properties; - } - - void Component::setProperty(const string& name, DataObjectPtr value) - { - //cout << "setting property: " << name.c_str() << " to: " << value <getProperty(name); - const Type& propType = propProperty.getType(); - if (propType.isDataType()) - { - if (propProperty.isMany()) - { - DataObjectList& dol = props->getList(propProperty); - dol.append(value->getCString("")); - } - else - { - props->setCString(propProperty, value->getCString("")); - } - } - else - { - // Create a new instance of the DO - // iterate over properties setting each one - - // for now: - props->setDataObject(propProperty, value); - } - } - catch (SDOPropertyNotFoundException&) - { - // Configuration error: property is not defined - string message = "Undefined property: " + name; - throw SystemConfigurationException(message.c_str()); - } - - //cout << "properties set: " << props << endl; - - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.h deleted file mode 100644 index dc34b03a57..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Component.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_component_h -#define tuscany_sca_model_component_h - -#include "tuscany/sca/export.h" -#include -using std::string; - -#include - -#include "commonj/sdo/SDO.h" - - -namespace tuscany -{ - namespace sca - { - namespace model - { - - class Composite; - class ComponentType; - class Reference; - class ReferenceType; - class Service; - class ServiceType; - - /** - * A component is a configured instance of an implementation. Components provide - * and consume services. More than one component can use and configure the same - * implementation, where each component configures the implementation differently. - * For example each component may configure a reference of the same implementation - * to consume a different service. - */ - class Component - { - public: - - /** - * Constructor - * @param composite The composite containing the component. - * @param name The name of the component. - */ - SCA_API Component(Composite *composite, const std::string& name, ComponentType *type); - - /** - * Destructor. - */ - SCA_API virtual ~Component(); - - /** - * Returns the name of this component. - * @return the name of this component - */ - SCA_API const string& getName() const { return name; } - - /** - * Returns the composite containing this component. - * @return The composite containing this component. - */ - SCA_API Composite* getComposite() const { return composite; } - - /** - * Returns the type of this component. - * @return The type of this component. - */ - SCA_API ComponentType* getType() const { return type; } - - /** - * Add a new service to this component. - * @param service The service to add. - */ - SCA_API void addService(Service* service); - - /** - * 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. - */ - SCA_API Service* findService(const string& serviceName); - - /** - * Add a new reference to this component. - * @param reference The reference to add. - */ - SCA_API void addReference(Reference* reference); - - /** - * 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. - */ - SCA_API Reference* findReference(const string& referenceName); - - /** - * Returns all the services defined on this component. - * @return All the services defined on this component. - */ - typedef std::map SERVICE_MAP; - SCA_API const SERVICE_MAP& getServices() const { return services; }; - - /** - * Returns all the references defined on this component. - * @return All the references defined on this component. - */ - typedef std::map REFERENCE_MAP; - SCA_API const REFERENCE_MAP& getReferences() const { return references; }; - - /** - * Set the value of a property defined on this component. The values - * will usually come from a component declaration in a composite file. - * @param name The name of the property. - * @param value The value of the property. - */ - SCA_API void setProperty(const string& name, commonj::sdo::DataObjectPtr value); - - /** - * Returns a data object from which all the properties of the component - * and their values can be accessed. - * @return A data object holding the property values. - */ - SCA_API DataObjectPtr getProperties(); - - private: - - /** - * Name of the component. - */ - string name; - - /** - * Composite containing the component. - */ - Composite* composite; - - /** - * Type of the component. - */ - ComponentType* type; - - /** - * Map of all the services defined on this component. - */ - SERVICE_MAP services; - - /** - * Map of all the references defined on this component. - */ - REFERENCE_MAP references; - - /** - * The properties and their values for this component. - */ - commonj::sdo::DataObjectPtr properties; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_component_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.cpp deleted file mode 100644 index a69364d7c4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" - -#include - -using namespace commonj::sdo; -using namespace std; - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // Constructor - ComponentType::ComponentType(Composite* composite, const string& name) - : composite(composite), name(name) - { - LOGENTRY(1, "ComponentType::constructor"); - LOGEXIT(1, "ComponentType::constructor"); - } - - // Destructor - ComponentType::~ComponentType() - { - } - - void ComponentType::addServiceType(ServiceType* serviceType) - { - serviceTypes[serviceType->getName()] = serviceType; - } - - ServiceType* ComponentType::findServiceType(const string& serviceName) - { - // If serviceName is empty then return the ONLY service - if (serviceName == "" - && serviceTypes.size() == 1) - { - return serviceTypes.begin()->second; - } - else - { - return serviceTypes[serviceName]; - } - } - - void ComponentType::addReferenceType(ReferenceType* referenceType) - { - referenceTypes[referenceType->getName()] = referenceType; - } - - ReferenceType* ComponentType::findReferenceType(const string& referenceName) - { - return referenceTypes[referenceName]; - } - - void ComponentType::addPropertyType(const string& name, - const string& type, - bool many, - DataObjectPtr* 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 for a dataType - if (defaultValue!=NULL) - { - try - { - const Type& propType = factory->getType(typeUri.c_str(), typeName.c_str()); - if (propType.isDataType()) - { - factory->setDefault("org/osoa/sca", "Properties", - name.c_str(), - (char*)(*defaultValue)->getCString("")); - } - } - catch (SDOTypeNotFoundException&) - { - // cout << "setting default failed" <addType("org/osoa/sca", "Properties", false, false, false, false); - } - return propertyFactory; - } - - void ComponentType::initializeComponent(Component* component) - { - for (SERVICETYPE_MAP::iterator iter = serviceTypes.begin(); - iter != serviceTypes.end(); - iter++) - { - Service* service = new Service(component, iter->second); - component->addService(service); - } - for (REFERENCETYPE_MAP::iterator refiter = referenceTypes.begin(); - refiter != referenceTypes.end(); - refiter++) - { - Reference* reference = new Reference(component, refiter->second); - component->addReference(reference); - } - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.h deleted file mode 100644 index 18e78ffedf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ComponentType.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_componenttype_h -#define tuscany_sca_model_componenttype_h - -#include -using std::string; - -#include - -#include "commonj/sdo/SDO.h" - -#include "tuscany/sca/model/ReferenceType.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - class ServiceType; - class ReferenceType; - class Interface; - class Component; - class Composite; - - /** - * Component type represents the configurable aspects of an implementation. - * A component type consists of services that are offered, references to other services - * that can be wired and properties that can be set. The settable properties and the settable - * references to services are configured by a component which uses the implementation. - * The component type can be thought of as the contract which is honoured by an implementation. - */ - class ComponentType - { - public: - - /** - * Constructor - */ - SCA_API ComponentType(Composite* composite, const string& name); - - /** - * Destructor. - */ - SCA_API virtual ~ComponentType(); - - /** - * Returns the name of the component type - */ - SCA_API const string& getName() const { return name; }; - - /** - * Returns the composite containing this component type - */ - SCA_API Composite* getComposite() const { return composite; }; - - /** - * Add a new service type to this component type. - * @param serviceType The service type to add. - */ - SCA_API virtual void addServiceType(ServiceType* serviceType); - - /** - * Find an existing service type on this component type. - * @param serviceName The name of the service type to find. - * If the serviceName is the zero length string then if there is - * only one service type it will be returned. - * @return The found service, or 0 if not found. - */ - SCA_API virtual ServiceType* findServiceType(const string& serviceName); - - /** - * Add a new reference type to this component type. - * @param referenceType The reference type to add. - */ - SCA_API virtual void addReferenceType(ReferenceType* referenceType); - - /** - * Find an existing reference type on this component type. - * @param referenceName The name of the reference type to find. - * @return The found reference type, or 0 if not found. - */ - SCA_API virtual ReferenceType* findReferenceType(const string& referenceName); - - /** - * Returns the service types defined on this component. - * @return The service types defined on this component. - */ - typedef std::map SERVICETYPE_MAP; - SERVICETYPE_MAP getServiceTypes() const { return serviceTypes; }; - - /** - * Returns the reference types defined on this component. - * @return The reference types defined on this component. - */ - typedef std::map REFERENCETYPE_MAP; - REFERENCETYPE_MAP getReferenceTypes() const { return referenceTypes; }; - - /** - * Add a new property type to this component type. Property types are added - * one at a time. The property definitions usually come from a component type file. - * @param name The name of the property type. - * @param type The full name of the property data type (including uri and local name). - * @param many True if this is a many valued property. - * @param defaultValue The default value if the property does not have a - * value set. - */ - SCA_API virtual void addPropertyType(const string& name, - const string& type, - bool many, - commonj::sdo::DataObjectPtr* defaultValue); - - /** - * Return the SDO data factory which has the types of the properties defined - * in this component type. - * @return The data factory. - */ - SCA_API virtual commonj::sdo::DataFactoryPtr getPropertyDataFactory(); - - /** - * Initialize a component of this type. - * @param component The component to initialize. - */ - SCA_API virtual void initializeComponent(Component* component); - - private: - - /** - * The name of the component type - */ - string name; - - /** - * The composite containing this component type - */ - Composite* composite; - - /** - * Map of all the service types defined on this component. - */ - SERVICETYPE_MAP serviceTypes; - - /** - * Map of all the reference types defined on this component. - */ - REFERENCETYPE_MAP referenceTypes; - - /** - * SDO data factory which has all the types of the properties defined in - * this component type - */ - commonj::sdo::DataFactoryPtr propertyFactory; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_componenttype_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.cpp deleted file mode 100644 index 7b7fbcbdda..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Wire.h" -#include "tuscany/sca/model/WSDLDefinition.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/model/ReferenceBinding.h" - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Composite::Composite(const string& name, const string& root) - : ComponentType(0, name), root(root) - { - LOGENTRY(1, "Composite::constructor"); - LOGEXIT(1, "Composite::constructor"); - } - - // Destructor - Composite::~Composite() - { - } - - void Composite::addComponent(Component* component) - { - LOGENTRY(1, "Composite::addComponent"); - components[component->getName()] = component; - LOGEXIT(1, "Composite::addComponent"); - } - - Component* Composite::findComponent(const std::string& name) - { - LOGENTRY(1, "Composite::findComponent"); - Component* component = components[name]; - LOGEXIT(1, "Composite::findComponent"); - return component; - } - - Service* Composite::findComponentService(const std::string& name) - { - LOGENTRY(1, "Composite::findComponentService"); - - Service* service = 0; - - string componentName; - string serviceName; - Utils::tokeniseUri(name, componentName, serviceName); - - // Locate the component - Component* component = findComponent(componentName); - if (component) - { - // Locate the service - service = component->findService(serviceName); - } - LOGEXIT(1, "Composite::findComponentService"); - return service; - } - - void Composite::addWire(const std::string& source, const std::string& target) - { - LOGENTRY(1, "Composite::addWire"); - Wire* wire=new Wire(source, target); - wires.push_back(wire); - LOGEXIT(1, "Composite::addWire"); - } - - void Composite::addInclude(Composite* composite) - { - LOGENTRY(1, "Composite::addInclude"); - includes.push_back(composite); - - for (COMPONENT_MAP::iterator iter = composite->components.begin(); - iter != composite->components.end(); - iter++) - { - components[iter->first] = iter->second; - } - LOGEXIT(1, "Composite::addInclude"); - } - - void Composite::resolveWires() - { - LOGENTRY(1, "Composite::resolveWires"); - - for (WIRES::iterator iter = wires.begin(); - iter != wires.end(); - iter++) - { - Wire* wire = *iter; - - // Locate the target - Service* service = findComponentService(wire->getTarget()); - if (!service) - { - LOGERROR_1(0, "Composite::resolveWires: Wire target %s not found", wire->getTarget().c_str()); - } - else - { - Component* component = findComponent(wire->getSourceComponent()); - if (component) - { - Reference* reference = component->findReference(wire->getSourceReference()); - if (reference) - { - - // Configure the binding on the reference from the binding on the target - // service - reference->getBinding()->configure(service->getBinding()); - } - else - { - LOGERROR_1(0, "Composite::resolveWires: Wire source reference %s not found", wire->getSourceReference().c_str()); - } - } - else - { - LOGERROR_1(0, "Composite::resolveWires: Wire source %s not found", wire->getSourceComponent().c_str()); - } - } - } - - LOGEXIT(1, "Composite::resolveWires"); - } - - void Composite::addWSDLDefinition(commonj::sdo::DataObjectPtr wsdlModel) - { - LOGENTRY(1, "Composite::addWSDLDefinition"); - WSDLDefinition* wsdlDefinition = new WSDLDefinition(wsdlModel); - wsdlDefinitions[wsdlDefinition->getNamespace()] = wsdlDefinition; - LOGEXIT(1, "Composite::addWSDLDefinition"); - - } - - WSDLDefinition* Composite::findWSDLDefinition(const std::string& wsdlNamespace ) - { - return wsdlDefinitions[wsdlNamespace]; - - } - - commonj::sdo::XSDHelperPtr Composite::getXSDHelper() - { - if (xsdHelper == 0) - { - xsdHelper = commonj::sdo::HelperProvider::getXSDHelper(); - } - - return xsdHelper; - } - - commonj::sdo::XMLHelperPtr Composite::getXMLHelper() - { - if (xmlHelper == 0) - { - xmlHelper = commonj::sdo::HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory()); - } - - return xmlHelper; - } - - commonj::sdo::DataFactoryPtr Composite::getDataFactory() - { - return getXSDHelper()->getDataFactory(); - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.h deleted file mode 100644 index 3e9fdfa832..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Composite.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_composite_h -#define tuscany_sca_model_composite_h - -#include "tuscany/sca/export.h" -#include -using std::string; - -#include -using std::map; -#include -using std::vector; - -#include "commonj/sdo/SDO.h" - -#include "tuscany/sca/model/ComponentType.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - class Component; - class ComponentType; - class Service; - class WSDLDefinition; - class Wire; - - /** - * Represents a composite. - * A composite is used to assemble SCA elements in logical groupings. - * It is the basic unit of composition within an SCA System. An SCA composite contains a - * set of components, services, references and the wires that interconnect them, plus a set - * of properties which can be used to configure components. - */ - class Composite : public ComponentType - { - public: - - /** - * Constructor. - * @param name the name of the composite. - * @param root the root of the composite in the file system. - */ - SCA_API Composite(const string& name, const string& root); - - /** - * Destructor. - */ - SCA_API virtual ~Composite(); - - /** - * Returns the root directory of the composite. - * @return The root of the composite in the file system. - */ - SCA_API const string& getRoot() const { return root; } - - /** - * Add a new component to the composite. - * @param component The component to add. - */ - SCA_API void addComponent(Component* component); - - /** - * Add/include a composite in this composite. - * @param composite The composite included in this composite. - */ - SCA_API void addInclude(Composite* composite); - - /** - * 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. - */ - SCA_API void addWire(const string& source, const 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. - */ - SCA_API Component* findComponent(const 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. - */ - SCA_API Service* findComponentService(const string& componentServiceName); - - /** - * Add a WSDL definition to the composite. - * @param wsdlModel A data object holding all the information about - * the WSDL definition from a WSDL file. - */ - SCA_API void addWSDLDefinition(commonj::sdo::DataObjectPtr wsdlModel); - - /** - * Find a WSDL definition by target namespace. - * @param wsdlNamespace The namespace of the WSDL definitions to find. - */ - SCA_API WSDLDefinition* findWSDLDefinition(const string& wsdlNamespace); - - /** - * Return a cached SDO XSDHelper. - */ - SCA_API commonj::sdo::XSDHelperPtr getXSDHelper(void); - - /** - * Return a cached SDO XMLHelper. - */ - SCA_API commonj::sdo::XMLHelperPtr getXMLHelper(void); - - /** - * Return a data factory which has all the types defined in XSDs and - * WSDL files configured for this composite. - * @return The data factory for this composite. - */ - SCA_API commonj::sdo::DataFactoryPtr getDataFactory(void); - - /** - * Work through the list of wires and connect the source and target uris. - */ - SCA_API void resolveWires(); - - private: - - /** - * Directory of the root of the composite. - */ - string root; - - /** - * Cached XSDHelper. - */ - commonj::sdo::XSDHelperPtr xsdHelper; - - /** - * Cached XMLHelper. - */ - commonj::sdo::XMLHelperPtr xmlHelper; - - /** - * Map (by name) of all the components in this composite. - */ - typedef map COMPONENT_MAP; - COMPONENT_MAP components; - - /** - * Vector of all the composites included in this composite. - */ - typedef vector INCLUDES; - INCLUDES includes; - - /** - * Vector of all the wires in this composite. - */ - typedef vector WIRES; - WIRES wires; - - /** - * Map by namespace of all the wsdl definitions in this composite. - */ - typedef map WSDL_MAP; - WSDL_MAP wsdlDefinitions; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_composite_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.cpp deleted file mode 100644 index e3ef4b05f4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/CompositeReference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Service.h" - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - CompositeReference::CompositeReference(Composite* composite, const string& name, - Interface* intface, Interface* callbackInterface, bool conversational, ReferenceType::Multiplicity multiplicity) : - Component(composite, name, new ComponentType(composite, name)) - { - LOGENTRY(1, "CompositeReference::constructor"); - LOGINFO_1(2, "CompositeReference::constructor: CompositeReference name: %s", name.c_str()); - - // Initialize the component type, service type and service - ComponentType* componentType = getType(); - ServiceType* serviceType = new ServiceType( - componentType, "", intface, callbackInterface); - componentType->addServiceType(serviceType); - - service = new Service(this, serviceType); - addService(service); - - LOGEXIT(1, "CompositeReference::constructor"); - } - - // Destructor - CompositeReference::~CompositeReference() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.h deleted file mode 100644 index aa2ed12e7f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeReference.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_compositereferencetype_h -#define tuscany_sca_model_compositereferencetype_h - -#include - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ReferenceType.h" - -namespace tuscany -{ - namespace sca - { - - namespace model - { - class ComponentType; - class Composite; - class Interface; - class Service; - - /** - * Represents a reference in a composite. - * Composite references represent dependencies that the composite has on services provided elsewhere, - * outside the composite. - */ - class CompositeReference : public Component - { - public: - - /** - * Constructor. - * @param name The name of the reference. - */ - SCA_API CompositeReference(Composite* composite, const string& name, - Interface* intface, Interface* callbackInterface, bool conversational, ReferenceType::Multiplicity multiplicity); - - /** - * Destructor. - */ - SCA_API virtual ~CompositeReference(); - - /** - * Returns the service exposed by this composite reference. - * @return The service exposed by this composite reference. - */ - SCA_API Service* getService() const { return service; }; - - private: - - /** - * The service exposed by this composite reference. - */ - Service* service; - - }; - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_compositereferencetype_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.cpp deleted file mode 100644 index 691091449e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/CompositeService.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/ServiceType.h" - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - CompositeService::CompositeService(Composite* composite, const string& name, - Interface* intface, Interface* callbackInterface, bool conversational, - ReferenceType::Multiplicity multiplicity) : - Component(composite, name, new ComponentType(composite, name)) - { - LOGENTRY(1, "CompositeService::constructor"); - LOGINFO_1(2, "CompositeService::constructor: CompositeService name: %s", name.c_str()); - - // Initialize the component type, reference type and reference - ComponentType* componentType = getType(); - ReferenceType* referenceType = new ReferenceType( - componentType, "", intface, callbackInterface, multiplicity); - componentType->addReferenceType(referenceType); - - reference = new Reference(this, referenceType); - addReference(reference); - - LOGEXIT(1, "CompositeService::constructor"); - } - - // Destructor - CompositeService::~CompositeService() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.h deleted file mode 100644 index c0c185676a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/CompositeService.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_compositeservicetype_h -#define tuscany_sca_model_compositeservicetype_h - -#include -using std::string; -#include -using std::vector; - -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ReferenceType.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - class Composite; - class Component; - class Interface; - class Reference; - - /** - * Represents a service in a composite. - * Composite services define the public services provided by the composite, which can be - * accessed from outside the composite. - */ - class CompositeService : public Component - { - - public: - - /** - * Constructor. - * @param componentType The component type on which this service is defined. - * @param name The name of the service. - */ - SCA_API CompositeService(Composite* composite, const string& name, - Interface* intface, Interface* callbackInterface, bool conversational, ReferenceType::Multiplicity multiplicity); - - /** - * Destructor. - */ - SCA_API virtual ~CompositeService(); - - /** - * Returns the reference used by this composite service. - * @return The reference used by this composite service. - */ - SCA_API Reference* getReference() const { return reference; }; - - private: - - /** - * The reference used by this composite service. - */ - Reference* reference; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_compositeservicetype_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.cpp deleted file mode 100644 index c9d8f017c7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/Contract.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Contract::Contract(Interface *intface, Interface* callbackInterface) : - iface(intface), callbackInterface(callbackInterface) - { - } - - // Destructor - Contract::~Contract() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.h deleted file mode 100644 index da533f4887..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Contract.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_contract_h -#define tuscany_sca_model_contract_h - -#include -using std::string; - -#include "tuscany/sca/model/Interface.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Interface contracts define one or more business functions. These business functions are - * provided by services and are used by references. Services are defined by the interface which - * they implement. - * This interface will typically be extended to support concrete interface type systems, such as - * CPP classes, Java interfaces, WSDL 1.1 portTypes and WSDL 2.0 interfaces. - */ - class Contract - { - public: - - /** - * Constructor. - */ - SCA_API Contract(Interface* intface, Interface* callbackInterface); - - /** - * Destructor. - */ - SCA_API virtual ~Contract(); - - /** - * Returns the interface for invocations from the requestor to the provider. - * @return The interface for invocations from the requestor to the provider. - */ - SCA_API Interface* getInterface() const { return iface; } - - /** - * Returns the interface for invocations from the provider back to the requestor. - * @return The interface for invocations from the provider back to the requestor. - */ - SCA_API Interface* getCallbackInterface() const { return callbackInterface; } - - private: - - /** - * The interface for invocations from the requestor to the provider. - */ - Interface* iface; - - /** - * The interface for invocations from the provider back to the requestor. - */ - Interface* callbackInterface; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_contract_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.cpp deleted file mode 100644 index bbc6c79bc6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/Interface.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - Interface::Interface(bool remotable, bool conversational) - : remotable(remotable), conversational(conversational) - { - } - - Interface::~Interface() - { - } - - } // End namespace model - - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.h deleted file mode 100644 index f02476745e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Interface.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_interface_h -#define tuscany_sca_model_interface_h - -#include - -using namespace std; - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Information about an interface. Subtypes will hold information - * specific to a type of interface. - */ - class Interface - { - - public: - - /** - * Constructor - */ - SCA_API Interface(bool remotable, bool conversational); - - /** - * Destructor - */ - SCA_API virtual ~Interface(); - - /** - * Returns true if the interface is remotable. - * @return True if the interface is remotable. - */ - SCA_API bool isRemotable() const { return remotable; }; - - /** - * Returns true if the interface is conversational. - * @return True if the interface is conversational. - */ - SCA_API bool isConversational() const { return conversational; }; - - /** - * return the QName of schema type for this interface type - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#WSDLInterface") - */ - SCA_API virtual const string& getInterfaceTypeQName() = 0; - - private: - - /** - * True if the interface is remotable - */ - bool remotable; - - /** - * True if the interface is conversational - */ - bool conversational; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_interface_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp deleted file mode 100644 index fe83807af4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp +++ /dev/null @@ -1,1815 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/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/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/CompositeService.h" -#include "tuscany/sca/model/CompositeReference.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/WSDLInterface.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "commonj/sdo/TypeDefinitions.h" -#include "tuscany/sca/util/File.h" - - -using namespace commonj::sdo; - - -#if defined(WIN32) || defined (_WINDOWS) -#define PATH_SEPARATOR ";" -#else -#define PATH_SEPARATOR ":" -#endif - -namespace tuscany -{ - namespace sca - { - - namespace model - { - // =========== - // Constructor - // =========== - ModelLoader::ModelLoader(Composite* system) : system(system) - { - LOGENTRY(1, "ModelLoader::constructor"); - - runtime = SCARuntime::getInstance(); - - 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 SCDL files to the SCA runtime's in memory model. - // ========================================================= - void ModelLoader::load(const string& systemRoot, const string& systemPath) - { - LOGENTRY(1, "ModelLoader::load"); - LOGINFO_1(2,"system root: %s", systemRoot.c_str()); - LOGINFO_1(2,"system path: %s", systemPath.c_str()); - - // Load composite implementations - // Composite implementations can occur anywhere on the given search path - if (systemPath != "") - { - loadComposites(systemRoot + PATH_SEPARATOR + systemPath); - } - else - { - loadComposites(systemRoot); - } - - // Load system composites - // Composites on the the system root path get included - // in the System composite - loadSystem(systemRoot); - - // Resolve the wires in the system composite - system->resolveWires(); - - LOGEXIT(1, "ModelLoader::load"); - } - - // ======================================================================== - // loadSystem: - // Load all the composite files on the system root path - // Translate the composite information to composite model objects - // ======================================================================== - void ModelLoader::loadSystem(const string& systemRoot) - { - // Get all the composite files on the system root path - // These composites are included in the system composite - LOGENTRY(1, "ModelLoader::loadSystem"); - for (string path = systemRoot; path != ""; ) - { - string dir; - Utils::tokeniseString(PATH_SEPARATOR, path, dir, path); - if (dir != "") - { - LOGINFO_1(2, "system root directory: %s", dir.c_str()); - Files files(dir, "*.composite", false); - for (unsigned int i=0; i < files.size(); i++) - { - string fileName = files[i].getDirectory() + "/" + files[i].getFileName(); - Composite* composite = compositeFiles[fileName]; - if (composite) - { - // Include the composite in the system composite - system->addInclude(composite); - } - else - { - // We already got an error or warning indicating why the file - // didn't turn into a composite - } - } - } - } - LOGEXIT(1, "ModelLoader::loadSystem"); - } - - // ===================================================================== - // loadComposites: - // Load all the composites from any directory under the composite search path - // Translate the composite information to composite model objects - // ===================================================================== - void ModelLoader::loadComposites(const string& searchPath) - { - // Get all the composite files on the composite search path - LOGENTRY(1, "ModelLoader::loadComposites"); - for (string path = searchPath; path != ""; ) - { - string dir; - Utils::tokeniseString(PATH_SEPARATOR, path, dir, path); - if (dir != "") - { - LOGINFO_1(2, "composite path directory: %s", dir.c_str()); - Files files(dir, "*.composite", true); - for (unsigned int i=0; i < files.size(); i++) - { - loadCompositeFile(files[i]); - } - } - } - - // Complete the mapping of the composites - for (COMPOSITE_DATAOBJECTS::iterator iter = compositeDataObjects.begin(); - iter != compositeDataObjects.end(); - iter++) - { - mapCompositePass2(iter->first, iter->second); - } - - LOGEXIT(1, "ModelLoader::loadComposites"); - } - - // ==================================================================== - // loadCompositeFile: - // This method is called for each .composite file found under the composite search - // path. The location of this composite file will indicate the root of a composite. - // ==================================================================== - Composite* ModelLoader::loadCompositeFile(const File& file) - { - LOGENTRY(1, "ModelLoader::loadCompositeFile"); - LOGINFO_1(2, "composite filename: %s", file.getFileName().c_str()); - - Composite* composite = NULL; - try - { - string fileName = file.getDirectory() + "/" + file.getFileName(); - if (compositeFiles[fileName] == NULL) - { - XMLDocumentPtr compositeFile = getXMLHelper()->loadFile(fileName.c_str()); - if (compositeFile->getRootDataObject() == NULL) - { - LOGERROR_1(0, "ModelLoader::loadCompositeFile: Unable to load file: %s", fileName.c_str()); - } - else - { - // Map the SCDL - composite = mapCompositePass1(file, compositeFile->getRootDataObject()); - - // Load the xsd types and wsdl files in the composite - loadTypeMetadata(file.getDirectory(), composite); - } - } - - } catch (SDORuntimeException ex) - { - LOGERROR_1(0, "ModelLoader::loadCompositeFile: Exception caught: %s", ex.getMessageText()); - } - - LOGEXIT(1, "ModelLoader::loadCompositeFile"); - return composite; - } - - // =========== - // mapCompositePass1 - // =========== - Composite* ModelLoader::mapCompositePass1(const File& file, DataObjectPtr root) - { - LOGENTRY(1, "ModelLoader::mapCompositePass1"); - - const string& compositeRootDir = file.getDirectory(); - const string compositeName = root->getCString("name"); - LOGINFO_2(2, "ModelLoader::mapCompositePass1: Loading composite: %s, root Dir: %s", compositeName.c_str(), compositeRootDir.c_str()); - - Composite* composite = new Composite(compositeName, compositeRootDir); - compositeModels[compositeName] = composite; - compositeDataObjects[compositeName] = root; - compositeFiles[file.getDirectory() + "/" + file.getFileName()] = composite; - - // ------------ - // Composite services - // ------------ - DataObjectList& compositeServiceList = root->getList("service"); - for (int i = 0; i < compositeServiceList.size(); i++) - { - addCompositeService(composite, compositeServiceList[i]); - } - - // ----------------- - // Composite references - // ----------------- - DataObjectList& compositeReferenceList = root->getList("reference"); - for (int cri = 0; cri < compositeReferenceList.size(); cri++) - { - addCompositeReference(composite, compositeReferenceList[cri]); - } - - // ----- - // Wires - // ----- - DataObjectList& wireList = root->getList("wire"); - for (int l = 0; l < wireList.size(); l++) - { - string source = wireList[l]->getCString("source"); - string target = wireList[l]->getCString("target"); - composite->addWire(source, target); - } - - LOGEXIT(1, "ModelLoader::mapCompositePass1"); - return composite; - } - - // =========== - // mapCompositePass2 - // =========== - Composite* ModelLoader::mapCompositePass2(const string& compositeName, DataObjectPtr root) - { - LOGENTRY(1, "ModelLoader::mapCompositePass2"); - - LOGINFO_1(2, "ModelLoader::mapCompositePass2: Loading composite: %s", compositeName.c_str()); - - Composite* composite = compositeModels[compositeName]; - - // ---------------------------- - // Add components to the composite - // ---------------------------- - DataObjectList& componentList = root->getList("component"); - int i; - for (i=0; i < componentList.size(); i++) - { - addComponent(composite, componentList[i]); - } - - // Resolve all the wires inside the composite - composite->resolveWires(); - - LOGEXIT(1, "ModelLoader::mapCompositePass2"); - return composite; - } - - // ================================= - // addComponent: - // ================================= - void ModelLoader::addComponent(Composite* composite, DataObjectPtr componentDO) - { - // ------------------- - // Get the component implementation - // ------------------- - DataObjectPtr impl = componentDO->getDataObject("implementation"); - if (!impl) - { - string message = "No implementation for component: "; - message = message + componentDO->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - - // Create the component type - ComponentType* componentType; - string componentTypeName; - string componentTypePath; - - string implTypeQname = impl->getType().getURI(); - implTypeQname += "#"; - implTypeQname += impl->getType().getName(); - - if (implTypeQname == "http://www.osoa.org/xmlns/sca/1.0#SCAImplementation") - { - // Handle a composite implementation - Composite* composite = compositeModels[impl->getCString("name")]; - if (!composite) - { - string message = "Composite not found: "; - message = message + impl->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - componentType = composite; - } - else - { - - // Locate extension that handles this implementation type - ImplementationExtension* implExtension = runtime->getImplementationExtension(implTypeQname); - if (implExtension) - { - componentType = implExtension->getImplementation(composite, impl); - - // ----------------------- - // Load the .componentType - // ----------------------- - string typeFileName = composite->getRoot() + "/" + componentType->getName() + ".componentType"; - - // Check that the component type file exists - //TODO We need a better and portable way to do this - string dirName; - string fileName; - Utils::rTokeniseString("/", typeFileName, dirName, fileName); - Files files(dirName, fileName, false); - if (files.size() !=0) - { - try - { - XMLDocumentPtr componentTypeFile = getXMLHelper()->loadFile(typeFileName.c_str()); - if (!componentTypeFile || componentTypeFile->getRootDataObject() == 0) - { - // Component type files are optional - LOGINFO_1(0, "ModelLoader::addComponent: Unable to load file: %s", typeFileName.c_str()); - } - else - { - //Utils::printDO(componentTypeFile->getRootDataObject()); - //commonj::sdo::SDOUtils::printDataObject(componentTypeFile->getRootDataObject()); - addServiceTypes(composite, componentType, componentTypeFile->getRootDataObject()); - addReferenceTypes(composite, componentType, componentTypeFile->getRootDataObject()); - addPropertyTypes(componentType, componentTypeFile->getRootDataObject()); - } - } catch (SDORuntimeException& ex) - { - LOGERROR_2(0, "ModelLoader::addComponent (%s): Exception caught: %s", - typeFileName.c_str(), ex.getMessageText()); - throw SystemConfigurationException(ex.getMessageText()); - } - } - } - else - { - LOGERROR_1(0, "ModelLoader::addComponent: Unsupported implementation type: %s", implTypeQname.c_str()); - - string message = "Implementation type not supported: "; - message = message + implTypeQname; - throw SystemConfigurationException(message.c_str()); - } - } - - // First check that references exist, some component types - // will create all used references automatically - DataObjectList& refs = componentDO->getList("reference"); - for (int i=0; igetCString("name"); - if (!componentType->findReferenceType(refName)) - { - // Configuration error: reference is not defined - string message = "Undefined reference: " + refName; - throw SystemConfigurationException(message.c_str()); - } - } - - // Create the component - Component* component = new Component(composite, componentDO->getCString("name"), componentType); - composite->addComponent(component); - - // ---------- - // Properties - // ---------- - DataObjectList& props = componentDO->getList("property"); - for (int pi=0; pigetCString("name"); - DataObjectPtr propValue = props[pi]->getDataObject("value"); - - component->setProperty(propName, propValue); - } - - // ---------- - // References - // ---------- - for (int ri=0; rigetCString("name"); - if (!component->findReference(refName)) - { - // Configuration error: reference is not defined - string message = "Undefined reference: " + refName; - throw SystemConfigurationException(message.c_str()); - } - - string src = component->getName() + "/" + refName; - - // Get the reference value - string refValue = refs[ri]->getCString("value"); - - composite->addWire(src, refValue); - } - } - - // ===================================================================== - // addServiceTypes: add the services to the component type - // ===================================================================== - void ModelLoader::addServiceTypes(Composite* composite, ComponentType* componentType, DataObjectPtr componentTypeDO) - { - DataObjectList& serviceTypes = componentTypeDO->getList("service"); - for (int i=0; igetCString("name"), iface, NULL); - componentType->addServiceType(serviceType); - } - } - - // =================================================== - // addReferenceTypes: add the references to the component type - // =================================================== - void ModelLoader::addReferenceTypes(Composite* composite, ComponentType* componentType, DataObjectPtr componentTypeDO) - { - DataObjectList& refs = componentTypeDO->getList("reference"); - for (int i=0; iisSet("multiplicity")) - { - string s = refs[i]->getCString("multiplicity"); - multiplicity = ReferenceType::getMultiplicityFromString(s); - } - else - { - multiplicity = ReferenceType::ONE_ONE; - } - - Interface* iface = getInterface(composite, refs[i]); - - ReferenceType* referenceType = new ReferenceType( - componentType, refs[i]->getCString("name"), iface, NULL, multiplicity); - componentType->addReferenceType(referenceType); - - } - } - - - // ============== - // getInterface - // ============== - Interface* ModelLoader::getInterface(Composite* composite, 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()); - } - - string typeQname = iface->getType().getURI(); - typeQname += "#"; - typeQname += iface->getType().getName(); - - if (typeQname == WSDLInterface::typeQName) - { - // Load a WSDL interface - string qname = iface->getCString("interface"); - - return new WSDLInterface(qname, true, false); - } - else - { - // Locate extension that handles this interface type - InterfaceExtension* ifaceExtension = runtime->getInterfaceExtension(typeQname); - if (ifaceExtension) - { - return ifaceExtension->getInterface(composite, iface); - } - else - { - // log this for now. - LOGERROR_1(1, "ModelLoader::getInterface: Unsupported interface type: %s", typeQname.c_str()); - return 0; - } - } - - } - - // ============================================== - // addProperties: add properties to the component type - // ============================================== - void ModelLoader::addPropertyTypes(ComponentType* componentType, DataObjectPtr componentTypeDO) - { - DataObjectList& props = componentTypeDO->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"); - } - - //TODO need to add support for complex properties, need the SDO - // folks to help understand how to do this... - DataObjectPtr defaultValue = props[i]->getDataObject("value"); - - componentType->addPropertyType(name, type, many, &defaultValue); - } - } - - // =============================================== - // addCompositeService: add an CompositeService to the composite - // =============================================== - void ModelLoader::addCompositeService(Composite* composite, DataObjectPtr compositeServiceDO) - { - - //Utils::printDO(compositeServiceDO); - string compositeServiceName = compositeServiceDO->getCString("name"); - - Interface* iface; - if (compositeServiceDO->getDataObject("interface")) - { - iface = getInterface(composite, compositeServiceDO); - } - else - { - iface = NULL; - } - - ReferenceType::Multiplicity multiplicity; - if (compositeServiceDO->isSet("multiplicity")) - { - string s = compositeServiceDO->getCString("multiplicity"); - multiplicity = ReferenceType::getMultiplicityFromString(s); - } - else - { - multiplicity = ReferenceType::ONE_ONE; - } - - CompositeService* compositeService = new CompositeService( - composite, compositeServiceName, iface, NULL, false, multiplicity); - - composite->addComponent(compositeService); - - DataObjectList& refs = compositeServiceDO->getList("reference"); - for (int i=0; iaddWire(compositeServiceName, targ); - } - - // Get binding, it will be the first and only binding - DataObjectList& bindings = compositeServiceDO->getList("binding"); - if (bindings.size()==0) - { - string message = "No binding for compositeService: "; - message = message + compositeServiceDO->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - DataObjectPtr binding = bindings[0]; - - // Utils::printDO(binding); - - // Determine the binding type - string bindingType = binding->getType().getName(); - string bindingTypeQname = binding->getType().getURI(); - bindingTypeQname += "#"; - bindingTypeQname += binding->getType().getName(); - - // Locate the extension that handles this binding type - ReferenceBindingExtension* bindingExtension = runtime->getReferenceBindingExtension(bindingTypeQname); - if (bindingExtension) - { - Reference* reference = compositeService->getReference(); - ReferenceBinding* referenceBinding = bindingExtension->getReferenceBinding(composite, reference, binding); - reference->setBinding(referenceBinding); - } - else - { - LOGERROR_1(0, "ModelLoader::addCompositeService: Unsupported binding type: %s", bindingTypeQname.c_str()); - - string message = "Binding type not supported: "; - message = message + bindingTypeQname; - throw SystemConfigurationException(message.c_str()); - } - } - - - // ========================================================= - // addCompositeReference: add a CompositeReference to the composite - // ========================================================= - void ModelLoader::addCompositeReference(Composite* composite, DataObjectPtr compositeReferenceDO) - { - string compositeReferenceName = compositeReferenceDO->getCString("name"); - - Interface* iface; - if (compositeReferenceDO->getDataObject("interface")) - { - iface = getInterface(composite, compositeReferenceDO); - } - else - { - iface = NULL; - } - - CompositeReference* compositeReference = new CompositeReference( - composite, compositeReferenceName, iface, NULL, false, ReferenceType::ONE_ONE); - - composite->addComponent(compositeReference); - - // Get binding, it will be the first and only binding - DataObjectList& bindings = compositeReferenceDO->getList("binding"); - if (bindings.size()==0) - { - string message = "No binding for compositeReference: "; - message = message + compositeReferenceDO->getCString("name"); - throw SystemConfigurationException(message.c_str()); - } - DataObjectPtr binding = bindings[0]; - - //Utils::printDO(binding); - - // Determine the binding type - string bindingType = binding->getType().getName(); - string bindingTypeQname = binding->getType().getURI(); - bindingTypeQname += "#"; - bindingTypeQname += binding->getType().getName(); - - // Locate the extension that handles this binding type - ServiceBindingExtension* bindingExtension = runtime->getServiceBindingExtension(bindingTypeQname); - if (bindingExtension) - { - Service *service = compositeReference->getService(); - ServiceBinding* serviceBinding = bindingExtension->getServiceBinding(composite, service, binding); - service->setBinding(serviceBinding); - } - else - { - LOGERROR_1(0, "ModelLoader::addCompositeReference: Unsupported binding type: %s", bindingTypeQname.c_str()); - - string message = "Binding type not supported: "; - message = message + bindingTypeQname; - throw SystemConfigurationException(message.c_str()); - } - } - - - /// - /// Use the Tuscany.config file in the composite root directory to - /// determine which xsds and wsdls to load into a dataFactory. - /// - void ModelLoader::loadTypeMetadata(const string &compositeRootDir, Composite* composite) - { - LOGENTRY(1, "ModelLoader::loadTypeMetadata"); - - // Load the "Tuscany.config" file, if it exists - Files files(compositeRootDir, "Tuscany.config", false); - if (files.size() !=0) - { - for (unsigned int i=0; i < files.size(); i++) - { - string filename = compositeRootDir + "/" + files[i].getFileName(); - XMLDocumentPtr compositeConfigFile = getXMLHelper()->loadFile(filename.c_str()); - if (compositeConfigFile->getRootDataObject() == 0) - { - LOGERROR_1(0, "ModelLoader::loadTypeMetadata: Unable to load file: %s", filename.c_str()); - } - else - { - LOGINFO_2(2, "ModelLoader::loadTypeMetadata: Loading composite config for: %s, root Dir: %s", composite->getName().c_str(), compositeRootDir.c_str()); - - if(compositeConfigFile->getRootDataObject()->isSet("xsd")) - { - DataObjectList& xsds = compositeConfigFile->getRootDataObject()->getList("xsd/file"); - - for (int i=0; iisSet("name")) - { - // Load a xsd file -> set the types in the compositeComponents data factory file - string xsdName = compositeRootDir + "/" +xsds[i]->getCString("name"); - loadXMLSchema(composite, xsdName.c_str()); - } - } - } - - - if( compositeConfigFile->getRootDataObject()->isSet("wsdl")) - { - DataObjectList& wsdls = compositeConfigFile->getRootDataObject()->getList("wsdl/file"); - for (int j=0; jisSet("name")) - { - string wsdlName = compositeRootDir + "/" +wsdls[j]->getCString("name"); - // Load a wsdl file -> get the types, then the contents of the wsdl - loadXMLSchema(composite, wsdlName.c_str()); - - // Load the contents of the wsdl files - loadWSDLDefinition(composite, wsdlName.c_str()); - } - } - } - } - } - } - else - { - // The default scheme is to have no Tuscany.config file, then we simply load all - // WSDLs and XSDs that we find under the composite root - - Files xsdFiles(compositeRootDir, "*.xsd", true); - for (unsigned int i=0; i < xsdFiles.size(); i++) - { - // Load a xsd file -> set the types in the compositeComponents data factory file - string xsdName = xsdFiles[i].getDirectory() + "/" + xsdFiles[i].getFileName(); - loadXMLSchema(composite, xsdName.c_str()); - - } - - Files wsdlFiles(compositeRootDir, "*.wsdl", true); - for (unsigned int wi=0; wi < wsdlFiles.size(); wi++) - { - // Load a wsdl file -> get the types, then the contents of the wsdl - string wsdlName = wsdlFiles[wi].getDirectory() + "/" + wsdlFiles[wi].getFileName(); - loadXMLSchema(composite, wsdlName.c_str()); - - // Load the contents of the wsdl files - loadWSDLDefinition(composite, wsdlName.c_str()); - } - } - - LOGEXIT(1, "ModelLoader::loadTypeMetadata"); - } - - - /// - /// Use the types from an xsd or wsdl file - /// - void ModelLoader::loadXMLSchema(Composite* composite, const char *fileName) - { - LOGENTRY(1, "ModelLoader::loadXMLSchema"); - - // Load a xsd file -> set the types in the data factory associated with - // the composite - try { - composite->getXSDHelper()->defineFile(fileName); - //Utils::printTypes((*compositeIter)->getXSDHelper()->getDataFactory()); - - } catch (SDOTypeNotFoundException ex) - { - LOGERROR_1(0, "ModelLoader: Exception caught: %s", ex.getMessageText()); - throw ex; - } - LOGEXIT(1, "ModelLoader::loadXMLSchema"); - } - - /// - /// Load the web services definition from a wsdl - /// - void ModelLoader::loadWSDLDefinition(Composite* composite, const char *fileName) - { - LOGENTRY(1, "ModelLoader::loadWSDLDefinition"); - - try { - // Load the wsdl file - XMLDocumentPtr doc = getXMLHelper()->loadFile(fileName); - - if (doc!=0 && doc->getRootDataObject()!=0) - { - //Utils::printDO(doc->getRootDataObject()); - - // Add the root WSDL object to the composite - composite->addWSDLDefinition(doc->getRootDataObject()); - - } - else - { - LOGERROR_1(0, "ModelLoader: Unable to load or parse WSDL %s", fileName); - } - - } catch (SDOTypeNotFoundException ex) - { - LOGERROR_1(0, "ModelLoader: SDOTypeNotFoundException caught: %s", ex.getMessageText()); - throw ex; - } - catch (SDONullPointerException ex) - { - LOGERROR_1(0, "ModelLoader: SDONullPointerException caught: %s", ex.getMessageText()); - throw ex; - } - LOGEXIT(1, "ModelLoader::loadWSDLDefinition"); - - } - - ////////////////////////////////////////////////////////////////////////////// - // 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(); - - try { - - // Load the Assembly model schema - 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()); - - initializeWSDLModel(myXSDHelper); - - // Load any schema from the extensions directory - string extensionsRoot = root + "/extensions"; - - Files files(extensionsRoot, "*.xsd", true); - for (unsigned int i=0; i < files.size(); i++) - { - string extensionSchema = files[i].getDirectory() + "/" + files[i].getFileName(); - myXSDHelper->defineFile(extensionSchema.c_str()); - } - - - } catch (SDOTypeNotFoundException ex) - { - LOGERROR_1(0, "ModelLoader: Exception caught: %s", ex.getMessageText()); - throw ex; - } - } - - //cout << myXSDHelper->getDataFactory(); - - 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::initializeWSDLModel(XSDHelperPtr xsdHelper) - { - DataFactoryPtr dataFactory = xsdHelper->getDataFactory(); - - 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); - - - TypeDefinition tpart; - tpart.setUri("http://schemas.xmlsoap.org/wsdl/"); - tpart.setName("tPart"); - tpart.setParentType("http://schemas.xmlsoap.org/wsdl/", - "tExtensibleAttributesDocumented", false); - PropertyDefinition propdef; - propdef.setName("name"); - propdef.setLocalName("name"); - propdef.setType("commonj.sdo", "String"); - propdef.setIsContainment(true); - tpart.addPropertyDefinition(propdef); - propdef.setName("element"); - propdef.setLocalName("element"); - propdef.setIsQName(true); - tpart.addPropertyDefinition(propdef); - propdef.setName("type"); - propdef.setLocalName("type"); - tpart.addPropertyDefinition(propdef); - TypeDefinitions typedefs; - typedefs.addTypeDefinition(tpart); - xsdHelper->defineTypes(typedefs); - - //Utils::printTypes(dataFactory); - /*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); - - - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "RootType", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tAddress", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tBinding", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tBody", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs", - false, true, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tFault", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tFaultRes", - false, false, true); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tHeader", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tHeaderFault", - false, true, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tOperation", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tParts", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tStyleChoice", - false, false, false); - dataFactory->addType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "useChoice", - false, false, false); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tAddress", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tBinding", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tBody", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs", - "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tFault", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tFaultRes"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tFaultRes", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tBody"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tHeader", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tOperation", - "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "tStyleChoice", - "commonj.sdo", "String"); - dataFactory->setBaseType( - "http://schemas.xmlsoap.org/wsdl/soap12/", "useChoice", - "commonj.sdo", "String"); - } - - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h deleted file mode 100644 index d0374e61d6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_modelloader_h -#define tuscany_sca_model_modelloader_h - -#include "tuscany/sca/export.h" -#include "commonj/sdo/SDO.h" - -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/util/File.h" - -#include -using std::map; - -using commonj::sdo::DataObjectPtr; -using commonj::sdo::XSDHelperPtr; -using namespace tuscany::sca; - - -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(Composite* system); - - /** - * Destructor. - */ - virtual ~ModelLoader(); - - /** - * Load the model from the configuration information. - * @param systemRoot The location of the system configuration - * @param systemPath The search path for composites - */ - void load(const string& systemRoot, const string& systemPath); - - private: - void loadSystem(const string& systemRoot); - - void loadComposites(const string& searchPath); - Composite* loadCompositeFile(const File& file); - Composite* mapCompositePass1(const File& file, DataObjectPtr rootDO); - Composite* mapCompositePass2(const string& compositeName, DataObjectPtr rootDO); - - void addComponent(Composite* composite, DataObjectPtr componentDO); - void addCompositeService(Composite* composite, DataObjectPtr compositeServiceDO); - void addCompositeReference(Composite* composite, DataObjectPtr referenceServiceDO); - - void addServiceTypes(Composite* composite, ComponentType* componentType, DataObjectPtr componentTypeDO); - void addReferenceTypes(Composite* composite, ComponentType* componentType, DataObjectPtr componentTypeDO); - void addPropertyTypes(ComponentType* componentType, DataObjectPtr componentTypeDO); - - void loadTypeMetadata(const string &compositeRootDir, Composite* composite); - - void loadXMLSchema(Composite* composite, const char *fileName); - void loadWSDLDefinition(Composite* composite, const char *fileName); - void initializeWSDLModel(XSDHelperPtr xsdHelper); - - Interface* getInterface(Composite* composite, DataObjectPtr obj); - - SCARuntime* runtime; - - 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); - - /** - * The composite describing the composition of the system - */ - Composite* system; - - /** - * Maps of all the composites installed on the system. - */ - typedef map COMPOSITE_MODELS; - COMPOSITE_MODELS compositeModels; - - typedef map COMPOSITE_DATAOBJECTS; - COMPOSITE_DATAOBJECTS compositeDataObjects; - - typedef map COMPOSITE_FILES; - COMPOSITE_FILES compositeFiles; - - }; - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_modelloader_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.cpp deleted file mode 100644 index 98084c6261..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // Constructor - Reference::Reference(Component* component, ReferenceType* referenceType) - : component(component), type(referenceType), binding(0) - { - } - - // Destructor - Reference::~Reference() - { - } - - void Reference::setBinding(ReferenceBinding* binding) - { - this->binding = binding; - } - - ReferenceBinding* Reference::getBinding() const - { - return binding; - } - - void Reference::addTarget(Service* target) - { - if (type->getMultiplicity() == ReferenceType::ONE_ONE || type->getMultiplicity() == ReferenceType::ZERO_ONE) - { - if (targets.size() > 0) - { - // throw exception - string message = "Duplicate wire for reference: " + type->getName(); - throw SystemConfigurationException(message.c_str()); - } - } - - targets.push_back(target); - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.h deleted file mode 100644 index b58ca54b4a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Reference.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_reference_h -#define tuscany_sca_model_reference_h - -#include -using std::string; -#include -using std::vector; - -namespace tuscany -{ - namespace sca - { - namespace model - { - class Component; - class ReferenceType; - class ReferenceBinding; - class Service; - - /** - * An addressable instance of a reference type associated with a particular component. - * Each reference represents a configured version of a logical - * reference type defined in the component type. If the logical reference - * has a multiplicity greater than 1 (0..n or 1..n) then the configured - * reference many have multiple targets. - */ - class Reference - { - public: - /** - * Constructor. - * @param component The component on which the reference is defined. - * @param referenceType The reference type defining the characteristics of the reference. - */ - SCA_API Reference(Component* component, ReferenceType* referenceType); - - /** - * Destructor. - */ - SCA_API virtual ~Reference(); - - /** - * Returns the component on which this reference is defined. - * @return The component on which this reference is defined. - */ - SCA_API Component* getComponent() const { return component; } - - /** - * Returns the reference type defining the characteristics of the reference. - * @return The reference type defining the characteristics of the reference. - */ - SCA_API ReferenceType* getType() const { return type; } - - /** - * Returns the binding supported by the reference. - * @return The binding supported by the reference. - */ - SCA_API ReferenceBinding* getBinding() const; - - /** - * Sets the binding supported by the reference. - * @param binding The binding supported by the reference. - */ - SCA_API void setBinding(ReferenceBinding* binding); - - /** - * Add a target for this reference. There may be more than - * one if the multiplicity is 0..n or 1..n. - * @param target The target of the reference. - */ - SCA_API void addTarget(Service* target); - - typedef vector TARGETS; - - /** - * Get a vector of all the targets from this reference. - * @return The targets of this reference. - */ - SCA_API const TARGETS& getTargets() const { return targets; } - - private: - - /** - * The component on which this reference is defined. - */ - Component* component; - - /** - * The reference type defining the characteristics of the reference. - */ - ReferenceType* type; - - /** - * The binding supported by this reference - */ - ReferenceBinding* binding; - - /** - * Vector of all the targets wired from this reference. - */ - TARGETS targets; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_reference_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.cpp deleted file mode 100644 index e18f8f3461..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/ReferenceBinding.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - ReferenceBinding::ReferenceBinding(Reference *reference, const string& uri) : - Binding(uri), reference(reference) - { - } - - // Destructor - ReferenceBinding::~ReferenceBinding() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.h deleted file mode 100644 index 259d088a26..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceBinding.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_referencebinding_h -#define tuscany_sca_model_referencebinding_h -#include -using std::string; - -#include "tuscany/sca/model/Binding.h" - -namespace tuscany -{ - namespace sca - { - class ServiceProxy; - - - namespace model - { - class Reference; - class ServiceBinding; - - /** - * Represents a reference binding. - * Bindings are used by services and references. References use bindings - * to describe the access mechanism used to call an external service (which can - * be a service provided by another SCA composite). Services use bindings to describe - * the access mechanism that clients (which can be a client from another SCA composite) - * have to use to call the service. - * This interface will typically be extended by binding implementations to allow - * specification of binding/transport specific information. - */ - class ReferenceBinding : public Binding - { - public: - - /** - * Constructor to create a new binding. - */ - SCA_API ReferenceBinding(Reference* reference, const string& uri); - - /** - * Destructor. - */ - SCA_API virtual ~ReferenceBinding(); - - /** - * Create a proxy representing the reference to the - * client component. - */ - SCA_API virtual ServiceProxy* getServiceProxy() = 0; - - /** - * Configure this binding from a service binding. - */ - SCA_API virtual void configure(ServiceBinding* serviceBinding) = 0; - - /** - * Returns the reference. - * @return The reference. - */ - SCA_API Reference* getReference() const { return reference; }; - - private: - - /** - * The reference configured with the binding. - */ - Reference* reference; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_referencebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.cpp deleted file mode 100644 index cc9b40ca5b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/ReferenceType.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - ReferenceType::ReferenceType(ComponentType* componentType, const string& name, - Interface* intface, Interface* callbackInterface, Multiplicity multiplicity) - : Contract(intface, callbackInterface), - componentType(componentType), name(name), multiplicity(multiplicity) - { - } - - ReferenceType::~ReferenceType() - { - } - - ReferenceType::Multiplicity ReferenceType::getMultiplicityFromString(const string& multip) - { - if (multip == "0..1") - { - return ReferenceType::ZERO_ONE; - } - else if (multip == "1..1") - { - return ReferenceType::ONE_ONE; - } - else if (multip == "0..n") - { - return ReferenceType::ZERO_MANY; - } - else if (multip == "1..n") - { - return ReferenceType::ONE_MANY; - } - else - { - return ReferenceType::UNKNOWN; - } - } - - void ReferenceType::setBinding(Binding* binding) - { - this->binding = binding; - } - - Binding* ReferenceType::getBinding() const - { - return binding; - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.h deleted file mode 100644 index a9d6adc0eb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ReferenceType.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_referencetype_h -#define tuscany_sca_model_referencetype_h - -#include -using std::string; - -#include "tuscany/sca/model/Contract.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - class ComponentType; - class Interface; - class Binding; - - /** - * Represents an SCA reference. SCA references within an implementation represent - * links to services that the implementation uses that must be provided by other components - * in the SCA system. - */ - class ReferenceType : public Contract - { - public: - - /** - * Multiplicity (how many wires can be connected to this - * reference) - */ - enum Multiplicity - { - ZERO_ONE = 1, - ONE_ONE = 2, - ZERO_MANY = 3, - ONE_MANY = 4, - UNKNOWN = 0, - }; - - /** - * Constructor. - * @param name The name of the reference. - */ - SCA_API ReferenceType(ComponentType* componentType, const string& name, - Interface* intface, Interface* callbackInterface, Multiplicity multiplicity); - - /** - * Destructor. - */; - SCA_API virtual ~ReferenceType(); - - /** - * Returns the component type on which this reference is defined. - * @return The component type on which this reference is defined. - */ - SCA_API ComponentType* getComponentType() const { return componentType; } - - /** - * Returns the name of the reference. - * @return The name of the reference. - */ - SCA_API const string& getName() const { return name; } - - /** - * Returns the multiplicity allowed for wires connected to this reference. - * @return The multiplicity allowed for wires connected to this reference - */ - SCA_API Multiplicity getMultiplicity() const { return multiplicity; } - - /** - * Returns the binding supported by the reference. - * @return The binding supported by the reference. - */ - SCA_API Binding* getBinding() const; - - /** - * Sets the binding supported by the reference. - * @param binding The binding supported by the reference. - */ - SCA_API void setBinding(Binding* binding); - - /** - * Get the multiplicity corresponding to the given - * string. - */ - static Multiplicity getMultiplicityFromString(const string& multip); - - private: - - /** - * The component type on which this reference is defined. - */ - ComponentType *componentType; - - /** - * The name of the reference type. - */ - string name; - - /** - * The multiplicity allowed for wires connected to this reference. - */ - Multiplicity multiplicity; - - /** - * The binding supported by this reference type. - */ - Binding* binding; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_referencetype_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.cpp deleted file mode 100644 index 83a2858248..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/Service.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - // Constructor - Service::Service(Component* component, ServiceType* serviceType) - : component(component), type(serviceType), binding(0) - { - } - - // Destructor - Service::~Service() - { - } - - void Service::setBinding(ServiceBinding* binding) - { - this->binding = binding; - } - - ServiceBinding* Service::getBinding() const - { - return binding; - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.h deleted file mode 100644 index bd632b7a3b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Service.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_service_h -#define tuscany_sca_model_service_h - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace model - { - class Component; - class ServiceType; - class ServiceBinding; - - /** - * An addressable instance of a service type associated with a particular component. - */ - class Service - { - public: - /** - * Constructor. - * @param component The component on which the service is defined. - * @param serviceType The service type defining the characteristics of the service. - */ - SCA_API Service(Component* component, ServiceType* serviceType); - - /** - * Destructor. - */ - SCA_API virtual ~Service(); - - /** - * Returns the component on which this service is defined. - * @return The component on which this service is defined. - */ - SCA_API Component* getComponent() const { return component; } - - /** - * Returns the service type defining the characteristics of the service. - * @return The service type defining the characteristics of the service. - */ - SCA_API ServiceType* getType() const { return type; } - - /** - * Returns the binding supported by the service. - * @return The binding supported by the service. - */ - SCA_API ServiceBinding* getBinding() const; - - /** - * Sets the binding supported by the service. - * @param binding The binding supported by the service. - */ - SCA_API void setBinding(ServiceBinding* binding); - - private: - - /** - * The component on which this service is defined. - */ - Component* component; - - /** - * The service type defining the characteristics of the service. - */ - ServiceType* type; - - /** - * The binding supported by this service - */ - ServiceBinding* binding; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_service_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.cpp deleted file mode 100644 index b8f1aabb2c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/ServiceBinding.h" - - -namespace tuscany -{ - namespace sca - { - - namespace model - { - - // Constructor - ServiceBinding::ServiceBinding(Service* service, const string& uri) : - Binding(uri), service(service) - { - } - - // Destructor - ServiceBinding::~ServiceBinding() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.h deleted file mode 100644 index feaa989505..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceBinding.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_servicebinding_h -#define tuscany_sca_model_servicebinding_h -#include -using std::string; - -#include "tuscany/sca/model/Binding.h" - - -namespace tuscany -{ - namespace sca - { - class ServiceWrapper; - - namespace model - { - class Service; - - /** - * Represents a service binding. - * Bindings are used by services and references. References use bindings - * to describe the access mechanism used to call an external service (which can - * be a service provided by another SCA composite). Services use bindings to describe - * the access mechanism that clients (which can be a client from another SCA composite) - * have to use to call the service. - * This interface will typically be extended by binding implementations to allow - * specification of binding/transport specific information. - */ - class ServiceBinding : public Binding - { - public: - - /** - * Constructor to create a new binding. - */ - SCA_API ServiceBinding(Service* service, const string& uri); - - /** - * Destructor. - */ - SCA_API virtual ~ServiceBinding(); - - /** - * Create a service wrapper handling the interaction - * with the service configured with this binding. - */ - SCA_API virtual ServiceWrapper* getServiceWrapper() = 0; - - /** - * Returns the service - * @return The service. - */ - SCA_API Service* getService() const { return service; }; - - private: - - /** - * The service configured with the binding. - */ - Service* service; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_servicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.cpp deleted file mode 100644 index 40ecca2ceb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/model/ServiceType.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - ServiceType::ServiceType(ComponentType* componentType, const string& name, - Interface* intface, Interface* callbackInterface) - : Contract(intface, callbackInterface), - componentType(componentType), name(name) - { - } - - // Destructor - ServiceType::~ServiceType() - { - } - - void ServiceType::setBinding(Binding* binding) - { - this->binding = binding; - } - - Binding* ServiceType::getBinding() const - { - return binding; - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.h deleted file mode 100644 index 7b6dd4b97f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/ServiceType.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_servicetype_h -#define tuscany_sca_model_servicetype_h - -#include -using std::string; - -#include "tuscany/sca/model/Contract.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - class ComponentType; - class Binding; - class Interface; - - /** - * Represents a service type. Services are used to publish services provided by - * implementations, so that they are addressable by other components. - */ - class ServiceType : public Contract - { - public: - - /** - * Constructor. - * @param componentType The component type on which this service is defined. - * @param name The name of the service. - */ - SCA_API ServiceType(ComponentType* componentType, const string& name, - Interface* intface, Interface* callbackInterface); - - /** - * Destructor. - */ - SCA_API virtual ~ServiceType(); - - /** - * Returns the component type on which this service is defined. - * @return The component type on which this service is defined. - */ - SCA_API ComponentType* getComponentType() const { return componentType; } - - /** - * Returns the name of the service type. - * @return The name of the service type - */ - SCA_API const string& getName() const { return name; } - - /** - * Returns the binding supported by this service type. - * @return The binding supported by this service type - */ - SCA_API Binding* getBinding() const; - - /** - * Sets the binding supported by this service type. - * @param binding the binding supported by this service type - */ - SCA_API void setBinding(Binding* binding); - - private: - - /** - * The component type on which this service is defined. - */ - ComponentType* componentType; - - /** - * The name of the service type. - */ - string name; - - /** - * The binding supported by this service - */ - Binding* binding; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_servicetype_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp deleted file mode 100644 index ac7bf0306b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/model/WSDLDefinition.h" -#include "tuscany/sca/model/WSDLOperation.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" - -using namespace tuscany::sca; - -using namespace commonj::sdo; - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - WSDLDefinition::WSDLDefinition(DataObjectPtr wsdlModel) - : wsdlModel(wsdlModel) - { - LOGENTRY(1, "WSDLDefinition::constructor"); - - // Trace - //Utils::printDO(wsdlModel); - - LOGEXIT(1, "WSDLDefinition::constructor"); - } - - WSDLDefinition::~WSDLDefinition() - { - } - - - /// - /// The namespace of the service and other definitions defined in this wsdl definition - string WSDLDefinition::getNamespace() - { - return wsdlModel->getCString("targetNamespace"); - } - - /// - /// Find the operation defined in this wsdl - /// - const WSDLOperation& WSDLDefinition::findOperation(const string& serviceName, - const string& portName, - const string& operationName) - { - string message; - - string operationKey = serviceName+"#"+portName+"#"+operationName; - OperationMap::iterator iter = operationMap.find(operationKey); - if (iter != operationMap.end()) - { - return iter->second; - } - - // 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()); - } - - - string soapAction = ""; - bool documentStyle = true; - bool wrappedStyle = true; - bool useEncoded = false; - WSDLOperation::soapVersion soapVer = WSDLOperation::SOAP11; - - // Find the binding operation - DataObjectList& bindingOperationList = wsBinding->getList("operation"); - for (int i=0; igetCString("name")); - - if (name.compare(operationName) == 0) - { - DataObjectPtr op = bindingOperationList[i]->getDataObject("operation"); - string opType = op->getType().getURI(); - if (opType == "http://schemas.xmlsoap.org/wsdl/soap12/") - { - soapVer = WSDLOperation::SOAP12; - } - - // Get the soapAction - soapAction = bindingOperationList[i]->getCString("operation/soapAction"); - - // Get the style - string style = bindingOperationList[i]->getCString("operation/style"); - if (style == "") - { - style = wsBinding->getCString("binding/style"); - } - if (style != "document") - { - documentStyle = false; - wrappedStyle = false; - } - - // get the use - string use = bindingOperationList[i]->getCString("input/body/use"); - if (use == "encoded") - { - useEncoded = true; - } - } - } - - - // TODO - get the style from the binding or operation???? - - // 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")); - - // 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")); - - WSDLOperation& wsdlOp = operationMap[operationKey]; - wsdlOp.setOperationName(operationName); - wsdlOp.setSoapAction(soapAction); - wsdlOp.setEndpoint(targetAddress); - wsdlOp.setSoapVersion(soapVer); - wsdlOp.setDocumentStyle(documentStyle); - wsdlOp.setWrappedStyle(wrappedStyle); - wsdlOp.setEncoded(useEncoded); - wsdlOp.setInputType(requestType); - wsdlOp.setOutputType(responseType); - return wsdlOp; - } - - } - - 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 the operation defined in this wsdl - /// - const WSDLOperation& WSDLDefinition::findOperation(const string& portTypeName, - const string& operationName) - { - string operationKey = portTypeName+"#"+operationName; - OperationMap::iterator iter = operationMap.find(operationKey); - if (iter != operationMap.end()) - { - return iter->second; - } - - string soapAction = getNamespace() + "#" + operationName; - bool documentStyle = true; - bool wrappedStyle = true; - bool useEncoded = false; - WSDLOperation::soapVersion soapVer = WSDLOperation::SOAP11; - - // Get the portType - DataObjectPtr wsPortType = findPortType(portTypeName); - if (!wsPortType) - { - string message = "Unable to find PortType "; - message = message + portTypeName; - 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) - { - string 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")); - - // Find the type of the response message - string outputMessageType = string(operationList[k]->getCString("output/message")); - - DataObjectPtr wsMessageOut = findMessage(outputMessageType); - if (!wsMessageOut) - { - string 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")); - - WSDLOperation& wsdlOp = operationMap[operationKey]; - wsdlOp.setOperationName(operationName); - wsdlOp.setSoapAction(soapAction); - wsdlOp.setEndpoint(""); - wsdlOp.setSoapVersion(soapVer); - wsdlOp.setDocumentStyle(documentStyle); - wsdlOp.setWrappedStyle(wrappedStyle); - wsdlOp.setEncoded(useEncoded); - wsdlOp.setInputType(requestType); - wsdlOp.setOutputType(responseType); - return wsdlOp; - } - } - - string message = "Unable to find Operation "; - message = message + operationName; - message = message + " in the WSDL definition"; - throw SystemConfigurationException(message.c_str()); - - } - - /// - /// Find a service - /// - DataObjectPtr WSDLDefinition::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 WSDLDefinition::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 WSDLDefinition::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 WSDLDefinition::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; - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h deleted file mode 100644 index 1f07294dcb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_wsdldefinition_h -#define tuscany_sca_model_wsdldefinition_h - -#include "tuscany/sca/model/WSDLOperation.h" - -#include "tuscany/sca/export.h" -#include -using std::string; - -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; - -#include -using std::map; - -namespace tuscany -{ - namespace sca - { - namespace model - { - - class WSDLOperation; - - /** - * Holds information about a WSDL definition loaded into the runtime. - */ - class WSDLDefinition - { - public: - /** - * Constructor. - * @param wsdlModel The data object representing the WSDL document - * defining a web service. - */ - SCA_API WSDLDefinition(DataObjectPtr wsdlModel); - - /** - * Destructor. - */ - SCA_API virtual ~WSDLDefinition(); - - - /** - * Returns the target namespace of the WSDL definitions. - * @return The target namespace. - */ - SCA_API 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. - */ - SCA_API const WSDLOperation& findOperation(const string& serviceName, - const string& portName, - const string& operationName); - - /** - * Find an operation in the WSDL definitions. - * @param portTypeName The name of the portType on which this - * operation is defined. - * @param operationName The name of the operation to find. - * @return The operation if found. Exception thrown if not found. - */ - SCA_API const WSDLOperation& findOperation(const string& portTypeName, - 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 data object representation of the WSDL document. - */ - DataObjectPtr wsdlModel; - - typedef map OperationMap; - OperationMap operationMap; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wsdldefinition_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.cpp deleted file mode 100644 index 1b7aed525c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/WSDLInterface.h" - - -namespace tuscany -{ - namespace sca - { - namespace model - { - - const string WSDLInterface::typeQName("http://www.osoa.org/xmlns/sca/1.0#WSDLPortType"); - - // Constructor - WSDLInterface::WSDLInterface( - const string& qname, bool remotable, bool conversational) - : Interface(remotable, conversational) - { - parse(qname); - } - - void WSDLInterface::parse(const string& qname) - { - // PortType is of the form: #wsdl.interface() - string::size_type hash = qname.find("#"); - if (hash != string::npos) - { - // Found a hash - - // Namepace is the part before the # - namespaceURI = qname.substr(0, hash); - - if ( (hash+1) < qname.length()) - { - // Check the next part is wsdl.interface( - int ending = hash+16; - string check = qname.substr(hash+1, 15); - if (check.compare("wsdl.interface(") == 0) - { - // Find the matching ) - int endBracket = qname.find(")",ending); - if (endBracket-1 > ending+1) - { - name = qname.substr(ending, endBracket-ending); - } - else - { - // Nothing between the () - name = ""; - } - } - else - { - // not the correct characters after the #, ignore the rest - name = ""; - } - - } - else - { - // Nothing after the hash - name = ""; - } - } - else - { - // No hash at all - namespaceURI = qname; - name = ""; - } - } - - - WSDLInterface::~WSDLInterface() - { - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.h deleted file mode 100644 index e59453e3f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLInterface.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_wsdlinterface_h -#define tuscany_sca_model_wsdlinterface_h - -#include "tuscany/sca/model/Interface.h" - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace model - { - /** - * Holds information about an interface described using a WSDL - * port type. - */ - class WSDLInterface : public Interface - { - - public: - /** - * Constuctor. - * @param interfaceName Name of the WSDL interface. - */ - WSDLInterface(const string& qname, bool remotable, bool conversational); - - /** - * Destructor. - */ - virtual ~WSDLInterface(); - - /** - * Returns the WSDL namespace - */ - string getNamespaceURI() const { return namespaceURI; } - - /** - * Returns the interface name - */ - string getName() const { return name; } - - /** - * return the QName of the schema type for this interface type - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#interface.cpp") - */ - virtual const string& getInterfaceTypeQName() { return typeQName; }; - - /** - * The QName of the schema type for this interface type. - */ - SCA_API static const string typeQName; - - private: - - /** - * Parse the WSDL qname - */ - void parse(const string& qname); - - /** - * WSDL namespace. - */ - string namespaceURI; - - /** - * Name of the WSDL interface. - */ - string name; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_wsdlinterface_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp deleted file mode 100644 index 264286caf3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/model/WSDLOperation.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" - -namespace tuscany -{ - namespace sca - { - namespace model - { - - - // Constructor - WSDLOperation::WSDLOperation() - { - LOGENTRY(1, "WSDLOperation::constructor"); - LOGEXIT(1, "WSDLOperation::constructor"); - } - - WSDLOperation::~WSDLOperation() - { - } - - - void WSDLOperation::setInputType(const string& inputType) - { - Utils::tokeniseQName(inputType, inputTypeUri, inputTypeName); - } - - void WSDLOperation::setOutputType(const string& outputType) - { - Utils::tokeniseQName(outputType, outputTypeUri, outputTypeName); - } - - } // End namespace model - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h deleted file mode 100644 index 371c67a6da..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_model_wsdloperation_h -#define tuscany_sca_model_wsdloperation_h -#include "tuscany/sca/export.h" -#include -using std::string; - - -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; - -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. - */ - SCA_API WSDLOperation(); - - /** - * Destructor. - */ - SCA_API virtual ~WSDLOperation(); - - /** - * Return the name of the operation for use when serializing an - * outgoing message. - * @return The name of the element in the request message. - */ - SCA_API const string& getOperationName() const {return operationName;} - SCA_API void setOperationName(const string& opName) {operationName = opName;} - - /** - * The soap action string for this operation. - * @return The soap action. - */ - SCA_API const string& getSoapAction() const {return soapAction;} - SCA_API void setSoapAction(const string& soapAct) {soapAction = soapAct;} - - /** - * Return the endpoint address for the target web service. - * @return The endpoint address. - */ - SCA_API const string& getEndpoint() const {return endpoint;} - SCA_API void setEndpoint(const string& ep) {endpoint = ep;} - - enum soapVersion - { - SOAP11, - SOAP12 - }; - - SCA_API void setSoapVersion(soapVersion ver) {soapVer = ver;} - SCA_API soapVersion getSoapVersion() const {return soapVer;} - - SCA_API void setDocumentStyle(bool docStyle) {documentStyle = docStyle;} - SCA_API bool isDocumentStyle() const {return documentStyle;} - - SCA_API void setWrappedStyle(bool wrapStyle) {wrappedStyle = wrapStyle;} - SCA_API bool isWrappedStyle() const {return wrappedStyle;} - - SCA_API void setEncoded(bool enc) {encoded = enc;} - SCA_API bool isEncoded() const {return encoded;} - - - SCA_API void setInputType(const string& inputType); - SCA_API const string& getInputTypeUri() const {return inputTypeUri;} - SCA_API const string& getInputTypeName() const {return inputTypeName;} - SCA_API void setOutputType(const string& outputType); - SCA_API const string& getOutputTypeUri() const {return outputTypeUri;} - SCA_API const string& getOutputTypeName() const {return outputTypeName;} - - private: - /** - * The name of the operation for use when serializing an - * outgoing message. - */ - string operationName; - - /** - * The soap action string for this operation. - */ - string soapAction; - - /** - * The endpoint address of the target web service. - */ - string endpoint; - - bool documentStyle; - bool wrappedStyle; - bool encoded; - soapVersion soapVer; - - string inputTypeUri; - string inputTypeName; - - string outputTypeUri; - string outputTypeName; - - DataObjectPtr inputMessage; - DataObjectPtr outputMessage; - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_model_wsdloperation_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.cpp deleted file mode 100644 index 77caae53a2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.h deleted file mode 100644 index 707ac5da0e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/model/Wire.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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. - */ - SCA_API Wire(const string& source, const string& target); - - /** - * Destructor. - */ - SCA_API virtual ~Wire(); - - /** - * Get the component name defined by the source of the wire. - * @return The component name which is the source of the wire. - */ - SCA_API const string& getSourceComponent() const { return sourceComponent; } - - /** - * Get the reference name defined by the source of the wire. - * @return The reference name which is the source of the wire. - */ - SCA_API const string& getSourceReference() const { return sourceReference; } - - /** - * Get the target uri defined by the target of the wire. - * @return The target uri which is the source of the wire. - */ - SCA_API const 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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp deleted file mode 100644 index 7b0b535523..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/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 < - - -namespace tuscany -{ - namespace sca - { - /** - * Top level exception to represent all the exceptions that may be - * thrown by an SCA runtime implementation. - */ - class SCA_API TuscanyRuntimeException - { - 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. - */ - TuscanyRuntimeException( - const char *name="TuscanyRuntimeException", - severity_level sev=Severe, - const char* msg_text=""); - - TuscanyRuntimeException(const TuscanyRuntimeException& c); - - // Destructor - virtual ~TuscanyRuntimeException(); - - /** - * 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 TuscanyRuntimeException &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 TuscanyRuntimeException#location). - */ - int location_set; - - - }; // End TuscanyRuntimeException class definition - - - /** - * Indicates a problem in the consistency of the SCA model provided to the - * Tuscany runtime. - */ - class SCA_API SystemConfigurationException: public TuscanyRuntimeException - { - public: - SystemConfigurationException(const char* msg) - : TuscanyRuntimeException("SystemConfigurationException", Severe, - msg) - { - } - private: - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_exceptions_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.cpp deleted file mode 100644 index 20066a09e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "tuscany/sca/util/File.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" -#include - -#include -#include -using namespace std; - -#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 SystemConfigurationException("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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.h deleted file mode 100644 index a0aef07cf3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/File.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp deleted file mode 100644 index 109d398e1a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.cpp deleted file mode 100644 index a9ff01b293..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "tuscany/sca/util/Library.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Logging.h" - -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) - int l = name.length(); - string dllName; - if (l>=4 && name.substr(l-4, 4)==".dll") - { - dllName = name; - } - else - { - dllName = name+".dll"; - } - hDLL = LoadLibrary(dllName.c_str()); - if (hDLL == NULL) - { - msg = "Unable to load library: " + dllName; - } -#else - int l = name.length(); - string soName; - if (l>=3 && name.substr(l-3, 3)==".so") - { - soName = name; - } - else - { - int s = name.rfind("/"); - if (s == name.length()) - { - soName = name + ".so"; - } - else - { - s++; - soName = name.substr(0, s) + "lib" + name.substr(s, name.length()-s) + ".so"; - } - } - hDLL = dlopen(soName.c_str(), RTLD_NOW); - if (hDLL == NULL) - { - msg = "Unable to load library: " + soName + ": " + dlerror(); - } -#endif - if (hDLL == NULL) - { - LOGERROR(1, msg.c_str()); - throw SystemConfigurationException(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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.h deleted file mode 100644 index 48b2ad4430..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Library.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_util_library_h -#define tuscany_sca_util_library_h -#include "tuscany/sca/export.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 SCA_API 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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp deleted file mode 100644 index 7613e14c4a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/LogWriter.h" - -namespace tuscany -{ - namespace sca - { - LogWriter::~LogWriter() - { - } - - } // End namespace sca -} // End namespace tuscany - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.h deleted file mode 100644 index 430ce1a785..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/LogWriter.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_util_logwriter_h -#define tuscany_sca_util_logwriter_h - -#include "tuscany/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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.cpp deleted file mode 100644 index cdaa3e562b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 -#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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.h deleted file mode 100644 index b0b09adc50..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logger.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_util_logger_h -#define tuscany_sca_util_logger_h - -#include "tuscany/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. - */ - SCA_API 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. - */ - SCA_API static void logArgs(int level, const char* msg, ...); - - /** - * The currently set logging level - */ - SCA_API 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-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logging.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logging.h deleted file mode 100644 index 047c653229..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Logging.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_util_logging_h -#define tuscany_sca_util_logging_h - -#include "tuscany/sca/util/Logger.h" - -#define LOGENTRY(level, methodName) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::log(level, "Entering: " methodName); - -#define LOGEXIT(level, methodName) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::log(level, "Exiting: " methodName); - -#define LOGINFO(level, message) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::log(level, message); - -#define LOGINFO_1(level, message, arg1) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::logArgs(level, message, arg1); - -#define LOGINFO_2(level, message, arg1, arg2) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::logArgs(level, message, arg1, arg2); - -#define LOGINFO_3(level, message, arg1, arg2, arg3) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::logArgs(level, message, arg1, arg2, arg3); - -#define LOGERROR(level, message) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::log(level, message); - -#define LOGERROR_1(level, message, arg1) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::logArgs(level, message, arg1); - -#define LOGERROR_2(level, message, arg1, arg2) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::logArgs(level, message, arg1, arg2); - -#define LOGERROR_3(level, message, arg1, arg2, arg3) \ -if (tuscany::sca::Logger::loggingLevel >= level) \ -tuscany::sca::Logger::logArgs(level, message, arg1, arg2, arg3); - -#endif // tuscany_sca_util_logging_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Utils.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Utils.cpp deleted file mode 100644 index 447f498eff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/src/tuscany/sca/util/Utils.cpp +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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; - } - } - - void Utils::breakpoint() { - // dummy method used to set breakpoints - } - - ////////////////////////////////////////////////////////////////////////// - // Print a DatObject tree - ////////////////////////////////////////////////////////////////////////// - void Utils::tabs(int inc) - { - for (int ind=0; ind isSet(prop1) != dataObject2->isSet(prop2)) - { - diff.append("Property "); - diff.append(prop1.getName()); - diff.append(" is set on one DataObject but not the other"); - return false; - } - - if (dataObject1->isSet(prop1)) - { - - if (prop1.isMany() != prop2.isMany()) - { - diff.append("Property "); - diff.append(prop1.getName()); - diff.append(" is many on one DataObject but not the other"); - return false; - } - if (propertyType1.isDataType() != propertyType2.isDataType()) - { - diff.append("Property "); - diff.append(prop1.getName()); - diff.append(" is dataType on one DataObject but not the other"); - return false; - } - - ////////////////////////////////////////////////////////////////////// - // For a many-valued property get the list of values - ////////////////////////////////////////////////////////////////////// - if (prop1.isMany()) - { - DataObjectList& dol1 = dataObject1->getList(prop1); - DataObjectList& dol2 = dataObject2->getList(prop2); - if (dol1.size() != dol2.size()) - { - diff.append("Property "); - diff.append(prop1.getName()); - diff.append(" is many but has differing number of elements"); - return false; - } - - for (int j = 0; j getCString(prop1), dataObject2->getCString(prop2)) != 0) - { - diff.append("Differing value for Property "); - diff.append(prop1.getName()); - diff.append(":\n"); - diff.append(dataObject1->getCString(prop1)); - diff.append("\n"); - diff.append(dataObject2->getCString(prop2)); - return false; - } - } - - ////////////////////////////////////////////////////////////////////// - // For a dataobject compare the DOs - ////////////////////////////////////////////////////////////////////// - else - { - if(!compareDataObjects(dataObject1->getDataObject(prop1), dataObject2->getDataObject(prop2), diff)) - { - return false; - } - } - } - return true; - } - - const bool Utils::compareDataObjects(DataObjectPtr dataObject1, DataObjectPtr dataObject2, string& diff) - { - if (!dataObject1 || !dataObject2) - { - diff.append("Cannot compare null DataObjects"); - return false; - } - - const Type& dataObject1Type = dataObject1->getType(); - const Type& dataObject2Type = dataObject2->getType(); - - if( strcmp(dataObject1Type.getURI(), dataObject2Type.getURI()) != 0 || - strcmp(dataObject1Type.getName(), dataObject2Type.getName()) != 0 ) - { - diff.append("DataObject Types differ:\n"); - diff.append(dataObject1Type.getURI()); - diff.append("#"); - diff.append(dataObject1Type.getName()); - diff.append("\n"); - diff.append(dataObject2Type.getURI()); - diff.append("#"); - diff.append(dataObject2Type.getName()); - return false; - } - - ////////////////////////////////////////////////////////////////////////// - // Iterate over all the properties - ////////////////////////////////////////////////////////////////////////// - PropertyList pl1 = dataObject1->getInstanceProperties(); - PropertyList pl2 = dataObject2->getInstanceProperties(); - if (pl1.size() != pl2.size()) - { - diff.append("Differing number of properties"); - return false; - } - - if (pl1.size() != 0) - { - for (int i = 0; i < pl1.size(); i++) - { - if(!compareProperties(dataObject1, pl1[i], dataObject2, pl2[i], diff)) - { - return false; - } - } - } - else - { - if(dataObject1->getType().isOpenType() != dataObject2->getType().isOpenType() && - dataObject1->getType().isDataObjectType() != dataObject2->getType().isDataObjectType()) - { - diff.append("DataObject is open & DO type on one but not the other"); - return false; - } - - // Compare elements under an open DataObject - if(dataObject1->getType().isOpenType() && dataObject1->getType().isDataObjectType()) - { - SequencePtr sequence1 = dataObject1->getSequence(); - SequencePtr sequence2 = dataObject2->getSequence(); - - if (sequence1 != NULL && sequence2 != NULL) - { - if (sequence1->size() != sequence1->size()) - { - diff.append("Open DataObjects have differing number of elements"); - return false; - } - - for (int i = 0; i < sequence1->size(); i++) - { - if (sequence1->isText(i) != sequence2->isText(i)) - { - diff.append("Open DataObjects have differing element types at position "); - diff += ((int) i); - return false; - } - if (sequence1->isText(i)) - { - if( strcmp(sequence1->getCStringValue(i), sequence2->getCStringValue(i)) != 0) - { - diff.append("Differing value for element at position "); - diff += ((int) i); - diff.append(":\n"); - diff.append(sequence1->getCStringValue(i)); - diff.append("\n"); - diff.append(sequence2->getCStringValue(i)); - return false; - } - } - else - { - const Property& p1 = sequence1->getProperty(i); - const Property& p2 = sequence2->getProperty(i); - - if(!compareProperties(dataObject1, p1, dataObject2, p2, diff)) - { - return false; - } - } - } - } - } - } - - return true; - } - - void Utils::printDO(DataObjectPtr dataObject, int increment) - { - int inc=increment; - if (!dataObject) - return; - const Type& dataObjectType = dataObject->getType(); - tabs(inc); - cout << "DataObject type: " << dataObjectType.getURI()<< "#" << dataObjectType.getName() << endl; - inc++; - - ////////////////////////////////////////////////////////////////////////// - // Iterate over all the properties - ////////////////////////////////////////////////////////////////////////// - PropertyList pl = dataObject->getInstanceProperties(); - if (pl.size() != 0) - { - 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" <getType().isOpenType() && dataObject->getType().isDataObjectType()) - { - SequencePtr sequence = dataObject->getSequence(); - if (sequence != NULL) - { - for (int i = 0; i < sequence->size(); i++) - { - if (sequence->isText(i)) - { - tabs(inc); - cout<< "Text Value: " << sequence->getCStringValue(i) <getProperty(i); - - tabs(inc); - cout << "Property: " << p.getName() << endl; - - const Type& propertyType = p.getType(); - - tabs(inc); - cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl; - - if (dataObject->isSet(p)) - { - - ////////////////////////////////////////////////////////////////////// - // For a many-valued property get the list of values - ////////////////////////////////////////////////////////////////////// - if (p.isMany()) - { - inc++; - DataObjectList& dol = dataObject->getList(p); - for (int j = 0; j getCString(p) <getDataObject(p), 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 "tuscany/sca/export.h" - -namespace tuscany -{ - namespace sca - { - /** - * Utility methods to parse strings and provide debugging information. - */ - class SCA_API 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); - - static void breakpoint(); - - static void printDO(commonj::sdo::DataObjectPtr dataObject, int increment=0); - static void printTypes(commonj::sdo::DataFactoryPtr df); - static void printType(const commonj::sdo::Type& type, int increment=0); - - static const bool compareDataObjects(commonj::sdo::DataObjectPtr dataObject1, commonj::sdo::DataObjectPtr dataObject2, string& diff); - static const bool compareProperties(commonj::sdo::DataObjectPtr dataObject1, const commonj::sdo::Property& prop1, commonj::sdo::DataObjectPtr dataObject2, const commonj::sdo::Property& prop2, string& diff); - - private: - static void tabs(int increment=0); - }; - - } // End namespace sca -} // End namespace tuscany -#endif // tuscany_sca_util_utils_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/test/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/test/Makefile.am deleted file mode 100644 index 7aec56841b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/core/test/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/Makefile.am deleted file mode 100644 index d3499698ce..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -if WANT_ALL - CPP_EXTENSION = cpp - PYTHON_EXTENSION = python - RUBY_EXTENSION = ruby - PHP_EXTENSION = php - WSBINDING_EXTENSION = ws - SCABINDING_EXTENSION = sca -endif -if WANT_CPP - CPP_EXTENSION = cpp -endif -if WANT_PYTHON - PYTHON_EXTENSION = python -endif -if WANT_RUBY - RUBY_EXTENSION = ruby -endif -if WANT_PHP - PHP_EXTENSION = php -endif -if WANT_WSBINDING - WSBINDING_EXTENSION = ws -endif -if WANT_SCABINDING - SCABINDING_EXTENSION = sca -endif -SUBDIRS = ${CPP_EXTENSION} ${WSBINDING_EXTENSION} ${SCABINDING_EXTENSION} ${PYTHON_EXTENSION} ${RUBY_EXTENSION} ${PHP_EXTENSION} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/Makefile.am deleted file mode 100644 index 7fac33118a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src - -datadir=$(prefix)/extensions/cpp - -nobase_data_DATA = xsd/*.xsd - -EXTRA_DIST = xsd \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/deploy.bat deleted file mode 100644 index e87f3b4dd6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/deploy.bat +++ /dev/null @@ -1,74 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set cppextdir=%extdir%\cpp -set srcdir=%rootdir%\runtime\extensions\cpp\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %cppextdir% mkdir %cppextdir% -if not exist %cppextdir%\bin mkdir %cppextdir%\bin -if not exist %cppextdir%\lib mkdir %cppextdir%\lib -if not exist %cppextdir%\include mkdir %cppextdir%\include -if not exist %cppextdir%\include\osoa mkdir %cppextdir%\include\osoa -if not exist %cppextdir%\include\osoa\sca mkdir %cppextdir%\include\osoa\sca -if not exist %cppextdir%\include\tuscany mkdir %cppextdir%\include\tuscany -if not exist %cppextdir%\include\tuscany\sca mkdir %cppextdir%\include\tuscany\sca -if not exist %cppextdir%\include\tuscany\sca\cpp mkdir %cppextdir%\include\tuscany\sca\cpp -if not exist %cppextdir%\include\tuscany\sca\cpp\model mkdir %cppextdir%\include\tuscany\sca\cpp\model -if not exist %cppextdir%\xsd mkdir %cppextdir%\xsd - -del %cppextdir%\bin\tuscany_sca_cpp.* -del %cppextdir%\lib\*.lib - -copy %srcdir%\osoa\sca\*.h %cppextdir%\include\osoa\sca -copy %srcdir%\tuscany\sca\cpp\*.h %cppextdir%\include\tuscany\sca\cpp -copy %srcdir%\tuscany\sca\cpp\model\*.h %cppextdir%\include\tuscany\sca\cpp\model - -copy %srcdir%\..\xsd\*.* %cppextdir%\xsd - -copy %inpath%\tuscany_sca_cpp.lib %cppextdir%\lib -copy %inpath%\tuscany_sca_cpp.dll %cppextdir%\bin - -if exist %inpath%\tuscany_sca_cpp.pdb copy %inpath%\tuscany_sca_cpp.pdb %cppextdir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/Makefile.am deleted file mode 100644 index c579dd2598..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/cpp/lib -lib_LTLIBRARIES = libtuscany_sca_cpp.la -includedir=$(prefix)/extensions/cpp/include -nobase_include_HEADERS = \ -osoa/sca/*.h \ -tuscany/sca/cpp/*.h \ -tuscany/sca/cpp/model/*.h - -libtuscany_sca_cpp_la_SOURCES = \ -osoa/sca/ComponentContext.cpp \ -osoa/sca/CompositeContext.cpp \ -tuscany/sca/cpp/ComponentContextImpl.cpp \ -tuscany/sca/cpp/CompositeContextImpl.cpp \ -tuscany/sca/cpp/CPPExtension.cpp \ -tuscany/sca/cpp/CPPImplementationExtension.cpp \ -tuscany/sca/cpp/CPPInterfaceExtension.cpp \ -tuscany/sca/cpp/CPPServiceProxy.cpp \ -tuscany/sca/cpp/CPPServiceWrapper.cpp \ -tuscany/sca/cpp/model/CPPImplementation.cpp \ -tuscany/sca/cpp/model/CPPInterface.cpp \ -tuscany/sca/cpp/model/CPPReferenceBinding.cpp \ -tuscany/sca/cpp/model/CPPServiceBinding.cpp - -libtuscany_sca_cpp_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca - -INCLUDES = -Imodel -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp deleted file mode 100644 index bd0a6c39db..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/ComponentContext.h" -#include "tuscany/sca/util/Logging.h" -#include "osoa/sca/ServiceRuntimeException.h" -#include "tuscany/sca/cpp/ComponentContextImpl.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataFactoryPtr; - -using namespace tuscany::sca; -using namespace tuscany::sca::cpp; - -namespace osoa -{ - namespace sca - { - - // ======================================================= - // getCurrent: create a context from the current component - // ======================================================= - ComponentContext ComponentContext::getCurrent() - { - LOGENTRY(1, "ComponentContext::getCurrent"); - Component* component = tuscany::sca::SCARuntime::getInstance()->getCurrentComponent(); - if (!component) - { - throw ComponentContextException("No current component"); - } - ComponentContext* cci = new ComponentContextImpl(component); - LOGEXIT(1, "ComponentContext::constructor"); - return ComponentContext(cci); - } - - // =========== - // Constructor - // =========== - ComponentContext::ComponentContext(ComponentContext* 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) - { - Component* component = ((ComponentContextImpl*)impl)->getComponent(); - impl = new ComponentContextImpl(component); - } - - // ============================= - // operator= : create a new impl - // ============================= - ComponentContext& ComponentContext::operator=(const ComponentContext& ctx) - { - if (this != &ctx) - { - Component* component = ((ComponentContextImpl*)impl)->getComponent(); - impl = new ComponentContextImpl(component); - } - return *this; - } - - // ========== - // getService - // ========== - void* ComponentContext::getService(const std::string& referenceName) - { - LOGENTRY(1, "ComponentContext::getService"); - void* service = impl->getService(referenceName); - LOGEXIT(1, "ComponentContext::getService"); - return service; - } - - // =========== - // getServices - // =========== - std::list ComponentContext::getServices(const std::string& 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-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h deleted file mode 100644 index fae62062b2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_componentcontext_h -#define osoa_sca_componentcontext_h - -#include "osoa/sca/export.h" -#include "commonj/sdo/SDO.h" -#include -#include -namespace osoa -{ - namespace sca - { - - /** - * An SCA component implementation uses the ComponentContext class to - * retrieve information about the configured SCA component. - */ - class SCA_CPP_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. - */ - virtual void* getService(const std::string& 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. - */ - virtual std::list getServices(const std::string& referenceName); - - /** - * Get the configured properties for the component. - * @return A data object representing all the properties that - * are configured for this component. - */ - virtual 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. - */ - virtual commonj::sdo::DataFactoryPtr getDataFactory(); - - /** - * Destructor - */ - virtual ~ComponentContext(); - - /** - * Constructor - */ - ComponentContext(const ComponentContext&); - - /** - * Copy operator - */ - ComponentContext& operator=(const ComponentContext&); - - /** - * Constructor to create an interface class from the contained - * implementation. - * @param implementation the actual implementation class - */ - ComponentContext(ComponentContext* implementation); - - private: - - /** - * Pointer to the class which provides the actual implementation. - */ - ComponentContext* impl; - - }; - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_componentcontext_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp deleted file mode 100644 index 43e5e6806e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/CompositeContext.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/cpp/CompositeContextImpl.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "commonj/sdo/SDO.h" - -using commonj::sdo::DataFactoryPtr; -using namespace tuscany::sca; -using namespace tuscany::sca::cpp; - - -namespace osoa -{ - namespace sca - { - // =========== - // Constructor - // =========== - CompositeContext::CompositeContext(CompositeContext* implementation) - : impl(implementation) - { - } - - // =================================== - // Copy constructor: create a new impl - // =================================== - CompositeContext::CompositeContext(const CompositeContext& ctx) - { - impl = new CompositeContextImpl( - tuscany::sca::SCARuntime::getInstance()->getDefaultComponent()); - } - - // ============================= - // operator= : create a new impl - // ============================= - CompositeContext& CompositeContext::operator=(const CompositeContext& ctx) - { - if (this != &ctx) - { - impl = new CompositeContextImpl( - tuscany::sca::SCARuntime::getInstance()->getDefaultComponent()); - } - return *this; - } - - // ========== - // Destructor - // ========== - CompositeContext::~CompositeContext() - { - LOGENTRY(1, "CompositeContext::destructor"); - delete impl; - LOGEXIT(1, "CompositeContext::destructor"); - } - - // ==================================================== - // getCurrent: create a context from the current composite - // ==================================================== - CompositeContext CompositeContext::getCurrent() - { - LOGENTRY(1, "CompositeContext::getCurrent"); - CompositeContext* cci = new CompositeContextImpl( - tuscany::sca::SCARuntime::getInstance()->getDefaultComponent()); - LOGEXIT(1, "CompositeContext::getCurrent"); - return CompositeContext(cci); - } - - // ============= - // locateService - // ============= - void* CompositeContext::locateService(const std::string& serviceName) - { - LOGENTRY(1, "CompositeContext::locateService"); - void* sp = impl->locateService(serviceName); - LOGEXIT(1, "CompositeContext::locateService"); - return sp; - } - - // ============= - // getDataFactory - // ============= - DataFactoryPtr CompositeContext::getDataFactory() - { - LOGENTRY(1, "CompositeContext::getDataFactory"); - DataFactoryPtr df = impl->getDataFactory(); - LOGEXIT(1, "CompositeContext::getDataFactory"); - return df; - } - - - } // End namespace sca -} // End namespace osoa diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h deleted file mode 100644 index ac13ed875e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_compositecontext_h -#define osoa_sca_compositecontext_h - -#include "osoa/sca/export.h" -#include "commonj/sdo/SDO.h" - -namespace osoa -{ - namespace sca - { - /** - * An SCA component implementation, or a non-SCA client, uses the - * CompositeContext class to retrieve information about the configured - * SCA composite. - */ - class SCA_CPP_API CompositeContext - { - - public: - /** - * Return a new CompositeContext for the current Component. - */ - static CompositeContext 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. - */ - virtual void* locateService(const std::string& serviceName); - - /** - * 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. - */ - virtual commonj::sdo::DataFactoryPtr getDataFactory(); - - /** - * Destructor. - */ - virtual ~CompositeContext(); - - /** - * Constructor - */ - CompositeContext(const CompositeContext&); - - /** - * Copy operator - */ - CompositeContext& operator=(const CompositeContext&); - - /** - * Constructor to create an interface class from the contained - * implementation. - * @param implementation The actual implementation class. - */ - CompositeContext(CompositeContext* implementation); - - private: - - /** - * Pointer to the class which provides the actual implementation. - */ - CompositeContext* impl; - - }; - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_compositecontext_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ServiceRuntimeException.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ServiceRuntimeException.h deleted file mode 100644 index 7bf8800242..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/ServiceRuntimeException.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_serviceruntimeexception_h -#define osoa_sca_serviceruntimeexception_h - -#include "osoa/sca/export.h" - -#include "tuscany/sca/util/Exceptions.h" -using tuscany::sca::TuscanyRuntimeException; -namespace osoa -{ - namespace sca - { - /** - * Top level exception to represent all the exceptions that may be - * thrown by an SCA runtime implementation. - */ - class SCA_CPP_API ServiceRuntimeException : public TuscanyRuntimeException - { - public: - ServiceRuntimeException( - const char *name="ServiceRuntimeException", - severity_level sev=Severe, - const char* msg_text="") - : TuscanyRuntimeException(name, sev, msg_text) - { - } - }; // End ServiceRuntimeException class definition - - - /** - * A remotable service is currently unavailable. It is possible that a retry - * may resolve this exception. - */ - class SCA_CPP_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 SCA_CPP_API 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 SCA_CPP_API ComponentContextException: public ServiceRuntimeException - { - public: - ComponentContextException(const char* msg) - : ServiceRuntimeException("ComponentContextException", Error, - msg) - { - } - private: - }; // End ComponentContextException class definition - - - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_serviceruntimeexception_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/export.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/export.h deleted file mode 100644 index 8a69913be4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/export.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_export_h -#define osoa_sca_export_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) - -#ifdef TUSCANY_SCA_CPP_EXPORTS -#define SCA_CPP_API __declspec(dllexport) -#else -#define SCA_CPP_API __declspec(dllimport) -#endif - -#else -#include -#include -#include -#define SCA_CPP_API -#endif - -#endif // osoa_sca_export_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/sca.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/sca.h deleted file mode 100644 index 6cce9453d7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/osoa/sca/sca.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_sca_h -#define osoa_sca_sca_h - -#include "osoa/sca/export.h" -#include "osoa/sca/CompositeContext.h" -#include "osoa/sca/ComponentContext.h" -#include "osoa/sca/ServiceRuntimeException.h" - -#endif // osoa_sca_sca_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp deleted file mode 100644 index b418a52425..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/cpp/CPPExtension.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/cpp/CPPImplementationExtension.h" -#include "tuscany/sca/cpp/CPPInterfaceExtension.h" - - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::cpp::CPPExtension::initialize(); - } -} - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - // =================================================================== - // Constructor for the CPPExtension class. - // =================================================================== - CPPExtension::CPPExtension() - { - LOGENTRY(1, "CPPExtension::constructor"); - LOGEXIT(1, "CPPExtension::constructor"); - } - - // =================================================================== - // Destructor for the CPPExtension class. - // =================================================================== - CPPExtension::~CPPExtension() - { - LOGENTRY(1, "CPPExtension::destructor");; - LOGEXIT(1, "CPPExtension::destructor"); - } - - void CPPExtension::initialize() - { - LOGENTRY(1, "CPPExtension::initialize");; - SCARuntime::getInstance()->registerImplementationExtension(new CPPImplementationExtension()); - SCARuntime::getInstance()->registerInterfaceExtension(new CPPInterfaceExtension()); - LOGEXIT(1, "CPPExtension::initialize");; - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h deleted file mode 100644 index d6c872629d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_cppextension_h -#define tuscany_sca_cpp_cppextension_h - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - class CPPExtension - { - public: - /** - * Default constructor - */ - CPPExtension(); - - /** - * Destructor - */ - virtual ~CPPExtension(); - - static void initialize(); - - private: - - }; - - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_cppextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp deleted file mode 100644 index 5ddf4b1113..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/cpp/CPPImplementationExtension.h" -#include "tuscany/sca/cpp/model/CPPImplementation.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - // =================================================================== - // Constructor for the CPPImplementationExtension class. - // =================================================================== - CPPImplementationExtension::CPPImplementationExtension() - { - LOGENTRY(1, "CPPImplementationExtension::constructor"); - LOGEXIT(1, "CPPImplementationExtension::constructor"); - } - - // =================================================================== - // Destructor for the CPPImplementationExtension class. - // =================================================================== - CPPImplementationExtension::~CPPImplementationExtension() - { - LOGENTRY(1, "CPPImplementationExtension::destructor");; - LOGEXIT(1, "CPPImplementationExtension::destructor"); - } - - const string CPPImplementationExtension::extensionName("cpp"); - const string CPPImplementationExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#CPPImplementation"); - - // =================================================================== - // loadModelElement - load the info from implementation.cpp - // =================================================================== - ComponentType* CPPImplementationExtension::getImplementation(Composite *composite, DataObjectPtr scdlImplementation) - { - string implType = scdlImplementation->getType().getName(); - if (implType == "CPPImplementation") - { - string library = scdlImplementation->getCString("library"); - string header = scdlImplementation->getCString("header"); - string className = scdlImplementation->getCString("class"); - string scopeName = scdlImplementation->getCString("scope"); - - CPPImplementation::Scope scope; - if (scopeName == "composite") - { - scope = CPPImplementation::COMPOSITE; - } - else - { - scope = CPPImplementation::STATELESS; - } - - string headerPath; - string headerStub; - - // Separate any path element - Utils::rTokeniseString("/", header, headerPath, headerStub); - if (headerPath != "") - { - headerPath += "/"; - } - - // Determine the header stub name - string tmp; - Utils::rTokeniseString(".h", headerStub, headerStub, tmp); - - CPPImplementation* cppImpl = new CPPImplementation( - composite, library, header, headerPath, headerStub, className, scope); - - return cppImpl; - } - else - { - return NULL; - } - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h deleted file mode 100644 index 8548a208e9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_cppimplementationextension_h -#define tuscany_sca_cpp_cppimplementationextension_h - -#include "tuscany/sca/extension/ImplementationExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - class CPPImplementationExtension : public ImplementationExtension - { - public: - /** - * Default constructor - */ - CPPImplementationExtension(); - - /** - * Destructor - */ - virtual ~CPPImplementationExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema type for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#implementation.cpp") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ComponentType* getImplementation(Composite* composite, DataObjectPtr scdlImplementation); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_cppimplementationextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp deleted file mode 100644 index d470949746..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/cpp/CPPInterfaceExtension.h" -#include "tuscany/sca/cpp/model/CPPInterface.h" -#include "tuscany/sca/util/Logging.h" - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - // =================================================================== - // Constructor for the CPPInterfaceExtension class. - // =================================================================== - CPPInterfaceExtension::CPPInterfaceExtension() - { - LOGENTRY(1, "CPPInterfaceExtension::constructor"); - LOGEXIT(1, "CPPInterfaceExtension::constructor"); - } - - // =================================================================== - // Destructor for the CPPInterfaceExtension class. - // =================================================================== - CPPInterfaceExtension::~CPPInterfaceExtension() - { - LOGENTRY(1, "CPPInterfaceExtension::destructor");; - LOGEXIT(1, "CPPInterfaceExtension::destructor"); - } - - const string CPPInterfaceExtension::extensionName("cpp"); - const string CPPInterfaceExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#CPPInterface"); - - // =================================================================== - // loadModelElement - load the info from interface.cpp - // =================================================================== - tuscany::sca::model::Interface* CPPInterfaceExtension::getInterface(Composite* composite, DataObjectPtr scdlInterface) - { - // Determine the type - string ifType = scdlInterface->getType().getName(); - if (ifType == "CPPInterface") - { - string header = scdlInterface->getCString("header"); - string className = scdlInterface->getCString("class"); - bool remotable = scdlInterface->getBoolean("remotable"); - - return new CPPInterface(header, className, remotable, false); - } - return 0; - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h deleted file mode 100644 index 62c3b9854b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_cppinterfaceextension_h -#define tuscany_sca_cpp_cppinterfaceextension_h - -#include "tuscany/sca/extension/InterfaceExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - class CPPInterfaceExtension : public InterfaceExtension - { - public: - /** - * Default constructor - */ - CPPInterfaceExtension(); - - /** - * Destructor - */ - virtual ~CPPInterfaceExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema type for this interface extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#interface.cpp") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual tuscany::sca::model::Interface* getInterface(Composite* composite, DataObjectPtr scdlInterface); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_cppinterfaceextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp deleted file mode 100644 index 56511fc9e6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/cpp/CPPServiceProxy.h" -#include "tuscany/sca/util/Logging.h" -#include "osoa/sca/ServiceRuntimeException.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/cpp/model/CPPImplementation.h" -#include "tuscany/sca/cpp/model/CPPReferenceBinding.h" - -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - // ============================ - // Constructor: Create a proxy - // ============================ - CPPServiceProxy::CPPServiceProxy(Reference* reference) - : ServiceProxy(reference) - { - LOGENTRY(1,"CPPServiceProxy::constructor"); - - // ---------------------- - // Get the component - // ---------------------- - Component* component = reference->getComponent(); - string name = reference->getType()->getName(); - - // Get the service wrapper - CPPReferenceBinding* referenceBinding = (CPPReferenceBinding*)reference->getBinding(); - - ServiceWrapper* serviceWrapper = referenceBinding->getTargetServiceBinding()->getServiceWrapper(); - - createProxy(component, name, serviceWrapper); - - LOGEXIT(1,"CPPServiceProxy::constructor"); - } - - // ============================ - // Constructor: Create a proxy - // ============================ - CPPServiceProxy::CPPServiceProxy(Service* service) - : ServiceProxy(0) - { - LOGENTRY(1,"CPPServiceProxy::constructor"); - - // ---------------------- - // Get the component - // ---------------------- - Component* component = service->getComponent(); - string name = service->getType()->getName(); - - // Get the service wrapper - ServiceWrapper* serviceWrapper = service->getBinding()->getServiceWrapper(); - - createProxy(component, name, serviceWrapper); - - LOGEXIT(1,"CPPServiceProxy::constructor"); - } - - void CPPServiceProxy::createProxy(Component* component, const string& name, ServiceWrapper* serviceWrapper) - { - LOGENTRY(1,"CPPServiceProxy::createProxy"); - - ComponentType* componentType = component->getType(); - if (!componentType) - { - string msg = "Component " + component->getName() + " has no implementation defined"; - throw ServiceNotFoundException(msg.c_str()); - } - - // If we got here we have a CPP implementation - CPPImplementation* impl = (CPPImplementation *)componentType; - - // ---------------------------------------------------- - // Get implementation dll name and service factory name - // ---------------------------------------------------- - string library = impl->getLibrary(); - string headerStub = impl->getHeaderStub(); - - string fullLibraryName = component->getComposite()->getRoot() + "/" + library; - string proxyFactoryName = headerStub + "_" + name + "_Proxy_Factory"; - string proxyDestructorName = headerStub + "_" + name + "_Proxy_Destructor"; - typedef void* (* PROXYFACTORY) (ServiceWrapper*); - - // ------------ - // Load the dll - // ------------ - proxyLibrary = Library(fullLibraryName); - - // ------------------------- - // Locate the factory method - // ------------------------- - PROXYFACTORY proxyFactory = (PROXYFACTORY)proxyLibrary.getSymbol(proxyFactoryName); - if (!proxyFactory) - { - LOGERROR_2(1, "CPPServiceProxy::createProxy: Unable to locate %s in library %s", - proxyFactoryName.c_str(), fullLibraryName.c_str()); - string msg = "Unable to locate " + proxyFactoryName + " in library " + fullLibraryName; - throw ServiceNotFoundException(msg.c_str()); - } - - // ----------------------------------- - // Now create an instance of the proxy - // ----------------------------------- - void* proxy = proxyFactory(serviceWrapper); - if (!proxy) - { - LOGERROR_2(1, "CPPServiceProxy::createProxy: Factory method %s in library %s returned null", - proxyFactoryName.c_str(), fullLibraryName.c_str()); - string msg = "Factory method " + proxyFactoryName + " in library " + fullLibraryName + " returned null"; - throw ServiceNotFoundException(msg.c_str()); - } - else - { - proxies.push_back(proxy); - } - - // ------------------------- - // Get the destructor method - // ------------------------- - destructor = (PROXYDESTRUCTOR)proxyLibrary.getSymbol(proxyDestructorName); - - LOGEXIT(1,"CPPServiceProxy::createProxy"); - } - - // ========== - // Destructor - // ========== - CPPServiceProxy::~CPPServiceProxy() - { - LOGENTRY(1,"CPPServiceProxy::destructor"); - - // Delete the proxies - if (destructor != NULL && proxies.size() != 0) - { - destructor(*proxies.begin()); - } - LOGEXIT(1,"CPPServiceProxy::destructor"); - } - - CPPServiceProxy::PROXIES CPPServiceProxy::getProxies() - { - return proxies; - } - - void* CPPServiceProxy::getProxy() - { - if (proxies.size() != 0) - { - return *proxies.begin(); - } - else - { - return NULL; - } - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h deleted file mode 100644 index 77a20d08b8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_cppserviceproxy_h -#define tuscany_sca_cpp_cppserviceproxy_h - -#include "osoa/sca/export.h" -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/util/Library.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/Service.h" - -using namespace tuscany::sca::model; - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - /** - * 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 CPPServiceProxy : public ServiceProxy - { - public: - /** - * Create a new service proxy for a reference. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The reference on the source component. - * @param target The wrapper of the service which is wired to this reference. - */ - CPPServiceProxy(Reference* reference); - - /** - * Create a new service proxy for a service. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The service on the target component. - * @param target The wrapper of the target service. - */ - CPPServiceProxy(Service* service); - - /** - * Destructor. - */ - virtual ~CPPServiceProxy(); - - /** - * Return an instance of the proxy created for this particular component and reference. - * @return The proxy. - */ - virtual void* getProxy(); - - /** - * Return the proxies created for this particular component and reference. - * @return The proxies. - */ - typedef std::list PROXIES; - virtual PROXIES getProxies(); - - private: - - /** - * Create the proxy - */ - void createProxy(Component* component, const string& name, ServiceWrapper* serviceWrapper); - - /** - * Holds the instances of the code generated proxies. - */ - PROXIES proxies; - - /** - * A function pointer to the destructor of the proxy. - */ - typedef void (* PROXYDESTRUCTOR) (void*); - PROXYDESTRUCTOR destructor; - - /** - * The library which contains the code for the proxy. - */ - Library proxyLibrary; - - }; - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_cppserviceproxy_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp deleted file mode 100644 index 3d7df2d44d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/cpp/CPPServiceWrapper.h" - -#include "osoa/sca/ServiceRuntimeException.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Library.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/cpp/model/CPPImplementation.h" -#include "tuscany/sca/model/Interface.h" - -using namespace osoa::sca; - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - // =================== - // Static data members - // =================== - void* CPPServiceWrapper::staticImpl = 0; - - // =========== - // Constructor - // =========== - CPPServiceWrapper::CPPServiceWrapper(Service* service) - : ServiceWrapper(service) - { - LOGENTRY(1,"CPPServiceWrapper::constructor"); - - component = service->getComponent(); - interf = service->getType()->getInterface(); - implementation = (CPPImplementation*)component->getType(); - - LOGEXIT(1,"CPPServiceWrapper::constructor"); - - } - - // ========== - // Destructor - // ========== - CPPServiceWrapper::~CPPServiceWrapper() - { - LOGENTRY(1,"CPPServiceWrapper::destructor"); - LOGEXIT(1,"CPPServiceWrapper::destructor"); - } - - - // ====================================================================== - // getImplementation: get an implementation for this scope - // ====================================================================== - void* CPPServiceWrapper::getImplementation() - { - if (implementation->getScope() == CPPImplementation::COMPOSITE) - { - if (!staticImpl) - { - staticImpl = newImplementation(); - } - return staticImpl; - } - else // (scope == CPPInterface::STATELESS) - { - return newImplementation(); - } - } - - // ====================================================================== - // releaseImplementation: release the implementation for this scope - // ====================================================================== - void CPPServiceWrapper::releaseImplementation() - { - if (implementation->getScope() == CPPImplementation::STATELESS) - { - deleteImplementation(); - } - } - - // ====================================================================== - // invoke: wrapper call to service with setting the component context - // ====================================================================== - void CPPServiceWrapper::invoke(Operation& operation) - { - LOGENTRY(1,"CPPServiceWrapper::invoke"); - - SCARuntime* runtime = SCARuntime::getInstance(); - runtime->setCurrentComponent(component); - - try - { - invokeService(operation); - } - catch (...) - { - runtime->unsetCurrentComponent(); - throw; - } - runtime->unsetCurrentComponent(); - LOGEXIT(1,"CPPServiceWrapper::invoke"); - - } - - void CPPServiceWrapper::setLibrary(Library* lib) - { - wrapperLibrary = lib; - } - - // ====================================================================== - // getServiceWrapper: create a wrapper for the target ComponentService - // ====================================================================== - CPPServiceWrapper* CPPServiceWrapper::getServiceWrapper(Service* service) - { - CPPServiceWrapper* serviceWrapper = 0; - - // ----------------------------------------------- - // Get the implementation for the target component - // ----------------------------------------------- - Component* component = service->getComponent(); - CPPImplementation* impl = (CPPImplementation*)component->getType(); - if (!impl) - { - string msg = "Component " + component->getName() + " has no implementation defined"; - throw ServiceNotFoundException(msg.c_str()); - } - - // ---------------------------------------------------- - // Get implementation dll name and wrapper factory name - // ---------------------------------------------------- - string libraryName = impl->getLibrary(); - string wrapperFactoryName = impl->getHeaderStub() - + "_" + service->getType()->getName() + "_Wrapper_Factory"; - - // ------------ - // Load the dll - // ------------ - string fullLibraryName = component->getComposite()->getRoot() + "/" + libraryName; - typedef CPPServiceWrapper* (* WRAPPERFACTORY) (Service*); - Library* wrapperLib = new Library(fullLibraryName); - - // ------------------------- - // Locate the factory method - // ------------------------- - WRAPPERFACTORY wrapperFactory = (WRAPPERFACTORY)wrapperLib->getSymbol(wrapperFactoryName); - if (!wrapperFactory) - { - LOGERROR_2(1, "CPPServiceWrapper::getServiceWrapper: Unable to locate %s in library %s", - wrapperFactoryName.c_str(), fullLibraryName.c_str()); - string msg = "Unable to locate " + wrapperFactoryName + " in library " + fullLibraryName; - throw ServiceNotFoundException(msg.c_str()); - } - - // ------------------------------------- - // Now create an instance of the wrapper - // ------------------------------------- - serviceWrapper = wrapperFactory(service); - if (!serviceWrapper) - { - LOGERROR_2(1, "CPPServiceWrapper::getServiceWrapper: Factory method %s in library %s returned null", - wrapperFactoryName.c_str(), fullLibraryName.c_str()); - string msg = "Factory method " + wrapperFactoryName + " in library " + fullLibraryName + " returned null"; - throw ServiceNotFoundException(msg.c_str()); - } - serviceWrapper->setLibrary(wrapperLib); - - return serviceWrapper; - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h deleted file mode 100644 index eeeb9cdb82..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_cppservicewrapper_h -#define tuscany_sca_cpp_cppservicewrapper_h - -#include "osoa/sca/export.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/cpp/model/CPPImplementation.h" -#include "tuscany/sca/util/Library.h" - -using namespace tuscany::sca::model; - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - /** - * 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 SCA_CPP_API CPPServiceWrapper : public ServiceWrapper - { - public: - /** - * Factory method to create a new CPPServiceWrapper 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 CPPServiceWrapper* getServiceWrapper(Service* service); - - /** - * Constructor. - * @param target The component service to which this wrapper refers. - */ - CPPServiceWrapper(Service* service); - - /** - * Destructor. - */ - virtual ~CPPServiceWrapper(); - - /** - * 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. - */ - virtual void invoke(Operation& operation); - - /** - * Return the loaded shared library for the target component. - */ - Library* getLibrary() const { return wrapperLibrary; } - - protected: - - /** - * Delegated method to invoke the correct method on the target component. - * Implemented by the subtype. - */ - 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. - */ - virtual void* newImplementation() = 0; - - /** - * Delegated method to delete the current instance of the component - * implementation. - * Implemented by the subtype. - */ - virtual void deleteImplementation() = 0; - - /** - * Return the current instance of the component implementation. - * @return A pointer to an instance of the component implementation class. - */ - virtual void* getImplementation(); - - /** - * Indicates that the current instance of the component implementation - * has been finished with. - * Will call CPPServiceWrapper#deleteImplementation if the - * implementation is stateless (so that a new instance is returned - * for each call). - */ - virtual void releaseImplementation(); - - private: - /** - * Holds an implementation instance if the scope is set to composite. - */ - static void* staticImpl; - - /** - * The component to which this wrapper refers. - */ - Component* component; - - /** - * A pointer to the interface which the service exposes. - */ - Interface* interf; - - /** - * The component implementation - */ - CPPImplementation* implementation; - - /** - * 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 cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_cppservicewrapper_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp deleted file mode 100644 index 76d6bbc5f6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "osoa/sca/ServiceRuntimeException.h" -#include "tuscany/sca/cpp/ComponentContextImpl.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ReferenceBinding.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/ServiceBinding.h" - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - // =========== - // Constructor - // =========== - ComponentContextImpl::ComponentContextImpl(Component* comp) - : ComponentContext(0), component(comp) - { - LOGENTRY(1, "ComponentContextImpl::constructor"); - LOGEXIT(1, "ComponentContextImpl::constructor"); - } - - // ========== - // Destructor - // ========== - ComponentContextImpl::~ComponentContextImpl() - { - } - - - // ========================================================================== - // getServices: return a list of Proxies for services wired to this reference - // ========================================================================== - std::list ComponentContextImpl::getServices(const std::string& referenceName) - { - LOGENTRY(1, "ComponentContextImpl::getServices"); - - // -------------------------------------------------------------- - // locate reference in the current component and determine target - // -------------------------------------------------------------- - Reference* reference = component->findReference(referenceName); - if (!reference) - { - string message = "Reference not defined: "; - message = message + referenceName; - throw ServiceNotFoundException(message.c_str()); - } - - // Get a service proxy from the binding configured on the reference - CPPServiceProxy* serviceProxy = (CPPServiceProxy*)reference->getBinding()->getServiceProxy(); - if (serviceProxy == NULL) - { - string message = "Reference "; - message = message + referenceName + " not wired"; - throw ServiceNotFoundException(message.c_str()); - } - - return serviceProxy->getProxies(); - - } // End getServices() - - - // =================================================================== - // getService: return a Proxy for the services wired to this reference - // =================================================================== - void* ComponentContextImpl::getService(const std::string& referenceName) - { - LOGENTRY(1, "ComponentContextImpl::getService"); - - // -------------------------------------------------------------- - // locate reference in the current component and determine target - // -------------------------------------------------------------- - Reference* reference = component->findReference(referenceName); - if (!reference) - { - string message = "Reference not defined: "; - message = message + referenceName; - throw ServiceNotFoundException(message.c_str()); - } - - // -------------------- - // Validate the request - // -------------------- - switch (reference->getType()->getMultiplicity()) - { - case ReferenceType::ZERO_MANY: - case ReferenceType::ONE_MANY: - { - string message = "getService() called for reference with multiplicity >1 :"; - message = message + referenceName; - throw ServiceNotFoundException(message.c_str()); - } - default: - { - } - } // end switch - - // Get a service proxy from the binding configured on the reference - CPPServiceProxy* serviceProxy = (CPPServiceProxy*)reference->getBinding()->getServiceProxy(); - if (serviceProxy == NULL) - { - string message = "Reference "; - message = message + referenceName + " not wired"; - throw ServiceNotFoundException(message.c_str()); - } - - void* service = serviceProxy->getProxy(); - return service; - - } // End getService() - - // ============================================== - // 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 composite in which - // this component resides - // ============================================== - commonj::sdo::DataFactoryPtr ComponentContextImpl::getDataFactory() - { - LOGENTRY(1, "ComponentContextImpl::getProperties"); - commonj::sdo::DataFactoryPtr dataFactory = component->getComposite()->getDataFactory(); - - LOGEXIT(1, "ComponentContextImpl::getDataFactory"); - return dataFactory; - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h deleted file mode 100644 index 6d9b76feeb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_componentcontextimpl_h -#define tuscany_sca_cpp_componentcontextimpl_h - -#include -using std::vector; - -#include "osoa/sca/ComponentContext.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/cpp/CPPServiceProxy.h" - -using namespace osoa::sca; - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - /** - * Contains the actual implementation of a ComponentContext interface. - */ - class ComponentContextImpl : public ComponentContext - { - - public: - /** - * Constructor that takes a Component which represents the runtime - * model for this context. - */ - ComponentContextImpl(Component* component); - - /** - * Default constructor. - */ - virtual ~ComponentContextImpl(); - - /** - * See ComponentContext. - */ - virtual void* getService(const std::string& referenceName); - - /** - * See ComponentContext. - */ - virtual std::list getServices(const std::string& referenceName); - - /** - * See ComponentContext. - */ - virtual DataObjectPtr getProperties(); - - /** - * See ComponentContext. - */ - virtual commonj::sdo::DataFactoryPtr getDataFactory(); - - /** - * Returns the contained Component. - * @return The Component to which this context refers. - */ - virtual 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( - Reference* serviceReference, - Service* 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(Service* target); - - }; - - } // End namespaca cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_componentcontextimpl_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp deleted file mode 100644 index 009e0ed765..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "osoa/sca/ServiceRuntimeException.h" -#include "tuscany/sca/cpp/CompositeContextImpl.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/cpp/CPPServiceProxy.h" -#include "commonj/sdo/SDO.h" - -using namespace tuscany::sca::model; -using namespace osoa::sca; -using namespace commonj::sdo; - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - // =========== - // Constructor - // =========== - CompositeContextImpl::CompositeContextImpl(Component* component) - : CompositeContext(0), component(component), composite((Composite*)component->getType()) - { - } - - // ========== - // Destructor - // ========== - CompositeContextImpl::~CompositeContextImpl() - { - } - - // =========================================================================== - // locateService: return a proxy connected to a wrapper for the target service - // =========================================================================== - void* CompositeContextImpl::locateService(const std::string& serviceName) - { - LOGENTRY(1, "CompositeContextImpl::locateService"); - - // ---------------------------- - // Locate the component service - // ---------------------------- - Service* service = composite->findComponentService(serviceName); - string msg; - if (!service) - { - msg = "Service not found: "; - msg = msg + serviceName; - throw ServiceNotFoundException(msg.c_str()); - } - - // ---------------------------- - // Get a Proxy for this service - // ---------------------------- - - // The locate service API is used from CPP clients so we are using - // our default service proxy here - CPPServiceProxy* serviceProxy = new CPPServiceProxy(service); - LOGEXIT(1, "CompositeContextImpl::locateService"); - return serviceProxy->getProxy(); - - } - - // ============================================== - // getDataFactory: return the data factory for the current composite - // ============================================== - DataFactoryPtr CompositeContextImpl::getDataFactory() - { - LOGENTRY(1, "CompositeContextImpl::getDataFactory"); - DataFactoryPtr dataFactory = composite->getDataFactory(); - - LOGEXIT(1, "CompositeContextImpl::getDataFactory"); - return dataFactory; - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h deleted file mode 100644 index c11af16848..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_compositecontextimpl_h -#define tuscany_sca_cpp_compositecontextimpl_h - -#include -using std::vector; - -#include "osoa/sca/CompositeContext.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/cpp/CPPServiceProxy.h" - -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - - namespace cpp - { - - /** - * Contains the actual implementation of a CompositeContext interface. - */ - class CompositeContextImpl : public CompositeContext - { - - public: - /** - * Constructor that takes a Composite which represents the runtime - * model for this context. - */ - CompositeContextImpl(Component* component); - - /** - * See CompositeContext#locateService. - */ - virtual void* locateService(const std::string& serviceName); - - /** - * See CompositeContext. - */ - virtual commonj::sdo::DataFactoryPtr getDataFactory(); - - /** - * Destructor. - */ - virtual ~CompositeContextImpl(); - - private: - CompositeContextImpl(const CompositeContextImpl&); - CompositeContextImpl& operator=(const CompositeContextImpl&); - - /** - * Pointer to the runtime model Composite object to which this - * context refers. - */ - Composite* composite; - - /** - * Pointer to the runtime model Component object to which this - * context refers. - */ - Component* component; - - }; - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_compositecontextimpl_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp deleted file mode 100644 index 4fb7c7cfd5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/cpp/model/CPPImplementation.h" -#include "tuscany/sca/cpp/model/CPPServiceBinding.h" -#include "tuscany/sca/cpp/model/CPPReferenceBinding.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/util/Utils.h" - -namespace tuscany -{ - namespace sca - { - - namespace cpp - { - - // Constructor - CPPImplementation::CPPImplementation(Composite* composite, const string& library, const string& header, - const string&headerPath, const string& headerStub, const string& className, Scope scope) - : ComponentType(composite, headerPath + headerStub), - library(library), header(header), headerPath(headerPath), - headerStub(headerStub), className(className), scope(scope) - { - } - - CPPImplementation::~CPPImplementation() - { - } - - void CPPImplementation::initializeComponent(Component* component) - { - ComponentType::initializeComponent(component); - - // Create CPP bindings for all the services - const Component::SERVICE_MAP& services = component->getServices(); - Component::SERVICE_MAP::const_iterator iter = services.begin(); - for (int i=0; i< services.size(); i++) - { - Service *service = iter->second; - CPPServiceBinding* binding = new CPPServiceBinding(service); - service->setBinding(binding); - iter++; - } - - // Create CPP bindings for all the references - const Component::REFERENCE_MAP& references = component->getReferences(); - Component::REFERENCE_MAP::const_iterator refiter = references.begin(); - for (int ri=0; ri< references.size(); ri++) - { - Reference *reference = refiter->second; - CPPReferenceBinding* binding = new CPPReferenceBinding(reference); - reference->setBinding(binding); - refiter++; - } - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h deleted file mode 100644 index 20636df884..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_model_cppimplementation_h -#define tuscany_sca_cpp_model_cppimplementation_h -#include "tuscany/sca/model/ComponentType.h" - -#include -using std::map; -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - /** - * Holds information about an SCA implementation written in C++ - */ - class CPPImplementation : public ComponentType - { - - public: - /** - * Scope of the component implementation. - */ - enum Scope - { - COMPOSITE, - STATELESS - }; - - /** - * 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(Composite* composite, const string& library, const string& header, const string&headerPath, - const string& headerStub, const string& className, Scope scope); - - /** - * Destructor - */ - virtual ~CPPImplementation(); - - /** - * Initialize a component of this type. - * @param component The component to initialize. - */ - virtual void initializeComponent(Component* component); - - /** - * Returns the name of the shared library. - * @return The name of the shared library. - */ - const string& getLibrary() const { return library; } - - /** - * Get the name of the header file. - * @return Name of the header file. - */ - const string& getHeader() const { return header; } - - /** - * Get the header file name without the extension. - * @return The name of the header file without any extension. - */ - const string& getHeaderStub() const { return headerStub; } - - /** - * Get the header path. - * @return The pathe element of the header. - */ - const string& getHeaderPath() const { return headerPath; } - - /** - * Get the name of the class. - * @return The class name if specified. - */ - const string& getClass() const { return className; } - - /** - * Returns the implementation scope - */ - Scope getScope() { return scope; } - - private: - - /** - * Name of the shared library. - */ - string library; - - /** - * 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; - - /** - * Scope of the implementation - */ - Scope scope; - }; - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_model_cppimplementation_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp deleted file mode 100644 index a728880e32..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/cpp/model/CPPInterface.h" - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - const string CPPInterface::typeQName("http://www.osoa.org/xmlns/sca/1.0#CPPInterface"); - - // Constructor - CPPInterface::CPPInterface( - const string& header, - const string& className, - bool remotable, - bool conversational) - : Interface(remotable, conversational), header(header), className(className) - { - string::size_type dot = header.rfind(".h"); // this will also find .hpp - if (dot != string::npos) - { - headerStub = header.substr(0, dot); - } - else - { - headerStub = header; - } - - } - - CPPInterface::~CPPInterface() - { - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h deleted file mode 100644 index d50d2f9485..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_model_cppinterface_h -#define tuscany_sca_cpp_model_cppinterface_h - -#include "tuscany/sca/model/Interface.h" - -#include -using std::map; -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - /** - * 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 composite). - * @param remotable True if the interface is remotable. - */ - CPPInterface( - const string& header, - const string& className, - bool remotable, - bool conversational); - - /** - * Destructor. - */ - virtual ~CPPInterface(); - - /** - * 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; } - - /** - * return the QName of the schema type for this interface type - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#interface.cpp") - */ - virtual const string& getInterfaceTypeQName() { return typeQName; }; - - 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; - - /** - * The QName of the schema type for this interface type. - */ - static const string typeQName; - }; - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_model_cppinterface_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp deleted file mode 100644 index 3c87560445..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/cpp/model/CPPReferenceBinding.h" -#include "tuscany/sca/cpp/CPPServiceProxy.h" - - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - // Constructor - CPPReferenceBinding::CPPReferenceBinding(Reference* reference) - : ReferenceBinding(reference, ""), serviceProxy(NULL), targetServiceBinding(NULL) - { - } - - // Destructor - CPPReferenceBinding::~CPPReferenceBinding() - { - } - - ServiceProxy* CPPReferenceBinding::getServiceProxy() - { - return serviceProxy; - } - - void CPPReferenceBinding::configure(ServiceBinding* binding) - { - targetServiceBinding = binding; - - serviceProxy = new CPPServiceProxy(getReference()); - } - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h deleted file mode 100644 index 81ba88940d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_model_cppreferencebinding_h -#define tuscany_sca_cpp_model_cppreferencebinding_h - -#include "tuscany/sca/model/ReferenceBinding.h" - - -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - /** - * Information about a CPP service binding for service or a reference. - */ - class CPPReferenceBinding : public ReferenceBinding - { - 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") - */ - CPPReferenceBinding(Reference* reference); - - /** - * Destructor. - */ - virtual ~CPPReferenceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#CPPImplementationBinding"; }; - - /** - * Create a proxy representing the reference to the - * client component. - */ - virtual ServiceProxy* getServiceProxy(); - - /** - * Configure this binding from a service binding. - */ - virtual void configure(ServiceBinding* serviceBinding); - - /** - * Returns the target service binding. - */ - ServiceBinding* getTargetServiceBinding() const { return targetServiceBinding; }; - - private: - - /** - * The proxy representing the reference to the client - * component. - */ - ServiceProxy* serviceProxy; - - /** - * The service binding of the target - */ - ServiceBinding* targetServiceBinding; - }; - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_model_cppreferencebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp deleted file mode 100644 index 641d9452f8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/cpp/model/CPPServiceBinding.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - - // Constructor - CPPServiceBinding::CPPServiceBinding(Service* service) - : ServiceBinding(service, "") - { - serviceWrapper = CPPServiceWrapper::getServiceWrapper(service); - } - - // Destructor - CPPServiceBinding::~CPPServiceBinding() - { - } - - ServiceWrapper* CPPServiceBinding::getServiceWrapper() - { - return (ServiceWrapper*)serviceWrapper; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h deleted file mode 100644 index f7db3065b3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_cpp_model_cppservicebinding_h -#define tuscany_sca_cpp_model_cppservicebinding_h - -#include "tuscany/sca/model/ServiceBinding.h" -using namespace tuscany::sca::model; -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace cpp - { - /** - * Information about a CPP service binding for service or a reference. - */ - class CPPServiceBinding : public ServiceBinding - { - 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") - */ - CPPServiceBinding(Service* service); - - /** - * Destructor. - */ - virtual ~CPPServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#CPPImplementationBinding"; }; - - /** - * Create a wrapper for the service configured by this - * binding. - */ - virtual ServiceWrapper* getServiceWrapper(); - - private: - - /** - * The wrapper for the service configured by this binding. - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace cpp - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_cpp_model_cppservicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-implementation-cpp.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-implementation-cpp.xsd deleted file mode 100644 index 7292f747b8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-implementation-cpp.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-interface-cpp.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-interface-cpp.xsd deleted file mode 100644 index 585bac0dc4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/cpp/xsd/sca-interface-cpp.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/Makefile.am deleted file mode 100644 index b8c2a91db2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src - -datadir=$(prefix)/extensions/php - -nobase_data_DATA = xsd/*.xsd - -EXTRA_DIST = xsd \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/Makefile.am deleted file mode 100644 index a8c2762484..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/php/lib -lib_LTLIBRARIES = libtuscany_sca_php.la - -noinst_HEADERS = \ -tuscany/sca/php/*.h \ -tuscany/sca/php/model/*.h - -libtuscany_sca_php_la_SOURCES = \ -tuscany/sca/php/PHPExtension.cpp \ -tuscany/sca/php/PHPImplementationExtension.cpp \ -tuscany/sca/php/PHPServiceWrapper.cpp \ -tuscany/sca/php/model/PHPImplementation.cpp \ -tuscany/sca/php/model/PHPServiceBinding.cpp - -libtuscany_sca_php_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L${PHP_LIB} -lphp5 - -INCLUDES = -Imodel -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${PHP_INCLUDE} \ - -I${PHP_INCLUDE}/main \ - -I${PHP_INCLUDE}/Zend \ - -I${PHP_INCLUDE}/TSRM \ - -I${PHP_INCLUDE}/sapi/embed - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/ServiceRuntimeException.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/ServiceRuntimeException.h deleted file mode 100644 index d31679b994..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/ServiceRuntimeException.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_serviceruntimeexception_h -#define osoa_sca_serviceruntimeexception_h - -#include "osoa/sca/export.h" - -#include "tuscany/sca/util/Exceptions.h" -using tuscany::sca::TuscanyRuntimeException; -namespace osoa -{ - namespace sca - { - /** - * Top level exception to represent all the exceptions that may be - * thrown by an SCA runtime implementation. - */ - class SCA_PHP_API ServiceRuntimeException : public TuscanyRuntimeException - { - public: - ServiceRuntimeException( - const char *name="ServiceRuntimeException", - severity_level sev=Severe, - const char* msg_text="") - : TuscanyRuntimeException(name, sev, msg_text) - { - } - }; // End ServiceRuntimeException class definition - - - /** - * A remotable service is currently unavailable. It is possible that a retry - * may resolve this exception. - */ - class SCA_PHP_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 SCA_PHP_API 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 SCA_PHP_API ComponentContextException: public ServiceRuntimeException - { - public: - ComponentContextException(const char* msg) - : ServiceRuntimeException("ComponentContextException", Error, - msg) - { - } - private: - }; // End ComponentContextException class definition - - /** - * There is an error whilst trying to invoke a component. - */ - class SCA_PHP_API ComponentInvocationException: public ServiceRuntimeException - { - public: - ComponentInvocationException(const char* msg) - : ServiceRuntimeException("ComponentInvocationException", Error, - msg) - { - } - private: - }; // End ComponentInvocationException class definition - - - } // End namespace sca -} // End namespace osoa - -#endif // osoa_sca_serviceruntimeexception_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/export.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/export.h deleted file mode 100644 index 99794a3352..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/osoa/sca/export.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 osoa_sca_export_h -#define osoa_sca_export_h -#include "tuscany/sca/export.h" - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) - -#ifdef TUSCANY_SCA_PHP_EXPORTS -#define SCA_PHP_API __declspec(dllexport) -#else -#define SCA_PHP_API __declspec(dllimport) -#endif - -#else -#include -#include -#include -#define SCA_PHP_API -#endif - -#endif // osoa_sca_export_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.cpp deleted file mode 100644 index f8768738e9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/php/PHPExtension.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/php/PHPImplementationExtension.h" - - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::php::PHPExtension::initialize(); - } -} - -namespace tuscany -{ - namespace sca - { - namespace php - { - // =================================================================== - // Constructor for the PHPExtension class. - // =================================================================== - PHPExtension::PHPExtension() - { - LOGENTRY(1, "PHPExtension::constructor"); - LOGEXIT(1, "PHPExtension::constructor"); - } - - // =================================================================== - // Destructor for the PHPExtension class. - // =================================================================== - PHPExtension::~PHPExtension() - { - LOGENTRY(1, "PHPExtension::destructor");; - LOGEXIT(1, "PHPExtension::destructor"); - } - - void PHPExtension::initialize() - { - LOGENTRY(1, "PHPExtension::initialize");; - SCARuntime::getInstance()->registerImplementationExtension(new PHPImplementationExtension()); - //SCARuntime::getInstance()->registerInterfaceExtension(new PHPInterfaceExtension()); - LOGEXIT(1, "PHPExtension::initialize");; - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.h deleted file mode 100644 index 971ed93c86..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPExtension.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_php_phpextension_h -#define tuscany_sca_php_phpextension_h - -namespace tuscany -{ - namespace sca - { - namespace php - { - - class PHPExtension - { - public: - /** - * Default constructor - */ - PHPExtension(); - - /** - * Destructor - */ - virtual ~PHPExtension(); - - static void initialize(); - - private: - - }; - - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_phpextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.cpp deleted file mode 100644 index 7f204b0ce9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/php/PHPImplementationExtension.h" -#include "tuscany/sca/php/model/PHPImplementation.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" - - -namespace tuscany -{ - namespace sca - { - namespace php - { - // =================================================================== - // Constructor for the PHPImplementationExtension class. - // =================================================================== - PHPImplementationExtension::PHPImplementationExtension() - { - LOGENTRY(1, "PHPImplementationExtension::constructor"); - LOGEXIT(1, "PHPImplementationExtension::constructor"); - } - - // =================================================================== - // Destructor for the PHPImplementationExtension class. - // =================================================================== - PHPImplementationExtension::~PHPImplementationExtension() - { - LOGENTRY(1, "PHPImplementationExtension::destructor");; - LOGEXIT(1, "PHPImplementationExtension::destructor"); - } - - const string PHPImplementationExtension::extensionName("php"); - const string PHPImplementationExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#PHPImplementation"); - - // =================================================================== - // loadModelElement - load the info from implementation.php - // =================================================================== - ComponentType* PHPImplementationExtension::getImplementation(Composite *composite, DataObjectPtr scdlImplementation) - { - string implType = scdlImplementation->getType().getName(); - if (implType == "PHPImplementation") - { - string module = scdlImplementation->getCString("module"); - string className = scdlImplementation->getCString("class"); - - PHPImplementation* phpImpl = new PHPImplementation(composite, module, className); - - return phpImpl; - } - else - { - return NULL; - } - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.h deleted file mode 100644 index 9aa4aea969..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPImplementationExtension.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_php_phpimplementationextension_h -#define tuscany_sca_php_phpimplementationextension_h - -#include "tuscany/sca/extension/ImplementationExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace php - { - - class PHPImplementationExtension : public ImplementationExtension - { - public: - /** - * Default constructor - */ - PHPImplementationExtension(); - - /** - * Destructor - */ - virtual ~PHPImplementationExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema element for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#implementation.phpn") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ComponentType* getImplementation(Composite* composite, DataObjectPtr scdlImplementation); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_phpimplementationextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp deleted file mode 100644 index 1b11e660c6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - - -// some strangeness in the build that causes -// WinSock.h and WinSock2.h to be included leading to redefinitions -#define _WINSOCKAPI_ - -#include "tuscany/sca/php/PHPServiceWrapper.h" - -#include "osoa/sca/ServiceRuntimeException.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/php/model/PHPImplementation.h" - -#include - -using namespace osoa::sca; - -namespace tuscany -{ - namespace sca - { - namespace php - { - // a global!! place to put the response - // as I can't get the PHP return value - // processing to work. Need to be - // removed when the proper PHP SAPI is used - // The variable is only valid between the PHP engine call and - // the results processing. It stores the last thing that - // the script echoed - string scriptResponse; - - // Global callbacks used by the PHP engine - - // Callback for log messages - void php_log_message(char *message) - { - LOGINFO_1(5, "PHP Log (%s)", message); - } - - // Callback for unbuffered writes (echo, print etc.) - int php_ub_write(const char *str, unsigned int str_length TSRMLS_DC) - { - LOGINFO_1(5, "PHP Write (%s)", str); - scriptResponse = str; - return str_length; - } - - // Callback for errors - void php_error_cb(int type, - const char *error_filename, - const uint error_lineno, - const char *format, va_list args) - { - char buffer[2048]; - int len; - - len = snprintf(buffer, 2048, "Error on line %d: ", error_lineno); - vsnprintf(buffer + len, (2048 - len), format, args); - LOGINFO_1(5, "PHP Unformatted Error (%s)", buffer); - zend_bailout(); - } - - // Callback for flush (could be used to do something with the scriptResponse) - void php_flush(void *server_context) - { - LOGINFO(5, "Flush"); - } - - // =========== - // Constructor - // =========== - PHPServiceWrapper::PHPServiceWrapper(Service* service) - : ServiceWrapper(service) - { - LOGENTRY(1,"PHPServiceWrapper::constructor"); - - component = service->getComponent(); - interf = service->getType()->getInterface(); - remotable = interf->isRemotable(); - - // ----------------------------------------------- - // Get the implementation for the target component - // ----------------------------------------------- - PHPImplementation* impl = (PHPImplementation*)component->getType(); - if (!impl) - { - string msg = "Component " + component->getName() + " has no implementation defined"; - throw ServiceNotFoundException(msg.c_str()); - } - - LOGINFO_1(3,"PHPServiceWrapper::getServiceWrapper module %s", impl->getModule().c_str()); - LOGINFO_1(3,"PHPServiceWrapper::getServiceWrapper class %s", impl->getClass().c_str()); - - LOGEXIT(1,"PHPServiceWrapper::constructor"); - - } - - // ========== - // Destructor - // ========== - PHPServiceWrapper::~PHPServiceWrapper() - { - LOGENTRY(1,"PHPServiceWrapper::destructor"); - LOGEXIT(1,"PHPServiceWrapper::destructor"); - } - - - // ====================================================================== - // invoke: wrapper call to service with setting the component context - // ====================================================================== - void PHPServiceWrapper::invoke(Operation& operation) - { - LOGENTRY(1,"PHPServiceWrapper::invoke"); - - SCARuntime* runtime = SCARuntime::getInstance(); - runtime->setCurrentComponent(component); - - try - { - LOGINFO_1(4, "PHPServiceWrapper::invoke called with operation name: %s", operation.getName().c_str()); - - // create a temporary script which - // - includes the named script - // - creates a class instance if required - // - calls the named method with the provided arguments - - // get the component type information - PHPImplementation* impl = (PHPImplementation*)component->getType(); - - // first create the temporay script and include the module - string script = "include '" + impl->getModule() + ".php';"; - - // if we have a class create an instance - string className = impl->getClass(); - if( &className != NULL && className.size() > 0) - { - script += "$anobject = new " + className + "();"; - } - - // construct the call to the function - script += "$response = "; - - if( &className != NULL && className.size() > 0) - { - script += " $anobject->"; - } - - script += operation.getName().c_str(); - script += "("; - - char tempString [32]; - - // add the parameters to the call - for(unsigned int i = 0; i < operation.getNParms(); i++) - { - const Operation::Parameter& parm = operation.getParameter(i); - switch(parm.getType()) - { - case Operation::BOOL: - { - if( *(bool*)parm.getValue()) - { - //boolean true - script += "true"; - } - else - { - script += "false"; - } - break; - } - case Operation::SHORT: - { - sprintf ( tempString, "%d", *(short*)parm.getValue() ); - script += tempString; - break; - } - case Operation::USHORT: - { - sprintf ( tempString, "%d", *(unsigned short*)parm.getValue() ); - script += tempString; - break; - } - case Operation::LONG: - { - sprintf ( tempString, "%d", *(long*)parm.getValue() ); - script += tempString; - break; - } - case Operation::ULONG: - { - sprintf ( tempString, "%d", *(unsigned long*)parm.getValue() ); - script += tempString; - break; - } - case Operation::FLOAT: - { - sprintf ( tempString, "%g", *(float*)parm.getValue() ); - script += tempString; - break; - } - case Operation::DOUBLE: - { - sprintf ( tempString, "%g", *(double*)parm.getValue() ); - script += tempString; - break; - } - case Operation::LONGDOUBLE: - { - sprintf ( tempString, "%g", *(long double*)parm.getValue() ); - script += tempString; - break; - } - case Operation::CHARS: - { - script += *(char**)parm.getValue(); - break; - } - case Operation::STRING: - { - script += (*(string*)parm.getValue()).c_str(); - break; - } - default: - { - throw new ComponentInvocationException("Operation parameter type not supported"); - } - } - - if ( ( i + 1 ) < operation.getNParms() ) - { - script += ", "; - } - } - - - // the closing bracket of the call - script += ");echo $response;return $response;"; - - // we now have the temporary script to make the call - LOGINFO_1(5, "Executing PHP script \n%s", script.c_str()); - - // load the PHP logging and error callback methods - php_embed_module.log_message = php_log_message; - php_embed_module.ub_write = php_ub_write; - php_embed_module.flush = php_flush; - - //PHP_EMBED_START_BLOCK(/* argc */ 0, /* argv */ NULL) - void ***tsrm_ls; - int status = php_embed_init(0, NULL PTSRMLS_CC); - LOGINFO_1(5, "Engine startup status %d", status); - - zend_first_try { - // set error handler - zend_error_cb = php_error_cb; - - // call the dynamically created script - //zval retval; - zend_eval_string((char *) script.c_str(), - NULL,//&retval, - "PHP Component" TSRMLS_CC); - - // get the response - // This doesn't want to work for some reason - // so have chaced the last echo that the script - // returns in the global scriptResponse variable - // This is a bit of a rubbish way of doing things so - // needs replacing when proper SAPI is used - //convert_to_string(&retval); - //LOGINFO_1(5, "Script returned %s", Z_STRVAL(retval)); - //zval_dtor(&retval); - - //PHP_EMBED_END_BLOCK() - } zend_catch { - int exit_status = EG(exit_status); - LOGINFO_1(5, "In catch %d", exit_status); - } zend_end_try(); - - //clean up - php_embed_shutdown(TSRMLS_C); - LOGINFO(5, "Engine shutdown"); - - // get the response values - LOGINFO_1(5, "Script returned %s", scriptResponse.c_str()); - - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - if(scriptResponse == "true") - { - *(bool*)operation.getReturnValue() = true; - } - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short) strtol(scriptResponse.c_str(), NULL,10); - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long) strtol(scriptResponse.c_str(), NULL,10); - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short) strtoul(scriptResponse.c_str(), NULL,10); - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long) strtoul(scriptResponse.c_str(), NULL,10); - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float) strtod(scriptResponse.c_str(), NULL); - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double) strtod(scriptResponse.c_str(), NULL); - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double) strtod(scriptResponse.c_str(), NULL); - break; - } - case Operation::CHARS: - { - *(char**)operation.getReturnValue() = (char *)scriptResponse.c_str(); - break; - } - case Operation::STRING: - { - *(string*)operation.getReturnValue() = scriptResponse; - break; - } - default:; - } - } - catch (...) - { - runtime->unsetCurrentComponent(); - throw; - } - runtime->unsetCurrentComponent(); - LOGEXIT(1,"PHPServiceWrapper::invoke"); - - } - - // ====================================================================== - // getServiceWrapper: create a wrapper for the target ComponentService - // ====================================================================== - PHPServiceWrapper* PHPServiceWrapper::getServiceWrapper(Service* service) - { - LOGENTRY(1,"PHPServiceWrapper::getServiceWrapper"); - PHPServiceWrapper* serviceWrapper = 0; - - // --------------------------------- - // Create an instance of the wrapper - // --------------------------------- - serviceWrapper = new PHPServiceWrapper(service); - if (!serviceWrapper) - { - string msg = "Could not create new PHPServiceWrapper"; - LOGERROR(1, msg.c_str()); - throw ServiceNotFoundException(msg.c_str()); - } - - LOGEXIT(1,"PHPServiceWrapper::getServiceWrapper"); - return serviceWrapper; - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.h deleted file mode 100644 index ef83a026a6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_php_phpservicewrapper_h -#define tuscany_sca_php_phpservicewrapper_h - - -#include "osoa/sca/export.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Interface.h" - -using namespace tuscany::sca::model; - - -namespace tuscany -{ - namespace sca - { - namespace php - { - class PHPInterface; - - /** - * 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 SCA_PHP_API PHPServiceWrapper : public ServiceWrapper - { - public: - /** - * Factory method to create a new PHPServiceWrapper 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 PHPServiceWrapper* getServiceWrapper(Service* service); - - /** - * Constructor. - * @param target The component service to which this wrapper refers. - */ - PHPServiceWrapper(Service* service); - - /** - * Destructor. - */ - virtual ~PHPServiceWrapper(); - - /** - * 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. - */ - virtual void invoke(Operation& operation); - - - protected: - - - private: - - - /** - * The component to which this wrapper refers. - */ - Component* component; - - /** - * Set to true if the service is remotable. - */ - bool remotable; - - /** - * A pointer to the interface which the service exposes. - */ - Interface* interf; - - }; - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_phpservicewrapper_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp deleted file mode 100644 index f8992ed498..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/php/model/PHPImplementation.h" -#include "tuscany/sca/php/model/PHPServiceBinding.h" -//#include "tuscany/sca/php/model/PHPReferenceBinding.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/util/Utils.h" - -namespace tuscany -{ - namespace sca - { - - namespace php - { - - // Constructor - PHPImplementation::PHPImplementation(Composite* composite, const string& module, const string& className) - : ComponentType(composite, module), - module(module), className(className) - { - LOGENTRY(1,"PHPImplementation::constructor"); - LOGEXIT(1,"PHPImplementation::constructor"); - } - - PHPImplementation::~PHPImplementation() - { - LOGENTRY(1,"PHPImplementation::destructor"); - LOGEXIT(1,"PHPImplementation::destructor"); - } - - void PHPImplementation::initializeComponent(Component* component) - { - LOGENTRY(1,"PHPImplementation::initializeComponent"); - ComponentType::initializeComponent(component); - - // Create PHP bindings for all the services - const Component::SERVICE_MAP& services = component->getServices(); - Component::SERVICE_MAP::const_iterator iter = services.begin(); - for (unsigned int i=0; i< services.size(); i++) - { - Service *service = iter->second; - PHPServiceBinding* binding = new PHPServiceBinding(service); - service->setBinding(binding); - iter++; - } - - // References not yet supported.. - - //// Create PHP bindings for all the references - //const Component::REFERENCE_MAP& references = component->getReferences(); - //Component::REFERENCE_MAP::const_iterator refiter = references.begin(); - //for (int ri=0; ri< references.size(); ri++) - //{ - // Reference *reference = refiter->second; - // PHPReferenceBinding* binding = new PHPReferenceBinding(reference); - // reference->setBinding(binding); - // refiter++; - //} - LOGEXIT(1,"PHPImplementation::initializeComponent"); - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h deleted file mode 100644 index b89ba8c5c2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_php_model_phpimplementation_h -#define tuscany_sca_php_model_phpimplementation_h -#include "tuscany/sca/model/ComponentType.h" - -#include -using std::map; -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace php - { - /** - * Holds information about an SCA implementation written in PHP - */ - class PHPImplementation : public ComponentType - { - - public: - /** - * Constructor. - * @param composite Composite containing this implementation. - * @param module Name of the module. - * @param modulePath Path to the module (could be a blank string - * if this is not specified). - * @param className Name of the class in the module (could be a blank string - * if this is not specified). - */ - PHPImplementation(Composite* composite, const string& module, const string& className); - - /** - * Destructor - */ - virtual ~PHPImplementation(); - - /** - * Initialize a component of this type. - * @param component The component to initialize. - */ - virtual void initializeComponent(Component* component); - - /** - * Returns the name of the module. - * @return The name of the module. - */ - const string& getModule() const { return module; } - - /** - * Get the name of the class. - * @return The class name if specified. - */ - const string& getClass() const { return className; } - - private: - - /** - * Name of the module. - */ - string module; - - /** - * 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 php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_model_phpimplementation_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp deleted file mode 100644 index fa162ce8f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/php/model/PHPServiceBinding.h" -#include "tuscany/sca/php/PHPServiceWrapper.h" - -namespace tuscany -{ - namespace sca - { - namespace php - { - - // Constructor - PHPServiceBinding::PHPServiceBinding(Service* service) - : ServiceBinding(service, "") - { - LOGENTRY(1,"PHPServiceBinding::constructor"); - serviceWrapper = PHPServiceWrapper::getServiceWrapper(service); - LOGEXIT(1,"PHPServiceBinding::constructor"); - } - - // Destructor - PHPServiceBinding::~PHPServiceBinding() - { - LOGENTRY(1,"PHPServiceBinding::destructor"); - LOGEXIT(1,"PHPServiceBinding::destructor"); - } - - ServiceWrapper* PHPServiceBinding::getServiceWrapper() - { - LOGENTRY(1,"PHPServiceBinding::getServiceWrapper"); - LOGEXIT(1,"PHPServiceBinding::getServiceWrapper"); - return (ServiceWrapper*)serviceWrapper; - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h deleted file mode 100644 index 6b1e694bd6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_php_model_phpservicebinding_h -#define tuscany_sca_php_model_phpservicebinding_h - -#include "tuscany/sca/model/ServiceBinding.h" -using namespace tuscany::sca::model; -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace php - { - /** - * Information about a PHP service binding for service or a reference. - */ - class PHPServiceBinding : public ServiceBinding - { - 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") - */ - PHPServiceBinding(Service* service); - - /** - * Destructor. - */ - virtual ~PHPServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#PHPImplementationBinding"; }; - - /** - * Create a wrapper for the service configured by this - * binding. - */ - virtual ServiceWrapper* getServiceWrapper(); - - private: - - /** - * The wrapper for the service configured by this binding. - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_model_phpservicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/xsd/sca-implementation-php.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/xsd/sca-implementation-php.xsd deleted file mode 100644 index 0f32f120e6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/php/xsd/sca-implementation-php.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/Makefile.am deleted file mode 100644 index 83e70b4b94..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src - -datadir=$(prefix)/extensions/python - -nobase_data_DATA = xsd/*.xsd - -EXTRA_DIST = xsd \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/deploy.bat deleted file mode 100644 index 94d4186eb5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/deploy.bat +++ /dev/null @@ -1,77 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set pythonextdir=%extdir%\python -set srcdir=%rootdir%\runtime\extensions\python\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %pythonextdir% mkdir %pythonextdir% -if not exist %pythonextdir%\bin mkdir %pythonextdir%\bin -if not exist %pythonextdir%\lib mkdir %pythonextdir%\lib -if not exist %pythonextdir%\xsd mkdir %pythonextdir%\xsd - -del %pythonextdir%\bin\tuscany_sca_python.* -del %pythonextdir%\lib\*.lib - -copy %srcdir%\deploy.cmd %pythonextdir% -copy %srcdir%\..\xsd\*.* %pythonextdir%\xsd - -copy %inpath%\tuscany_sca_python.lib %pythonextdir%\lib -copy %inpath%\tuscany_sca_python.dll %pythonextdir%\bin\tuscany_sca_python.dll.disabled - -if exist %inpath%\tuscany_sca_python.pdb copy %inpath%\tuscany_sca_python.pdb %pythonextdir%\bin - - -echo Building extension to Python -set origdir=%~d0%~p0 -set bindir=%pythonextdir%\bin -cd %srcdir%\tuscany\sca\python\ - -rem if %pythonextdir% is a relative path, it won't be found, so set %bindir% to a full path -if not exist %bindir% set bindir=%origdir%\%pythonextdir%\bin - -%PYTHON_HOME%\python sca_setup.py build -%PYTHON_HOME%\python sca_setup.py install --install-lib %bindir% -cd %origdir% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/Makefile.am deleted file mode 100644 index 0f221aca05..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/python/lib -lib_LTLIBRARIES = libtuscany_sca_python.la - -install-exec-hook: - cd $(libdir); \ - ln -s -f libtuscany_sca_python.so sca.so; \ - for i in libtuscany_sca_python.*; do mv $$i $$i.disabled; done - -pydir=$(prefix)/extensions/python/lib -py_DATA = tuscany/sca/python/sca_proxy.py -EXTRA_DIST = tuscany/sca/python/sca_proxy.py deploy.sh - -rootdir=$(prefix)/extensions/python -root_SCRIPTS = deploy.sh - -noinst_HEADERS = \ -tuscany/sca/python/*.h \ -tuscany/sca/python/model/*.h - -libtuscany_sca_python_la_SOURCES = \ -tuscany/sca/python/PythonExtension.cpp \ -tuscany/sca/python/PythonImplementationExtension.cpp \ -tuscany/sca/python/PythonInterfaceExtension.cpp \ -tuscany/sca/python/PythonServiceWrapper.cpp \ -tuscany/sca/python/PythonServiceProxy.cpp \ -tuscany/sca/python/sca_module.cpp \ -tuscany/sca/python/model/PythonImplementation.cpp \ -tuscany/sca/python/model/PythonInterface.cpp \ -tuscany/sca/python/model/PythonReferenceBinding.cpp \ -tuscany/sca/python/model/PythonServiceBinding.cpp - -# Need python env varibles set. e.g: -# PYTHON_LIB=/usr/lib -# PYTHON_INCLUDE=/usr/include/python2.4 -# PYTHON_VERSION=python2.4 -libtuscany_sca_python_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L${PYTHON_LIB} -l${PYTHON_VERSION} - -INCLUDES = -Imodel -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${PYTHON_INCLUDE} - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.cmd deleted file mode 100644 index 7cd6bb29ab..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.cmd +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal -set currentPath=%~d0%~p0 - -echo Enabling the Tuscany Python extension -rename %currentPath%\bin\tuscany_sca_python.dll.disabled tuscany_sca_python.dll - -:end -echo Done -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.sh deleted file mode 100755 index af8ad6f422..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/deploy.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -echo "Enabling the Tuscany Python extension" - -for i in lib/*.disabled; do x=${i%.disabled}; mv $i $x; done - -echo "Done" diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.cpp deleted file mode 100644 index 4744f628e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/python/PythonExtension.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/python/PythonImplementationExtension.h" -#include "tuscany/sca/python/PythonInterfaceExtension.h" - - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::python::PythonExtension::initialize(); - } -} - -namespace tuscany -{ - namespace sca - { - namespace python - { - // =================================================================== - // Constructor for the PythonExtension class. - // =================================================================== - PythonExtension::PythonExtension() - { - LOGENTRY(1, "PythonExtension::constructor"); - LOGEXIT(1, "PythonExtension::constructor"); - } - - // =================================================================== - // Destructor for the PythonExtension class. - // =================================================================== - PythonExtension::~PythonExtension() - { - LOGENTRY(1, "PythonExtension::destructor");; - LOGEXIT(1, "PythonExtension::destructor"); - } - - void PythonExtension::initialize() - { - LOGENTRY(1, "PythonExtension::initialize");; - SCARuntime::getInstance()->registerImplementationExtension(new PythonImplementationExtension()); - SCARuntime::getInstance()->registerInterfaceExtension(new PythonInterfaceExtension()); - LOGEXIT(1, "PythonExtension::initialize");; - } - - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.h deleted file mode 100644 index 783f37a228..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonExtension.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_pythonextension_h -#define tuscany_sca_python_pythonextension_h - -namespace tuscany -{ - namespace sca - { - namespace python - { - - class PythonExtension - { - public: - /** - * Default constructor - */ - PythonExtension(); - - /** - * Destructor - */ - virtual ~PythonExtension(); - - static void initialize(); - - private: - - }; - - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_pythonextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.cpp deleted file mode 100644 index 0623fb206c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/python/PythonImplementationExtension.h" -#include "tuscany/sca/python/model/PythonImplementation.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" - - -namespace tuscany -{ - namespace sca - { - namespace python - { - // =================================================================== - // Constructor for the PythonImplementationExtension class. - // =================================================================== - PythonImplementationExtension::PythonImplementationExtension() - { - LOGENTRY(1, "PythonImplementationExtension::constructor"); - LOGEXIT(1, "PythonImplementationExtension::constructor"); - } - - // =================================================================== - // Destructor for the PythonImplementationExtension class. - // =================================================================== - PythonImplementationExtension::~PythonImplementationExtension() - { - LOGENTRY(1, "PythonImplementationExtension::destructor");; - LOGEXIT(1, "PythonImplementationExtension::destructor"); - } - - const string PythonImplementationExtension::extensionName("python"); - const string PythonImplementationExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#PythonImplementation"); - - // =================================================================== - // loadModelElement - load the info from implementation.python - // =================================================================== - ComponentType* PythonImplementationExtension::getImplementation(Composite *composite, DataObjectPtr scdlImplementation) - { - string implType = scdlImplementation->getType().getName(); - if (implType == "PythonImplementation") - { - string module = scdlImplementation->getCString("module"); - string path = scdlImplementation->getCString("path"); - string className = scdlImplementation->getCString("class"); - string scopeName = scdlImplementation->getCString("scope"); - - PythonImplementation::Scope scope; - if (scopeName == "composite") - { - scope = PythonImplementation::COMPOSITE; - } - else - { - scope = PythonImplementation::STATELESS; - } - - PythonImplementation* pythonImpl = new PythonImplementation(composite, module, path, className, scope); - - return pythonImpl; - } - else - { - return NULL; - } - } - - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.h deleted file mode 100644 index 69414dce22..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonImplementationExtension.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_pythonimplementationextension_h -#define tuscany_sca_python_pythonimplementationextension_h - -#include "tuscany/sca/extension/ImplementationExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace python - { - - class PythonImplementationExtension : public ImplementationExtension - { - public: - /** - * Default constructor - */ - PythonImplementationExtension(); - - /** - * Destructor - */ - virtual ~PythonImplementationExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#implementation.python") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ComponentType* getImplementation(Composite* composite, DataObjectPtr scdlImplementation); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_pythonimplementationextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.cpp deleted file mode 100644 index 2a4c94b7af..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/python/PythonInterfaceExtension.h" -#include "tuscany/sca/python/model/PythonInterface.h" -#include "tuscany/sca/util/Logging.h" - -//#include "commonj/sdo/SDO.h" -//using commonj::sdo::DataObjectList; - -namespace tuscany -{ - namespace sca - { - namespace python - { - // =================================================================== - // Constructor for the PythonInterfaceExtension class. - // =================================================================== - PythonInterfaceExtension::PythonInterfaceExtension() - { - LOGENTRY(1, "PythonInterfaceExtension::constructor"); - LOGEXIT(1, "PythonInterfaceExtension::constructor"); - } - - // =================================================================== - // Destructor for the PythonInterfaceExtension class. - // =================================================================== - PythonInterfaceExtension::~PythonInterfaceExtension() - { - LOGENTRY(1, "PythonInterfaceExtension::destructor");; - LOGEXIT(1, "PythonInterfaceExtension::destructor"); - } - - const string PythonInterfaceExtension::extensionName("python"); - const string PythonInterfaceExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#PythonInterface"); - - // =================================================================== - // loadModelElement - load the info from interface.python - // =================================================================== - tuscany::sca::model::Interface* PythonInterfaceExtension::getInterface(Composite* composite, DataObjectPtr scdlInterface) - { - // Determine the type - string ifType = scdlInterface->getType().getName(); - if (ifType == "PythonInterface") - { - bool remotable = scdlInterface->getBoolean("remotable"); - bool conversational = scdlInterface->getBoolean("conversational"); - - return new PythonInterface(remotable, conversational); - //DataObjectList& operationList = scdlInterface->getList("operation"); - - //for(int i=0; igetCString("name"); - - // if(operationList[i]->hasProperty("returnType")) - // { - // string returnType = operationList[i]->getCString("returnType"); - - // if(returnType == "string") - // { - // pythonInterface->addOperation(opName, PythonInterface::STRING); - // } - // else if(returnType == "int") - // { - // pythonInterface->addOperation(opName, PythonInterface::INT); - // } - // else if(returnType == "long") - // { - // pythonInterface->addOperation(opName, PythonInterface::LONG); - // } - // else if(returnType == "boolean") - // { - // pythonInterface->addOperation(opName, PythonInterface::BOOLEAN); - // } - // else if(returnType == "float") - // { - // pythonInterface->addOperation(opName, PythonInterface::FLOAT); - // } - // else if(returnType == "other") - // { - // pythonInterface->addOperation(opName, PythonInterface::OTHER); - // } - // else - // { - // pythonInterface->addOperation(opName, PythonInterface::NONE); - // } - // } - // else - // { - // // No return Type provided - set as NONE - // pythonInterface->addOperation(opName, PythonInterface::NONE); - // } - //} - // - //return pythonInterface; - } - return 0; - } - - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.h deleted file mode 100644 index 3596857c0d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonInterfaceExtension.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_pythoninterfaceextension_h -#define tuscany_sca_python_pythoninterfaceextension_h - -#include "tuscany/sca/extension/InterfaceExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace python - { - - class PythonInterfaceExtension : public InterfaceExtension - { - public: - /** - * Default constructor - */ - PythonInterfaceExtension(); - - /** - * Destructor - */ - virtual ~PythonInterfaceExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#PythonInterface") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual tuscany::sca::model::Interface* getInterface(Composite* composite, DataObjectPtr scdlInterface); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_pythoninterfaceextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.cpp deleted file mode 100644 index ef482f32e8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/python/PythonServiceProxy.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/python/PythonServiceRuntimeException.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/python/model/PythonImplementation.h" -#include "tuscany/sca/python/model/PythonReferenceBinding.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace python - { - - // ============================================ - // Constructor: Create a proxy from a reference - // ============================================ - PythonServiceProxy::PythonServiceProxy(Reference* reference) - : ServiceProxy(reference) - { - LOGENTRY(1,"PythonServiceProxy::constructor(Reference)"); - - // Get the service wrapper - PythonReferenceBinding* referenceBinding = (PythonReferenceBinding*)reference->getBinding(); - serviceWrapper = referenceBinding->getTargetServiceBinding()->getServiceWrapper(); - - LOGEXIT(1,"PythonServiceProxy::constructor(Reference)"); - } - - // ========================================== - // Constructor: Create a proxy from a service - // ========================================== - PythonServiceProxy::PythonServiceProxy(Service* service) - : ServiceProxy(NULL) - { - LOGENTRY(1,"PythonServiceProxy::constructor(Service)"); - - // Get the service wrapper - serviceWrapper = service->getBinding()->getServiceWrapper(); - - LOGEXIT(1,"PythonServiceProxy::constructor(Service)"); - } - - // ========== - // Destructor - // ========== - PythonServiceProxy::~PythonServiceProxy() - { - LOGENTRY(1,"PythonServiceProxy::destructor"); - LOGEXIT(1,"PythonServiceProxy::destructor"); - } - - // ===================================================== - // invokeService: invoke the service wired to this proxy - // ===================================================== - void PythonServiceProxy::invokeService(Operation& operation) - { - LOGENTRY(1,"PythonServiceProxy::invokeService"); - - // Invoke the service - serviceWrapper->invoke(operation); - - LOGEXIT(1,"PythonServiceProxy::invokeService"); - } - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.h deleted file mode 100644 index f16cb95609..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceProxy.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_pythonserviceproxy_h -#define tuscany_sca_python_pythonserviceproxy_h - -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/util/Library.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/Service.h" - -#include "export.h" - -using namespace tuscany::sca::model; - - -namespace tuscany -{ - namespace sca - { - namespace python - { - - /** - * Holds a proxy for a given reference from a component implemented in Python. - */ - class PythonServiceProxy : public ServiceProxy - { - public: - /** - * Create a new service proxy for a reference. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The reference on the source component. - */ - PythonServiceProxy(Reference* reference); - - /** - * Create a new service proxy for a service. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param service The service on the target component. - */ - SCA_PYTHON_API PythonServiceProxy(Service* service); - - /** - * Destructor. - */ - virtual ~PythonServiceProxy(); - - /** - * Invoke the wired service. - */ - virtual void invokeService(Operation& operation); - - private: - - /** - * The target service wrapper - */ - ServiceWrapper* serviceWrapper; - }; - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_pythonserviceproxy_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceRuntimeException.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceRuntimeException.h deleted file mode 100644 index aa8c88d06d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceRuntimeException.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_pythonserviceruntimeexception_h -#define tuscany_sca_python_pythonserviceruntimeexception_h - -#include "export.h" - -#include "tuscany/sca/util/Exceptions.h" -using tuscany::sca::TuscanyRuntimeException; -namespace tuscany -{ - namespace sca - { - namespace python - { - /** - * Exception to represent a failure in a Python call. - */ - class SCA_PYTHON_API PythonServiceRuntimeException : public TuscanyRuntimeException - { - public: - PythonServiceRuntimeException( - const char *name="PythonServiceRuntimeException", - severity_level sev=Severe, - const char* msg_text="") - : TuscanyRuntimeException(name, sev, msg_text) - { - } - }; // End PythonServiceRuntimeException class definition - - /** - * The target of a wire cannot be found, or the reference has not been - * configured. - */ - class SCA_PYTHON_API PythonServiceNotFoundException: public PythonServiceRuntimeException - { - public: - PythonServiceNotFoundException(const char* msg) - : PythonServiceRuntimeException("PythonServiceNotFoundException", Error, - msg) - { - } - private: - }; // End PythonServiceNotFoundException class definition - - - /** - * There is no current component (for example, if a non-SCA component - * tries to get the current ComponentContext). - */ - class SCA_PYTHON_API PythonComponentContextException: public PythonServiceRuntimeException - { - public: - PythonComponentContextException(const char* msg) - : PythonServiceRuntimeException("PythonComponentContextException", Error, - msg) - { - } - private: - }; // End PythonComponentContextException class definition - - /** - * There is no current component (for example, if a non-SCA component - * tries to get the current ComponentContext). - */ - class SCA_PYTHON_API PythonComponentInvocationException: public PythonServiceRuntimeException - { - public: - PythonComponentInvocationException(const char* msg) - : PythonServiceRuntimeException("ComponentInvocationException", Error, - msg) - { - } - private: - }; // End PythonComponentInvocationException class definition - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_pythonserviceruntimeexception_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp deleted file mode 100644 index 0223a5741d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp +++ /dev/null @@ -1,950 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/python/PythonServiceRuntimeException.h" -#include "tuscany/sca/python/PythonServiceWrapper.h" - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/python/model/PythonImplementation.h" - -#include "commonj/sdo/SDO.h" -using namespace commonj::sdo; - -namespace tuscany -{ - namespace sca - { - namespace python - { - - /** - * Prints out PyObject and dir(PyObject) - * for debugging purposes - */ - void printPyObject(char * name, PyObject *pObj) - { - PyObject* pObjRepr = PyObject_Repr(pObj); - LOGINFO_2(5, "PythonServiceWrapper::printPyObject %s: %s", name, PyString_AsString(pObjRepr)); - Py_DECREF(pObjRepr); - - PyObject* pObjDir = PyObject_Dir(pObj); - PyObject* pObjDirRepr = PyObject_Repr(pObjDir); - LOGINFO_2(5, "PythonServiceWrapper::printPyObject dir(%s): %s", name, PyString_AsString(pObjDirRepr)); - Py_DECREF(pObjDirRepr); - Py_DECREF(pObjDir); - } - - // =========== - // Constructor - // =========== - PythonServiceWrapper::PythonServiceWrapper(Service* service) - : ServiceWrapper(service) - { - LOGENTRY(1,"PythonServiceWrapper::constructor"); - - component = service->getComponent(); - implementation = (PythonImplementation*)component->getType(); - - pythonModule = NULL; - pythonClassInstance = NULL; - - // ----------------------------------------------- - // Get the implementation for the target component - // ----------------------------------------------- - PythonImplementation* impl = (PythonImplementation*)component->getType(); - if (!impl) - { - string msg = "Component " + component->getName() + " has no implementation defined"; - throw PythonServiceNotFoundException(msg.c_str()); - } - - LOGINFO_1(3,"PythonServiceWrapper::constructor module %s", impl->getModule().c_str()); - LOGINFO_1(3,"PythonServiceWrapper::constructor path %s", impl->getModulePath().c_str()); - LOGINFO_1(3,"PythonServiceWrapper::constructor class %s", impl->getClass().c_str()); - - // Initialize the Python environment - Py_Initialize(); - - // Add the path to the composite (+ any further path specified) to the Python sys.path - string path = component->getComposite()->getRoot() + "/" + impl->getModulePath(); - - PyObject* pSysName = PyString_FromString("sys"); - PyObject* pSys = PyImport_Import(pSysName); - Py_DECREF(pSysName); - - if(pSys != NULL) - { - PyObject* pSysPath = PyObject_GetAttrString(pSys, "path"); - - if(pSysPath != NULL && PyList_Check(pSysPath)) - { - PyObject* pPath = PyString_FromString(path.c_str()); - PyList_Append(pSysPath, pPath); - - - Py_DECREF(pPath); - Py_DECREF(pSysPath); - } - Py_DECREF(pSys); - } - - if(&(impl->getModule()) != NULL && impl->getModule().size() > 0) - { - // Now import the module - PyObject* pModuleName = PyString_FromString(impl->getModule().c_str()); - - pythonModule = PyImport_Import(pModuleName); - Py_DECREF(pModuleName); - } - - if (!pythonModule) - { - if(PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Failed to load module named " + impl->getModule(); - LOGERROR(0, msg.c_str()); - throw PythonComponentContextException(msg.c_str()); - } - //else - //{ - // addReferences(pythonModule); - // addProperties(pythonModule); - //} - - printPyObject("pythonModule",pythonModule); - - LOGEXIT(1,"PythonServiceWrapper::constructor"); - - } - - // ========== - // Destructor - // ========== - PythonServiceWrapper::~PythonServiceWrapper() - { - LOGENTRY(1,"PythonServiceWrapper::destructor"); - Py_XDECREF(pythonClassInstance); - Py_XDECREF(pythonModule); - Py_Finalize(); - LOGEXIT(1,"PythonServiceWrapper::destructor"); - } - - // ====================================================================== - // newInstance: create a new class instance - // ====================================================================== - PyObject* PythonServiceWrapper::newInstance() - { - LOGENTRY(1,"PythonServiceWrapper::newInstance"); - PythonImplementation* impl = (PythonImplementation*)component->getType(); - string className = impl->getClass(); - - PyObject* pClassInstance = NULL; - if (pythonModule != NULL) - { - if(&className != NULL && className.size() > 0) - { - // We have a class name, so create an instance and use this to invoke the correct function - PyObject* pClass = PyObject_GetAttrString(pythonModule, (char*) className.c_str()); - - if(pClass == NULL) - { - if(PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Cannot find class named " + className + " in Python module"; - LOGERROR(0, msg.c_str()); - throw new PythonComponentInvocationException(msg.c_str()); - } - - pClassInstance = PyInstance_New(pClass, NULL, NULL); - - if(pClassInstance == NULL || !PyInstance_Check(pClassInstance)) - { - if(PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Could not create new instance of class named " + className + " in Python module"; - LOGERROR(0, msg.c_str()); - throw new PythonComponentInvocationException(msg.c_str()); - } - Py_XDECREF(pClass); - } - } - LOGEXIT(1,"PythonServiceWrapper::newInstance"); - return pClassInstance; - } - - // ====================================================================== - // getInstance: get a class instance for this scope - // ====================================================================== - PyObject* PythonServiceWrapper::getInstance() - { - LOGENTRY(1,"PythonServiceWrapper::getInstance"); - - PythonImplementation::Scope scope = implementation->getScope(); - if (scope == PythonImplementation::COMPOSITE) - { - if (!pythonClassInstance) - { - pythonClassInstance = newInstance(); - } - return pythonClassInstance; - } - else // (scope == PythonImplementation::STATELESS) - { - return newInstance(); - } - LOGEXIT(1,"PythonServiceWrapper::getInstance"); - } - - // ====================================================================== - // releaseImplementation: release the implementation for this scope - // ====================================================================== - void PythonServiceWrapper::releaseInstance() - { - LOGENTRY(1,"PythonServiceWrapper::releaseInstance"); - - PythonImplementation::Scope scope = implementation->getScope(); - if(scope == PythonImplementation::STATELESS) - { - // Delete the class instance if there is one - if(pythonClassInstance != NULL && PyInstance_Check(pythonClassInstance)) - { - Py_DECREF(pythonClassInstance); - pythonClassInstance = NULL; - } - - // Need to reload the module - PyObject* reloadedPythonModule = PyImport_ReloadModule(pythonModule); - - if(reloadedPythonModule != NULL) - { - // Get rid of old pythonModule and replace with the reloaded one - Py_DECREF(pythonModule); - pythonModule = reloadedPythonModule; - } - } - LOGEXIT(1,"PythonServiceWrapper::releaseInstance"); - } - - // ====================================================================== - // invoke: wrapper call to service with setting the component context - // ====================================================================== - void PythonServiceWrapper::invoke(Operation& operation) - { - LOGENTRY(1,"PythonServiceWrapper::invoke"); - - SCARuntime* runtime = SCARuntime::getInstance(); - runtime->setCurrentComponent(component); - - - // Load the references & properties into the module - addReferences(pythonModule); - addProperties(pythonModule); - - try - { - LOGINFO_1(4, "PythonServiceWrapper::invoke called with operation name: %s", operation.getName().c_str()); - - PyObject* pFunc = NULL; - pythonClassInstance = getInstance(); - - if(pythonClassInstance != NULL && PyInstance_Check(pythonClassInstance)) - { - // Get the function from the instance - pFunc = PyObject_GetAttrString(pythonClassInstance, (char*) operation.getName().c_str()); - } - if(pFunc == NULL && pythonModule != NULL) - { - // Get the function directly from the module if it could not be got from an instance - pFunc = PyObject_GetAttrString(pythonModule, (char*) operation.getName().c_str()); - } - if(pFunc == NULL) - { - // Can't get the function from the class or module - throw exception - string msg = "Python module or class instance has not been created"; - LOGERROR(0, msg.c_str()); - throw new PythonComponentInvocationException(msg.c_str()); - } - - if (pFunc && PyCallable_Check(pFunc)) - { - PyObject* pArgs = PyTuple_New(operation.getNParms()); - PyObject* pValue = NULL; - - for(unsigned int i = 0; i < operation.getNParms(); i++) - { - const Operation::Parameter& parm = operation.getParameter(i); - switch(parm.getType()) - { - case Operation::BOOL: - { - if( *(bool*)parm.getValue()) - { - //boolean true - pValue = Py_True; - } - else - { - pValue = Py_False; - } - break; - } - case Operation::SHORT: - { - pValue = PyInt_FromLong(*(short*)parm.getValue()); - break; - } - case Operation::USHORT: - { - pValue = PyInt_FromLong(*(unsigned short*)parm.getValue()); - break; - } - case Operation::INT: - { - pValue = PyInt_FromLong(*(int*)parm.getValue()); - break; - } - case Operation::UINT: - { - pValue = PyInt_FromLong(*(unsigned int*)parm.getValue()); - break; - } - case Operation::LONG: - { - pValue = PyLong_FromLong(*(long*)parm.getValue()); - break; - } - case Operation::ULONG: - { - pValue = PyLong_FromUnsignedLong(*(unsigned long*)parm.getValue()); - break; - } - case Operation::FLOAT: - { - pValue = PyFloat_FromDouble(*(float*)parm.getValue()); - break; - } - case Operation::DOUBLE: - { - pValue = PyFloat_FromDouble(*(double*)parm.getValue()); - break; - } - case Operation::LONGDOUBLE: - { - pValue = PyFloat_FromDouble(*(long double*)parm.getValue()); - break; - } - case Operation::CHARS: - { - pValue = PyString_FromString(*(char**)parm.getValue()); - break; - } - case Operation::STRING: - { - pValue = PyString_FromString((*(string*)parm.getValue()).c_str()); - break; - } - default: throw new PythonComponentInvocationException("Operation parameter type not supported"); - } - - if (!pValue) - { - Py_DECREF(pArgs); - - if(PyErr_Occurred()) - { - PyErr_Print(); - } - - string msg = "Error converting parameter into Python type"; - LOGERROR(0, msg.c_str()); - throw new PythonComponentInvocationException(msg.c_str()); - - } - //printPyObject("Param value", pValue); - - /* pValue reference stolen here: */ - PyTuple_SetItem(pArgs, i, pValue); - } - - pValue = PyObject_CallObject(pFunc, pArgs); - //printPyObject("Return value", pValue); - - Py_DECREF(pArgs); - if (pValue != NULL) - { - char buf[20]; - if(PyInt_Check(pValue) || PyLong_Check(pValue)) - { - long* data = new long; - if(PyInt_Check(pValue)) - { - LOGINFO_1(3, "PythonServiceWrapper::invoke Return value is int type: %d", PyInt_AsLong(pValue)); - *data = PyInt_AsLong(pValue); - } - else - { - LOGINFO_1(3, "PythonServiceWrapper::invoke Return value is long type: %l", PyLong_AsLong(pValue)); - *data = PyLong_AsLong(pValue); - } - - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = (*data != 0); - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - sprintf(buf, "%d", *data); - *(char**)operation.getReturnValue() = buf; - break; - } - case Operation::STRING: - { - sprintf(buf, "%d", *data); - *(string*)operation.getReturnValue() = buf; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - } - else if(PyBool_Check(pValue)) - { - LOGINFO_1(3, "PythonServiceWrapper::invoke Return value is bool type: %d", (pValue == Py_True)); - bool* data = new bool; - *data = (pValue == Py_True); - - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = *data; - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - if(*data) - { - *(char**)operation.getReturnValue() = "true"; - } - else - { - *(char**)operation.getReturnValue() = "false"; - } - break; - } - case Operation::STRING: - { - if(*data) - { - *(string*)operation.getReturnValue() = "true"; - } - else - { - *(string*)operation.getReturnValue() = "false"; - } - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - } - else if(PyFloat_Check(pValue)) - { - LOGINFO_1(3, "PythonServiceWrapper::invoke Return value is float type: %f", PyFloat_AsDouble(pValue)); - - double* data = new double; - *data = PyFloat_AsDouble(pValue); - - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = (*data != 0.0); - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - sprintf(buf, "%f", *data); - *(char**)operation.getReturnValue() = buf; - break; - } - case Operation::STRING: - { - sprintf(buf, "%f", *data); - *(string*)operation.getReturnValue() = buf; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - } - else if(PyString_Check(pValue)) - { - LOGINFO_1(3, "PythonServiceWrapper::invoke Return value is string type: %s", PyString_AsString(pValue)); - const char** data = new const char*; - *data = PyString_AsString(pValue); - - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - // If the string is empty or "0" or "false" set to false, otherwise true - if(strlen(*data) == 0 || strcmp(*data, "0") == 0 || strcmp(*data, "false") == 0) - { - *(bool*)operation.getReturnValue() = false; - } - else - { - *(bool*)operation.getReturnValue() = true; - } - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)atoi(*data); - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)atoi(*data); - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)atoi(*data); - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)atoi(*data); - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)atol(*data); - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)atol(*data); - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)atof(*data); - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)atof(*data); - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)atof(*data); - break; - } - case Operation::CHARS: - { - *(const char**)operation.getReturnValue() = *data; - break; - } - case Operation::STRING: - { - *(string*)operation.getReturnValue() = *data; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - } - else - { - PyObject* valueRepr = PyObject_Repr(pValue); - PyObject* valueType = PyObject_Type(pValue); - PyObject* valueTypeRepr = PyObject_Repr(valueType); - LOGINFO_2(3, "PythonServiceWrapper::invoke Return value is of unknown type (%s) and has repr: %s", PyString_AsString(valueTypeRepr), PyString_AsString(valueRepr)); - Py_DECREF(valueTypeRepr); - Py_DECREF(valueType); - Py_DECREF(valueRepr); - } - - Py_DECREF(pValue); - } - else - { - Py_DECREF(pFunc); - if(PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Error whilst calling Python module"; - LOGERROR(0, msg.c_str()); - throw new PythonComponentInvocationException(msg.c_str()); - } - } - else - { - if (PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Cannot find the operation named " + operation.getName() + " in the Python module"; - LOGERROR(0, msg.c_str()); - throw new PythonComponentInvocationException(msg.c_str()); - } - Py_XDECREF(pFunc); - - } - catch (...) - { - releaseInstance(); - runtime->unsetCurrentComponent(); - throw; - } - releaseInstance(); - runtime->unsetCurrentComponent(); - LOGEXIT(1,"PythonServiceWrapper::invoke"); - - } - - - // ========================================================================== - // Add any properties into the loaded implementation module as Python objects - // ========================================================================== - void PythonServiceWrapper::addProperties(PyObject* module) - { - // Set all the configured properties - DataObjectPtr properties = component->getProperties(); - PropertyList pl = properties->getInstanceProperties(); - - for (int i = 0; i < pl.size(); i++) - { - if (properties->isSet(pl[i])) - { - string propName = pl[i].getName(); - string propValue = properties->getCString(pl[i]); - PyObject* property; - - if(pl[i].isMany()) - { - //TODO - deal with properties that are many - } - - switch(pl[i].getTypeEnum()) - { - case Type::BooleanType: - { - if(properties->getBoolean(pl[i])) - { - property = Py_True; - } - else - { - property = Py_False; - } - Py_INCREF(property); - break; - } - case Type::BigIntegerType: - case Type::BigDecimalType: - case Type::LongType: - { - property = PyLong_FromLongLong(properties->getLong(pl[i])); - break; - } - case Type::ShortType: - case Type::IntegerType: - { - property = PyInt_FromLong(properties->getInteger(pl[i])); - break; - } - case Type::DoubleType: - case Type::FloatType: - { - property = PyFloat_FromDouble(properties->getDouble(pl[i])); - break; - } - case Type::DataObjectType: - case Type::OpenDataObjectType: - { - // Serialize a DataObject and create a python string object from the XML - DataObjectPtr data = properties->getDataObject(pl[i]); - XMLHelperPtr helper = HelperProvider::getXMLHelper(properties->getDataFactory()); - string serializedData = helper->save(data, "", propName); - property = PyString_FromString(serializedData.c_str()); - break; - } - case Type::CharacterType: - case Type::StringType: - case Type::TextType: - case Type::UriType: - default: - { - // For strings and by default create a python string object - property = PyString_FromString(propValue.c_str()); - break; - } - } - - int success = PyModule_AddObject(module, (char*)propName.c_str(), property); - - if(success == 0) - { - LOGINFO_3(3, "Successfully added property named %s with type %s and value %s to python module", propName.c_str(), pl[i].getType().getName(), propValue.c_str()); - } - else - { - LOGERROR_1(1, "Failed to add property named %s to python module", propName.c_str()); - } - } - } - } - - - // ====================================================================== - // Add any references into the loaded implementation module as class instances that look like - // the classes defined in the interface.python xml - // ====================================================================== - void PythonServiceWrapper::addReferences(PyObject* module) - { - - // Import the TuscanySCA python-extension module - PyObject* pModuleName = PyString_FromString("sca_proxy"); - PyObject* sca_proxy_module = PyImport_Import(pModuleName); - Py_DECREF(pModuleName); - - if(!sca_proxy_module) - { - if(PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Failed to load the sca_proxy Python module - has it been successfully installed?\nReferences from Python components will not be supported"; - LOGERROR(0, msg.c_str()); - } - else - { - // Get the sca_proxy class - PyObject* sca_proxy_class = PyObject_GetAttrString(sca_proxy_module, "sca_proxy_class"); - - // Iterate through the references of the current component, adding - // each reference to the module - Component::REFERENCE_MAP references = component->getReferences(); - Component::REFERENCE_MAP::iterator pos; - for( pos = references.begin(); pos != references.end(); ++pos) - { - ReferenceType* referenceType = ((Reference*) pos->second)->getType(); - string referenceName = referenceType->getName(); - - PyObject* tuscanySCAArgs = PyTuple_New(2); - PyObject* refName = PyString_FromString(referenceType->getName().c_str()); - PyTuple_SetItem(tuscanySCAArgs, 0, refName); - Py_INCREF(Py_True); - PyTuple_SetItem(tuscanySCAArgs, 1, Py_True); - - // Create the instance of the TuscanySCAReference class - PyObject* sca_proxy_classInstance = PyInstance_New(sca_proxy_class, tuscanySCAArgs, NULL); - Py_DECREF(tuscanySCAArgs); - - int success = PyModule_AddObject(module, (char*)referenceName.c_str(), sca_proxy_classInstance); - - if(success == 0) - { - LOGINFO_1(3, "Successfully added sca_proxy_class instance as %s to pythonModule", referenceName.c_str()); - } - else - { - LOGERROR_1(1, "Failed to add sca_proxy_class instance as %s to pythonModule", referenceName.c_str()); - } - } - Py_DECREF(sca_proxy_module); - } - } - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.h deleted file mode 100644 index 51b0f1dd64..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_pythonservicewrapper_h -#define tuscany_sca_python_pythonservicewrapper_h - -#include "tuscany/sca/python/export.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/python/model/PythonImplementation.h" - -using namespace tuscany::sca::model; - -// undefine _DEBUG so Python does not need it's deebug dll -#ifdef _DEBUG -#undef _DEBUG -#define _SCA_PYTHON_DEBUG -#endif -#include -#ifdef _SCA_PYTHON_DEBUG -#define _DEBUG -#endif - - -namespace tuscany -{ - namespace sca - { - namespace python - { - class PythonInterface; - - /** - * 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 PythonServiceWrapper : public ServiceWrapper - { - public: - - /** - * Constructor. - * @param target The component service to which this wrapper refers. - */ - PythonServiceWrapper(Service* service); - - /** - * Destructor. - */ - virtual ~PythonServiceWrapper(); - - /** - * 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. - */ - virtual void invoke(Operation& operation); - - - protected: - - /** - * Return the current instance of the python class. - * @return A pointer to an instance of the python class. - */ - virtual PyObject* getInstance(); - - /** - * Creates a new instance of the python class. - * @return A pointer to a new instance of the python class. - */ - virtual PyObject* newInstance(); - - /** - * Indicates that the current instance of the python module or class - * has been finished with. - */ - virtual void releaseInstance(); - - - private: - /** - * Holds a class instance if a classname is provided. - * Will be constructed each time if scope is set to STATELESS - */ - PyObject* pythonClassInstance; - - /** - * Holds the module - */ - PyObject* pythonModule; - - /** - * Adds references to the provided implementation module or class instance - */ - void addReferences(PyObject* module); - - /** - * Adds properties to the provided implementation module or class instance - */ - void addProperties(PyObject* module); - - /** - * The component to which this wrapper refers. - */ - Component* component; - - /** - * The component implementation - */ - PythonImplementation* implementation; - - }; - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_pythonservicewrapper_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/export.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/export.h deleted file mode 100644 index b608a50711..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/export.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_export_h -#define tuscany_sca_python_export_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) - -#ifdef TUSCANY_SCA_PYTHON_EXPORTS -#define SCA_PYTHON_API __declspec(dllexport) -#else -#define SCA_PYTHON_API __declspec(dllimport) -#endif - -#else -#include -#include -#include -#define SCA_PYTHON_API -#endif - -#endif // tuscany_sca_export_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.cpp deleted file mode 100644 index 413d87173d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/python/model/PythonImplementation.h" -#include "tuscany/sca/python/model/PythonServiceBinding.h" -#include "tuscany/sca/python/model/PythonReferenceBinding.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/util/Utils.h" - -namespace tuscany -{ - namespace sca - { - - namespace python - { - - // Constructor - PythonImplementation::PythonImplementation( - Composite* composite, const string& module, const string& modulePath, const string& className, Scope scope) - : ComponentType(composite, modulePath + "/" + module), - module(module), modulePath(modulePath), className(className), scope(scope) - { - LOGENTRY(1,"PythonImplementation::constructor"); - LOGEXIT(1,"PythonImplementation::constructor"); - } - - PythonImplementation::~PythonImplementation() - { - LOGENTRY(1,"PythonImplementation::destructor"); - LOGEXIT(1,"PythonImplementation::destructor"); - } - - void PythonImplementation::initializeComponent(Component* component) - { - LOGENTRY(1,"PythonImplementation::initializeComponent"); - ComponentType::initializeComponent(component); - - // Create Python bindings for all the services - const Component::SERVICE_MAP& services = component->getServices(); - Component::SERVICE_MAP::const_iterator iter = services.begin(); - for (unsigned int i=0; i< services.size(); i++) - { - Service *service = iter->second; - PythonServiceBinding* binding = new PythonServiceBinding(service); - service->setBinding(binding); - iter++; - } - - // Create Python bindings for all the references - const Component::REFERENCE_MAP& references = component->getReferences(); - Component::REFERENCE_MAP::const_iterator refiter = references.begin(); - for (int ri=0; ri< references.size(); ri++) - { - Reference *reference = refiter->second; - PythonReferenceBinding* binding = new PythonReferenceBinding(reference); - reference->setBinding(binding); - refiter++; - } - - LOGEXIT(1,"PythonImplementation::initializeComponent"); - } - - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.h deleted file mode 100644 index 6d4cece5fd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonImplementation.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_model_pythonimplementation_h -#define tuscany_sca_python_model_pythonimplementation_h -#include "tuscany/sca/model/ComponentType.h" - -#include -using std::map; -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace python - { - /** - * Holds information about an SCA implementation written in Python - */ - class PythonImplementation : public ComponentType - { - - public: - /** - * Scope of the component implementation. - */ - enum Scope - { - COMPOSITE, - STATELESS - }; - - /** - * Constructor. - * @param composite The composite containing this implementation. - * @param module Name of the module. - * @param modulePath Path to the module (could be a blank string - * if this is not specified). - * @param className Name of the class in the module (could be a blank string - * if this is not specified). - */ - PythonImplementation(Composite* composite, const string& module, const string& modulePath, const string& className, Scope scope); - - /** - * Destructor - */ - virtual ~PythonImplementation(); - - /** - * Initialize a component of this type. - * @param component The component to initialize. - */ - virtual void initializeComponent(Component* component); - - /** - * Returns the name of the module. - * @return The name of the module. - */ - const string& getModule() const { return module; } - - /** - * Get the header path. - * @return The pathe element of the header. - */ - const string& getModulePath() const { return modulePath; } - - /** - * Get the name of the class. - * @return The class name if specified. - */ - const string& getClass() const { return className; } - - /** - * Returns the implementation scope - */ - Scope getScope() const { return scope; } - - private: - - /** - * Name of the module. - */ - string module; - - /** - * Path to the module. - */ - string modulePath; - - /** - * 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; - - /** - * The implementation scope - */ - Scope scope; - }; - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_model_pythonimplementation_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.cpp deleted file mode 100644 index 6836158e0d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/python/export.h" -#include "tuscany/sca/python/model/PythonInterface.h" - - -namespace tuscany -{ - namespace sca - { - namespace python - { - const string PythonInterface::typeQName("http://www.osoa.org/xmlns/sca/1.0#PythonInterface"); - - // Constructor - PythonInterface::PythonInterface( - bool remotable, - bool conversational) - : Interface(remotable, conversational) - { - LOGENTRY(1, "PythonInterface::constructor"); - LOGEXIT(1, "PythonInterface::constructor"); - } - - PythonInterface::~PythonInterface() - { - } - - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.h deleted file mode 100644 index ed42a3920d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonInterface.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_model_pythoninterface_h -#define tuscany_sca_python_model_pythoninterface_h - -#include "tuscany/sca/python/export.h" -#include "tuscany/sca/model/Interface.h" - -#include -using std::map; -#include -using std::vector; -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace python - { - /** - * Holds information about an interface described using a C++ - * header file. - */ - class PythonInterface : public Interface - { - - public: - /** - * Constuctor. - * @param scope The scope of the interface (stateless or composite). - * @param remotable True if the interface is remotable. - */ - PythonInterface( - bool remotable, - bool conversational); - - /** - * Destructor. - */ - virtual ~PythonInterface(); - - /** - * return the QName of the schema type for this interface type - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#interface.cpp") - */ - const string& getInterfaceTypeQName() { return typeQName; }; - - /** - * The QName of the schema type for this interface type. - */ - SCA_PYTHON_API static const string typeQName; - - }; - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_model_pythoninterface_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.cpp deleted file mode 100644 index 82f5811203..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/python/model/PythonReferenceBinding.h" -#include "tuscany/sca/python/PythonServiceProxy.h" - - -namespace tuscany -{ - namespace sca - { - namespace python - { - - // Constructor - PythonReferenceBinding::PythonReferenceBinding(Reference* reference) - : ReferenceBinding(reference, ""), serviceProxy(NULL) - { - } - - // Destructor - PythonReferenceBinding::~PythonReferenceBinding() - { - } - - ServiceProxy* PythonReferenceBinding::getServiceProxy() - { - return serviceProxy; - } - - void PythonReferenceBinding::configure(ServiceBinding* binding) - { - targetServiceBinding = binding; - - serviceProxy = new PythonServiceProxy(getReference()); - } - - } // End namespace python - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.h deleted file mode 100644 index b37d261416..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonReferenceBinding.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_model_pythonreferencebinding_h -#define tuscany_sca_python_model_pythonreferencebinding_h - -#include "tuscany/sca/model/ReferenceBinding.h" - - -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace python - { - /** - * Information about a Python service binding for service or a reference. - */ - class PythonReferenceBinding : public ReferenceBinding - { - public: - - /** - * Constructor. - */ - PythonReferenceBinding(Reference* reference); - - /** - * Destructor. - */ - virtual ~PythonReferenceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#PythonImplementationBinding"; }; - - /** - * Create a proxy representing the reference to the - * client component. - */ - virtual ServiceProxy* getServiceProxy(); - - /** - * Configure this binding from a service binding. - */ - virtual void configure(ServiceBinding* serviceBinding); - - /** - * Returns the target service binding. - */ - ServiceBinding* getTargetServiceBinding() const { return targetServiceBinding; }; - - private: - - /** - * The proxy representing the reference to the client - * component. - */ - ServiceProxy* serviceProxy; - - /** - * The service binding of the target - */ - ServiceBinding* targetServiceBinding; - }; - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_model_pythonreferencebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.cpp deleted file mode 100644 index 544682c18e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/python/model/PythonServiceBinding.h" -#include "tuscany/sca/python/PythonServiceWrapper.h" - -namespace tuscany -{ - namespace sca - { - namespace python - { - - // Constructor - PythonServiceBinding::PythonServiceBinding(Service* service) - : ServiceBinding(service, "") - { - LOGENTRY(1,"PythonServiceBinding::constructor"); - serviceWrapper = new PythonServiceWrapper(service); - LOGEXIT(1,"PythonServiceBinding::constructor"); - } - - // Destructor - PythonServiceBinding::~PythonServiceBinding() - { - LOGENTRY(1,"PythonServiceBinding::destructor"); - LOGEXIT(1,"PythonServiceBinding::destructor"); - } - - ServiceWrapper* PythonServiceBinding::getServiceWrapper() - { - LOGENTRY(1,"PythonServiceBinding::getServiceWrapper"); - LOGEXIT(1,"PythonServiceBinding::getServiceWrapper"); - return (ServiceWrapper*)serviceWrapper; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.h deleted file mode 100644 index f2d64b3edc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/model/PythonServiceBinding.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_python_model_pythonservicebinding_h -#define tuscany_sca_python_model_pythonservicebinding_h - -#include "tuscany/sca/model/ServiceBinding.h" -using namespace tuscany::sca::model; -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace python - { - /** - * Information about a Python service binding for service or a reference. - */ - class PythonServiceBinding : public ServiceBinding - { - 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") - */ - PythonServiceBinding(Service* service); - - /** - * Destructor. - */ - virtual ~PythonServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#PythonImplementationBinding"; }; - - /** - * Create a wrapper for the service configured by this - * binding. - */ - virtual ServiceWrapper* getServiceWrapper(); - - private: - - /** - * The wrapper for the service configured by this binding. - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace python - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_python_model_pythonservicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp deleted file mode 100644 index d3a92ba57b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/core/Operation.h" -using namespace tuscany::sca; -using namespace tuscany::sca::model; - -#include "PythonServiceProxy.h" -using namespace tuscany::sca::python; - -#include "tuscany/sca/util/Logging.h" - -#include -#include -using namespace std; - -static PyObject* scaError; - -/** -* Prints out PyObject and dir(PyObject) -* for debugging purposes -*/ -static void printPyObject(char* prefix, char* name, PyObject* pObj) -{ - LOGINFO(4, "Entering printPyObject"); - PyObject* pObjRepr = PyObject_Repr(pObj); - LOGINFO_3(4, "%s printPyObject %s: %s", prefix, name, PyString_AsString(pObjRepr)); - Py_XDECREF(pObjRepr); - - if(pObj != NULL) - { - PyObject* pObjDir = PyObject_Dir(pObj); - PyObject* pObjDirRepr = PyObject_Repr(pObjDir); - LOGINFO_3(4, "%s printPyObject dir(%s): %s", prefix, name, PyString_AsString(pObjDirRepr)); - Py_DECREF(pObjDirRepr); - Py_DECREF(pObjDir); - } - LOGINFO(4, "Returning from printPyObject"); -} - -static PyObject* sca_locateservice(PyObject *self, PyObject *args) -{ - // Get the service name - PyObject* pServiceName = PyTuple_GetItem(args, 0); - - // Import the SCA python-extension module - PyObject* pModuleName = PyString_FromString("sca_proxy"); - PyObject* sca_proxy_module = PyImport_Import(pModuleName); - Py_DECREF(pModuleName); - - if(!sca_proxy_module) - { - if(PyErr_Occurred()) - { - PyErr_Print(); - } - string msg = "Failed to load the sca_proxy Python module - has it been successfully installed?\nReferences from Python components will not be supported"; - LOGERROR(0, msg.c_str()); - } - else - { - // Get the sca_proxy class - PyObject* sca_proxy_class = PyObject_GetAttrString(sca_proxy_module, "sca_proxy_class"); - - PyObject* scaArgs = PyTuple_New(2); - PyTuple_SetItem(scaArgs, 0, pServiceName); - Py_INCREF(Py_True); - PyTuple_SetItem(scaArgs, 1, Py_False); - - // Create the instance of the scaReference class - PyObject* sca_proxy_classInstance = PyInstance_New(sca_proxy_class, scaArgs, NULL); - Py_DECREF(scaArgs); - - return sca_proxy_classInstance; - } - - Py_INCREF(Py_None); - return Py_None; -} - - -static PythonServiceProxy* getServiceProxy(PyObject *args) -{ - LOGENTRY(1, "sca_module getPythonServiceProxy"); - - PythonServiceProxy* serviceProxy = NULL; - SCARuntime* runtime = SCARuntime::getInstance(); - - // The first argument holds the name - string name; - PyObject* pName = PyTuple_GetItem(args, 0); - if(pName && PyString_Check(pName)) - { - name = PyString_AsString(pName); - } - if(name.size() > 0) - { - LOGINFO_1(3, "sca_invoke Service/Reference name is %s", name.c_str()); - } - else - { - string msg = "sca_invoke Service/Reference name has not been set"; - LOGERROR(1, msg.c_str()); - PyErr_SetString(scaError, msg.c_str()); - return NULL; - } - - // The second argument is a boolean - PyObject* isReference = PyTuple_GetItem(args, 1); - - // Get the serviceProxy from the reference or service name provided - if(PyObject_IsTrue(isReference)) - { - Component* component = runtime->getCurrentComponent(); - Reference* ref = component->findReference(name); - if(!ref) - { - string msg = "sca_invoke Could not find the reference named "+name; - LOGERROR(1, msg.c_str()); - PyErr_SetString(scaError, msg.c_str()); - - return NULL; - } - - ReferenceBinding* refBinding = ref->getBinding(); - serviceProxy = (PythonServiceProxy*) refBinding->getServiceProxy(); - } - else - { - Component* component = runtime->getDefaultComponent(); - Composite* composite = (Composite*)component->getType(); - Service* service = composite->findComponentService(name); - - if(!service) - { - string msg = "sca_invoke Could not find the service named "+name; - LOGERROR(1, msg.c_str()); - PyErr_SetString(scaError, msg.c_str()); - return NULL; - } - - serviceProxy = new PythonServiceProxy(service); - } - - return serviceProxy; -} - - -static PyObject* sca_invoke(PyObject *self, PyObject *args) -{ - LOGENTRY(1, "sca_invoke"); - - PythonServiceProxy* pythonServiceProxy = getServiceProxy(args); - if(!pythonServiceProxy) - { - return NULL; - } - - // Get the name of the operation to invoke - string operationName; - PyObject* opName = PyTuple_GetItem(args, 2); - if(opName && PyString_Check(opName)) - { - operationName = PyString_AsString(opName); - } - - if(operationName.size() > 0) - { - LOGINFO_1(3, "sca_invoke Operation name is %s", operationName.c_str()); - } - else - { - string msg = "sca_invoke Operation name has not been set"; - LOGERROR(1, msg.c_str()); - PyErr_SetString(scaError, msg.c_str()); - return NULL; - } - - // Create the Operation object - Operation operation(operationName.c_str()); - - // Parameters are the fourth argument - PyObject* paramTuple = PyTuple_GetItem(args, 3); - - // Go through the supplied parameters - for(int i=0; i < PyTuple_Size(paramTuple); i++) - { - PyObject* param = PyTuple_GetItem(paramTuple, i); - - if(PyInt_Check(param)) - { - LOGINFO_2(3, "sca_invoke Param %d is int type: %d", i, PyInt_AsLong(param)); - long* intData = new long; - *intData = PyInt_AsLong(param); - operation.addParameter(intData); - } - else if(PyBool_Check(param)) - { - LOGINFO_2(3, "sca_invoke Param %d is bool type: %d", i, (param == Py_True)); - bool* boolData = new bool; - *boolData = (param == Py_True); - operation.addParameter(boolData); - } - else if(PyLong_Check(param)) - { - LOGINFO_2(3, "sca_invoke Param %d is long type: %l", i, PyLong_AsLong(param)); - long* longData = new long; - *longData = PyLong_AsLong(param); - operation.addParameter(longData); - } - else if(PyFloat_Check(param)) - { - LOGINFO_2(3, "sca_invoke Param %d is float type: %f", i, PyFloat_AsDouble(param)); - double* doubleData = new double; - *doubleData = PyFloat_AsDouble(param); - operation.addParameter(doubleData); - } - else if(PyString_Check(param)) - { - LOGINFO_2(3, "sca_invoke %d is string type: %s", i, PyString_AsString(param)); - const char** stringData = new const char*; - *stringData = PyString_AsString(param); - operation.addParameter(stringData); - } - else - { - PyObject* paramRepr = PyObject_Repr(param); - PyObject* paramType = PyObject_Type(param); - PyObject* paramTypeRepr = PyObject_Repr(paramType); - - string msg = "sca_invoke Param "; - msg += i; - msg += "is of unknown type ("; - msg += PyString_AsString(paramTypeRepr); - msg += ") and has repr: "; - msg += PyString_AsString(paramRepr); - - LOGERROR(1, msg.c_str()); - PyErr_SetString(scaError, msg.c_str()); - - Py_DECREF(paramTypeRepr); - Py_DECREF(paramType); - Py_DECREF(paramRepr); - - return NULL; - } - } - - PyObject* returnValue = NULL; - - try - { - // Invoke the wired service - pythonServiceProxy->invokeService(operation); - } - catch(...) - { - string msg = "sca_invoke Exception thrown whilst invoking the service"; - LOGERROR(1, msg.c_str()); - PyErr_SetString(scaError, msg.c_str()); - return NULL; - } - - - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - if(*(bool*)operation.getReturnValue()) - { - returnValue = Py_True; - } - else - { - returnValue = Py_False; - } - break; - } - case Operation::SHORT: - { - returnValue = PyInt_FromLong(*(short*)operation.getReturnValue()); - break; - } - case Operation::LONG: - { - returnValue = PyLong_FromLong(*(long*)operation.getReturnValue()); - break; - } - case Operation::USHORT: - { - returnValue = PyInt_FromLong(*(unsigned short*)operation.getReturnValue()); - break; - } - case Operation::ULONG: - { - returnValue = PyLong_FromLong(*(unsigned long*)operation.getReturnValue()); - break; - } - case Operation::FLOAT: - { - returnValue = PyFloat_FromDouble(*(float*)operation.getReturnValue()); - break; - } - case Operation::DOUBLE: - { - returnValue = PyFloat_FromDouble(*(double*)operation.getReturnValue()); - break; - } - case Operation::LONGDOUBLE: - { - returnValue = PyFloat_FromDouble(*(long double*)operation.getReturnValue()); - break; - } - case Operation::CHARS: - { - returnValue = PyString_FromString(*(char**)operation.getReturnValue()); - break; - } - case Operation::STRING: - { - returnValue = PyString_FromString((*(string*)operation.getReturnValue()).c_str()); - break; - } - default: - { - Py_INCREF(Py_None); - returnValue = Py_None; - } - - } - - LOGEXIT(1, "sca_invoke"); - return returnValue; -} -static PyMethodDef ModuleMethods[] = -{ - {"locateservice", sca_locateservice, METH_VARARGS, "Locates an SCA service & returns an sca_proxy_class instance"}, - {"invoke", sca_invoke, METH_VARARGS, "Invoke an operation on an SCA service or reference"}, - {NULL, NULL, 0, NULL} /* Sentinel */ -}; - -PyMODINIT_FUNC initsca(void) -{ - LOGENTRY(1, "initsca"); - - // Create a new module - PyObject* module = Py_InitModule("sca", ModuleMethods); - - scaError = PyErr_NewException("sca.error", NULL, NULL); - Py_INCREF(scaError); - PyModule_AddObject(module, "error", scaError); - - LOGEXIT(1, "initsca"); -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_proxy.py b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_proxy.py deleted file mode 100644 index 1846bf994d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_proxy.py +++ /dev/null @@ -1,56 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# -# This Python code is used in the SCA package and -# provides the proxy objects to a Python SCA component or SCA -# client. -# -# This is done by overloading the __getattr__ method which makes -# calls to myProxy.anyMethod go to __getattr__ which will return -# the invokeFunction defined inside the invoke method - -import sca - -class sca_proxy_class: - - sca_proxy_name = '' - sca_proxy_is_reference = 1 - - def __init__(self, name, isReference): - self.sca_proxy_name = name - self.sca_proxy_is_reference = isReference - return - - def invoke(self, operationName): - - def invokeFunction(*args,**kwargs): - return sca.invoke(self.sca_proxy_name, self.sca_proxy_is_reference, operationName, args) - - return invokeFunction - - def __getattr__(self, operationName): - return self.invoke(operationName) - - def __str__(self): - return '' - - def __repr__(self): - return '' - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_setup.py b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_setup.py deleted file mode 100644 index 9363d5533f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/src/tuscany/sca/python/sca_setup.py +++ /dev/null @@ -1,60 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# -# This Python code builds and/or installs the sca and -# sca_proxy extension modules -# -# Build/install with the following comands: -# python scaSetup.py build -# python scaSetup.py install -# -# - -from distutils.core import setup, Extension, os - -TUSCANY_SCACPP = os.environ.get("TUSCANY_SCACPP") -print 'Using TUSCANY_SCACPP at ' + TUSCANY_SCACPP - -TUSCANY_SDOCPP = os.environ.get("TUSCANY_SDOCPP") -print 'Using TUSCANY_SDOCPP at ' + TUSCANY_SDOCPP - -macros = [] -if os.name == 'nt': - macros = [ ('WIN32',None) ] - -module1 = Extension('sca', - define_macros = macros, - sources = ['sca_module.cpp'], - include_dirs = [ TUSCANY_SCACPP + '/include', - TUSCANY_SCACPP + '/extensions/python/include', - TUSCANY_SDOCPP + '/include'], - libraries = ['tuscany_sca', - 'tuscany_sdo', - 'tuscany_sca_python'], - library_dirs = [ TUSCANY_SCACPP + '/lib', - TUSCANY_SCACPP + '/extensions/python/lib', - TUSCANY_SDOCPP + '/lib']) - -setup (name = 'sca', - version = '1.0', - description = 'The Tuscany SCA package', - url='http://incubator.apache.org/tuscany/', - ext_modules = [module1], - py_modules = ['sca_proxy']) diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-implementation-python.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-implementation-python.xsd deleted file mode 100644 index e1c7247992..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-implementation-python.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-interface-python.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-interface-python.xsd deleted file mode 100644 index dd9075c7fb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/python/xsd/sca-interface-python.xsd +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/Makefile.am deleted file mode 100644 index ac176d8811..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src - -datadir=$(prefix)/extensions/ruby - -nobase_data_DATA = xsd/*.xsd - -EXTRA_DIST = xsd \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/deploy.bat deleted file mode 100644 index e53a8780cf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/deploy.bat +++ /dev/null @@ -1,64 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set rubyextdir=%extdir%\ruby -set srcdir=%rootdir%\runtime\extensions\ruby\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %rubyextdir% mkdir %rubyextdir% -if not exist %rubyextdir%\bin mkdir %rubyextdir%\bin -if not exist %rubyextdir%\lib mkdir %rubyextdir%\lib -if not exist %rubyextdir%\xsd mkdir %rubyextdir%\xsd - -del %rubyextdir%\bin\tuscany_sca_ruby.* -del %rubyextdir%\lib\*.lib - -copy %srcdir%\deploy.cmd %rubyextdir% -copy %srcdir%\..\xsd\*.* %rubyextdir%\xsd - -copy %inpath%\tuscany_sca_ruby.lib %rubyextdir%\lib -copy %inpath%\tuscany_sca_ruby.dll %rubyextdir%\bin\tuscany_sca_ruby.dll.disabled - -if exist %inpath%\tuscany_sca_ruby.pdb copy %inpath%\tuscany_sca_ruby.pdb %rubyextdir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/Makefile.am deleted file mode 100644 index d73ac1f90c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/ruby/lib -lib_LTLIBRARIES = libtuscany_sca_ruby.la - -install-exec-hook: - cd $(libdir); \ - ln -s -f libtuscany_sca_ruby.so tuscany_sca_ruby.so; \ - for i in libtuscany_sca_ruby.*; do mv $$i $$i.disabled; done - -rootdir=$(prefix)/extensions/ruby -root_SCRIPTS = deploy.sh - -noinst_HEADERS = \ -tuscany/sca/ruby/*.h \ -tuscany/sca/ruby/model/*.h - -EXTRA_DIST = deploy.sh - -libtuscany_sca_ruby_la_SOURCES = \ -tuscany/sca/ruby/RubyExtension.cpp \ -tuscany/sca/ruby/RubyImplementationExtension.cpp \ -tuscany/sca/ruby/RubyServiceProxy.cpp \ -tuscany/sca/ruby/RubyServiceWrapper.cpp \ -tuscany/sca/ruby/model/RubyImplementation.cpp \ -tuscany/sca/ruby/model/RubyReferenceBinding.cpp \ -tuscany/sca/ruby/model/RubyServiceBinding.cpp \ -tuscany/sca/ruby/RubyCompositeContext.cpp - -libtuscany_sca_ruby_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L${RUBY_LIB} -lruby - -INCLUDES = -Imodel -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${RUBY_INCLUDE} - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.cmd deleted file mode 100644 index 5baf8289e3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.cmd +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal -set currentPath=%~d0%~p0 - -echo Enabling the Tuscany Ruby extension -rename %currentPath%\bin\tuscany_sca_ruby.dll.disabled tuscany_sca_ruby.dll - -:end -echo Done -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.sh deleted file mode 100755 index 492b1b09d1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/deploy.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -echo "Enabling the Tuscany Ruby extension" - -for i in lib/*.disabled; do x=${i%.disabled}; mv $i $x; done - -echo "Done" diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/Ruby.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/Ruby.h deleted file mode 100644 index a6b8ee8ffa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/Ruby.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_ruby_h -#define tuscany_sca_ruby_ruby_h - -// Ruby inists on MS VC6 ... we'll see about that! -#if defined(WIN32) || defined (_WINDOWS) -#define _REAL_MSC_VER _MSC_VER -#undef _MSC_VER -#define _MSC_VER 1200 -#endif - -#include - -#if defined(WIN32) || defined (_WINDOWS) -#undef _MSC_VER -#define _MSC_VER _REAL_MSC_VER -#endif - -#endif // tuscany_sca_ruby_ruby_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyCompositeContext.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyCompositeContext.cpp deleted file mode 100644 index 148bccc025..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyCompositeContext.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/ruby/RubyServiceProxy.h" - -using namespace tuscany::sca::ruby; - -extern "C" -{ - - // Implement the Sca::locateService module function - SCA_RUBY_API VALUE tuscany_sca_ruby_locateService(VALUE module, VALUE value) - { - - // Get the default component - Component* defaultComponent = tuscany::sca::SCARuntime::getInstance()->getDefaultComponent(); - Composite* composite = (Composite*)defaultComponent->getType(); - - // Locate the service - const char* serviceName = rb_string_value_cstr(&value); - Service* service = composite->findComponentService(serviceName); - string msg; - if (!service) - { - string msg = "Service not found: "; - msg = msg + serviceName; - rb_raise(rb_eRuntimeError, msg.c_str()); - } - - // Get a Proxy for this service - RubyServiceProxy* serviceProxy = new RubyServiceProxy(service); - - // Return the Ruby proxy value object - return serviceProxy->getProxyValue(); - } - - // Initialize the Ruby extension - SCA_RUBY_API void Init_tuscany_sca_ruby() - { - - // Define the Sca::locateService() function - VALUE module = rb_define_module("SCA"); - rb_define_module_function(module, "locateService", (VALUE(*)(ANYARGS))tuscany_sca_ruby_locateService, 1); - - } - - SCA_RUBY_API void Init_libtuscany_sca_ruby() - { - Init_tuscany_sca_ruby(); - } -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.cpp deleted file mode 100644 index 7153ef4fb1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/ruby/RubyExtension.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/ruby/RubyImplementationExtension.h" - - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::ruby::RubyExtension::initialize(); - } -} - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - // =================================================================== - // Constructor for the RubyExtension class. - // =================================================================== - RubyExtension::RubyExtension() - { - LOGENTRY(1, "RubyExtension::constructor"); - LOGEXIT(1, "RubyExtension::constructor"); - } - - // =================================================================== - // Destructor for the RubyExtension class. - // =================================================================== - RubyExtension::~RubyExtension() - { - LOGENTRY(1, "RubyExtension::destructor");; - LOGEXIT(1, "RubyExtension::destructor"); - } - - void RubyExtension::initialize() - { - LOGENTRY(1, "RubyExtension::initialize");; - SCARuntime::getInstance()->registerImplementationExtension(new RubyImplementationExtension()); - LOGEXIT(1, "RubyExtension::initialize");; - } - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.h deleted file mode 100644 index 232431ca1e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyExtension.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_rubyextension_h -#define tuscany_sca_ruby_rubyextension_h - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - class RubyExtension - { - public: - /** - * Default constructor - */ - RubyExtension(); - - /** - * Destructor - */ - virtual ~RubyExtension(); - - static void initialize(); - - private: - - }; - - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_rubyextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.cpp deleted file mode 100644 index 2bc5f9d0d9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/ruby/RubyImplementationExtension.h" -#include "tuscany/sca/ruby/model/RubyImplementation.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" - - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - // =================================================================== - // Constructor for the RubyImplementationExtension class. - // =================================================================== - RubyImplementationExtension::RubyImplementationExtension() - { - LOGENTRY(1, "RubyImplementationExtension::constructor"); - LOGEXIT(1, "RubyImplementationExtension::constructor"); - } - - // =================================================================== - // Destructor for the RubyImplementationExtension class. - // =================================================================== - RubyImplementationExtension::~RubyImplementationExtension() - { - LOGENTRY(1, "RubyImplementationExtension::destructor");; - LOGEXIT(1, "RubyImplementationExtension::destructor"); - } - - const string RubyImplementationExtension::extensionName("ruby"); - const string RubyImplementationExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#RubyImplementation"); - - // =================================================================== - // loadModelElement - load the info from implementation.ruby - // =================================================================== - ComponentType* RubyImplementationExtension::getImplementation(Composite *composite, DataObjectPtr scdlImplementation) - { - string implType = scdlImplementation->getType().getName(); - if (implType == "RubyImplementation") - { - string module = scdlImplementation->getCString("module"); - string className = scdlImplementation->getCString("class"); - string script = scdlImplementation->getCString("script"); - - RubyImplementation* rubyImpl = new RubyImplementation(composite, module, className, script); - - return rubyImpl; - } - else - { - return NULL; - } - } - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.h deleted file mode 100644 index a1c5f26a3e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyImplementationExtension.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_rubyimplementationextension_h -#define tuscany_sca_ruby_rubyimplementationextension_h - -#include "tuscany/sca/extension/ImplementationExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - class RubyImplementationExtension : public ImplementationExtension - { - public: - /** - * Default constructor - */ - RubyImplementationExtension(); - - /** - * Destructor - */ - virtual ~RubyImplementationExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#implementation.ruby") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ComponentType* getImplementation(Composite* composite, DataObjectPtr scdlImplementation); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_rubyimplementationextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.cpp deleted file mode 100644 index 228f1f8940..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.cpp +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/ruby/RubyServiceProxy.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/ruby/model/RubyImplementation.h" -#include "tuscany/sca/ruby/model/RubyReferenceBinding.h" - -extern "C" -{ - - // Initialize a Ruby proxy - SCA_RUBY_API VALUE tuscany_sca_ruby_proxy_initialize(VALUE self, VALUE serviceProxy) - { - rb_iv_set(self, "@cppProxy", serviceProxy); - return self; - } - - // Handle a method_missing message and dispatch to - // our C++ proxy - SCA_RUBY_API VALUE tuscany_sca_ruby_proxy_method_missing(int argc, VALUE* argv, VALUE self) - { - VALUE proxy = rb_iv_get(self, "@cppProxy"); - - // Get the target service wrapper - tuscany::sca::ruby::RubyServiceProxy *serviceProxy; - Data_Get_Struct(proxy, tuscany::sca::ruby::RubyServiceProxy, serviceProxy); - - // Handle the invocation - return serviceProxy->invoke(argc, argv); - - } - -} - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - VALUE RubyServiceProxy::proxyClass = Qnil; - - // ============================ - // Constructor: Create a proxy - // ============================ - RubyServiceProxy::RubyServiceProxy(Reference* reference) - : ServiceProxy(reference) - { - LOGENTRY(1,"RubyServiceProxy::constructor"); - - // ---------------------- - // Get the component - // ---------------------- - component = reference->getComponent(); - string name = reference->getType()->getName(); - - // Get the service wrapper - RubyReferenceBinding* referenceBinding = (RubyReferenceBinding*)reference->getBinding(); - - serviceWrapper = referenceBinding->getTargetServiceBinding()->getServiceWrapper(); - - // Create the Ruby proxy - createProxy(); - - LOGEXIT(1,"RubyServiceProxy::constructor"); - } - - // ============================ - // Constructor: Create a proxy - // ============================ - RubyServiceProxy::RubyServiceProxy(Service* service) - : ServiceProxy(0) - { - LOGENTRY(1,"RubyServiceProxy::constructor"); - - // ---------------------- - // Get the component - // ---------------------- - component = service->getComponent(); - string name = service->getType()->getName(); - - // Get the service wrapper - serviceWrapper = service->getBinding()->getServiceWrapper(); - - // Create the Ruby proxy - createProxy(); - - LOGEXIT(1,"RubyServiceProxy::constructor"); - } - - // ========== - // Destructor - // ========== - RubyServiceProxy::~RubyServiceProxy() - { - LOGENTRY(1,"RubyServiceProxy::destructor"); - LOGEXIT(1,"RubyServiceProxy::destructor"); - } - - void RubyServiceProxy::createProxy() - { - // Create the Ruby proxy class - if (RubyServiceProxy::proxyClass == Qnil) - { - VALUE module = rb_define_module("Tuscany"); - proxyClass = rb_define_class_under(module, "ServiceProxy", rb_cObject); - rb_define_method(proxyClass, "initialize", (VALUE(*)(ANYARGS))tuscany_sca_ruby_proxy_initialize, 1); - rb_define_method(proxyClass, "method_missing", (VALUE(*)(ANYARGS))tuscany_sca_ruby_proxy_method_missing, -1); - } - - // Create the Ruby proxy instance, pass the service wrapper to it - VALUE* args = new VALUE[1]; - args[0] = Data_Wrap_Struct(rb_cObject, NULL, NULL, this); - proxyValue = rb_class_new_instance(1, args, proxyClass); - - // Mark proxyValue busy so that it doesn't get GC'ed by Ruby - rb_gc_register_address(&proxyValue); - } - - - VALUE RubyServiceProxy::invoke(int argc, VALUE* argv) - { - // Get the method name - char* methodName = rb_id2name(SYM2ID(argv[0])); - - // Get the block passed by the caller - VALUE block =rb_block_given_p() ? rb_block_proc() : Qnil; - - // Create new Operation object - Operation operation(methodName); - - // Convert the Ruby parameters to C++ - for (int i = 1; i < argc; i++) - { - VALUE value = argv[i]; - - int valueType = TYPE(value); - - switch (valueType) - { - case T_FLOAT: - { - float* data = new float; - *data = rb_num2dbl(value); - operation.addParameter(data); - break; - } - case T_STRING: - { - string* data = new string(rb_string_value_cstr(&value)); - const char** cdata = new const char*; - *cdata = data->c_str(); - operation.addParameter(cdata); - break; - } - case T_FIXNUM: - { - long* data = new long; - *data = rb_num2long(value); - operation.addParameter(data); - break; - } - case T_BIGNUM: - { - long double* data = new long double; - *data = rb_num2dbl(value); - operation.addParameter(data); - break; - } - case T_TRUE: - { - bool* data = new bool; - *data = true; - operation.addParameter(data); - break; - } - case T_FALSE: - { - bool* data = new bool; - *data = false; - operation.addParameter(data); - break; - } - case T_OBJECT: - { - VALUE klass = rb_obj_class(value); - if (klass == RubyImplementation::getXMLDocumentClass()) - { - // Convert a REXML::Document to a DataObject - ID to_s = rb_intern("to_s"); - VALUE vstr = rb_funcall(value, to_s, 0); - string str = string(rb_string_value_cstr(&vstr)); - - Composite* composite = getReference()->getComponent()->getComposite(); - commonj::sdo::XMLHelper* xmlHelper = composite->getXMLHelper(); - commonj::sdo::XMLDocumentPtr xmlDoc = xmlHelper->load(str.c_str()); - - DataObjectPtr dob; - if (xmlDoc != NULL) - { - dob = xmlDoc->getRootDataObject(); - } - if (dob != NULL) - { - operation.addParameter(&dob); - } - else - { - string msg = "Document could not be converted to a DataObject"; - rb_raise(rb_eTypeError, msg.c_str()); - return Qnil; - } - } - else - { - string msg = "Ruby type not supported: " + valueType; - rb_raise(rb_eTypeError, msg.c_str()); - return Qnil; - } - break; - } - default:; - string msg = "Ruby type not supported: " + valueType; - rb_raise(rb_eTypeError, msg.c_str()); - return Qnil; - } - - } - - try - { - // Call into the target service wrapper - serviceWrapper->invoke(operation); - - // Convert the result to a Ruby value - VALUE value; - Operation::ParameterType resultType = operation.getReturnType(); - switch(resultType) - { - case Operation::BOOL: - { - if( *(bool*)operation.getReturnValue()) - { - //boolean true - value = rb_int2inum(1); - } - else - { - value = rb_int2inum(0); - } - break; - } - case Operation::SHORT: - { - value = rb_int2inum(*(short*)operation.getReturnValue()); - break; - } - case Operation::USHORT: - { - value = rb_uint2inum(*(unsigned short*)operation.getReturnValue()); - break; - } - case Operation::LONG: - { - value = rb_int2inum(*(long*)operation.getReturnValue()); - break; - } - case Operation::ULONG: - { - value = rb_uint2inum(*(unsigned long*)operation.getReturnValue()); - break; - } - case Operation::FLOAT: - { - value = rb_float_new(*(float*)operation.getReturnValue()); - break; - } - case Operation::DOUBLE: - { - value = rb_float_new(*(double*)operation.getReturnValue()); - break; - } - case Operation::LONGDOUBLE: - { - value = rb_float_new(*(long double*)operation.getReturnValue()); - break; - } - case Operation::CHARS: - { - value = rb_str_new2(*(char**)operation.getReturnValue()); - break; - } - case Operation::STRING: - { - value = rb_str_new2((*(string*)operation.getReturnValue()).c_str()); - break; - } - case Operation::DATAOBJECT: - { - DataObjectPtr dob = *(DataObjectPtr*)operation.getReturnValue(); - - // Convert a DataObject to a REXML Document object - Composite* composite = component->getComposite(); - commonj::sdo::XMLHelper* xmlHelper = composite->getXMLHelper(); - char* str = xmlHelper->save( - dob, - dob->getType().getURI(), - dob->getType().getName()); - VALUE vstr[1]; - vstr[0] = rb_str_new2(str); - - value = rb_class_new_instance(1, vstr, RubyImplementation::getXMLDocumentClass()); - break; - } - default: - { - //throw new ComponentInvocationException("Operation parameter type not supported"); - string msg = "Operation parameter type not supported" + resultType; - rb_raise(rb_eRuntimeError, msg.c_str()); - return Qnil; - } - } - - return value; - - } - catch(TuscanyRuntimeException &ex) - { - string msg = "Exception while invoking a service: "; - msg += ex.getEClassName(); - msg += ": "; - msg += ex.getMessageText(); - rb_raise(rb_eRuntimeError, msg.c_str()); - return Qnil; - } - - return Qnil; - } - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.h deleted file mode 100644 index f4692733f1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceProxy.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_rubyserviceproxy_h -#define tuscany_sca_ruby_rubyserviceproxy_h - -#include "tuscany/sca/ruby/export.h" -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/Service.h" - -using namespace tuscany::sca::model; - -#include "tuscany/sca/ruby/Ruby.h" - - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - /** - * 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 RubyServiceProxy : public ServiceProxy - { - public: - /** - * Create a new service proxy for a reference. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The reference on the source component. - * @param target The wrapper of the service which is wired to this reference. - */ - RubyServiceProxy(Reference* reference); - - /** - * Create a new service proxy for a service. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The service on the target component. - * @param target The wrapper of the target service. - */ - RubyServiceProxy(Service* service); - - /** - * Destructor. - */ - virtual ~RubyServiceProxy(); - - /** - * Returns the Ruby value of the proxy - */ - VALUE getProxyValue() const { return proxyValue; }; - - /** - * Handles the invocation of a Ruby method. - */ - VALUE invoke(int argc, VALUE* argv); - - private: - - /** - * Create the Ruby proxy object - */ - void createProxy(); - - /** - * The target service wrapper - */ - ServiceWrapper* serviceWrapper; - - /** - * The Ruby value of the proxy - */ - VALUE proxyValue; - - /** - * The component owning the proxy - */ - Component* component; - - /** - * The Ruby proxy class - */ - static VALUE proxyClass; - - }; - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_rubyserviceproxy_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp deleted file mode 100644 index a0eb97142d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp +++ /dev/null @@ -1,724 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/ruby/RubyServiceWrapper.h" - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Library.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/ruby/model/RubyImplementation.h" -#include "tuscany/sca/ruby/model/RubyServiceBinding.h" -#include "tuscany/sca/ruby/RubyServiceProxy.h" -#include "commonj/sdo/SDO.h" - -using commonj::sdo::PropertyList; - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - // =========== - // Constructor - // =========== - RubyServiceWrapper::RubyServiceWrapper(Service* service) - : ServiceWrapper(service) - { - LOGENTRY(1,"RubyServiceWrapper::constructor"); - - component = service->getComponent(); - implementation = (RubyImplementation*)component->getType(); - interf = service->getType()->getInterface(); - - LOGEXIT(1,"RubyServiceWrapper::constructor"); - - } - - // ========== - // Destructor - // ========== - RubyServiceWrapper::~RubyServiceWrapper() - { - LOGENTRY(1,"RubyServiceWrapper::destructor"); - LOGEXIT(1,"RubyServiceWrapper::destructor"); - } - - // ====================================================================== - // invoke: wrapper call to service with setting the component context - // ====================================================================== - void RubyServiceWrapper::invoke(Operation& operation) - { - LOGENTRY(1,"RubyServiceWrapper::invoke"); - - SCARuntime* runtime = SCARuntime::getInstance(); - runtime->setCurrentComponent(component); - - try - { - - // Create a new instance of the Ruby implementation class - VALUE instance = rb_class_new_instance(0, NULL, implementation->getImplementationClass()); - - // Set all the references - const Component::REFERENCE_MAP& references = component->getReferences(); - Component::REFERENCE_MAP::const_iterator refiter = references.begin(); - for (int ri=0; ri< references.size(); ri++) - { - Reference* reference = refiter->second; - RubyServiceProxy* proxy = (RubyServiceProxy*)reference->getBinding()->getServiceProxy(); - if (proxy != NULL) - { - VALUE proxyValue = proxy->getProxyValue(); - string varName = "@" + refiter->first; - rb_iv_set(instance, varName.c_str(), proxyValue); - } - refiter++; - } - - // Set all the configured properties - DataObjectPtr properties = component->getProperties(); - PropertyList pl = properties->getInstanceProperties(); - for (int i = 0; i < pl.size(); i++) - { - if (properties->isSet(pl[i])) - { - string varName = "@"; - varName += pl[i].getName(); - string cstr = properties->getCString(pl[i]); - VALUE propertyValue; - if (cstr == "true") - { - propertyValue = Qtrue; - } - else if (cstr == "false") - { - propertyValue = Qfalse; - } - else - { - //TODO use one of the rb_str_to_inum() functions - // to convert a numeric value to a Ruby numeric - propertyValue = rb_str_new2(cstr.c_str()); - } - rb_iv_set(instance, varName.c_str(), propertyValue); - } - } - - // Get the ID of the specified method - ID method = rb_intern(operation.getName().c_str()); - - // Convert C++ parameters to Ruby parameters - VALUE *args = NULL; - int n = operation.getNParms(); - if (n != 0) - { - args=new VALUE[n]; - - for(int i = 0; i < operation.getNParms(); i++) - { - VALUE value; - - const Operation::Parameter& parm = operation.getParameter(i); - Operation::ParameterType parmType = parm.getType(); - switch(parmType) - { - case Operation::BOOL: - { - if( *(bool*)parm.getValue()) - { - //boolean true - value = rb_int2inum(1); - } - else - { - value = rb_int2inum(0); - } - break; - } - case Operation::SHORT: - { - value = rb_int2inum(*(short*)parm.getValue()); - break; - } - case Operation::USHORT: - { - value = rb_uint2inum(*(unsigned short*)parm.getValue()); - break; - } - case Operation::LONG: - { - value = rb_int2inum(*(long*)parm.getValue()); - break; - } - case Operation::ULONG: - { - value = rb_uint2inum(*(unsigned long*)parm.getValue()); - break; - } - case Operation::FLOAT: - { - value = rb_float_new(*(float*)parm.getValue()); - break; - } - case Operation::DOUBLE: - { - value = rb_float_new(*(double*)parm.getValue()); - break; - } - case Operation::LONGDOUBLE: - { - value = rb_float_new(*(long double*)parm.getValue()); - break; - } - case Operation::CHARS: - { - value = rb_str_new2(*(char**)parm.getValue()); - break; - } - case Operation::STRING: - { - value = rb_str_new2((*(string*)parm.getValue()).c_str()); - break; - } - case Operation::DATAOBJECT: - { - DataObjectPtr dob = *(DataObjectPtr*)parm.getValue(); - - // Convert a DataObject to a REXML Document object - Composite* composite = component->getComposite(); - commonj::sdo::XMLHelper* xmlHelper = composite->getXMLHelper(); - char* str = xmlHelper->save( - dob, - dob->getType().getURI(), - dob->getType().getName()); - VALUE vstr[1]; - vstr[0] = rb_str_new2(str); - - value = rb_class_new_instance(1, vstr, RubyImplementation::getXMLDocumentClass()); - break; - } - default: - { - //throw new ComponentInvocationException("Operation parameter type not supported"); - string msg = "Operation parameter type not supported" + parmType; - throw msg.c_str(); - } - } - - args[i] = value; - } - } - - - // Invoke the specified method - VALUE result; - if (n == 0) - { - result = rb_funcall(instance, method, 0); - } - else - { - result = rb_funcall2(instance, method, n, args); - } - - // Convert the Ruby result value to a C++ result - int resultType = TYPE(result); - char buf[20]; - switch(resultType) - { - case T_FLOAT: - { - float* data = new float; - *data = rb_num2dbl(result); - - // Check if the return type has already been set for typed languages - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = (*data != 0.0); - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - sprintf(buf, "%f", *data); - *(char**)operation.getReturnValue() = buf; - break; - } - case Operation::STRING: - { - sprintf(buf, "%f", *data); - *(string*)operation.getReturnValue() = buf; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - break; - } - case T_STRING: - { - string* stringdata = new string(rb_string_value_cstr(&result)); - const char** data = new const char*; - *data = stringdata->c_str(); - - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - // If the string is empty or "0" or "false" set to false, otherwise true - if(strlen(*data) == 0 || strcmp(*data, "0") == 0 || strcmp(*data, "false") == 0) - { - *(bool*)operation.getReturnValue() = false; - } - else - { - *(bool*)operation.getReturnValue() = true; - } - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)atoi(*data); - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)atoi(*data); - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)atoi(*data); - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)atoi(*data); - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)atol(*data); - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)atol(*data); - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)atof(*data); - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)atof(*data); - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)atof(*data); - break; - } - case Operation::CHARS: - { - *(const char**)operation.getReturnValue() = *data; - break; - } - case Operation::STRING: - { - *(string*)operation.getReturnValue() = *data; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - break; - } - case T_FIXNUM: - { - long* data = new long; - *data = rb_num2long(result); - - // Check if the return type has already been (set for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = (*data != 0); - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - sprintf(buf, "%d", *data); - *(char**)operation.getReturnValue() = buf; - break; - } - case Operation::STRING: - { - sprintf(buf, "%d", *data); - *(string*)operation.getReturnValue() = buf; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - - break; - } - case T_BIGNUM: - { - long double* data = new long double; - *data = rb_num2dbl(result); - - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = (*data != 0.0); - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - sprintf(buf, "%f", *data); - *(char**)operation.getReturnValue() = buf; - break; - } - case Operation::STRING: - { - sprintf(buf, "%f", *data); - *(string*)operation.getReturnValue() = buf; - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - break; - } - case T_TRUE: - case T_FALSE: - { - bool* data = new bool; - *data = (resultType == T_TRUE); - // Check if the return type has already been set (for typed languages) - switch(operation.getReturnType()) - { - case Operation::BOOL: - { - *(bool*)operation.getReturnValue() = *data; - break; - } - case Operation::SHORT: - { - *(short*)operation.getReturnValue() = (short)*data; - break; - } - case Operation::USHORT: - { - *(unsigned short*)operation.getReturnValue() = (unsigned short)*data; - break; - } - case Operation::INT: - { - *(int*)operation.getReturnValue() = (int)*data; - break; - } - case Operation::UINT: - { - *(unsigned int*)operation.getReturnValue() = (unsigned int)*data; - break; - } - case Operation::LONG: - { - *(long*)operation.getReturnValue() = (long)*data; - break; - } - case Operation::ULONG: - { - *(unsigned long*)operation.getReturnValue() = (unsigned long)*data; - break; - } - case Operation::FLOAT: - { - *(float*)operation.getReturnValue() = (float)*data; - break; - } - case Operation::DOUBLE: - { - *(double*)operation.getReturnValue() = (double)*data; - break; - } - case Operation::LONGDOUBLE: - { - *(long double*)operation.getReturnValue() = (long double)*data; - break; - } - case Operation::CHARS: - { - if(*data) - { - *(char**)operation.getReturnValue() = "true"; - } - else - { - *(char**)operation.getReturnValue() = "false"; - } - break; - } - case Operation::STRING: - { - if(*data) - { - *(string*)operation.getReturnValue() = "true"; - } - else - { - *(string*)operation.getReturnValue() = "false"; - } - break; - } - default: - { - // The type is set as something else or has not been set - operation.setReturnValue(data); - } - } - - break; - } - case T_OBJECT: - { - VALUE klass = rb_obj_class(result); - if (klass == RubyImplementation::getXMLDocumentClass()) - { - // Convert a REXML::Document to a DataObject - ID to_s = rb_intern("to_s"); - VALUE vstr = rb_funcall(result, to_s, 0); - string str = string(rb_string_value_cstr(&vstr)); - - Composite* composite = component->getComposite(); - commonj::sdo::XMLHelper* xmlHelper = composite->getXMLHelper(); - commonj::sdo::XMLDocumentPtr xmlDoc = xmlHelper->load(str.c_str()); - - DataObjectPtr dob; - if (xmlDoc != NULL) - { - dob = xmlDoc->getRootDataObject(); - } - if (dob != NULL) - { - operation.setReturnValue(&dob); - } - else - { - string msg = "Document could not be converted to a DataObject"; - throw msg.c_str(); - } - } - else - { - string msg = "Ruby type not supported: " + resultType; - throw msg.c_str(); - } - break; - } - default: - { - string msg = "Ruby type not supported: " + resultType; - throw msg.c_str(); - } - } - - } - catch (...) - { - runtime->unsetCurrentComponent(); - throw; - } - runtime->unsetCurrentComponent(); - LOGEXIT(1,"RubyServiceWrapper::invoke"); - - } - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.h deleted file mode 100644 index 849bbdd33e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_rubyservicewrapper_h -#define tuscany_sca_ruby_rubyservicewrapper_h - -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/ruby/model/RubyImplementation.h" -#include "tuscany/sca/ruby/export.h" - -#include "tuscany/sca/ruby/Ruby.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - class RubyInterface; - - /** - * 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 SCA_RUBY_API RubyServiceWrapper : public ServiceWrapper - { - public: - - /** - * Constructor. - * @param target The component service to which this wrapper refers. - */ - RubyServiceWrapper(Service* service); - - /** - * Destructor. - */ - virtual ~RubyServiceWrapper(); - - /** - * 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. - */ - virtual void invoke(Operation& operation); - - private: - - /** - * The component to which this wrapper refers. - */ - Component* component; - - /** - * A pointer to the interface which the service exposes. - */ - Interface* interf; - - /** - * The Ruby implementation - */ - RubyImplementation* implementation; - - }; - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_rubyservicewrapper_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/export.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/export.h deleted file mode 100644 index 21f09dddfc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/export.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_export_h -#define tuscany_sca_ruby_export_h - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) - -#ifdef TUSCANY_SCA_RUBY_EXPORTS -#define SCA_RUBY_API __declspec(dllexport) -#else -#define SCA_RUBY_API __declspec(dllimport) -#endif - -#else -#define SCA_RUBY_API -#endif - -#endif // tuscany_sca_ruby_export_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.cpp deleted file mode 100644 index 877b98e7b4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/ruby/model/RubyImplementation.h" -#include "tuscany/sca/ruby/model/RubyServiceBinding.h" -#include "tuscany/sca/ruby/model/RubyReferenceBinding.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/util/Utils.h" - -namespace tuscany -{ - namespace sca - { - - namespace ruby - { - - bool RubyImplementation::initialized = false; - VALUE RubyImplementation::xmlDocumentClass = 0; - - // Constructor - RubyImplementation::RubyImplementation(Composite* composite, const string& module, const string& className, const string& script) - : ComponentType(composite, script.substr(0, script.find_last_of('.'))), - module(module), className(className), script(script) - { - loadClass(); - } - - RubyImplementation::~RubyImplementation() - { - } - - void RubyImplementation::loadClass() - { - // Initialize the Ruby runtime - if (!initialized) - { - ruby_init(); - ruby_init_loadpath(); - - // Load the Rexml module. Rexml is used to handle XML documents. - //rb_require("rexml/document"); - // Use rb_eval_string for now as it provides better error reporting - rb_eval_string("require(\"rexml/document\")"); - - xmlDocumentClass = rb_path2class("REXML::Document"); - - initialized = true; - } - - // Load the specified Ruby script - if (script != "") - { - // Convert any windows slashes \ in the root path to unix slashes / - // otherwise the ruby interpreter throws an error - string rootpath = getComposite()->getRoot(); - int pos = 0; - while((pos = rootpath.find('\\', pos)) != string::npos) - { - rootpath = rootpath.replace(pos, 1, "/"); - } - - // Use rb_eval_string for now as it provides better error reporting - string path = "require(\"" + rootpath + "/" + script +"\")"; - //rb_require((char *)path.c_str()); - rb_eval_string(path.c_str()); - } - - // Load the Ruby implementation class - implementationClass = rb_path2class(className.c_str()); - - // Create a default service - ServiceType* defaultServiceType = new ServiceType(this, "", NULL, NULL); - addServiceType(defaultServiceType); - - // Introspect the Ruby class and create references and properties for - // all public attributes - VALUE methods = rb_class_public_instance_methods(0, NULL, implementationClass); - int n = RARRAY(methods)->len; - for (int i = 0; i 1 && methodName[s-1] == '=' && methodName[0] != '=') - { - string variableName = methodName.substr(0, s-1); - ReferenceType* referenceType = new ReferenceType( - this, variableName, NULL, NULL, ReferenceType::ONE_ONE); - addReferenceType(referenceType); - - // Create a property type as well - addPropertyType(variableName, "http://www.w3.org/2001/XMLSchema#string", false, NULL); - - } - } - } - - void RubyImplementation::initializeComponent(Component* component) - { - ComponentType::initializeComponent(component); - - // Create Ruby bindings for all the services - const Component::SERVICE_MAP& services = component->getServices(); - Component::SERVICE_MAP::const_iterator iter = services.begin(); - for (int i=0; i< services.size(); i++) - { - Service *service = iter->second; - RubyServiceBinding* binding = new RubyServiceBinding(service); - service->setBinding(binding); - iter++; - } - - // Create Ruby bindings for all the references - const Component::REFERENCE_MAP& references = component->getReferences(); - Component::REFERENCE_MAP::const_iterator refiter = references.begin(); - for (int ri=0; ri< references.size(); ri++) - { - Reference *reference = refiter->second; - RubyReferenceBinding* binding = new RubyReferenceBinding(reference); - reference->setBinding(binding); - refiter++; - } - } - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.h deleted file mode 100644 index 32b5801f42..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyImplementation.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_model_rubyimplementation_h -#define tuscany_sca_ruby_model_rubyimplementation_h -#include "tuscany/sca/model/ComponentType.h" - -#include -using std::map; -#include -using std::string; - -#include "tuscany/sca/ruby/Ruby.h" - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - /** - * Holds information about an SCA implementation written in Ruby - */ - class RubyImplementation : public ComponentType - { - - public: - /** - * Constructor. - * @param composite The composite containing this implementation. - * @param module Name of the Ruby module. - * @param className Name of the Ruby implementation class. - * @param script Path of the Ruby script. - */ - RubyImplementation(Composite* composite, const string& module, const string& className, const string& script); - - /** - * Destructor - */ - virtual ~RubyImplementation(); - - /** - * Initialize a component of this type. - * @param component The component to initialize. - */ - virtual void initializeComponent(Component* component); - - /** - * Returns the name of the Ruby module. - * @return The name of the Ruby module. - */ - const string& getModule() const { return module; } - - /** - * Returns the name of Ruby class. - * @return Name of the Ruby class. - */ - const string& getClass() const { return className; } - - /** - * Returns the path of the Ruby script. - * @return The path of the Ruby script. - */ - const string& getScript() const { return script; } - - /** - * Returns the Ruby implementation class - */ - VALUE getImplementationClass() const { return implementationClass; } - - /** - * Returns the Ruby REXML::Document class - */ - static VALUE getXMLDocumentClass() { return xmlDocumentClass; } - - private: - - /** - * Load the Ruby implementation class - */ - void loadClass(); - - /** - * Name of the Ruby module. - */ - string module; - - /** - * Name of the Ruby class. - */ - string className; - - /** - * Path of the Ruby script. - */ - string script; - - /** - * The Ruby implementation class - */ - VALUE implementationClass; - - /** - * True if the Ruby runtime has been initialized - */ - static bool initialized; - - /** - * The Ruby REXML::Document class. - */ - static VALUE xmlDocumentClass; - - }; - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_model_rubyimplementation_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.cpp deleted file mode 100644 index 0e813983f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/ruby/model/RubyReferenceBinding.h" -#include "tuscany/sca/ruby/RubyServiceProxy.h" - - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - // Constructor - RubyReferenceBinding::RubyReferenceBinding(Reference* reference) - : ReferenceBinding(reference, ""), serviceProxy(NULL), targetServiceBinding(NULL) - { - } - - // Destructor - RubyReferenceBinding::~RubyReferenceBinding() - { - } - - ServiceProxy* RubyReferenceBinding::getServiceProxy() - { - return serviceProxy; - } - - void RubyReferenceBinding::configure(ServiceBinding* binding) - { - targetServiceBinding = binding; - - serviceProxy = new RubyServiceProxy(getReference()); - } - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.h deleted file mode 100644 index cab1c22c48..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyReferenceBinding.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_model_rubyreferencebinding_h -#define tuscany_sca_ruby_model_rubyreferencebinding_h - -#include "tuscany/sca/model/ReferenceBinding.h" - - -#include -using std::string; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - /** - * Information about a Ruby service binding for service or a reference. - */ - class RubyReferenceBinding : public ReferenceBinding - { - public: - - /** - * Constructor. - */ - RubyReferenceBinding(Reference* reference); - - /** - * Destructor. - */ - virtual ~RubyReferenceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#RubyImplementationBinding"; }; - - /** - * Create a proxy representing the reference to the - * client component. - */ - virtual ServiceProxy* getServiceProxy(); - - /** - * Configure this binding from a service binding. - */ - virtual void configure(ServiceBinding* serviceBinding); - - /** - * Returns the target service binding. - */ - ServiceBinding* getTargetServiceBinding() const { return targetServiceBinding; }; - - private: - - /** - * The proxy representing the reference to the client - * component. - */ - ServiceProxy* serviceProxy; - - /** - * The service binding of the target - */ - ServiceBinding* targetServiceBinding; - }; - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_model_rubyreferencebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.cpp deleted file mode 100644 index 376a4db0f7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/ruby/model/RubyServiceBinding.h" -#include "tuscany/sca/ruby/RubyServiceWrapper.h" - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - - // Constructor - RubyServiceBinding::RubyServiceBinding(Service* service) - : ServiceBinding(service, "") - { - serviceWrapper = new RubyServiceWrapper(service); - } - - // Destructor - RubyServiceBinding::~RubyServiceBinding() - { - } - - ServiceWrapper* RubyServiceBinding::getServiceWrapper() - { - return (ServiceWrapper*)serviceWrapper; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.h deleted file mode 100644 index 24c0275bb9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/model/RubyServiceBinding.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_ruby_model_rubyservicebinding_h -#define tuscany_sca_ruby_model_rubyservicebinding_h - -#include "tuscany/sca/model/ServiceBinding.h" -using namespace tuscany::sca::model; -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace ruby - { - /** - * Information about a Ruby service binding for service or a reference. - */ - class RubyServiceBinding : public ServiceBinding - { - public: - - /** - * Constructor. - */ - RubyServiceBinding(Service* service); - - /** - * Destructor. - */ - virtual ~RubyServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#RubyImplementationBinding"; }; - - /** - * Create a wrapper for the service configured by this - * binding. - */ - virtual ServiceWrapper* getServiceWrapper(); - - private: - - /** - * The wrapper for the service configured by this binding. - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace ruby - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ruby_model_rubyservicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/xsd/sca-implementation-ruby.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/xsd/sca-implementation-ruby.xsd deleted file mode 100644 index f6598590d1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ruby/xsd/sca-implementation-ruby.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/Makefile.am deleted file mode 100644 index 50dfb45557..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = reference service -datadir=$(prefix)/extensions/sca - -nobase_data_DATA = xsd/*.xsd - -EXTRA_DIST = xsd diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/Makefile.am deleted file mode 100644 index 18e9ba89b9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = axis2c diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/Makefile.am deleted file mode 100644 index 2b9491ec1c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am deleted file mode 100644 index 75eba52f73..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/sca/reference/lib -lib_LTLIBRARIES = libtuscany_sca_binding_reference.la - -noinst_HEADERS = \ -tuscany/sca/binding/*.h \ -tuscany/sca/binding/model/*.h - -libtuscany_sca_binding_reference_la_SOURCES = \ -tuscany/sca/binding/SCAServiceBindingExtension.cpp \ -tuscany/sca/binding/model/SCAServiceBinding.cpp - -libtuscany_sca_binding_reference_la_LIBADD = \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L$(top_builddir)/runtime/extensions/ws/reference/axis2c/src -ltuscany_sca_ws_reference - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I$(top_builddir)/runtime/extensions/ws/reference/axis2c/src - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp deleted file mode 100644 index b12702bf43..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "SCAServiceBindingExtension.h" -#include "model/SCAServiceBinding.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/core/SCARuntime.h" - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::binding::SCAServiceBindingExtension::initialize(); - } -} - - -namespace tuscany -{ - namespace sca - { - namespace binding - { - // =================================================================== - // Constructor for the SCAServiceBinding class. - // =================================================================== - SCAServiceBindingExtension::SCAServiceBindingExtension() - { - LOGENTRY(1, "SCAServiceBindingExtension::constructor"); - LOGEXIT(1, "SCAServiceBindingExtension::constructor"); - } - - // =================================================================== - // Destructor for the SCAServiceBindingExtension class. - // =================================================================== - SCAServiceBindingExtension::~SCAServiceBindingExtension() - { - LOGENTRY(1, "SCAServiceBindingExtension::destructor");; - LOGEXIT(1, "SCAServiceBindingExtension::destructor"); - } - - const string SCAServiceBindingExtension::extensionName("sca"); - const string SCAServiceBindingExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#SCABinding"); - - - // =================================================================== - // loadModelElement - load the info from binding.ws - // =================================================================== - ServiceBinding* SCAServiceBindingExtension::getServiceBinding(Composite *composite, Service* service, DataObjectPtr scdlBinding) - { - string bindingType = scdlBinding->getType().getName(); - if (bindingType == "SCABinding") - { - string uri = scdlBinding->getCString("uri"); - - SCAServiceBinding* serviceBinding = new SCAServiceBinding(service, uri); - - return serviceBinding; - } - else - { - return NULL; - } - } - - void SCAServiceBindingExtension::initialize() - { - LOGENTRY(1, "SCAServiceBindingExtension::initialize");; - SCARuntime::getInstance()->registerServiceBindingExtension(new SCAServiceBindingExtension()); - LOGEXIT(1, "SCAServiceBindingExtension::initialize");; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h deleted file mode 100644 index 4cd05bee16..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/SCAServiceBindingExtension.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_binding_scaservicebindingextension_h -#define tuscany_sca_extension_binding_scaservicebindingextension_h - -#include "tuscany/sca/extension/ServiceBindingExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace binding - { - - class SCAServiceBindingExtension : public ServiceBindingExtension - { - public: - /** - * Default constructor - */ - SCAServiceBindingExtension(); - - /** - * Destructor - */ - virtual ~SCAServiceBindingExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ServiceBinding* getServiceBinding(Composite* composite, Service* service, DataObjectPtr scdlBinding); - - static void initialize(); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace binding - } // End namespace sca -} // End namespace tuscany - -#endif //tuscany_sca_extension_binding_scaservicebindingextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp deleted file mode 100644 index a6b052f04f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/binding/model/SCAServiceBinding.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -namespace tuscany -{ - namespace sca - { - namespace binding - { - - // Constructor - SCAServiceBinding::SCAServiceBinding(Service* service, const string& uri) - : WSServiceBinding(service, uri, "", "") - { - } - - // Destructor - SCAServiceBinding::~SCAServiceBinding() - { - } - - } // End namespace binding - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h deleted file mode 100644 index 90eb222b7b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/reference/axis2c/src/tuscany/sca/binding/model/SCAServiceBinding.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_binding_model_scaservicebinding_h -#define tuscany_sca_extension_binding_model_scaservicebinding_h - -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/ws/model/WSServiceBinding.h" - -#include -using std::string; - -using namespace tuscany::sca::model; -using namespace tuscany::sca::ws; - -namespace tuscany -{ - namespace sca - { - namespace binding - { - /** - * Information about an SCA service binding for service or a reference. - */ - class SCAServiceBinding : public WSServiceBinding - { - public: - - /** - * Constructor. - * @param uri The uri of the binding. - */ - SCAServiceBinding(model::Service* service, const string& uri); - - /** - * Destructor. - */ - virtual ~SCAServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#SCABinding"; }; - - private: - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_model_wsservicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/Makefile.am deleted file mode 100644 index 18e9ba89b9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = axis2c diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/Makefile.am deleted file mode 100644 index feadf9e317..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am deleted file mode 100644 index b03e398106..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/sca/service/lib -lib_LTLIBRARIES = libtuscany_sca_binding_service.la - -noinst_HEADERS = \ -tuscany/sca/binding/*.h \ -tuscany/sca/binding/model/*.h - -libtuscany_sca_binding_service_la_SOURCES = \ -tuscany/sca/binding/SCAReferenceBindingExtension.cpp \ -tuscany/sca/binding/model/SCAReferenceBinding.cpp - -libtuscany_sca_binding_service_la_LIBADD = \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L$(top_builddir)/runtime/extensions/ws/service/axis2c/src -ltuscany_sca_ws_service - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I$(top_builddir)/runtime/extensions/ws/service/axis2c/src - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp deleted file mode 100644 index 7fb9b4af64..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "SCAReferenceBindingExtension.h" -#include "model/SCAReferenceBinding.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/core/SCARuntime.h" - - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::binding::SCAReferenceBindingExtension::initialize(); - } -} - -namespace tuscany -{ - namespace sca - { - namespace binding - { - // =================================================================== - // Constructor for the SCAReferenceBinding class. - // =================================================================== - SCAReferenceBindingExtension::SCAReferenceBindingExtension() - { - LOGENTRY(1, "SCAReferenceBindingExtension::constructor"); - LOGEXIT(1, "SCAReferenceBindingExtension::constructor"); - } - - // =================================================================== - // Destructor for the SCAReferenceBindingExtension class. - // =================================================================== - SCAReferenceBindingExtension::~SCAReferenceBindingExtension() - { - LOGENTRY(1, "SCAReferenceBindingExtension::destructor");; - LOGEXIT(1, "SCAReferenceBindingExtension::destructor"); - } - - const string SCAReferenceBindingExtension::extensionName("sca"); - const string SCAReferenceBindingExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#SCABinding"); - - // =================================================================== - // loadModelElement - load the info from binding.ws - // =================================================================== - ReferenceBinding* SCAReferenceBindingExtension::getReferenceBinding(Composite *composite, Reference* reference, DataObjectPtr scdlBinding) - { - string bindingType = scdlBinding->getType().getName(); - if (bindingType == "SCABinding") - { - string uri = scdlBinding->getCString("uri"); - - SCAReferenceBinding* serviceBinding = new SCAReferenceBinding(reference, uri); - - return serviceBinding; - } - else - { - return NULL; - } - } - - void SCAReferenceBindingExtension::initialize() - { - LOGENTRY(1, "SCAReferenceBindingExtension::initialize");; - SCARuntime::getInstance()->registerReferenceBindingExtension(new SCAReferenceBindingExtension()); - LOGEXIT(1, "SCAReferenceBindingExtension::initialize");; - } - - } // End namespace binding - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h deleted file mode 100644 index 9f5ddd55eb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/SCAReferenceBindingExtension.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_binding_scareferencebindingextension_h -#define tuscany_sca_extension_binding_scareferencebindingextension_h - -#include "tuscany/sca/extension/ReferenceBindingExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace binding - { - - class SCAReferenceBindingExtension : public ReferenceBindingExtension - { - public: - /** - * Default constructor - */ - SCAReferenceBindingExtension(); - - /** - * Destructor - */ - virtual ~SCAReferenceBindingExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ReferenceBinding* getReferenceBinding(Composite* composite, Reference *reference, DataObjectPtr scdlBinding); - - static void initialize(); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace binding - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_binding_scareferencebindingextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp deleted file mode 100644 index 6e7b4eaccc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/binding/model/SCAReferenceBinding.h" -#include "tuscany/sca/ws/model/WSReferenceBinding.h" -#include "tuscany/sca/core/ServiceProxy.h" - -namespace tuscany -{ - namespace sca - { - namespace binding - { - - // Constructor - SCAReferenceBinding::SCAReferenceBinding(Reference* reference, const string& uri) - : WSReferenceBinding(reference, uri, "", "") - { - } - - // Destructor - SCAReferenceBinding::~SCAReferenceBinding() - { - } - - } // End namespace binding - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h deleted file mode 100644 index 445a00be82..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/service/axis2c/src/tuscany/sca/binding/model/SCAReferenceBinding.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_binding_model_scareferencebinding_h -#define tuscany_sca_extension_binding_model_scareferencebinding_h - -#include "tuscany/sca/model/ReferenceBinding.h" -#include "tuscany/sca/ws/model/WSReferenceBinding.h" - -using namespace tuscany::sca::model; -using namespace tuscany::sca::ws; - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace binding - { - /** - * Information about a web service binding for service or a reference. - */ - class SCAReferenceBinding : public WSReferenceBinding - { - public: - - /** - * Constructor. - * @param uri The uri of the binding. - */ - SCAReferenceBinding(Reference* reference, const string&uri); - - /** - * Destructor. - */ - virtual ~SCAReferenceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#SCABinding"; }; - - private: - - }; - - } // End namespace binding - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_binding_model_scareferencebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd deleted file mode 100644 index 1051c3910c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/sca/xsd/sca-binding-sca.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/Makefile.am deleted file mode 100644 index 806786ce04..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = reference service -datadir=$(prefix)/extensions/ws - -nobase_data_DATA = xsd/*.xsd - -EXTRA_DIST = xsd diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/deploy.bat deleted file mode 100644 index 567875624f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/deploy.bat +++ /dev/null @@ -1,45 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set wsextdir=%extdir%\ws -set srcdir=%rootdir%\runtime\extensions\ws - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %wsextdir% mkdir %wsextdir% -if not exist %wsextdir%\xsd mkdir %wsextdir%\xsd - -copy %srcdir%\xsd\*.* %wsextdir%\xsd - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/Makefile.am deleted file mode 100644 index 18e9ba89b9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = axis2c diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/Makefile.am deleted file mode 100644 index 2b9491ec1c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/Makefile.am deleted file mode 100644 index 208af0e15a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/ws/reference/lib -lib_LTLIBRARIES = libtuscany_sca_ws_reference.la - -noinst_HEADERS = tuscany/sca/ws/*.h tuscany/sca/ws/model/*.h - -libtuscany_sca_ws_reference_la_SOURCES = \ -tuscany/sca/ws/WSServiceBindingExtension.cpp \ -tuscany/sca/ws/model/WSServiceBinding.cpp \ -tuscany/sca/ws/WSServiceWrapper.cpp \ -tuscany/sca/ws/Axis2Client.cpp - -libtuscany_sca_ws_reference_la_LIBADD = \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -lwoden \ - -laxis2_http_sender \ - -laxis2_http_receiver - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXIS2C_HOME}/include - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp deleted file mode 100644 index 4dfb3e7efd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp +++ /dev/null @@ -1,717 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4091) -#pragma warning(disable: 4786) -#endif - -#include - -#include -#include -#include -#include -#include - -#include -#include "Axis2Client.h" - -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "model/WSServiceBinding.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/WSDLDefinition.h" -#include "tuscany/sca/model/WSDLInterface.h" -#include "tuscany/sca/model/WSDLOperation.h" - -#include - -using namespace tuscany::sca::ws; - - -using namespace commonj::sdo; -using namespace commonj::sdo_axiom; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - Axis2Client::Axis2Client(CompositeReference* compositeReference) - : compositeReference(compositeReference) - { - } - - Axis2Client::~Axis2Client() - { - } - - void Axis2Client::invoke(tuscany::sca::Operation& operation) - { - LOGENTRY(1, "Axis2Client::invoke"); - - // Initialize Axis2 stuff - axis2_allocator_t *allocator = axis2_allocator_init (NULL); - axis2_log_t *log = axis2_log_create(allocator, NULL, "tuscany_client.log"); - axis2_error_t *error = axis2_error_create(allocator); - axis2_env_t *env = axis2_env_create_with_error_log(allocator, error, log); - env->log->level = AXIS2_LOG_LEVEL_TRACE; - axis2_error_init(); - - // Get the WS service binding and WSDLOperation - Composite* composite=compositeReference->getComposite(); - Service* service = compositeReference->getService(); - WSServiceBinding* binding = (WSServiceBinding *)service->getBinding(); - const string& operationName = operation.getName(); - WSDLOperation wsdlOperation; - - // Get the WSDL namespace - string wsdlNamespace = binding->getWSDLNamespaceURL(); - if (wsdlNamespace != "") - { - - // Lookup the wsdl model from the composite, keyed on the namespace - // (the wsdl will have been loaded at startup) - WSDLDefinition* wsdlDefinition = composite->findWSDLDefinition(wsdlNamespace); - if (wsdlDefinition == 0) - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "WSDL description %s not found\n", wsdlNamespace.c_str()); - string msg = "WSDL not found for " + wsdlNamespace; - throw SystemConfigurationException(msg.c_str()); - } - - // Match the operation in Operation to the operation in the wsdl port type. - try - { - wsdlOperation = wsdlDefinition->findOperation( - binding->getServiceName(), - binding->getEndpointName(), - operationName); - } - catch(SystemConfigurationException &ex) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "SystemConfigurationException has been caught: %s\n", ex.getMessageText()); - throw; - } - - } - else - { - Interface* iface = service->getType()->getInterface(); - if (iface != NULL && - iface->getInterfaceTypeQName() == WSDLInterface::typeQName) - { - WSDLInterface* wsdlInterface = (WSDLInterface*)iface; - wsdlNamespace = wsdlInterface->getNamespaceURI(); - - if (wsdlNamespace != "") - { - - WSDLDefinition* wsdl = composite->findWSDLDefinition(wsdlNamespace); - if (wsdl == 0) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "WSDL description %s not found\n", wsdlNamespace.c_str()); - string msg = "WSDL not found for " + wsdlNamespace; - throw SystemConfigurationException(msg.c_str()); - } - - try - { - wsdlOperation = wsdl->findOperation(wsdlInterface->getName(), operationName); - } - catch(SystemConfigurationException &ex) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "SystemConfigurationException has been caught: %s\n", ex.getMessageText()); - throw; - } - } - } - } - - if (wsdlNamespace == "") - { - - // Create a default document literal wrapped WSDL operation - wsdlNamespace = compositeReference->getName(); - wsdlOperation = WSDLOperation(); - wsdlOperation.setOperationName(operationName); - wsdlOperation.setSoapAction(wsdlNamespace+ "#" +operationName); - wsdlOperation.setEndpoint(""); - wsdlOperation.setSoapVersion(WSDLOperation::SOAP11); - wsdlOperation.setDocumentStyle(true); - wsdlOperation.setWrappedStyle(true); - wsdlOperation.setEncoded(false); - wsdlOperation.setInputType(wsdlNamespace + "#" + operationName); - wsdlOperation.setOutputType(wsdlNamespace + "#" + operationName + "Response"); - } - - // Get the target endpoint address - // The URI specified in the binding overrides the address specified in - // the WSDL - axis2_char_t* address; - if (binding->getURI() != "") - { - address = (axis2_char_t*)binding->getURI().c_str(); - } - else - { - address = (axis2_char_t*)wsdlOperation.getEndpoint().c_str(); - } - - axis2_char_t* opName = (axis2_char_t*)operationName.c_str(); - axis2_char_t* soap_action = (axis2_char_t*)wsdlOperation.getSoapAction().c_str(); - axis2_char_t* serviceName = (axis2_char_t*)binding->getServiceName().c_str(); - - // create OM from Operation and wsdlOperation - axiom_node_t* payload = createPayload(operation, wsdlOperation, env); - - /* Create EPR with given address */ - axis2_endpoint_ref_t* endpoint_ref = axis2_endpoint_ref_create(env, address); - - /* Setup options */ - axis2_options_t* options = axis2_options_create(env); - AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); - int soap_version = AXIOM_SOAP11; - if (binding->getSOAPVersion() == "1.2") - { - soap_version = AXIOM_SOAP12; - } - else - { - if (wsdlOperation.getSoapVersion() == WSDLOperation::SOAP12) - { - soap_version = AXIOM_SOAP12; - } - } - - AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, soap_version); - AXIS2_OPTIONS_SET_ACTION(options, env, soap_action); - - /* Create service client */ - - axis2_char_t* client_home = AXIS2_GETENV("AXIS2C_HOME"); - if (!client_home) - { - throw SystemConfigurationException("Environment error: AXIS2C_HOME not set"); - } - axis2_svc_client_t* svc_client = axis2_svc_client_create(env, client_home); - if (!svc_client) - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - - throw SystemConfigurationException("Axis2Client: axis2_svc_client_create failed"); - } - - /* Set service client options */ - AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options); - - /* Send request */ - axiom_node_t* ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); - if(ret_node) - { - setReturn(ret_node, operation, wsdlOperation, env); - } - else - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invoke failed: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - throw SystemConfigurationException("Axis2Client: Invoke failed"); - } - - LOGINFO(2, "Warning: Have not freed Axis2C service client memory due to Jira AXIS2C-209"); - // Uncommenting this code causes crash when invoking a composite with both Axis2C ws.binding - // service and reference. See Jiras TUSCANY-536 and AXIS2C-209 - //if (svc_client) - //{ - // AXIS2_SVC_CLIENT_FREE(svc_client, env); - // svc_client = NULL; - //} - - LOGEXIT(1, "Axis2Client::invoke"); - } - - axiom_node_t* Axis2Client::createPayload(Operation& operation, - const WSDLOperation& wsdlOperation, - axis2_env_t* env) - { - LOGENTRY(1, "Axis2Client::createPayload"); - axiom_node_t* request_node = NULL; - - // map the operation request to the wsdl - if (wsdlOperation.isDocumentStyle()) - { - // Document style - // only support single part messages - WS-I compliant - - // Build up the payload as an SDO - - // Get the data factory for the composite (it will already have the typecreates loaded for the xsds) - DataFactoryPtr dataFactory = compositeReference->getComposite()->getDataFactory(); - - DataObjectPtr inputDataObject; - try - { - - // Create the input wrapper - const Type& rootType = dataFactory->getType(wsdlOperation.getInputTypeUri().c_str(), "RootType"); - const Property& prop = rootType.getProperty(wsdlOperation.getInputTypeName().c_str()); - const Type& inputType = prop.getType(); - inputDataObject = dataFactory->create(inputType); - } - catch (SDORuntimeException e) - { - try - { - // Create the input wrapper - const Type& inputType = dataFactory->getType(wsdlOperation.getInputTypeUri().c_str(), - wsdlOperation.getInputTypeName().c_str()); - inputDataObject = dataFactory->create(inputType); - } - catch (SDORuntimeException e2) - { - - // The input wrapper type is not known, create an open DataObject - inputDataObject = dataFactory->create(Type::SDOTypeNamespaceURI, "OpenDataObject"); - } - } - - // Go through data object to set the input parameters - PropertyList pl = inputDataObject->getType().getProperties(); - - if(pl.size() == 0) - { - if(inputDataObject->getType().isOpenType() && inputDataObject->getType().isDataObjectType()) - { - /* - * This code deals with sending xsd:any elements - */ - for (int i=0; igetList(pname.str()); - - const Operation::Parameter& parm = operation.getParameter(i); - switch(parm.getType()) - { - case Operation::BOOL: - { - l.append(*(bool*)parm.getValue()); - break; - } - case Operation::SHORT: - { - l.append(*(short*)parm.getValue()); - break; - } - case Operation::INT: - { - l.append(*(long*)parm.getValue()); - break; - } - case Operation::LONG: - { - l.append(*(long*)parm.getValue()); - break; - } - case Operation::USHORT: - { - l.append(*(short*)parm.getValue()); - break; - } - case Operation::UINT: - { - l.append(*(long*)parm.getValue()); - break; - } - case Operation::ULONG: - { - l.append(*(long*)parm.getValue()); - break; - } - case Operation::FLOAT: - { - l.append(*(float*)parm.getValue()); - break; - } - case Operation::DOUBLE: - { - l.append(*(long double*)parm.getValue()); - break; - } - case Operation::LONGDOUBLE: - { - l.append(*(long double*)parm.getValue()); - break; - } - case Operation::CHARS: - { - l.append(*(char**)parm.getValue()); - break; - } - case Operation::STRING: - { - l.append((*(string*)parm.getValue()).c_str()); - break; - } - case Operation::DATAOBJECT: - { - l.append(*(DataObjectPtr*)parm.getValue()); - break; - } - default: throw "unsupported parameter type"; - } - } - } - } - else { - - // Each parameter in the operation should be a property on the request dataobject - for (int i=0; isetBoolean(i, *(bool*)parm.getValue()); - break; - } - case Operation::SHORT: - { - inputDataObject->setShort(i, *(short*)parm.getValue()); - break; - } - case Operation::INT: - { - inputDataObject->setInteger(i, *(int*)parm.getValue()); - break; - } - case Operation::LONG: - { - inputDataObject->setLong(i, *(long*)parm.getValue()); - break; - } - case Operation::USHORT: - { - inputDataObject->setInteger(i, *(unsigned short*)parm.getValue()); - break; - } - case Operation::UINT: - { - inputDataObject->setInteger(i, *(unsigned int*)parm.getValue()); - break; - } - case Operation::ULONG: - { - inputDataObject->setInteger(i, *(unsigned long*)parm.getValue()); - break; - } - case Operation::FLOAT: - { - inputDataObject->setFloat(i, *(float*)parm.getValue()); - break; - } - case Operation::DOUBLE: - { - inputDataObject->setDouble(i, *(double*)parm.getValue()); - break; - } - case Operation::LONGDOUBLE: - { - inputDataObject->setDouble(i, *(long double*)parm.getValue()); - break; - } - case Operation::CHARS: - { - inputDataObject->setCString(i, *(char**)parm.getValue()); - break; - } - case Operation::STRING: - { - inputDataObject->setCString(i, (*(string*)parm.getValue()).c_str()); - break; - } - case Operation::DATAOBJECT: - { - inputDataObject->setDataObject(i, *(DataObjectPtr*)parm.getValue()); - break; - } - default: throw "unsupported parameter type"; - } - } - } - - // Create the Axiom object from the request dataobject - AxiomHelper* axiomHelper = AxiomHelper::getHelper(); - request_node = axiomHelper->toAxiomNode(inputDataObject, - wsdlOperation.getInputTypeUri().c_str(), wsdlOperation.getInputTypeName().c_str()); - AxiomHelper::releaseHelper(axiomHelper); - } - else - { - // RPC - } - - char* str = AXIOM_NODE_TO_STRING(request_node, env); - LOGINFO_1(3, "Sending this OM node in XML : %s \n", str); - - LOGEXIT(1, "Axis2Client::createPayload"); - return request_node; - } - - void Axis2Client::setReturn(axiom_node_t* ret_node, - Operation& operation, - const WSDLOperation& wsdlOperation, - axis2_env_t* env) - { - LOGENTRY(1, "Axis2Client::setReturn"); - - if (wsdlOperation.isDocumentStyle()) - { - // Document style - DataFactoryPtr dataFactory = compositeReference->getComposite()->getDataFactory(); - - // Get the AXIOM node representing the SOAP Body - axiom_node_t* body = AXIOM_NODE_GET_PARENT(ret_node, env); - - // Convert the AXIOM node to an SDO DataObject - char* str = NULL; - str = AXIOM_NODE_TO_STRING(body, env); - if (str) - { - AXIS2_LOG_INFO((env)->log, "Axis2Client invoke has response OM: %s\n", str); - } - - // Convert the SOAP body to an SDO DataObject - AxiomHelper* axiomHelper = AxiomHelper::getHelper(); - DataObjectPtr outputBodyDataObject = axiomHelper->toSdo(body, dataFactory); - AxiomHelper::releaseHelper(axiomHelper); - - if(!outputBodyDataObject) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service invoke: Could not convert received Axiom node to SDO"); - /** TODO: return a SOAP fault here */ - return; - } - - // Get the first body part representing the doc-lit-wrapped wrapper element - DataObjectPtr outputDataObject = NULL; - PropertyList bpl = outputBodyDataObject->getInstanceProperties(); - if (bpl.size()!=0) - { - if (bpl[0].isMany()) - { - DataObjectList& parts = outputBodyDataObject->getList((unsigned int)0); - outputDataObject = parts[0]; - } - else - { - outputDataObject = outputBodyDataObject->getDataObject(bpl[0]); - } - } - if (outputDataObject == NULL) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Client invoke: Could not convert body part to SDO"); - return; - } - - PropertyList pl = outputDataObject->getInstanceProperties(); - unsigned int i = 0; - - switch(pl[i].getTypeEnum()) - { - case Type::BooleanType: - { - bool* boolData = new bool; - *boolData = outputDataObject->getBoolean(pl[i]); - operation.setReturnValue(boolData); - } - break; - case Type::ByteType: - { - char* byteData = new char; - *byteData = outputDataObject->getByte(pl[i]); - operation.setReturnValue(byteData); - } - break; - case Type::BytesType: - { - int len = outputDataObject->getLength(pl[i]); - char* bytesData = new char[len+1]; - int bytesWritten = outputDataObject->getBytes(pl[i], bytesData, len); - // Ensure the bytes end with the null char. Not sure if this is neccessary - if(bytesWritten <= len) - { - bytesData[bytesWritten] = 0; - } - else - { - bytesData[len] = 0; - } - //printf("outputDataObject has BytesType named %s with length %d\n", name, bytesWritten); - operation.setReturnValue(&bytesData); - } - break; - case Type::CharacterType: - { - // This code should work but won't be used as there is no mapping from an XSD type to the SDO CharacterType - wchar_t* charData = new wchar_t; - *charData = outputDataObject->getCharacter(pl[i]); - operation.setReturnValue(charData); - } - break; - case Type::DoubleType: - { - long double* doubleData = new long double; - *doubleData = outputDataObject->getDouble(pl[i]); - operation.setReturnValue(doubleData); - } - break; - case Type::FloatType: - { - float* floatData = new float; - *floatData = outputDataObject->getFloat(pl[i]); - operation.setReturnValue(floatData); - } - break; - case Type::IntegerType: - { - long* intData = new long; - *intData = outputDataObject->getInteger(pl[i]); - operation.setReturnValue(intData); - } - break; - case Type::ShortType: - { - short* shortData = new short; - *shortData = outputDataObject->getShort(pl[i]); - operation.setReturnValue(shortData); - } - break; - case Type::StringType: - { - string* str = new string(outputDataObject->getCString(pl[i])); - operation.setReturnValue(str); - } - break; - case Type::DataObjectType: - { - DataObjectPtr dataObjectData = outputDataObject->getDataObject(pl[i]); - if(!dataObjectData) - { - LOGINFO(4, "SDO DataObject return value was null"); - } - operation.setReturnValue(&dataObjectData); - } - break; - case Type::OpenDataObjectType: - { - /* - * This code deals with xsd:any element parameters - */ - - DataObjectList& dataObjectList = outputDataObject->getList(pl[i]); - - for(int j=0; jgetSequence(); - if (sequence->size()!=0) - { - // Return a text element - if (sequence->isText(0)) - { - string* stringData = new string(sequence->getCStringValue(0)); - operation.setReturnValue(stringData); - } - else - { - // Return a DataObject representing a complex element - DataObjectPtr dob = sequence->getDataObjectValue(0); - if(!dob) - { - LOGINFO(4, "SDO DataObject return value was null"); - } - operation.setReturnValue(&dob); - } - } - else - { - // Empty content, add an empty string - LOGINFO(4, "SDO OpenDataObject return value was empy"); - string *stringData = new string(""); - operation.setReturnValue(stringData); - } - } - } - } - break; - case Type::DateType: - LOGERROR(0, "SDO DateType return values are not yet supported"); - break; - case Type::LongType: - LOGERROR(0, "SDO LongType (int64_t) return values are not yet supported"); - break; - case Type::UriType: - LOGERROR(0, "SDO UriType return values are not yet supported"); - break; - case Type::BigDecimalType: - LOGERROR(0, "SDO BigDecimalType return values are not yet supported"); - break; - case Type::BigIntegerType: - LOGERROR(0, "SDO BigIntegerType return values are not yet supported"); - break; - default: - LOGERROR(0, "Unknown SDO type has been found in return value. Unknown types are not yet supported"); - break; - } - } - else - { - // RPC - } - LOGEXIT(1, "Axis2Client::setReturn"); - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.h deleted file mode 100644 index 5ec302f0c8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_axis2client_h -#define tuscany_sca_extension_ws_axis2client_h - -#include - -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/CompositeReference.h" -#include "tuscany/sca/model/WSDLOperation.h" - -using namespace tuscany::sca::model; - - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - class Axis2Client - { - public: - Axis2Client(CompositeReference* externalService); - virtual ~Axis2Client(); - - virtual void invoke(Operation& operation); - - private: - CompositeReference* compositeReference; - - axiom_node_t* createPayload(Operation& operation, - const WSDLOperation& wsdlOp, - axis2_env_t* env); - - void setReturn(axiom_node_t* returnNode, - Operation& operation, - const WSDLOperation& wsdlOp, - axis2_env_t* env); - - }; - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_axis2client_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.cpp deleted file mode 100644 index c260445b60..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "WSServiceBindingExtension.h" -#include "model/WSServiceBinding.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/core/SCARuntime.h" - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::ws::WSServiceBindingExtension::initialize(); - } -} - - -namespace tuscany -{ - namespace sca - { - namespace ws - { - // =================================================================== - // Constructor for the WSServiceBinding class. - // =================================================================== - WSServiceBindingExtension::WSServiceBindingExtension() - { - LOGENTRY(1, "WSServiceBindingExtension::constructor"); - LOGEXIT(1, "WSServiceBindingExtension::constructor"); - } - - // =================================================================== - // Destructor for the WSServiceBindingExtension class. - // =================================================================== - WSServiceBindingExtension::~WSServiceBindingExtension() - { - LOGENTRY(1, "WSServiceBindingExtension::destructor");; - LOGEXIT(1, "WSServiceBindingExtension::destructor"); - } - - const string WSServiceBindingExtension::extensionName("ws"); - const string WSServiceBindingExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#WebServiceBinding"); - - - // =================================================================== - // loadModelElement - load the info from binding.ws - // =================================================================== - ServiceBinding* WSServiceBindingExtension::getServiceBinding(Composite *composite, Service* service, DataObjectPtr scdlBinding) - { - string bindingType = scdlBinding->getType().getName(); - if (bindingType == "WebServiceBinding") - { - string uri = scdlBinding->getCString("uri"); - string endpoint = scdlBinding->getCString("endpoint"); - commonj::sdo::DataObjectList& soap = scdlBinding->getList("soapbinding"); - string version; - if (soap.size()!=0) - { - version = soap.getCString(0); - } - else - { - version = ""; - } - - WSServiceBinding* serviceBinding = new WSServiceBinding(service, uri, endpoint, version); - - return serviceBinding; - } - else - { - return NULL; - } - } - - void WSServiceBindingExtension::initialize() - { - LOGENTRY(1, "WSServiceBindingExtension::initialize");; - SCARuntime::getInstance()->registerServiceBindingExtension(new WSServiceBindingExtension()); - LOGEXIT(1, "WSServiceBindingExtension::initialize");; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.h deleted file mode 100644 index db2c0c791f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceBindingExtension.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_wsservicebindingextension_h -#define tuscany_sca_extension_ws_wsservicebindingextension_h - -#include "tuscany/sca/extension/ServiceBindingExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - class WSServiceBindingExtension : public ServiceBindingExtension - { - public: - /** - * Default constructor - */ - WSServiceBindingExtension(); - - /** - * Destructor - */ - virtual ~WSServiceBindingExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ServiceBinding* getServiceBinding(Composite* composite, Service* service, DataObjectPtr scdlBinding); - - static void initialize(); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif //tuscany_sca_extension_ws_wsservicebindingextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.cpp deleted file mode 100644 index 5839aa8722..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4091) -#endif - -#include "tuscany/sca/util/Logging.h" -#include "Axis2Client.h" -#include "WSServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceType.h" - -#include "commonj/sdo/SDO.h" -using namespace commonj::sdo; - -using namespace tuscany::sca; -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - WSServiceWrapper::WSServiceWrapper(Service* service) : ServiceWrapper(service) - { - // Define the SOAP Body type and element to allow a SOAP body to - // be loaded in a DataObject - DataFactoryPtr dataFactory = service->getComponent()->getComposite()->getDataFactory(); - try { - const Type& bodyType = dataFactory->getType("http://www.w3.org/2003/05/soap-envelope", "Body"); - } catch (SDORuntimeException e) - { - dataFactory->addType("http://www.w3.org/2003/05/soap-envelope", "RootType", false, false, false); - dataFactory->addType("http://www.w3.org/2003/05/soap-envelope", "Body", false, true, false); - dataFactory->addPropertyToType( - "http://www.w3.org/2003/05/soap-envelope", "RootType", - "Body", - "http://www.w3.org/2003/05/soap-envelope", "Body", - false, false, true); - - dataFactory->addType("http://schemas.xmlsoap.org/soap/envelope/", "RootType", false, false, false); - dataFactory->addType("http://schemas.xmlsoap.org/soap/envelope/", "Body", false, true, false); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/soap/envelope/", "RootType", - "Body", - "http://schemas.xmlsoap.org/soap/envelope/", "Body", - false, false, true); - } - } - - 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,"Service: %s, Operation: %s", getService()->getType()->getName().c_str() , operationName.c_str()); - - for (unsigned int i=0; igetComponent(); - - Axis2Client client(compositeReference); - client.invoke(operation); - - LOGEXIT(1, "WSServiceWrapper::invoke"); - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.h deleted file mode 100644 index 93607db4a2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/WSServiceWrapper.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_wsservicewrapper_h -#define tuscany_sca_extension_ws_wsservicewrapper_h - -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/core/Operation.h" -#include "tuscany/sca/model/Service.h" - -using namespace tuscany::sca::model; - - -namespace tuscany -{ - namespace sca - { - - namespace ws - { - - class WSServiceWrapper : public ServiceWrapper - { - public: - - /** - * Constructor. - * @param target The service wrapper represents a Web service. - */ - WSServiceWrapper(Service* service); - - /** - * Destructor - */ - virtual ~WSServiceWrapper(); - - /** - * 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); - }; - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_ws_wsservicewrapper_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.cpp deleted file mode 100644 index 8980ec489b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/ws/model/WSServiceBinding.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/ws/WSServiceWrapper.h" - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - // Constructor - WSServiceBinding::WSServiceBinding(Service* service, const string& uri, const string& endpoint, const string& version) - : ServiceBinding(service, uri), endpoint(endpoint), soapVersion(version) - { - parseEndpoint(); - - serviceWrapper = new WSServiceWrapper(service); - } - - void WSServiceBinding::parseEndpoint() - { - // Endpoint is of the form: #wsdl.endpoint(/) - string::size_type hash = endpoint.find("#"); - if (hash != string::npos) - { - // Found a hash - - // Namepace is the part before the # - wsdlNamespaceURL = endpoint.substr(0, hash); - - - if ( (hash+1) < endpoint.length()) - { - // Check the next part is wsdl.endpoint( - int ending = hash+15; - string check = endpoint.substr(hash+1, 14); - if (check.compare("wsdl.endpoint(") == 0) - { - // Find the matching ) - int endBracket = endpoint.find(")",ending); - if (endBracket-1 > ending+1) - { - string serviceAndEndpoint = endpoint.substr(ending, endBracket-ending); - // Look for a '/' - string::size_type slash = serviceAndEndpoint.find("/"); - if (slash != string::npos) - { - serviceName = serviceAndEndpoint.substr(0, slash); - - if ( (slash+1) < serviceAndEndpoint.length()) - { - endpointName = serviceAndEndpoint.substr(slash+1); - } - else - { - endpointName = ""; - } - - } - else - { - // No '/' so all of it is the service name - serviceName = serviceAndEndpoint; - endpointName = ""; - - } - } - else - { - // Nothing between the () - serviceName = ""; - endpointName = ""; - } - } - else - { - // not the correct characters after the #, ignore the rest - serviceName = ""; - endpointName = ""; - } - - } - else - { - // Nothing after the hash - serviceName = ""; - endpointName = ""; - } - } - else - { - // No hash at all - wsdlNamespaceURL = endpoint; - serviceName = ""; - endpointName = ""; - } - } - - // Destructor - WSServiceBinding::~WSServiceBinding() - { - } - - ServiceWrapper* WSServiceBinding::getServiceWrapper() - { - return serviceWrapper; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.h deleted file mode 100644 index 15691ce6eb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/model/WSServiceBinding.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_model_wsservicebinding_h -#define tuscany_sca_extension_ws_model_wsservicebinding_h - -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/model/Service.h" - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - /** - * Information about a web service binding for service or a reference. - */ - class WSServiceBinding : public model::ServiceBinding - { - public: - - /** - * Constructor. - * @param uri The uri of the binding. - * @param endpoint The definition of the endpoint to which the service - * or reference is to be bound. This is of the form - * "namespace"#endpoint("service"/"endpoint") - */ - WSServiceBinding(model::Service* service, const string& uri, const string& endpoint, const string& version); - - /** - * Destructor. - */ - virtual ~WSServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#WebServiceBinding"; }; - - /** - * Create a wrapper for the service configured by this - * binding. - */ - virtual ServiceWrapper* getServiceWrapper(); - - /** - * Return the part of the endpoint definition describing the wsdl - * namespace. - * @return The wsdl namespace. - */ - string getWSDLNamespaceURL() const { return wsdlNamespaceURL; }; - - /** - * Return the service part of the endpoint definition. - * @return The service to use. - */ - string getServiceName() const { return serviceName; }; - - /** - * Return the endpoint name part of the endpoint definition. - * @return The endpoint name to use. - */ - string getEndpointName() const { return endpointName; }; - - /** - * Return the SOAP version. - * @return The SOAP version to use. - */ - string getSOAPVersion() const { return soapVersion; }; - - private: - - /** - * Parse the endpoint specification. - */ - void parseEndpoint(); - - /** - * The full endpoint string. - */ - string endpoint; - - /** - * Namespace from the endpoint. - */ - string wsdlNamespaceURL; - - /** - * Service name from the endpoint. - */ - string serviceName; - - /** - * WSDL Endpoint name. - */ - string endpointName; - - /** - * SOAP version. - */ - string soapVersion; - - /** - * The wrapper for the service configured by this binding. - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace model - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_model_wsservicebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/deploy.bat deleted file mode 100644 index 2bba10425c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/reference/deploy.bat +++ /dev/null @@ -1,65 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set wsextdir=%extdir%\ws -set refextdir=%wsextdir%\reference -set srcdir=%rootdir%\runtime\extensions\ws\reference - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -call %srcdir%\..\deploy.bat %rootdir% - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %wsextdir% mkdir %wsextdir% -if not exist %refextdir% mkdir %refextdir% -if not exist %refextdir%\bin mkdir %refextdir%\bin -if not exist %refextdir%\lib mkdir %refextdir%\lib - -set libname=tuscany_sca_ws_reference - -del %refextdir%\bin\%libname%.* -del %refextdir%\lib\%libname%.* - -copy %inpath%\%libname%.lib %refextdir%\lib -copy %inpath%\%libname%.dll %refextdir%\bin - -if exist %inpath%\%libname%.pdb copy %inpath%\%libname%.pdb %refextdir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/Makefile.am deleted file mode 100644 index 18e9ba89b9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = axis2c diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/Makefile.am deleted file mode 100644 index feadf9e317..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/Makefile.am deleted file mode 100644 index 37ab185259..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -libdir=$(prefix)/extensions/ws/service/lib -lib_LTLIBRARIES = \ -libtuscany_sca_ws_service.la \ -libtuscany_sca_ws_dispatcher.la - -noinst_HEADERS = \ -tuscany/sca/ws/*.h \ -tuscany/sca/ws/model/*.h - -libtuscany_sca_ws_service_la_SOURCES = \ -tuscany/sca/ws/WSReferenceBindingExtension.cpp \ -tuscany/sca/ws/model/WSReferenceBinding.cpp \ -tuscany/sca/ws/WSServiceProxy.cpp \ -tuscany/sca/ws/Axis2Service.cpp \ -tuscany/sca/ws/Axis2Utils.cpp - -libtuscany_sca_ws_service_la_LIBADD = \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \ - -L$(top_builddir)/runtime/core/src -ltuscany_sca \ - -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -lwoden \ - -laxis2_http_sender \ - -laxis2_http_receiver - -rootdir=$(prefix)/extensions/ws/service -root_DATA = axis2.xml -root_SCRIPTS = deploy.sh - -libtuscany_sca_ws_dispatcher_la_SOURCES = \ -tuscany/sca/ws/Axis2Dispatcher.cpp \ -tuscany/sca/ws/Axis2DispatcherModule.cpp - -libtuscany_sca_ws_dispatcher_la_LIBADD = \ - -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -lwoden \ - -laxis2_http_sender \ - -laxis2_http_receiver - -servicedir=$(rootdir)/services/tuscany -service_DATA = services.xml - -moduledir=$(rootdir)/modules/tuscany -module_DATA = module.xml - -EXTRA_DIST = axis2.xml services.xml module.xml deploy.sh - -install-data-hook: - cd $(servicedir); ln -s -f ../../lib/libtuscany_sca_ws_service.so libtuscany_sca_ws_service.so - cd $(moduledir); ln -s -f ../../lib/libtuscany_sca_ws_dispatcher.so libtuscany_sca_ws_dispatcher.so - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include \ - -I${AXIS2C_HOME}/include - -AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/axis2.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/axis2.xml deleted file mode 100644 index 641085466e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/axis2.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - false - false - false - true - - admin - axis2 - - . - - 127.0.0.1 - 5555 - - - - - - - - - - - - - - - - - - - - - - - - - 6060 - - - - - - - - - - - - HTTP/1.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.cmd deleted file mode 100644 index 6493e1cec9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.cmd +++ /dev/null @@ -1,39 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -rem Will deploy the Tuscany SCA WS service Axis2C service and module -rem to the correct places within the AXIS2C_HOME directory -setlocal -set currentPath=%~d0%~p0 - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Deploying to Axis2C installed at %AXIS2C_HOME% - -if not exist %AXIS2C_HOME%\services\tuscany mkdir %AXIS2C_HOME%\services\tuscany -if not exist %AXIS2C_HOME%\modules\tuscany mkdir %AXIS2C_HOME%\modules\tuscany - -copy %currentPath%\services\tuscany\* %AXIS2C_HOME%\services\tuscany -copy %currentPath%\modules\tuscany\* %AXIS2C_HOME%\modules\tuscany -copy %currentPath%\axis2.xml %AXIS2C_HOME%\axis2.xml - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.sh deleted file mode 100755 index ffe571b0ee..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/deploy.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Deploying to Axis2C installed at $AXIS2C_HOME" - -if ! [ -d $AXIS2C_HOME/services/tuscany ]; then - mkdir $AXIS2C_HOME/services/tuscany -fi - -if ! [ -d $AXIS2C_HOME/modules/tuscany ]; then - mkdir $AXIS2C_HOME/modules/tuscany -fi - -cp $APFULLDIR/services/tuscany/services.xml $AXIS2C_HOME/services/tuscany - -if ! [ -f $AXIS2C_HOME/services/tuscany/libtuscany_sca_ws_service.so ]; then - ln -s $APFULLDIR/services/tuscany/libtuscany_sca_ws_service.so $AXIS2C_HOME/services/tuscany/libtuscany_sca_ws_service.so -fi - -cp $APFULLDIR/modules/tuscany/module.xml $AXIS2C_HOME/modules/tuscany -if ! [ -f $AXIS2C_HOME/modules/tuscany/libtuscany_sca_ws_dispatcher.so ]; then - ln -s $APFULLDIR/modules/tuscany/libtuscany_sca_ws_dispatcher.so $AXIS2C_HOME/modules/tuscany/libtuscany_sca_ws_dispatcher.so -fi - -cp $APFULLDIR/axis2.xml $AXIS2C_HOME/axis2.xml diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/module.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/module.xml deleted file mode 100644 index 97d4d43a86..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/module.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/services.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/services.xml deleted file mode 100644 index 335d4d96be..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/services.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - tuscany_sca_ws_service - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Dispatcher.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Dispatcher.cpp deleted file mode 100644 index fe3eb52064..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Dispatcher.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#pragma warning(disable: 4091) -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern "C" -{ - -axis2_status_t AXIS2_CALL -Axis2Dispatcher_invoke ( - axis2_handler_t * handler, - const axis2_env_t *env, - struct axis2_msg_ctx *msg_ctx); - -axis2_svc_t *AXIS2_CALL -Axis2Dispatcher_find_svc( - axis2_msg_ctx_t *msg_ctx, - const axis2_env_t *env); - -axis2_op_t *AXIS2_CALL -Axis2Dispatcher_find_op( - axis2_msg_ctx_t *msg_ctx, - const axis2_env_t *env, - axis2_svc_t *svc); - -AXIS2_EXPORT axis2_handler_t* AXIS2_CALL -Axis2Dispatcher_create(const axis2_env_t *env, - axis2_qname_t *qname) -{ - axis2_handler_t *handler = NULL; - - handler = axis2_handler_create(env); - if (!handler) - { - return NULL; - } - - /* handler init is handled by conf loading, so no need to do it here */ - - /* set the base struct's invoke op */ - if (handler->ops) - handler->ops->invoke = Axis2Dispatcher_invoke; - - return handler; -} - -axis2_svc_t *AXIS2_CALL -Axis2Dispatcher_find_svc( - axis2_msg_ctx_t *msg_ctx, - const axis2_env_t *env) -{ - axis2_svc_t *svc = NULL; - - AXIS2_ENV_CHECK(env, NULL); - - axis2_conf_ctx_t *conf_ctx = NULL; - conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env); - if (conf_ctx) - { - axis2_conf_t *conf = NULL; - conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env); - if (conf) - { - axis2_char_t* service_name = "TuscanyService"; - svc = AXIS2_CONF_GET_SVC(conf, env, service_name); - if (svc) - { - AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, - "Service found using target endpoint address"); - } - } - } - - return svc; -} - -axis2_op_t *AXIS2_CALL -Axis2Dispatcher_find_op( - axis2_msg_ctx_t *msg_ctx, - const axis2_env_t *env, - axis2_svc_t *svc) -{ - axis2_op_t *op = NULL; - - AXIS2_ENV_CHECK(env, NULL); - - axis2_qname_t *op_qname = NULL; - axis2_char_t* execute_op_name = "execute"; - op_qname = axis2_qname_create(env, execute_op_name, NULL, NULL); - - op = AXIS2_SVC_GET_OP_WITH_NAME(svc, env, AXIS2_QNAME_GET_LOCALPART(op_qname, env)); - - AXIS2_QNAME_FREE(op_qname, env); - if (op) - { - AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, - "TuscanyService execute operation found"); - } - return op; -} - -axis2_status_t AXIS2_CALL -Axis2Dispatcher_invoke( - axis2_handler_t * handler, - const axis2_env_t *env, - struct axis2_msg_ctx *msg_ctx) -{ - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - if (!(AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env))) - return AXIS2_SUCCESS; - - msg_ctx->ops->find_svc = Axis2Dispatcher_find_svc; - msg_ctx->ops->find_op = Axis2Dispatcher_find_op; - - axis2_svc_t *axis_service = NULL; - axis2_op_t *op = NULL; - - axis_service = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env); - - if (!axis_service) - { - axis_service = AXIS2_MSG_CTX_FIND_SVC(msg_ctx, env); - if (axis_service) - { - AXIS2_MSG_CTX_SET_SVC(msg_ctx, env, axis_service); - /*TODO Set the Service Group Context to the message Context*/ - } - } - op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env); - if (!op) - { - op = AXIS2_MSG_CTX_FIND_OP(msg_ctx, env, axis_service); - - if (op) - { - AXIS2_MSG_CTX_SET_OP(msg_ctx, env, op); - } - } - - return AXIS2_SUCCESS; -} - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2DispatcherModule.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2DispatcherModule.cpp deleted file mode 100644 index 0dc8f3358a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2DispatcherModule.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#pragma warning(disable: 4091) -#endif - -#include -#include -#include -#include - -extern "C" -{ - -axis2_status_t AXIS2_CALL -Axis2DispatcherModule_shutdown(axis2_module_t *module, - const axis2_env_t *env); - -axis2_status_t AXIS2_CALL -Axis2DispatcherModule_init( - axis2_module_t *module, - const axis2_env_t *env, - axis2_conf_ctx_t *conf_ctx, - axis2_module_desc_t *module_desc); - -axis2_status_t AXIS2_CALL -Axis2DispatcherModule_fill_handler_create_func_map(axis2_module_t *module, - const axis2_env_t *env); - -AXIS2_EXTERN axis2_handler_t* AXIS2_CALL -Axis2Dispatcher_create(const axis2_env_t *env, - axis2_qname_t *qname); - -axis2_module_t * -Axis2DispatcherModule_create(const axis2_env_t *env) -{ - axis2_module_t *module = NULL; - module = (axis2_module_t*)AXIS2_MALLOC(env->allocator, - sizeof(axis2_module_t)); - - - module->ops = (axis2_module_ops_t*)AXIS2_MALLOC( - env->allocator, sizeof(axis2_module_ops_t)); - - module->ops->shutdown = Axis2DispatcherModule_shutdown; - module->ops->init = Axis2DispatcherModule_init; - module->ops->fill_handler_create_func_map = - Axis2DispatcherModule_fill_handler_create_func_map; - - return module; -} - -axis2_status_t AXIS2_CALL -Axis2DispatcherModule_init( - axis2_module_t *module, - const axis2_env_t *env, - axis2_conf_ctx_t *conf_ctx, - axis2_module_desc_t *module_desc) -{ - return AXIS2_SUCCESS; -} - -axis2_status_t AXIS2_CALL -Axis2DispatcherModule_shutdown(axis2_module_t *module, - const axis2_env_t *env) -{ - if(module->ops) - { - AXIS2_FREE(env->allocator, module->ops); - module->ops = NULL; - } - - if(module->handler_create_func_map) - { - axis2_hash_free(module->handler_create_func_map, env); - module->handler_create_func_map = NULL; - } - - if(module) - { - AXIS2_FREE(env->allocator, module); - module = NULL; - } - return AXIS2_SUCCESS; -} - -axis2_status_t AXIS2_CALL -Axis2DispatcherModule_fill_handler_create_func_map(axis2_module_t *module, - const axis2_env_t *env) -{ - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - module->handler_create_func_map = axis2_hash_make(env); - axis2_hash_set(module->handler_create_func_map, "TuscanyDispatcher", - (axis2_ssize_t)AXIS2_HASH_KEY_STRING, (const void *)Axis2Dispatcher_create); - - return AXIS2_SUCCESS; -} - -/** - * Following block distinguish the exposed part of the dll. - */ - -AXIS2_EXPORT int -axis2_get_instance(axis2_module_t **inst, - const axis2_env_t *env) -{ - *inst = Axis2DispatcherModule_create(env); - if(!(*inst)) - { - return AXIS2_FAILURE; - } - - return AXIS2_SUCCESS; -} - -AXIS2_EXPORT int -axis2_remove_instance(axis2_module_t *inst, - const axis2_env_t *env) -{ - axis2_status_t status = AXIS2_FAILURE; - if (inst) - { - status = Axis2DispatcherModule_shutdown(inst, env); - } - return status; -} - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp deleted file mode 100644 index 046a6e221b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#pragma warning(disable: 4091) -#endif - -#include -#include -#include -#include -#include -#include - -#include -using commonj::sdo::DataObjectPtr; -using commonj::sdo::DataFactoryPtr; -using commonj::sdo::DataObjectList; -using commonj::sdo::PropertyList; -using commonj::sdo_axiom::AxiomHelper; - -#include "tuscany/sca/util/Exceptions.h" -#include "WSServiceProxy.h" -#include "model/WSReferenceBinding.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/CompositeService.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/WSDLDefinition.h" -#include "tuscany/sca/model/WSDLOperation.h" -#include "tuscany/sca/model/WSDLInterface.h" -#include "tuscany/sca/model/Interface.h" -#include "tuscany/sca/core/TuscanyRuntime.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/util/Utils.h" -#include "Axis2Utils.h" - -using namespace tuscany::sca; -using namespace tuscany::sca::ws; -using namespace tuscany::sca::model; - -int AXIS2_CALL -Axis2Service_free(axis2_svc_skeleton_t *svc_skeleton, - const axis2_env_t *env); - -/* - * This method invokes the right service method - */ -axiom_node_t* AXIS2_CALL -Axis2Service_invoke(axis2_svc_skeleton_t *svc_skeleton, - const axis2_env_t *env, - axiom_node_t *node, - axis2_msg_ctx_t *msg_ctx); - -int AXIS2_CALL Axis2Service_init(axis2_svc_skeleton_t *svc_skeleton, - const axis2_env_t *env); - -axis2_svc_skeleton_t * -axis2_Axis2Service_create(axis2_env_t *env) -{ - axis2_svc_skeleton_t *svc_skeleton = NULL; - svc_skeleton = (axis2_svc_skeleton_t *) AXIS2_MALLOC((env)->allocator, - sizeof(axis2_svc_skeleton_t)); - - - svc_skeleton->ops = (axis2_svc_skeleton_ops_t *) AXIS2_MALLOC( - (env)->allocator, sizeof(axis2_svc_skeleton_ops_t)); - - svc_skeleton->func_array = NULL; - - svc_skeleton->ops->free = Axis2Service_free; - svc_skeleton->ops->init = Axis2Service_init; - svc_skeleton->ops->invoke = Axis2Service_invoke; - /*svc_skeleton->ops->on_fault = Axis2Service_on_fault;*/ - - return svc_skeleton; -} - -int AXIS2_CALL -Axis2Service_init(axis2_svc_skeleton_t *svc_skeleton, - const axis2_env_t *env) -{ - // This method never seems to be called - an old Axis2C artifact? - - svc_skeleton->func_array = axis2_array_list_create(env, 0); - return AXIS2_SUCCESS; -} - -int AXIS2_CALL -Axis2Service_free(axis2_svc_skeleton_t *svc_skeleton, - const axis2_env_t *env) -{ - /*if(svc_skeleton->func_array) - { - AXIS2_ARRAY_LIST_FREE(svc_skeleton->func_array, env); - svc_skeleton->func_array = NULL; - }*/ - - if(svc_skeleton->ops) - { - AXIS2_FREE((env)->allocator, svc_skeleton->ops); - svc_skeleton->ops = NULL; - } - - if(svc_skeleton) - { - AXIS2_FREE((env)->allocator, svc_skeleton); - svc_skeleton = NULL; - } - return AXIS2_SUCCESS; -} - -/** - * Initialize the Tuscany runtime - */ - -static string systemRoot = ""; -static string componentName = ""; -static string serviceName = ""; -static TuscanyRuntime* tuscanyRuntime = NULL; -static CompositeService* compositeService = NULL; - -void initTuscanyRuntime(const axis2_env_t *env, const char* root, const char *component, const char* service) -{ - AXIS2_LOG_INFO((env)->log, "Axis2Service init, root: %s, component: %s, service: %s\n", root, component, service); - try - { - - bool newInitParams = false; - - if(systemRoot != root) - { - systemRoot = root; - newInitParams = true; - } - - if(componentName != component) - { - componentName = component; - newInitParams = true; - } - - if(serviceName != service) - { - serviceName = service; - newInitParams = true; - } - - if(tuscanyRuntime == NULL) - { - AXIS2_LOG_INFO((env)->log, "Creating new Tuscany runtime\n"); - tuscanyRuntime = new TuscanyRuntime(componentName, systemRoot); - tuscanyRuntime->start(); - } - else if(tuscanyRuntime != NULL && newInitParams) - { - AXIS2_LOG_INFO((env)->log, "Restarting Tuscany runtime\n"); - tuscanyRuntime->stop(); - tuscanyRuntime->setDefaultComponentName(componentName); - tuscanyRuntime->setSystemRoot(systemRoot); - tuscanyRuntime->start(); - } - - if(compositeService == NULL) - { - Composite* composite = (Composite*)SCARuntime::getInstance()->getDefaultComponent()->getType(); - compositeService = (CompositeService*)composite->findComponent(serviceName); - } - else - { - if(newInitParams) - { - Composite* composite = SCARuntime::getInstance()->getDefaultComponent()->getComposite(); - compositeService = (CompositeService*)composite->findComponent(serviceName); - } - } - } - catch(TuscanyRuntimeException &ex) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "%s has been caught: %s\n", ex.getEClassName(), ex.getMessageText()); - } -} - - -/* - * This method invokes the target service method - */ -axiom_node_t* AXIS2_CALL -Axis2Service_invoke(axis2_svc_skeleton_t *svc_skeleton, - const axis2_env_t *env, - axiom_node_t *node, - axis2_msg_ctx_t *msg_ctx) -{ - if (node) - { - if (AXIOM_NODE_GET_NODE_TYPE(node, env) == AXIOM_ELEMENT) - { - axiom_element_t *element = NULL; - element = (axiom_element_t *)AXIOM_NODE_GET_DATA_ELEMENT(node, env); - if (element) - { - string op_name = ""; - axis2_bool_t rest = AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env); - if (rest) - { - axis2_endpoint_ref_t *endpoint_ref = AXIS2_MSG_CTX_GET_FROM(msg_ctx, env); - if (endpoint_ref) - { - const axis2_char_t *address = AXIS2_ENDPOINT_REF_GET_ADDRESS(endpoint_ref, env); - if (address) - { - axis2_char_t **url_tokens = axis2_parse_request_url_for_svc_and_op(env, address); - if (url_tokens) - { - if (url_tokens[1]) - { - op_name = url_tokens[1]; - } - if (NULL != url_tokens[1]) - AXIS2_FREE(env->allocator, url_tokens[1]); - if (NULL != url_tokens[0]) - AXIS2_FREE(env->allocator, url_tokens[0]); - AXIS2_FREE(env->allocator, url_tokens); - } - } - } - } - else - { - // This gets the operation name from the root element name - this is correct for DocLit Wrapped style - op_name = AXIOM_ELEMENT_GET_LOCALNAME(element, env); - } - - if (op_name != "") - { - // Get the Tuscany system root and composite service name from the Axis2 - // service parameters - char* rootParam = Axis2Utils::getAxisServiceParameterValue(env, msg_ctx, "TuscanySystemRoot"); - if (rootParam == NULL) - rootParam = ""; - - char* serviceParam = Axis2Utils::getAxisServiceParameterValue(env, msg_ctx, "TuscanyService"); - if (serviceParam != NULL) - { - AXIS2_LOG_INFO((env)->log, "Axis2Service invoke called with system root: %s, service name: %s, operation name: %s", rootParam, serviceParam, op_name.c_str()); - - // Service is of the form "component name"/"composite service name" - string component, service; - Utils::rTokeniseString("/", serviceParam, component, service); - - initTuscanyRuntime(env, rootParam, component.c_str(), service.c_str()); - } - else { - - // Use the default system root and component, the service is - // derived from the target address - axis2_endpoint_ref_t *endpoint_ref = NULL; - endpoint_ref = AXIS2_MSG_CTX_GET_FROM(msg_ctx, env); - axis2_char_t *address = NULL; - address = (axis2_char_t*) AXIS2_ENDPOINT_REF_GET_ADDRESS(endpoint_ref, env); - axis2_char_t **url_tokens = NULL; - url_tokens = axis2_parse_request_url_for_svc_and_op(env, address); - string service(url_tokens[0]); - - AXIS2_LOG_INFO((env)->log, "Axis2Service invoke called with system root: %s, service name: %s, operation name: %s", rootParam, service.c_str(), op_name.c_str()); - - initTuscanyRuntime(env, rootParam, "", service.c_str()); - } - - if(!compositeService) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: Tuscany initialisation failed"); - return 0; - } - - DataFactoryPtr dataFactory = compositeService->getComposite()->getDataFactory(); - if (dataFactory == 0) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: CompositeService has no SCA implementation"); - return 0; - } - - // Get the WS binding and the WSDL operation - Composite* composite = compositeService->getComposite(); - Reference* reference = compositeService->getReference(); - WSReferenceBinding* binding = (WSReferenceBinding*)reference->getBinding(); - WSDLOperation wsdlOperation; - - string wsdlNamespace = binding->getWSDLNamespaceURL(); - if (wsdlNamespace != "") - { - - // Lookup the WSDL model from the composite, keyed on the namespace - // (the wsdl will have been loaded at startup) - WSDLDefinition* wsdlDefinition = composite->findWSDLDefinition(wsdlNamespace); - if (wsdlDefinition == 0) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "WSDL description %s not found\n", wsdlNamespace.c_str()); - string msg = "WSDL not found for " + wsdlNamespace; - throw SystemConfigurationException(msg.c_str()); - } - - // Find the target operation in the wsdl port type. - try { - wsdlOperation = wsdlDefinition->findOperation( - binding->getServiceName(), - binding->getEndpointName(), - op_name.c_str()); - } - catch(SystemConfigurationException &ex) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "SystemConfigurationException has been caught: %s\n", ex.getMessageText()); - throw; - } - - } - else - { - Interface* iface = reference->getType()->getInterface(); - if (iface != NULL && - iface->getInterfaceTypeQName() == WSDLInterface::typeQName) - { - WSDLInterface* wsdlInterface = (WSDLInterface*)iface; - wsdlNamespace = wsdlInterface->getNamespaceURI(); - - if (wsdlNamespace != "") - { - - WSDLDefinition* wsdl = composite->findWSDLDefinition(wsdlNamespace); - if (wsdl == 0) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "WSDL description %s not found\n", wsdlNamespace.c_str()); - string msg = "WSDL not found for " + wsdlNamespace; - throw SystemConfigurationException(msg.c_str()); - } - - try - { - wsdlOperation = wsdl->findOperation(wsdlInterface->getName(), op_name.c_str()); - } - catch(SystemConfigurationException &ex) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "SystemConfigurationException has been caught: %s\n", ex.getMessageText()); - throw; - } - } - } - } - - if (wsdlNamespace == "") - { - // Create a default document literal wrapped WSDL operation - wsdlNamespace = compositeService->getName(); - wsdlOperation = WSDLOperation(); - wsdlOperation.setOperationName(op_name.c_str()); - wsdlOperation.setSoapAction(wsdlNamespace+ "#" +op_name); - wsdlOperation.setEndpoint(""); - wsdlOperation.setSoapVersion(WSDLOperation::SOAP11); - wsdlOperation.setDocumentStyle(true); - wsdlOperation.setWrappedStyle(true); - wsdlOperation.setEncoded(false); - wsdlOperation.setInputType(wsdlNamespace + "#" + op_name); - wsdlOperation.setOutputType(wsdlNamespace + "#" + op_name + "Response"); - } - - // Convert the input AXIOM node to an SDO DataObject - axiom_node_t* body = AXIOM_NODE_GET_PARENT(node, env); - char* str = NULL; - str = AXIOM_NODE_TO_STRING(body, env); - if (str) - { - AXIS2_LOG_INFO((env)->log, "Axis2Service invoke has request OM: %s\n", str); - } - - // Convert the SOAP body to an SDO DataObject - AxiomHelper* axiomHelper = AxiomHelper::getHelper(); - DataObjectPtr inputBodyDataObject = NULL; - - try - { - inputBodyDataObject = axiomHelper->toSdo(body, dataFactory); - } - catch(SDORuntimeException &ex) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: SDORuntimeException thrown: %s", ex.getMessageText()); - } - - if(!inputBodyDataObject) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: Could not convert received Axiom node to SDO"); - /** TODO: return a SOAP fault here */ - return 0; - } - - // Get the first body part representing the doc-lit-wrapped wrapper element - DataObjectPtr inputDataObject = NULL; - PropertyList bpl = inputBodyDataObject->getInstanceProperties(); - if (bpl.size()!=0) - { - if (bpl[0].isMany()) - { - DataObjectList& parts = inputBodyDataObject->getList((unsigned int)0); - inputDataObject = parts[0]; - } - else - { - inputDataObject = inputBodyDataObject->getDataObject(bpl[0]); - } - } - if (inputDataObject == NULL) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: Could not convert body part to SDO"); - return 0; - } - - // Dispatch to the WS proxy - WSServiceProxy* proxy = (WSServiceProxy*)binding->getServiceProxy(); - - DataObjectPtr outputDataObject = proxy->invoke(wsdlOperation, inputDataObject); - - if(!outputDataObject) - { - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: Failure whilst invoking CompositeService"); - - /** TODO: return a SOAP fault here */ - return 0; - } - - // Convert the output DataObject to an Axiom node - axiom_node_t* outputNode = axiomHelper->toAxiomNode(outputDataObject, - wsdlOperation.getOutputTypeUri().c_str(), wsdlOperation.getOutputTypeName().c_str()); - - AxiomHelper::releaseHelper(axiomHelper); - - str = AXIOM_NODE_TO_STRING(outputNode, env); - if (str) - { - AXIS2_LOG_INFO((env)->log, "Axis2Service invoke has response OM : %s\n", str); - } - - - //LOGEXIT(1, "Axis2Service_invoke"); - return outputNode; - } - } - } - } - - AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2Service_invoke: invalid OM parameters in request"); - //LOGERROR(0, "Axis2Service service ERROR: invalid OM parameters in request\n"); - - /** TODO: return a SOAP fault here */ - return 0; -} - - -extern "C" -{ - -/** - * Following block distinguish the exposed part of the dll. - */ - -AXIS2_EXPORT int axis2_get_instance(axis2_svc_skeleton **inst, - axis2_env_t *env) -{ - *inst = axis2_Axis2Service_create(env); - if(!(*inst)) - { - return AXIS2_FAILURE; - } - - return AXIS2_SUCCESS; -} - -AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst, - axis2_env_t *env) -{ - axis2_status_t status = AXIS2_FAILURE; - if (inst) - { - status = AXIS2_SVC_SKELETON_FREE(inst, env); - } - return status; -} -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.cpp deleted file mode 100644 index 7a30ab2994..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#pragma warning(disable: 4091) -#endif -#include "Axis2Utils.h" - -#include -#include - -#include "tuscany/sca/util/Logging.h" - -using namespace tuscany::sca; -using namespace tuscany::sca::ws; - - -/* Static utility method to retrieve service parameters from the service.xml file - * Get an odd linking error if this method (or the header's it requires) are in - * a different class. - */ -char* Axis2Utils::getAxisServiceParameterValue(const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, char* parameterName) -{ - struct axis2_svc *svc = NULL; - struct axis2_op_ctx *op_ctx = NULL; - struct axis2_svc_ctx *svc_ctx = NULL; - axis2_param_t *param = NULL; - char* paramValue = NULL; - - LOGENTRY(1, "Axis2Utils::getAxisServiceParameterValue"); - - op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env); - svc_ctx = AXIS2_OP_CTX_GET_PARENT(op_ctx, env); - svc = AXIS2_SVC_CTX_GET_SVC(svc_ctx, env); - if(NULL == svc) - { - return NULL; - } - - param = AXIS2_SVC_GET_PARAM(svc, env, parameterName); - if(!param) - { - LOGERROR_1(1,"Axis parameter %s cannot be found", parameterName); - } - else - { - paramValue = (char*) AXIS2_PARAM_GET_VALUE(param, env); - } - - LOGEXIT(1, "Axis2Utils::getAxisServiceParameterValue"); - return paramValue; -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.h deleted file mode 100644 index 4e8b069010..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Utils.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_axis2utils_h -#define tuscany_sca_extension_ws_axis2utils_h - -#include -#include - - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - class Axis2Utils - { - public: - static char* getAxisServiceParameterValue(const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, char* parameterName); - }; - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_axis2utils_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.cpp deleted file mode 100644 index 2cf5e5d8e1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "WSReferenceBindingExtension.h" -#include "model/WSReferenceBinding.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/core/SCARuntime.h" - - -extern "C" -{ - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void tuscany_sca_extension_initialize() - { - tuscany::sca::ws::WSReferenceBindingExtension::initialize(); - } -} - -namespace tuscany -{ - namespace sca - { - namespace ws - { - // =================================================================== - // Constructor for the WSReferenceBinding class. - // =================================================================== - WSReferenceBindingExtension::WSReferenceBindingExtension() - { - LOGENTRY(1, "WSReferenceBindingExtension::constructor"); - LOGEXIT(1, "WSReferenceBindingExtension::constructor"); - } - - // =================================================================== - // Destructor for the WSReferenceBindingExtension class. - // =================================================================== - WSReferenceBindingExtension::~WSReferenceBindingExtension() - { - LOGENTRY(1, "WSReferenceBindingExtension::destructor");; - LOGEXIT(1, "WSReferenceBindingExtension::destructor"); - } - - const string WSReferenceBindingExtension::extensionName("ws"); - const string WSReferenceBindingExtension::typeQName("http://www.osoa.org/xmlns/sca/1.0#WebServiceBinding"); - - // =================================================================== - // loadModelElement - load the info from binding.ws - // =================================================================== - ReferenceBinding* WSReferenceBindingExtension::getReferenceBinding(Composite *composite, Reference* reference, DataObjectPtr scdlBinding) - { - string bindingType = scdlBinding->getType().getName(); - if (bindingType == "WebServiceBinding") - { - string uri = scdlBinding->getCString("uri"); - string endpoint = scdlBinding->getCString("endpoint"); - commonj::sdo::DataObjectList& soap = scdlBinding->getList("soapbinding"); - string version; - if (soap.size()!=0) - { - version = soap.getCString(0); - } - else - { - version = ""; - } - - WSReferenceBinding* serviceBinding = new WSReferenceBinding(reference, uri, endpoint, version); - - return serviceBinding; - } - else - { - return NULL; - } - } - - void WSReferenceBindingExtension::initialize() - { - LOGENTRY(1, "WSReferenceBindingExtension::initialize");; - SCARuntime::getInstance()->registerReferenceBindingExtension(new WSReferenceBindingExtension()); - LOGEXIT(1, "WSReferenceBindingExtension::initialize");; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.h deleted file mode 100644 index c7972fe15a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSReferenceBindingExtension.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_wsreferencebindingextension_h -#define tuscany_sca_extension_ws_wsreferencebindingextension_h - -#include "tuscany/sca/extension/ReferenceBindingExtension.h" - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - class WSReferenceBindingExtension : public ReferenceBindingExtension - { - public: - /** - * Default constructor - */ - WSReferenceBindingExtension(); - - /** - * Destructor - */ - virtual ~WSReferenceBindingExtension(); - - /** - * return the name of the extension - */ - virtual const string& getExtensionName() {return extensionName;} - - /** - * return the QName of schema elemant for this implementation extension - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#binding.ws") - */ - virtual const string& getExtensionTypeQName() {return typeQName;} - - virtual ReferenceBinding* getReferenceBinding(Composite* composite, Reference *reference, DataObjectPtr scdlBinding); - - static void initialize(); - - private: - static const string extensionName; - static const string typeQName; - - }; - - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_wsreferencebindingextension_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp deleted file mode 100644 index 960c91ed60..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp +++ /dev/null @@ -1,587 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "WSServiceProxy.h" -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/util/Exceptions.h" -#include "tuscany/sca/util/Utils.h" -#include "tuscany/sca/core/SCARuntime.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/ReferenceType.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/ServiceType.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/ComponentType.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Composite.h" -#include "tuscany/sca/model/ServiceBinding.h" -#include "tuscany/sca/model/WSDLDefinition.h" -#include "tuscany/sca/model/WSDLInterface.h" -#include "tuscany/sca/model/WSDLOperation.h" -#include "model/WSReferenceBinding.h" - -#include "commonj/sdo/SDO.h" -using namespace commonj::sdo; - -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - // ============================ - // Constructor: Create a proxy - // ============================ - WSServiceProxy::WSServiceProxy(Reference* reference) - : ServiceProxy(reference) - { - LOGENTRY(1,"WSServiceProxy::constructor"); - - // Get the target service wrapper - WSReferenceBinding* referenceBinding = (WSReferenceBinding*)reference->getBinding(); - serviceWrapper = referenceBinding->getTargetServiceBinding()->getServiceWrapper(); - - // Define the SOAP Body type and element to allow a SOAP body to - // be loaded in a DataObject - DataFactoryPtr dataFactory = reference->getComponent()->getComposite()->getDataFactory(); - try { - const Type& bodyType = dataFactory->getType("http://www.w3.org/2003/05/soap-envelope", "Body"); - } catch (SDORuntimeException e) - { - - // Define the SOAP 1.2 Body type - dataFactory->addType("http://www.w3.org/2003/05/soap-envelope", "RootType", false, false, false); - dataFactory->addType("http://www.w3.org/2003/05/soap-envelope", "Body", false, true, false); - dataFactory->addPropertyToType( - "http://www.w3.org/2003/05/soap-envelope", "RootType", - "Body", - "http://www.w3.org/2003/05/soap-envelope", "Body", - false, false, true); - - // Define the SOAP 1.1 Body type - dataFactory->addType("http://schemas.xmlsoap.org/soap/envelope/", "RootType", false, false, false); - dataFactory->addType("http://schemas.xmlsoap.org/soap/envelope/", "Body", false, true, false); - dataFactory->addPropertyToType( - "http://schemas.xmlsoap.org/soap/envelope/", "RootType", - "Body", - "http://schemas.xmlsoap.org/soap/envelope/", "Body", - false, false, true); - } - - LOGEXIT(1,"WSServiceProxy::constructor"); - } - - // ========== - // Destructor - // ========== - WSServiceProxy::~WSServiceProxy() - { - LOGENTRY(1,"WSServiceProxy::destructor"); - LOGEXIT(1,"WSServiceProxy::destructor"); - } - - /// - /// This method will be called to process an operation invocation. - /// - DataObjectPtr WSServiceProxy::invoke(const WSDLOperation& wsdlOperation, DataObjectPtr inputDataObject) - { - LOGENTRY(1,"WSServiceProxy::invoke"); - - Reference* reference = getReference(); - Component* component = reference->getComponent(); - Composite* composite = component ->getComposite(); - - WSReferenceBinding* referenceBinding = (WSReferenceBinding*)reference->getBinding(); - DataFactoryPtr dataFactoryPtr = reference->getComponent()->getComposite()->getDataFactory(); - - bool documentStyle = wsdlOperation.isDocumentStyle(); - bool wrappedStyle = wsdlOperation.isWrappedStyle(); - - const char* outputTypeURI = wsdlOperation.getOutputTypeUri().c_str(); - const char* outputTypeName = wsdlOperation.getOutputTypeName().c_str(); - - LOGINFO_2(4, "WSServiceProxy has got WSDLOperation with inputType: %s#%s", - wsdlOperation.getInputTypeUri().c_str(), - wsdlOperation.getInputTypeName().c_str()); - LOGINFO_2(4, "WSServiceProxy has got WSDLOperation with outputType: %s#%s", - outputTypeURI, - outputTypeName); - LOGINFO_2(4, "WSServiceProxy has got WSDLOperation with documentStyle=%d and wrapped=%d", - documentStyle, - wrappedStyle); - - if (documentStyle) - { - if (wrappedStyle) - { - - // Create new Operation object and set parameters and return value - Operation operation(wsdlOperation.getOperationName().c_str()); - - // Go through the input data object to set the operation parameters - PropertyList pl = inputDataObject->getInstanceProperties(); - - for(int i=0; igetBoolean(pl[i]); - operation.addParameter(boolData); - } - break; - case Type::ByteType: - { - char* byteData = new char; - *byteData = inputDataObject->getByte(pl[i]); - operation.addParameter(byteData); - } - break; - case Type::BytesType: - { - int len = inputDataObject->getLength(pl[i]); - char* bytesData = new char[len+1]; - int bytesWritten = inputDataObject->getBytes(pl[i], bytesData, len); - // Ensure the bytes end with the null char. Not sure if this is neccessary - if(bytesWritten <= len) - { - bytesData[bytesWritten] = 0; - } - else - { - bytesData[len] = 0; - } - operation.addParameter(&bytesData); - } - break; - case Type::CharacterType: - { - // This code should work but won't be used as there is no mapping from an XSD type to the SDO CharacterType - wchar_t* charData = new wchar_t; - *charData = inputDataObject->getCharacter(pl[i]); - operation.addParameter(charData); - } - break; - case Type::DoubleType: - { - long double* doubleData = new long double; - *doubleData = inputDataObject->getDouble(pl[i]); - operation.addParameter(doubleData); - } - break; - case Type::FloatType: - { - float* floatData = new float; - *floatData = inputDataObject->getFloat(pl[i]); - operation.addParameter(floatData); - } - break; - case Type::IntegerType: - { - long* intData = new long; - *intData = inputDataObject->getInteger(pl[i]); - operation.addParameter(intData); - } - break; - case Type::ShortType: - { - short* shortData = new short; - *shortData = inputDataObject->getShort(pl[i]); - operation.addParameter(shortData); - } - break; - case Type::StringType: - { - string* stringData; - if(inputDataObject->isSet(pl[i])) - { - stringData = new string(inputDataObject->getCString(pl[i])); - } - else - { - // The data is not set, so pass an empty string as the parameter - stringData = new string(); - } - operation.addParameter(stringData); - } - break; - case Type::DataObjectType: - { - DataObjectPtr dataObjectData = inputDataObject->getDataObject(pl[i]); - if(!dataObjectData) - { - LOGINFO_1(4, "SDO DataObject parameter named %s was null", name); - } - operation.addParameter(&dataObjectData); - } - break; - case Type::OpenDataObjectType: - { - /* - * This code deals with xsd:any element parameters - * Get each element as a DataObject and add in to the parameter list - */ - - DataObjectList& dataObjectList = inputDataObject->getList(pl[i]); - - for(int j=0; jgetSequence(); - if (sequence->size()!=0) - { - // Add a text element - if (sequence->isText(0)) - { - string* stringData = new string(sequence->getCStringValue(0)); - operation.addParameter(stringData); - } - else - { - // Add a complex element DataObject - DataObjectPtr dob = sequence->getDataObjectValue(0); - if(!dob) - { - LOGINFO_1(4, "SDO DataObject parameter named %s was null", name); - } - operation.addParameter(&dob); - } - } - else - { - // Empty content, add an empty string - LOGINFO_2(4, "SDO OpenDataObject parameter named %s[%d] was empty", name, j); - string* stringData = new string(""); - operation.addParameter(stringData); - } - } - } - } - break; - case Type::DateType: - LOGERROR_1(0, "SDO DateType parameters are not yet supported (%s)", name); - return NULL; - case Type::LongType: - LOGERROR_1(0, "SDO LongType (int64_t) parameters are not yet supported (%s)", name); - return NULL; - break; - case Type::UriType: - LOGERROR_1(0, "SDO UriType parameters are not yet supported (%s)", name); - return NULL; - break; - case Type::BigDecimalType: - LOGERROR_1(0, "SDO BigDecimalType parameters are not yet supported (%s)", name); - return NULL; - break; - case Type::BigIntegerType: - LOGERROR_1(0, "SDO BigIntegerType parameters are not yet supported (%s)", name); - return NULL; - break; - default: - LOGERROR_1(0, "Unknown SDO type parameter named %s has been found. Unknown types are not yet supported", name); - return NULL; - } - } - - try - { - - // Call into the target service wrapper - serviceWrapper->invoke(operation); - - // Set the data in the outputDataObject to be returned - DataObjectPtr outputDataObject; - try { - - // Create the output wrapper - const Type& rootType = dataFactoryPtr->getType(outputTypeURI, "RootType"); - const Property& prop = rootType.getProperty(outputTypeName); - const Type& outputType = prop.getType(); - outputDataObject = dataFactoryPtr->create(outputType); - } - catch (SDORuntimeException e) - { - try - { - - // Create the output wrapper - const Type& outputType = dataFactoryPtr->getType(outputTypeURI, outputTypeName); - outputDataObject = dataFactoryPtr->create(outputType); - } - catch (SDORuntimeException e) - { - // The output wrapper type is not known, create an open DataObject - outputDataObject = dataFactoryPtr->create(Type::SDOTypeNamespaceURI, "OpenDataObject"); - } - } - - setOutputData(operation, outputDataObject, dataFactoryPtr); - - LOGEXIT(1,"WSServiceProxy::invoke"); - - return outputDataObject; - - } - catch(SDORuntimeException &ex) - { - // TODO: Return more error information than just a null DataObject - LOGERROR_2(0, "%s has been caught: %s\n", ex.getEClassName(), ex.getMessageText()); - return NULL; - } - catch(TuscanyRuntimeException &ex) - { - // TODO: Return more error information than just a null DataObject - LOGERROR_2(0, "%s has been caught: %s\n", ex.getEClassName(), ex.getMessageText()); - return NULL; - } - } - else - { - LOGERROR(0, "CompositeServices with non-wrapped document style WSDL Operations are not yet supported"); - LOGEXIT(1,"WSServiceProxy::invoke"); - return NULL; - } - } - else - { - // RPC style - LOGERROR(0, "CompositeServices with RPC style WSDL Operations are not yet supported"); - return NULL; - } - } - - - void WSServiceProxy::setOutputData(Operation& operation, DataObjectPtr outputDataObject, DataFactoryPtr dataFactoryPtr) - { - // Go through data object to set the return value - PropertyList pl = outputDataObject->getType().getProperties(); - - if(pl.size() == 0) - { - if(outputDataObject->getType().isOpenType() && outputDataObject->getType().isDataObjectType()) - { - /* - * This code deals with returning xsd:any elements - */ - DataObjectList& l = outputDataObject->getList("return"); - Operation::ParameterType resultType = operation.getReturnType(); - switch(resultType) - { - case Operation::BOOL: - { - l.append(*(bool*)operation.getReturnValue()); - break; - } - case Operation::SHORT: - { - l.append(*(short*)operation.getReturnValue()); - break; - } - case Operation::INT: - { - l.append(*(long*)operation.getReturnValue()); - break; - } - case Operation::LONG: - { - l.append(*(long*)operation.getReturnValue()); - break; - } - case Operation::USHORT: - { - l.append(*(short*)operation.getReturnValue()); - break; - } - case Operation::UINT: - { - l.append(*(long*)operation.getReturnValue()); - break; - } - case Operation::ULONG: - { - l.append(*(long*)operation.getReturnValue()); - break; - } - case Operation::FLOAT: - { - l.append(*(float*)operation.getReturnValue()); - break; - } - case Operation::DOUBLE: - { - l.append(*(long double*)operation.getReturnValue()); - break; - } - case Operation::LONGDOUBLE: - { - l.append(*(long double*)operation.getReturnValue()); - break; - } - case Operation::CHARS: - { - l.append(*(char**)operation.getReturnValue()); - break; - } - case Operation::STRING: - { - l.append((*(string*)operation.getReturnValue()).c_str()); - break; - } - case Operation::DATAOBJECT: - { - l.append(*(DataObjectPtr*)operation.getReturnValue()); - break; - } - default: - { - string msg = "Unsupported parameter type"; - msg += resultType; - throw msg.c_str(); - } - } - } - else - { - LOGINFO(4, "No return values are defined"); - } - } - else { - - // Should only be one return value.. This goes through all return values - for(int i=0; isetBoolean(pl[i], *(bool*)operation.getReturnValue()); - break; - } - case Operation::SHORT: - { - outputDataObject->setShort(pl[i], *(short*)operation.getReturnValue()); - break; - } - case Operation::INT: - { - outputDataObject->setInteger(pl[i], *(int*)operation.getReturnValue()); - break; - } - case Operation::LONG: - { - outputDataObject->setInteger(pl[i], *(long*)operation.getReturnValue()); - break; - } - case Operation::USHORT: - { - outputDataObject->setInteger(pl[i], *(unsigned short*)operation.getReturnValue()); - break; - } - case Operation::UINT: - { - outputDataObject->setInteger(pl[i], *(unsigned int*)operation.getReturnValue()); - break; - } - case Operation::ULONG: - { - outputDataObject->setInteger(pl[i], *(unsigned long*)operation.getReturnValue()); - break; - } - case Operation::FLOAT: - { - outputDataObject->setFloat(pl[i], *(float*)operation.getReturnValue()); - break; - } - case Operation::DOUBLE: - { - outputDataObject->setDouble(pl[i], *(double*)operation.getReturnValue()); - break; - } - case Operation::LONGDOUBLE: - { - outputDataObject->setDouble(pl[i], *(long double*)operation.getReturnValue()); - break; - } - case Operation::CHARS: - { - if(*(char**)operation.getReturnValue() != NULL) - { - outputDataObject->setCString(pl[i], *(char**)operation.getReturnValue()); - } - else - { - LOGINFO_1(4, "Return value is NULL, so leaving property %s unset", pl[i].getName()); - } - break; - } - case Operation::STRING: - { - outputDataObject->setCString(pl[i], (*(string*)operation.getReturnValue()).c_str()); - break; - } - case Operation::DATAOBJECT: - { - - if(*(DataObjectPtr*)operation.getReturnValue() != NULL) - { - outputDataObject->setDataObject(pl[i], *(DataObjectPtr*)operation.getReturnValue()); - } - else - { - LOGINFO_1(4, "Return value is NULL, so leaving property %s unset", pl[i].getName()); - } - - break; - } - default: - { - string msg = "Unsupported parameter type"; - msg += resultType; - throw msg.c_str(); - } - } - } - } - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h deleted file mode 100644 index 82ab4385f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_wsserviceproxy_h -#define tuscany_sca_extension_ws_wsserviceproxy_h - -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/core/ServiceWrapper.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/WSDLOperation.h" -#include "model/WSReferenceBinding.h" -#include "commonj/sdo/SDO.h" - -using namespace tuscany::sca::model; - -using commonj::sdo::DataObjectPtr; -using commonj::sdo::DataFactoryPtr; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - /** - * Holds a proxy for a given component and reference. - * The proxy which is held inside a ServiceProxy will be specific to the programming - * interface expected by the client. In this particular case the client is an Axis2 - * Web service skeleton. - */ - class WSServiceProxy : public ServiceProxy - { - public: - /** - * Create a new service proxy for a reference. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The reference on the source component. - * @param target The wrapper of the service which is wired to this reference. - */ - WSServiceProxy(Reference* reference); - - /** - * Create a new service proxy for a service. The proxy will contain a pointer to - * the target ServiceWrapper. - * @param reference The service on the target component. - * @param target The wrapper of the target service. - */ - WSServiceProxy(Service* service); - - /** - * Destructor. - */ - virtual ~WSServiceProxy(); - - /** - * Invoke the specified operation - */ - DataObjectPtr invoke(const WSDLOperation& wsdlOperation, DataObjectPtr inputDataObject); - - private: - - void setOutputData(Operation& operation, DataObjectPtr outputDataObject, DataFactoryPtr dataFactoryPtr); - - /** - * The target service wrapper - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_wsserviceproxy_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.cpp deleted file mode 100644 index 23ecc133e8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/Logging.h" -#include "tuscany/sca/ws/model/WSReferenceBinding.h" -#include "tuscany/sca/core/ServiceProxy.h" -#include "tuscany/sca/ws/WSServiceProxy.h" - -namespace tuscany -{ - namespace sca - { - namespace ws - { - - // Constructor - WSReferenceBinding::WSReferenceBinding(Reference* reference, const string& uri, const string& endpoint, const string&version) - : ReferenceBinding(reference, uri), endpoint(endpoint), soapVersion(version) - { - parseEndpoint(); - } - - void WSReferenceBinding::parseEndpoint() - { - // Endpoint is of the form: #wsdl.endpoint(/) - string::size_type hash = endpoint.find("#"); - if (hash != string::npos) - { - // Found a hash - - // Namepace is the part before the # - wsdlNamespaceURL = endpoint.substr(0, hash); - - - if ( (hash+1) < endpoint.length()) - { - // Check the next part is wsdl.endpoint( - int ending = hash+15; - string check = endpoint.substr(hash+1, 14); - if (check.compare("wsdl.endpoint(") == 0) - { - // Find the matching ) - int endBracket = endpoint.find(")",ending); - if (endBracket-1 > ending+1) - { - string serviceAndEndpoint = endpoint.substr(ending, endBracket-ending); - // Look for a '/' - string::size_type slash = serviceAndEndpoint.find("/"); - if (slash != string::npos) - { - serviceName = serviceAndEndpoint.substr(0, slash); - - if ( (slash+1) < serviceAndEndpoint.length()) - { - endpointName = serviceAndEndpoint.substr(slash+1); - } - else - { - endpointName = ""; - } - - } - else - { - // No '/' so all of it is the service name - serviceName = serviceAndEndpoint; - endpointName = ""; - - } - } - else - { - // Nothing between the () - serviceName = ""; - endpointName = ""; - } - } - else - { - // not the correct characters after the #, ignore the rest - serviceName = ""; - endpointName = ""; - } - - } - else - { - // Nothing after the hash - serviceName = ""; - endpointName = ""; - } - } - else - { - // No hash at all - wsdlNamespaceURL = endpoint; - serviceName = ""; - endpointName = ""; - } - } - - // Destructor - WSReferenceBinding::~WSReferenceBinding() - { - } - - void WSReferenceBinding::configure(ServiceBinding *binding) - { - targetServiceBinding = binding; - - serviceProxy = new WSServiceProxy(getReference()); - } - - ServiceProxy* WSReferenceBinding::getServiceProxy() - { - return serviceProxy; - } - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.h deleted file mode 100644 index 90e28e326b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/model/WSReferenceBinding.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 tuscany_sca_extension_ws_model_wsreferencebinding_h -#define tuscany_sca_extension_ws_model_wsreferencebinding_h - -#include "tuscany/sca/model/ReferenceBinding.h" - -using namespace tuscany::sca::model; - -#include -using std::string; - -namespace tuscany -{ - namespace sca - { - namespace ws - { - /** - * Information about a web service binding for service or a reference. - */ - class WSReferenceBinding : public ReferenceBinding - { - public: - - /** - * Constructor. - * @param uri The uri of the binding. - * @param endpoint The definition of the endpoint to which the entrypoint - * or external service is to be bound. This is of the form - * "namespace"#endpoint("service"/"endpoint") - */ - WSReferenceBinding(Reference* reference, const string&uri, const string& endpoint, const string& version); - - /** - * Destructor. - */ - virtual ~WSReferenceBinding(); - - /** - * Returns the type of binding. - */ - virtual string getType() { return "http://www.osoa.org/xmlns/sca/1.0#WebServiceBinding"; }; - - /** - * Configure this binding from a service binding. - */ - virtual void configure(ServiceBinding* serviceBinding); - - /** - * Create a proxy representing the reference to the - * client component. - */ - virtual ServiceProxy* getServiceProxy(); - - /** - * Return the part of the endpoint definition describing the wsdl - * namespace. - * @return The wsdl namespace. - */ - string getWSDLNamespaceURL() const { return wsdlNamespaceURL; }; - - /** - * Return the service part of the endpoint definition. - * @return The service to use. - */ - string getServiceName() const { return serviceName; }; - - /** - * Return the endpoint name part of the endpoint definition. - * @return The endpoint name to use. - */ - string getEndpointName() const { return endpointName; }; - - /** - * Return the SOAP version. - * @return The SOAP version to use. - */ - string getSOAPVersion() const { return soapVersion; }; - - /** - * Returns the target service binding. - */ - ServiceBinding* getTargetServiceBinding() const { return targetServiceBinding; }; - - private: - - /** - * Parse the endpoint specification. - */ - void parseEndpoint(); - - /** - * The full endpoint string. - */ - string endpoint; - - /** - * Namespace from the endpoint. - */ - string wsdlNamespaceURL; - - /** - * Service name from the endpoint. - */ - string serviceName; - - /** - * Endpoint name from the endpoint. - */ - string endpointName; - - /** - * SOAP version. - */ - string soapVersion; - - /** - * The proxy representing the reference to the client - * component. - */ - ServiceProxy* serviceProxy; - - /** - * The service binding of the target - */ - ServiceBinding* targetServiceBinding; - }; - - } // End namespace ws - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_extension_ws_model_wsreferencebinding_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploy.bat deleted file mode 100644 index 0722342b03..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploy.bat +++ /dev/null @@ -1,73 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set wsextdir=%extdir%\ws -set svcextdir=%wsextdir%\service -set svcsdir=%svcextdir%\services -set srcdir=%rootdir%\runtime\extensions\ws\service\axis2c\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %wsextdir% mkdir %wsextdir% -if not exist %svcextdir% mkdir %svcextdir% -if not exist %svcextdir%\bin mkdir %svcextdir%\bin -if not exist %svcextdir%\lib mkdir %svcextdir%\lib - -set libname=tuscany_sca_ws_service - -del %svcextdir%\bin\%libname%.* -del %svcextdir%\lib\%libname%.* - -copy %inpath%\%libname%.lib %svcextdir%\lib -copy %inpath%\%libname%.dll %svcextdir%\bin - -if exist %inpath%\%libname%.pdb copy %inpath%\%libname%.pdb %svcextdir%\bin - -if not exist %svcsdir% mkdir %svcsdir% -if not exist %svcsdir%\tuscany mkdir %svcsdir%\tuscany - -copy %srcdir%\axis2.xml %svcextdir% -copy %srcdir%\deploy.cmd %svcextdir% -copy %srcdir%\services.xml %svcsdir%\tuscany -copy %inpath%\%libname%.dll %svcsdir%\tuscany -if exist %inpath%\%libname%.pdb copy %inpath%\%libname%.pdb %svcsdir%\tuscany - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploymodule.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploymodule.bat deleted file mode 100644 index 246728b6b2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/service/deploymodule.bat +++ /dev/null @@ -1,69 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sca root not specified -goto usage -) -set rootdir=%1 -set deploydir=%rootdir%\deploy -set extdir=%deploydir%\extensions -set wsextdir=%extdir%\ws -set svcextdir=%wsextdir%\service -set modsdir=%svcextdir%\modules -set srcdir=%rootdir%\runtime\extensions\ws\service\axis2c\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -if not exist %deploydir% mkdir %deploydir% -if not exist %extdir% mkdir %extdir% -if not exist %wsextdir% mkdir %wsextdir% - -set libname=tuscany_sca_ws_dispatcher - -del %svcextdir%\bin\%libname%.* -del %svcextdir%\lib\%libname%.* - -copy %inpath%\%libname%.lib %svcextdir%\lib -copy %inpath%\%libname%.dll %svcextdir%\bin - -if exist %inpath%\%libname%.pdb copy %inpath%\%libname%.pdb %svcextdir%\bin - - -if not exist %modsdir% mkdir %modsdir% -if not exist %modsdir%\tuscany mkdir %modsdir%\tuscany - -copy %srcdir%\module.xml %modsdir%\tuscany -copy %inpath%\%libname%.dll %modsdir%\tuscany -if exist %inpath%\%libname%.pdb copy %inpath%\%libname%.pdb %modsdir%\tuscany - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/xsd/sca-binding-webservice.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/xsd/sca-binding-webservice.xsd deleted file mode 100644 index 2c1c2abbcc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/runtime/extensions/ws/xsd/sca-binding-webservice.xsd +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/AUTHORS b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/Makefile.am deleted file mode 100644 index aa315d4f46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/BigBank/deploy -SUBDIRS = bigbank.account bigbank.client bigbank.wsclient bigbank.phpwsclient -EXTRA_DIST = *.composite README.html -deploy_DATA = *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README deleted file mode 100644 index dc919e1aed..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README +++ /dev/null @@ -1,30 +0,0 @@ -Tuscany SCA for C++ Samples - BigBank Sample -=============================================== - -This sample implements the "Simplified BigBank" scenario. A whitepaper -describing the scenario based on the SCA 0.9 Assembly specification can be -found here. This sample uses multiple C++ components, calls out to an -external Web Service via a reference, exposes the service as a Web Service -and also provides a PHP based client. - -There are four sub projects in this workspace: - - bigbank.account - This contains the source code and SCDL artifacts for the SCA BigBank - composite implementing the account services. - - - bigbank.client - A sample client which does a local call to the BigBank service. - - - bigbank.wsclient - A sample Axis2 Web Service client which calls the BigBank Web service. - - - bigbank.phpclient - A sample PHP client which calls the BigBank Web service and then - deconstructs and displays the result by using the SDO for PHP extension. - -Additionally, there is the bigbank.accountmanagement.composite file. This -describes the configuration of the SCA Calculator composite deployed to the -SCA runtime. - -See the README.html file for instructions to build and run this sample - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README.html b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README.html deleted file mode 100644 index 597d05de67..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/README.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ Samples - BigBank Sample - - - -
-
-
-

Tuscany SCA for C++ Samples - BigBank Sample

- -

This sample implements the "Simplified BigBank" scenario. A whitepaper describing - the scenario based on the SCA 0.9 Assembly specification can be found - here. - This sample uses multiple C++ components, calls out to an external Web Service via a reference, - exposes the service as a Web Service and also provides a PHP based client. -

-

There are four sub projects in this workspace:

-
    -
  • bigbank.account
    - This contains the source code and SCDL artifacts for the SCA BigBank - composite implementing the account services. -
  • -
  • bigbank.client
    - A sample client which does a local call to the BigBank service. -
  • -
  • bigbank.wsclient
    - A sample Axis2 Web Service client which calls the BigBank Web service. -
  • -
  • bigbank.phpclient
    - A sample PHP client which calls the BigBank Web service and then deconstructs - and displays the result by using the - SDO for PHP extension. -

    This is a pair of very simple PHP scripts to demonstrate how the Accounts service - that the C++ Big Bank sample exposes can be used from within the PHP scripting - language. -

    -

    bigwelcome.php
    - A bootstrap script that shows a form and allows the user to press a button - in order to invoke the bigaccount.php script -

    -

    bigaccount.php
    - Makes a call to a locally installed BigBank Accounts service. The script - shows how to use PHP SDO and SOAP extensions to construct the call - and interpret the result. -

    -
  • -
-

Additionally, there is the bigbank.accountmanagement.composite file. This - describes the configuration of the SCA Calculator composite deployed to the SCA - runtime. -

- -
- - - - -
-

Building the C++ samples on Linux

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. Build the C++ samples with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>/samples
    • -
    • ./configure --prefix=$TUSCANY_SCACPP --enable-static=no
    • -
    • make
    • -
    • make install
    • -
    - NOTE: If you don't provide the --prefix configure option, it will by default install into - /usr/local/tuscany/sca/samples/BigBank
  4. -
-
- -
-

Running the BigBank sample on Linux

-

BigBank with basic client

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.92>
    • -
    -
  2. -
  3. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bigbank.client
    • -
    • ./runclient.sh
    • -
    -
  4. -
-

BigBank with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bigbank.account -
    4. -
    5. ./runwsserver.sh
    6. -
    -
  4. -
  5. Run the client: -
      -
    1. The following environment variable is required: -
        -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bigbank.wsclient
    4. -
    5. ./runwsclient.sh
    6. -
    -
  6. -
-

BigBank with PHP web client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bin -
    4. -
    5. ./runwsserver.sh
    6. -
    -
  4. -
  5. To run the php scripts requires some configuration and setup of a php runtime with - the SDO and SimpleXML extensions enabled. The bits you will need are: - -

    Follow - these instructions to - install SDO and DAS. -

    -
  6. -
  7. You need to configure Apache to run PHP of course. This is well documented but this - is what to put at the end of httpd.conf: -
    # PHP5 Support
    -LoadModule php5_module "/home/php/php5.1.6/php5apache2.so"
    -AddType application/x-httpd-php .php
    -
    -# configure the path to php.ini
    -PHPIniDir "/home/php/php5.1.6"
    -
  8. -
  9. Copy the <tuscany_sca_install_dir>/samples/BigBank/bigbank.phpwsclient - directory to your Apache document root directory (by default this is named 'htdocs'). -
  10. -
  11. Finally, start your Apache web server. -
  12. -
  13. Run the PHP web client by pointing your browser at - http://localhost/bigbank.phpwsclient/welcome.php. - You should now be able to press the "GetAccount" button and see the values - returned from the BigBank SCA application. -
  14. - -
-
- -
-

Building the BigBank sample on Windows

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. You must have set up the environment for Microsoft Visual C++ tools. - The build command will call vcvars32 to set the environment. Ensure the - directory containing this is on your path. This will be where you - installed the compiler. -
  4. -
  5. Build the source, either via the Visual Studio 6 or 7 projects under - <tuscany_sca_install_dir>\samples\ides or via the command-line build file - found at <tuscany_sca_install_dir>\samples\ides\devstudio6\projects\BigBank\build.cmd - which will build and deploy the samples. -
  6. -
-
- -
-

Running the BigBank sample on Windows

-

BigBank with basic client

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  2. -
  3. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.client
    • -
    • runclient.bat
    • -
    -
  4. -
-

BigBank with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.account -
    4. -
    5. runwsserver.bat
    6. -
    -
  4. -
  5. Run the client: -
      -
    1. The following environment variable is required: -
        -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.wsclient
    4. -
    5. runwsclient.bat
    6. -
    -
  6. -
-

BigBank with PHP web client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.account -
    4. -
    5. runwsserver.bat
    6. -
    -
  4. -
  5. To run the php scripts requires some configuration and setup of a php runtime with - the SDO and SimpleXML extensions enabled. The bits you will need are: - -

    You can get Windows binary builds from - http://www.php.net/downloads.php. - For SDO you need two dlls as follows: -

    - -

    Copy these to the php5.1.6\ext dir ( php_soap.dll is already there) and add the - following to php.ini file (having already renamed php.ini-recommended to php.ini - of course) -

    extension=php_soap.dll
    -extension=php_sdo.dll
    -extension=php_sdo_das_xml.dll
    - I also changed the extension_dir directive to point to my extensions directory: -
    extension_dir="C:\php5.1.6\ext"
    -

    -

    Asking PHP to list what modules are active gives the following: -

    C:\php5.1.6>php -m
    -[PHP Modules]
    -bcmath
    -calendar
    -com_dotnet
    -ctype
    -date
    -dom
    -ftp
    -hash
    -iconv
    -libxml
    -odbc
    -pcre
    -Reflection
    -sdo
    -sdo_das_xml
    -session
    -SimpleXML
    -soap
    -SPL
    -standard
    -tokenizer
    -wddx
    -xml
    -xmlreader
    -xmlwriter
    -zlib
    -
    -[Zend Modules]
    - Of particular relevance to these scripts note that soap, sdo and sdo_das_xml are active. -

    -
  6. -
  7. You need to configure Apache to run PHP of course. This is well documented but this - is what to put at the end of httpd.conf: -
    # PHP5 Support
    -LoadModule php5_module "C:\php5.1.6\php5apache2.dll"
    -AddType application/x-httpd-php .php
    -
    -# configure the path to php.ini
    -PHPIniDir "C:\php5.1.6"
    -
  8. -
  9. Copy the <tuscany_sca_install_dir>\samples\BigBank\bigbank.phpwsclient - directory to your Apache document root directory (by default this is named 'htdocs'). -
  10. -
  11. Finally, start your Apache web server. -
  12. -
  13. Run the PHP web client by pointing your browser at - http://localhost/bigbank.phpwsclient/welcome.php. - You should now be able to press the "GetAccount" button and see the values - returned from the BigBank SCA application. -
  14. -
-
- - - -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataService.h deleted file mode 100644 index 04000698e7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataService.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDO.h" - -#include -using std::string; - -namespace services -{ - namespace accountdata - { - - /** - * AccountDataService business interface - */ - class AccountDataService - { - public: - - // CheckingAccount is a data object containing - // string accountNumber - // float balance - - virtual commonj::sdo::DataObjectPtr /* CheckingAccount*/ getCheckingAccount( - const string id) = 0; - - // SavingsAccount is a data object containing - // string accountNumber - // float balance - - virtual commonj::sdo::DataObjectPtr /* SavingsAccount */ getSavingsAccount( - const string id) = 0; - - // StockAccount is a data object containing - // string accountNumber - // string symbol - // int quantity - - virtual commonj::sdo::DataObjectPtr /* StockAccount */ getStockAccount ( - const string id) = 0; - - }; - - } // End accountdata -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType deleted file mode 100644 index b1cab9e1f9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp deleted file mode 100644 index 3f06809919..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "commonj/sdo/SDO.h" -#include "osoa/sca/sca.h" - -#include "AccountDataServiceImpl.h" - -using namespace commonj::sdo; -using namespace osoa::sca; - -/** - * AccountDataServiceImpl component implementation - */ - -namespace services -{ - namespace accountdata - { - - DataObjectPtr /* CheckingAccount*/ - AccountDataServiceImpl::getCheckingAccount(const string id) - { - try { - - DataFactoryPtr factory = ComponentContext::getCurrent().getDataFactory(); - - DataObjectPtr newaccount = - factory->create("http://www.bigbank.com/AccountService","CheckingAccount"); - - char* name = new char[id.size() + 10]; - strcpy(name,id.c_str()); - strcat(name,"_CHA12345"); - - newaccount->setCString("accountNumber",name); - - delete name; - - newaccount->setFloat("balance",1500.0f); - - return newaccount; - - } - catch (SDORuntimeException e) - { - return 0; - } - } - - - - DataObjectPtr /* SavingsAccount */ - AccountDataServiceImpl::getSavingsAccount(const string id) - { - try { - - DataFactoryPtr factory = ComponentContext::getCurrent().getDataFactory(); - - DataObjectPtr newaccount = - factory->create("http://www.bigbank.com/AccountService","SavingsAccount"); - - char* name = new char[id.size() + 10]; - strcpy(name,id.c_str()); - strcat(name,"_SAA12345"); - - newaccount->setCString("accountNumber",name); - - delete name; - - newaccount->setFloat("balance",1500.0f); - - return newaccount; - - } - catch (SDORuntimeException e) - { - return 0; - } - } - - - DataObjectPtr /* StockAccount */ - AccountDataServiceImpl::getStockAccount (const string id) - { - try { - - DataFactoryPtr factory = ComponentContext::getCurrent().getDataFactory(); - - DataObjectPtr newaccount = - factory->create("http://www.bigbank.com/AccountService","StockAccount"); - - char* name = new char[id.size() + 10]; - strcpy(name,id.c_str()); - strcat(name,"_STA12345"); - - newaccount->setCString("accountNumber",name); - - delete name; - - newaccount->setCString("symbol","IBM"); - - newaccount->setInteger("quantity",100); - - return newaccount; - - } - catch (SDORuntimeException e) - { - return 0; - } - } - - } // End accountdata -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h deleted file mode 100644 index 373da4ba95..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "AccountDataService.h" - -namespace services -{ - namespace accountdata - { - - /** - * AccountDataServiceImpl component implementation class - */ - class AccountDataServiceImpl : public AccountDataService - { - public: - - // CheckingAccount is a data object containing - // string accountNumber - // float balance - - virtual DataObjectPtr /* CheckingAccount*/ getCheckingAccount( - const string id); - - // SavingsAccount is a data object containing - // string accountNumber - // float balance - - virtual DataObjectPtr /* SavingsAccount */ getSavingsAccount( - const string id); - - // StockAccount is a data object containing - // string accountNumber - // string symbol - // int quantity - - virtual DataObjectPtr /* StockAccount */ getStockAccount ( - const string id); - - }; - - } // End accountdata -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.h deleted file mode 100644 index b8e462fb72..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDO.h" - -#include -using std::string; - -namespace services -{ - namespace account - { - - /** - * AccountService business interface - */ - class AccountService - { - public: - - // The account report data object has one many-valued - // property "accountSummaries", containing the following - // properties: - // string accountNumber - // string accountType - // float balance. - - virtual commonj::sdo::DataObjectPtr /*AccountReport*/ - getAccountReport(const string customerID) = 0; - - }; - - } // End account -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.wsdl deleted file mode 100644 index cbfe180692..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountService.wsdl +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType deleted file mode 100644 index b65fa1dc18..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - USD - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp deleted file mode 100644 index fd18119bad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "osoa/sca/sca.h" - -#include "AccountServiceImpl.h" -#include "StockQuoteService.h" -#include "AccountDataService.h" - -using namespace osoa::sca; -using namespace services::accountdata; -using namespace services::stockquote; - -/** - * AccountServiceImpl component implementation - */ -namespace services -{ - namespace account - { - - DataObjectPtr /*AccountReport**/ - AccountServiceImpl::getAccountReport(const string customerID) - { - ComponentContext theContext = ComponentContext::getCurrent(); - - commonj::sdo::DataFactoryPtr factory = theContext.getDataFactory(); - - commonj::sdo::DataObjectPtr newReport = - factory->create("http://www.bigbank.com/AccountService","AccountReport"); - - // Get the accountDataService service - AccountDataService *dataService = - (AccountDataService*)theContext.getService("accountDataService"); - - // would be better to return a list of accounts - this only - // gets the first of each. - - commonj::sdo::DataObjectPtr checking = - dataService->getCheckingAccount(customerID); - - if (checking != 0) - { - commonj::sdo::DataObjectList& dl = newReport->getList("checking"); - checking->setFloat("balance", - fromUSDollarToCurrency(checking->getFloat("balance"))); - dl.append(checking); - } - - commonj::sdo::DataObjectPtr savings = dataService->getSavingsAccount(customerID); - - if (savings != 0) - { - commonj::sdo::DataObjectList& dl = newReport->getList("savings"); - savings->setFloat("balance", - fromUSDollarToCurrency(savings->getFloat("balance"))); - dl.append(savings); - } - - // Get the stockQuoteService service - StockQuoteService* stockService = - (StockQuoteService*)theContext.getService("stockQuoteService"); - - commonj::sdo::DataObjectPtr stocks = dataService->getStockAccount(customerID); - - if (stocks != 0) - { - commonj::sdo::DataObjectList& dl = newReport->getList("stocks"); - - float value = 10.0f; - try { - value = stockService->getQuote( - stocks->getCString("symbol")); - } - catch (ServiceRuntimeException& e) - { - std::cout << "Fault from stock quote service" << e << std::endl; - } - stocks->setFloat("balance", - fromUSDollarToCurrency(stocks->getInteger("quantity") * - value)); - dl.append(stocks); - } - - return newReport; - } - - float AccountServiceImpl::fromUSDollarToCurrency(float value) - { - // Get the "currency" property - ComponentContext myContext = ComponentContext::getCurrent(); - - commonj::sdo::DataObjectInstance properties = myContext.getProperties(); - if (properties) - { - const char* currency = properties->getCString("currency"); - if (currency != 0) - { - std::cout << "Currency is : " << currency << std::endl; - if (!strcmp(currency,"USD")) return value; - if (!strcmp(currency,"EURO")) return 0.8f * value; - } - } - return 0.0f; - } - - } // End account -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h deleted file mode 100644 index 70dfc17b19..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h +++ /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. - */ - -#include "AccountService.h" - - -namespace services -{ - namespace account - { - - /** - * AccountServiceImpl component implementation class - */ - class AccountServiceImpl: public AccountService - { - public: - - virtual DataObjectPtr /*AccountReport*/ - getAccountReport(const string customerID); - - private: - - float fromUSDollarToCurrency(float value); - - }; - - } // End account -} // End services - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/Makefile.am deleted file mode 100644 index 4e4d69e2d7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/BigBank/deploy -compositedir=$(deploydir)/bigbank.account - -BUILT_SOURCES = scagen - -noinst_HEADERS = *.h - -composite_SCRIPTS = runwsserver.sh - -scagen: - java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output . - -composite_LTLIBRARIES = libAccount.la -composite_DATA = *.composite *.componentType *.wsdl *.xsd -EXTRA_DIST = *.composite *.componentType *.wsdl *.xsd runwsserver.sh - -dist_libAccount_la_SOURCES = \ -AccountDataServiceImpl.cpp \ -AccountServiceImpl.cpp \ -StockQuoteServiceImpl.cpp - -nodist_libAccount_la_SOURCES = \ -AccountDataServiceImpl_AccountDataService_Proxy.cpp \ -AccountDataServiceImpl_AccountDataService_Wrapper.cpp \ -AccountServiceImpl_accountDataService_Proxy.cpp \ -AccountServiceImpl_AccountService_Proxy.cpp \ -AccountServiceImpl_AccountService_Wrapper.cpp \ -AccountServiceImpl_stockQuoteService_Proxy.cpp \ -StockQuoteServiceImpl_StockQuoteService_Proxy.cpp \ -StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp \ -StockQuoteServiceImpl_webService_Proxy.cpp - -libAccount_la_LIBADD = \ --L${TUSCANY_SCACPP}/lib \ - -ltuscany_sca \ --L${TUSCANY_SCACPP}/extensions/cpp/lib \ - -ltuscany_sca_cpp - -INCLUDES = \ - -I$(TUSCANY_SCACPP)/extensions/cpp/include \ - -I$(TUSCANY_SCACPP)/include \ - -I${TUSCANY_SDOCPP}/include diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteService.h deleted file mode 100644 index d67998059a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteService.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 -using std::string; - -namespace services -{ - namespace stockquote - { - /** - * StockQuoteService business interface - */ - class StockQuoteService - { - public: - - virtual float getQuote(const string symbol) = 0; - - }; - - } // End stockquote -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType deleted file mode 100644 index 6ac2b77255..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp deleted file mode 100644 index e78769f50e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "StockQuoteServiceImpl.h" -#include "StockQuoteWebService.h" - -#include "osoa/sca/sca.h" -#include "commonj/sdo/SDO.h" - -using namespace osoa::sca; -using namespace commonj::sdo; - -/** - * StockQuoteServiceImpl component implementation - */ -namespace services { - namespace stockquote { - - // Map the format returned by the StockQuote Web service to - // the format expected in the BigBank application - float StockQuoteServiceImpl::getQuote(const string symbol) - { - ComponentContext myContext = ComponentContext::getCurrent(); - - // Get the StockQuote Web service - StockQuoteWebService* webService = - (StockQuoteWebService*)myContext.getService("webService"); - - // Invoke the service - const string result = webService->GetQuote(symbol); - - float stockPrice = 0.0f; - - // Get the stock price out of the document returned by the StockQuote - // Web service - try - { - XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(myContext.getDataFactory()); - XMLDocumentPtr stockDoc = xmlHelper->load(result); - if (stockDoc->getRootDataObject()) - { - stockPrice=stockDoc->getRootDataObject()->getFloat("Stock.0/Last"); - } - } - catch (SDORuntimeException e) - { - std::cout << e << std::endl; - return 0.0f; - } - return stockPrice; - } - - } // End stockquote -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h deleted file mode 100644 index cccf161454..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 "StockQuoteService.h" - -namespace services -{ - namespace stockquote - { - - /** - * StockQuoteServiceImpl component implementation class - */ - class StockQuoteServiceImpl : public StockQuoteService - { - public: - - virtual float getQuote(const string symbol); - }; - - } // End stockquote -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd deleted file mode 100644 index 5bce3a63dc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h deleted file mode 100644 index 9bee445c8d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 -using std::string; - -namespace services -{ - namespace stockquote - { - - /** - * StockQuoteWebService business interface - * - * This is the interface of the Web service used to get - * live stock quotes. - */ - class StockQuoteWebService - { - public: - - virtual const string GetQuote(const string symbol) = 0; - - }; - - } // End stockquote -} // End services diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl deleted file mode 100644 index c14f97c87b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get Stock quote for a company Symbol - - - - - - - - - - Get Stock quote for a company Symbol - - - - - - - - - - Get Stock quote for a company Symbol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/bigbank.account.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/bigbank.account.composite deleted file mode 100644 index 7173d584d2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/bigbank.account.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - AccountServiceComponent - - - - - AccountDataServiceComponent - StockQuoteServiceComponent - EURO - - - - - - - - - StockQuoteWebService - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.bat deleted file mode 100644 index f95d5136ef..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.bat +++ /dev/null @@ -1,51 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo Using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo Using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME% - -set APFULLDIR=%~d0%~p0 -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -rem Run the client -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %AXIS2C_HOME%\bin -.\axis2_http_server.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.sh deleted file mode 100755 index eb20a3d670..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.account/runwsserver.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -cd $AXIS2C_HOME/bin -./axis2_http_server diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.accountmanagement.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.accountmanagement.composite deleted file mode 100644 index 4bf2c35008..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.accountmanagement.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/AccountClient.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/AccountClient.cpp deleted file mode 100644 index a0b9de5f76..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/AccountClient.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "AccountService.h" -#include "osoa/sca/sca.h" -#include -#include - -using namespace osoa::sca; -using namespace std; -using namespace services::account; -using namespace commonj::sdo; - -int main(int argc, char* argv[]) -{ - - if (argc != 2) - { - cout << "account_client: Argument must be the name of the account" << endl; - return 0; - } - try - { - - // Locate a service - CompositeContext myContext = CompositeContext::getCurrent(); - AccountService *accountService = - (AccountService*) myContext.locateService("AccountServiceComponent"); - if (accountService == 0) - { - cout << "account_client: Unable to find Account service" << endl; - } - else - { - try - { - // exercise the account service - - DataObjectPtr report = - accountService->getAccountReport(argv[1]); - - XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(myContext.getDataFactory()); - char* doc = xmlHelper->save(report, report->getType().getURI(), report->getType().getName()); - cout << "XML: " << doc <getList("stocks"); - - for (i=0;i< stocks.size() ;i++) - { - cout << "Stock Account " << stocks[i]->getCString("accountNumber") << endl; - cout << "Stock Symbol : " << stocks[i]->getCString("symbol") << endl; - cout << " Holding : " << stocks[i]->getCString("quantity") << endl; - balance = stocks[i]->getFloat("balance"); - sprintf(balanceStr,"%.2f",balance); - cout << " Value : " << balanceStr << endl << endl; - } - - DataObjectList& checking = report->getList("checking"); - - for (i=0;i< checking.size() ;i++) - { - cout << "Checking Account " << checking[i]->getCString("accountNumber") << endl; - balance = checking[i]->getFloat("balance"); - sprintf(balanceStr,"%.2f",balance); - cout << " Balance : " << balanceStr << endl << endl; - } - - DataObjectList& savings = report->getList("savings"); - - for (i=0;i< savings.size() ;i++) - { - cout << "Savings Account " << savings[i]->getCString("accountNumber") << endl; - balance = savings[i]->getFloat("balance"); - sprintf(balanceStr,"%.2f",balance); - cout << " Balance : " << balanceStr << endl << endl; - } - - cout << endl; - } - } - catch (SDORuntimeException& e) - { - cout << e << endl; - } - catch (char* x) - { - cout << "account_client: exception caught: " << x << endl; - } - } - - } - catch (ServiceRuntimeException& ex) - { - cout << ex << endl; - } - return 0; -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/Makefile.am deleted file mode 100644 index 3ca7379572..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/BigBank/deploy -clientdir=$(deploydir)/bigbank.client - -client_PROGRAMS = account_client -client_SCRIPTS = runclient.sh -EXTRA_DIST = runclient.sh - -AM_CPPFLAGS = $(CPPFLAGS) -account_client_SOURCES = AccountClient.cpp - -account_client_LDADD = -L${TUSCANY_SCACPP}/lib -ltuscany_sca \ - -L${TUSCANY_SCACPP}/extensions/cpp/lib -ltuscany_sca_cpp \ - -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \ - -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -lwoden \ - -lwoden_wsdl \ - -laxis2_xml_schema \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -laxis2_http_sender \ - -laxis2_http_receiver - - -INCLUDES = -I$(TUSCANY_SCACPP)/extensions/cpp/include \ - -I${TUSCANY_SCACPP}/include \ - -I${TUSCANY_SDOCPP}/include \ - -I../bigbank.account diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.bat deleted file mode 100644 index e8907e9302..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo Using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo Using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME% - -set APFULLDIR=%~d0%~p0 -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -rem Run the client -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -.\AccountClient.exe 1234 - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.sh deleted file mode 100755 index 54f3c27578..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.client/runclient.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -./account_client 1234 - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl deleted file mode 100644 index cbfe180692..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am deleted file mode 100644 index 48843d8e56..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/BigBank/deploy -phpwsclientdir=$(deploydir)/bigbank.phpwsclient - -phpwsclient_DATA = *.php *.wsdl README -EXTRA_DIST = *.php *.wsdl README diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/README deleted file mode 100644 index d02873e860..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/README +++ /dev/null @@ -1,137 +0,0 @@ -Big Bank PHP Client -=================== - -Overview --------- - -This is a pair of very simple PHP scripts to demonstrate how the Accounts service -that the C++ Big Bank sample exposes can be used from within the PHP scripting -language. - -bigwelcome.php - A bootstrap script that shows a form and allows the user to press a button - in order to invoke the bigaccount.php script - -bigaccount.php - Makes a call to a locally installed BigBank Accounts service. The script - shows how to use PHP SDO and SOAP extensions to construct the call - and interpret the result. - -As this is a very simple test client once you have reached bigaccount.php you are done. -So there are no further buttons other than the browser back button. - -Installation ------------- - -This assumes that you have the BigBank sample runnig as a web service in your local -Axis2C container at http://localhost:9090/axis2/services/AccountService - -To run the php scripts requires some configuration and setup of a php runtime with -the SDO and SimpleXML extensions enabled. The bits you will need are: - -Apache web server - http://httpd.apache.org/ (I'm currently at 2.0.55) -PHP 5.1.6 - http://www.php.net/downloads.php (I'm currently at 5.1.6) -PHP SDO - http://pecl.php.net/package/sdo (I'm currently at 1.0.3) - -Windows -------- -If you are on windows you can get binary builds from http://www.php.net/downloads.php. -For SDO you need two dlls as followd - -php_sdo.dll http://pecl4win.php.net/ext.php/php_sdo.dll -php_sdo_das_xml.dll http://pecl4win.php.net/ext.php/php_sdo_das_xml.dll - -I copied these to my php5.1.6/ext dir ( php_soap.dll is already there) - -And added the following to my php.ini file (having already renamed php.ini-recommended to -php.ini of course) - -extension=php_soap.dll -extension=php_sdo.dll -extension=php_sdo_das_xml.dll - -I also changed the extension_dir directive to point to my extensions directory: - -extension_dir="C:/simon/apps/php5.1.6/ext" - -When I ask PHP to list what modules are active in my version of PHP I get the -following - -C:\simon\apps\php5.1.6>php -m -[PHP Modules] -bcmath -calendar -com_dotnet -ctype -date -dom -ftp -hash -iconv -libxml -odbc -pcre -Reflection -sdo -sdo_das_xml -session -SimpleXML -soap -SPL -standard -tokenizer -wddx -xml -xmlreader -xmlwriter -zlib - -[Zend Modules] - -Of particular relevance to these scripts note that soap, sdo and sd_das_xml are active. - -Other Platforms ---------------- - -If your on on another platform, such as Linux, then you will need to compile the -SDO extension. The documentation at the SDO extension page (http://livedocs.phpdoc.info/index.php?l=en&q=ref.sdo) -is currently a bit missleading and needs updating. What you need to do is do a -phpize build of the SDO PECL extension. This is discussed in the SDO documentation -but is also discussed in many other places, for example, http://www.php.net/manual/en/install.pecl.phpize.php. -Here is not the time to go into the details of how to build PHP extensions using -phpize but if you are familar with the process I use the following configure line -on windows. - -cscript configure.js --with-extra-includes=c:\simon\projects\tuscany\php\win32build\include; - c:\simon\apps\libxml2-2.6.23.win32\include; - c:\simon\apps\iconv-1.9.1.win32\include - --with-extra-libs=c:\simon\projects\tuscany\php\win32build\lib; - c:\simon\apps\libxml2-2.6.23.win32\lib; - c:\simon\apps\iconv-1.9.1.win32\lib - --enable-sdo=shared - --enable-soap - -There are no newlines in my command line by the way. I've just included them -here so you can see the command. - -Running -------- - -You need to configure Apache to run PHP of course. This is well documented but this -is what I put at the end of httpd.conf - -# PHP5 Support -LoadModule php5_module "C:/simon/apps/php5.1.6/php5apache2.dll" -AddType application/x-httpd-php .php - -# configure the path to php.ini -PHPIniDir "C:/simon/apps/php5.1.6" - -Having set up Apache all that remains is to - -- put the bigbank.phpwsclient directory in your web server's root documents directory -- start up the Axis2C runtime configured to run BigBank -- point your browser at http://myserver:port/bigbank.phpwsclient/bigwelcome.php - -You should now be able to press the "GetAccount" button and see the values -returned from the BigBank SCA application. diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php deleted file mode 100644 index b9f77d3297..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php +++ /dev/null @@ -1,113 +0,0 @@ - - - BigBank Sample - - - - - - -getAccountReport($accountname); - // we have to construct an object hierarchy that matches the - // WSDL request. We can use SDO to do this for us - - // configure SDO based on the WSDL - $xmldas = SDO_DAS_XML::create("AccountService.wsdl"); - - // Get a document that represents the request - // and get the root element - $requestxdoc = $xmldas->createDocument("getAccountReport"); - $requestsdo = $requestxdoc->getRootDataObject(); - - // add the parameter - $requestsdo['customerID'] = $accountname; - - // make the call - $result = $client->getAccountReport($requestsdo); - - // now we have the result as a PHP object - // we can turn this into an SDO but we have to do it manually - // as the SOAP extension won't generate types for us - // automatically just yet - $responsexdoc = $xmldas->createDocument("getAccountReportResponse"); - $responsesdo = $responsexdoc->getRootDataObject(); - - // flesh out the object hierarchy - $account = $responsesdo->createDataObject ('result'); - $checking = $account->createDataObject ('checking'); - $saving = $account->createDataObject ('savings'); - $stocks = $account->createDataObject ('stocks'); - - //copy the data - $checking['accountNumber'] = $result->result->checking->accountNumber; - $checking['balance'] = $result->result->checking->balance; - //etc.. - // This is a bit rubbish as we would want this to happen automatically - - // Now just put the data on the screen - // To do this we don't need to use SDO as you can see but - // it would be really handy if we wanted to pass the XML doc - // onto another service or if we wanted to do some other - // more complex XML manipulation or XPath searches - echo "

Account $accountname

"; - echo "

Checking Account

"; - echo ""; - echo ""; - echo "
Account Number $checking->accountNumber
Balance $checking->balance

Saving Account

"; - echo ""; - echo ""; - echo "
Account Number" . $result->result->savings->accountNumber . "
Balance" . $result->result->savings->balance . "

Stock Account

"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
Account Number" . $result->result->stocks->accountNumber . "
Symbol" . $result->result->stocks->symbol . "
Quantity" . $result->result->stocks->quantity . "
Banalce" . $result->result->stocks->balance . "
"; - } - catch (SoapFault $f) - { - echo "Caught soap exception: \n"; - print_r ( $f ); - } - } - catch ( Exception $e ) - { - echo "Caught exception: \n"; - print_r ( $e ); - - } -?> diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php deleted file mode 100644 index 32159ddc16..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - BigBank Sample - - - - - - - - -

Welcome To The BigBank Sample

- -
- Please enter your account ID - - -
- -
- - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp deleted file mode 100644 index b31959170f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "axis2_Account_stub.h" -#include -#include -#include -#include -#include - -axiom_node_t * -build_om_programatically(const axis2_env_t *env, - const axis2_char_t *operation, - const axis2_char_t *param1 - ); - -int main(int argc, char** argv) -{ - axis2_stub_t *stub = NULL; - axiom_node_t *node = NULL; - axis2_status_t status = AXIS2_FAILURE; - const axis2_env_t *env = NULL; - const axis2_char_t *address = NULL; - const axis2_char_t *client_home = NULL; - axiom_node_t *ret_node = NULL; - - const axis2_char_t *operation = "getAccountReport"; - const axis2_char_t *param1 = "ED"; - - env = axis2_env_create_all( "BigBank_blocking.log", AXIS2_LOG_LEVEL_TRACE); - - client_home = AXIS2_GETENV("AXIS2C_HOME"); - if (!client_home) - client_home = "../../deploy"; - - address = "http://localhost:9090/axis2/services/AccountService"; - if (argc > 1 ) - operation = argv[1]; - if (AXIS2_STRCMP(operation, "-h") == 0) - { - printf("Usage : %s [operation] [param1] [endpoint_url]\n", argv[0]); - printf("use -h for help\n"); - printf("default operation add\n"); - printf("default param1 %s\n", param1); - printf("default endpoint_url %s\n", address); - printf("NOTE: command line arguments must appear in given order, with trailing ones being optional\n"); - return 0; - } - if (argc > 2 ) - param1 = argv[2]; - if (argc > 3 ) - address = argv[3]; - - printf ("Using endpoint : %s\n", address); - printf ("\nInvoking operation %s with param %s \n", operation, param1); - - node = build_om_programatically(env, operation, param1); - stub = - axis2_Account_stub_create_with_endpoint_uri_and_client_home(env, address, client_home); - /* create node and invoke Calculator */ - ret_node = axis2_Account_stub_getAccountReport(stub, env, node); - if(ret_node) - { - axis2_char_t *om_str = NULL; - om_str = AXIOM_NODE_TO_STRING(ret_node, env); - if(om_str) - { - printf("\nOM returned = %s\n", om_str); - } - - //if (AXIOM_NODE_GET_NODE_TYPE(ret_node, env) == AXIOM_ELEMENT) - //{ - // axis2_char_t *result = NULL; - // axiom_node_t *result_node = (axiom_node_t*)AXIOM_NODE_GET_FIRST_CHILD(ret_node, env); - // axiom_element_t *data_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT(result_node, env); - - // result = AXIOM_ELEMENT_GET_TEXT(data_ele, env, result_node); - // printf( "\nResult = %s\n", result); - //} - //else - //{ - // axiom_xml_writer_t *writer = NULL; - // axiom_output_t *om_output = NULL; - // axis2_char_t *buffer = NULL; - // writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0, - // AXIS2_XML_PARSER_TYPE_BUFFER); - // om_output = axiom_output_create (env, writer); - - // AXIOM_NODE_SERIALIZE (ret_node, env, om_output); - // buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, env); - // printf ("\nReceived invalid OM as result : %s\n", buffer); - // if(NULL != buffer) - // { - // AXIS2_FREE(env->allocator, buffer); - // buffer = NULL; - // } - // if(NULL != om_output) - // { - // AXIOM_OUTPUT_FREE(om_output, env); - // om_output = NULL; - // } - //} - } - else - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - printf("Account stub invoke FAILED!\n"); - } - if (stub) - { - AXIS2_STUB_FREE(stub, env); - } - return status; -} - -axiom_node_t * -build_om_programatically(const axis2_env_t *env, - const axis2_char_t *operation, - const axis2_char_t *param1 - ) -{ - axiom_node_t *Account_om_node = NULL; - axiom_element_t* Account_om_ele = NULL; - axiom_node_t* text_om_node = NULL; - axiom_element_t * text_om_ele = NULL; - axiom_node_t* first_om_node = NULL; - axiom_element_t * first_om_ele = NULL; - axiom_namespace_t *ns1 = NULL; - - - axiom_xml_writer_t *xml_writer = NULL; - axiom_output_t *om_output = NULL; - axis2_char_t *buffer = NULL; - - ns1 = axiom_namespace_create (env, "http://www.bigbank.com/AccountService", "ns1"); - - Account_om_ele = axiom_element_create(env, NULL, operation, ns1, &Account_om_node); - - first_om_ele = axiom_element_create(env, Account_om_node, "customerID", NULL, &first_om_node); - - text_om_ele = axiom_element_create(env, first_om_node, "customerID", NULL, &text_om_node); - - AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param1, text_om_node); - - xml_writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE, - AXIS2_XML_PARSER_TYPE_BUFFER); - om_output = axiom_output_create( env, xml_writer); - - AXIOM_NODE_SERIALIZE(Account_om_node, env, om_output); - buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(xml_writer, env); - AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "\nSending OM node in XML : %s \n", buffer); - if(NULL != buffer) - { - AXIS2_FREE(env->allocator, buffer); - buffer = NULL; - } - if(NULL != om_output) - { - AXIOM_OUTPUT_FREE(om_output, env); - om_output = NULL; - } - - return Account_om_node; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/Makefile.am deleted file mode 100644 index c9b565dc0c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/BigBank/deploy -wsclientdir=$(deploydir)/bigbank.wsclient - -wsclient_PROGRAMS = account_wsclient -wsclient_SCRIPTS = runwsclient.sh -EXTRA_DIST = runwsclient.sh - -AM_CPPFLAGS = $(CPPFLAGS) -account_wsclient_SOURCES = axis2_Account_stub.cpp AccountWSClient.cpp -noinst_HEADERS = *.h - -account_wsclient_LDADD = -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -lwoden \ - -lwoden_wsdl \ - -laxis2_xml_schema \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -laxis2_http_sender \ - -laxis2_http_receiver - - -INCLUDES = -I${AXIS2C_HOME}/include diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp deleted file mode 100644 index a219003a75..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "axis2_Account_stub.h" - - -axis2_stub_t * -axis2_Account_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env, - axis2_endpoint_ref_t *endpoint_ref, - axis2_char_t *client_home) -{ - axis2_stub_t *stub = NULL; - - AXIS2_ENV_CHECK(env, NULL); - - stub = (axis2_stub_t *) - axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref, - client_home); - if(NULL == stub) - { - AXIS2_ERROR_SET(env->error, - AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE); - return NULL; - } - axis2_populate_axis_service( stub, env); - return stub; -} - -void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env) -{ - axis2_svc_client_t* svc_client = NULL; - axis2_qname_t *op_qname = NULL; - axis2_svc_t* svc = NULL; - axis2_op_t* op = NULL; - - /*Modifying the Service*/ - svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env ); - svc = (axis2_svc_t*)AXIS2_SVC_CLIENT_GET_AXIS_SERVICE ( svc_client, env ); - - /*creating the operations*/ - - op_qname = axis2_qname_create(env,"getAccountReport" , "", NULL); - op = axis2_op_create_with_qname(env, op_qname); - AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN); - AXIS2_SVC_ADD_OP(svc, env, op); - - } - -axis2_stub_t * -axis2_Account_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env, - const axis2_char_t *endpoint_uri, - const axis2_char_t *client_home) -{ - axis2_stub_t *stub = NULL; - - AXIS2_ENV_CHECK(env, NULL); - - stub = (axis2_stub_t *) - axis2_stub_create_with_endpoint_uri_and_client_home(env, endpoint_uri, - client_home); - if(NULL == stub) - { - AXIS2_ERROR_SET(env->error, - AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE); - return NULL; - } - - axis2_populate_axis_service( stub, env); - - return stub; -} - -/***************************Function implementation****************************/ - -axiom_node_t * -axis2_Account_stub_getAccountReport(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node) -{ - axis2_svc_client_t *svc_client = NULL; - axiom_node_t *ret_node = NULL; - axis2_qname_t *op_qname = NULL; - - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env); - op_qname = axis2_qname_create(env, "getAccountReport" , "", NULL); - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node); - - return ret_node; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h deleted file mode 100644 index f16b6d3a06..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 AXIS2_ECHO_STUB_H -#define AXIS2_ECHO_STUB_H - -/** - * @file axis2_Calculator_stub.h - * @brief axis2 Calculator stub interface - */ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -axiom_node_t * -axis2_Account_stub_getAccountReport(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node); - -/** - * populate services - */ -void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env); - -/** - * Creates axis2_stub struct - * @param endpoint reference - * @return pointer to newly created axis2_stub struct - */ -axis2_stub_t * -axis2_Account_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env, - axis2_endpoint_ref_t *endpoint_ref, - axis2_char_t *client_home); - -/** - * Creates axis2_stub struct - * @param endpoint uri - * @return pointer to newly created axis2_stub struct - */ -axis2_stub_t * -axis2_Account_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env, - const axis2_char_t *endpoint_uri, - const axis2_char_t *client_home); -/** @} */ - -#ifdef __cplusplus -} -#endif -#endif /* AXIS2_ECHO_STUB_H */ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat deleted file mode 100644 index aa3f7d6dad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME%" - -rem Run the client -WSAccountClient.exe %* -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh deleted file mode 100755 index fa7d7d6813..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -export LD_LIBRARY_PATH=$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -./account_wsclient - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploy.bat deleted file mode 100644 index 2f1bdf1423..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploy.bat +++ /dev/null @@ -1,67 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA BigBank sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -set package=bigbank.account - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set bbdir=%samplesdir%\BigBank -set bbdeploydir=%bbdir%\deploy -set samplebb=%bbdeploydir%\%package% - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %bbdir% mkdir %bbdir% -if not exist %bbdeploydir% mkdir %bbdeploydir% -if not exist %samplebb% mkdir %samplebb% - -set samplebbsrc=%srcdir%\%package% -copy %srcdir%\bigbank.accountmanagement.composite %bbdeploydir% -copy %samplebbsrc%\*.wsdl %samplebb% -copy %samplebbsrc%\*.composite %samplebb% -copy %samplebbsrc%\*.componentType %samplebb% -copy %samplebbsrc%\runwsserver.bat %samplebb% - -set library=Account -copy %inpath%\%library%.dll %samplebb% - -if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %samplebb% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deployclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deployclient.bat deleted file mode 100644 index 1f47e5ab13..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deployclient.bat +++ /dev/null @@ -1,63 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA BigBank sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -set package=bigbank.client - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set bbdir=%samplesdir%\BigBank -set bbdeploydir=%bbdir%\deploy -set clientdir=%bbdeploydir%\%package% - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %bbdir% mkdir %bbdir% -if not exist %bbdeploydir% mkdir %bbdeploydir% -if not exist %clientdir% mkdir %clientdir% - -set clientdirsrc=%srcdir%\%package% -copy %clientdirsrc%\runclient.bat %clientdir% - -set library=AccountClient -copy %inpath%\%library%.exe %clientdir% - -if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %clientdir% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploywsclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploywsclient.bat deleted file mode 100644 index 3e2ce687fe..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/BigBank/deploywsclient.bat +++ /dev/null @@ -1,63 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA BigBank sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -set package=bigbank.wsclient - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set bbdir=%samplesdir%\BigBank -set bbdeploydir=%bbdir%\deploy -set clientdir=%bbdeploydir%\%package% - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %bbdir% mkdir %bbdir% -if not exist %bbdeploydir% mkdir %bbdeploydir% -if not exist %clientdir% mkdir %clientdir% - -set clientdirsrc=%srcdir%\%package% -copy %clientdirsrc%\runwsclient.bat %clientdir% - -set library=WSAccountClient -copy %inpath%\%library%.exe %clientdir% - -if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %clientdir% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/COPYING b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/COPYING deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/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-1.0-incubating-M2-RC3/sca/samples/Calculator/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/Makefile.am deleted file mode 100644 index 88ec180a84..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/Calculator/deploy -SUBDIRS = sample.calculator sample.calculator.client sample.calculator.wsclient -EXTRA_DIST = *.composite README.html -deploy_DATA = *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README deleted file mode 100644 index 4104ff46b6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README +++ /dev/null @@ -1,23 +0,0 @@ -Tuscany SCA for C++ Samples - Calculator Sample -=============================================== - -This is a very simple sample to show how an SCA composite can wire together -two components to implement a Calculator service and expose that service as -a Web Service. - -There are three sub projects in this workspace: - - sample.calculator - This contains the source code and SCDL artifacts for the SCA Calculator. - composite implementing the sample Calculator. - - - sample.calculator.client - A sample client which does a local call to the Calculator service. - - - sample.calculator.wsclient - A sample Axis2 Web Service client which calls the Calculator Web service. - -Additionally, there is the sample.calculator.solution.composite file. This -describes the configuration of the SCA Calculator composite deployed to the -SCA runtime. - -See the README.html file for instructions to build and run this sample diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README.html b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README.html deleted file mode 100644 index 8a1198df46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/README.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ Samples - Calculator Sample - - - -
-
-
-

Tuscany SCA for C++ Samples - Calculator Sample

- -

This is a very simple sample to show how an SCA composite can wire - together two C++ components to implement a Calculator service and expose - that service as a Web Service. -

-

There are three sub projects in this workspace:

-
    -
  • sample.calculator
    - This contains the source code and SCDL artifacts for the SCA Calculator - composite implementing the sample Calculator. -
  • -
  • sample.calculator.client
    - A sample client which does a local call to the Calculator service. -
  • -
  • sample.calculator.wsclient
    - A sample Axis2 Web Service client which calls the Calculator Web service. -
  • -
-

Additionally, there is the sample.calculator.solution.composite file. This - describes the configuration of the SCA Calculator composite deployed to the SCA - runtime. -

-
- - - - -
-

Building the C++ samples on Linux

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. Build the C++ samples with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>/samples
    • -
    • ./configure --prefix=$TUSCANY_SCACPP --enable-static=no
    • -
    • make
    • -
    • make install
    • -
    - NOTE: If you don't provide the --prefix configure option, it will by default install into - /usr/local/tuscany/sca/samples/Calculator
  4. -
-
- -
-

Running the Calculator sample on Linux

-

Calculator with basic client

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.92>
    • -
    -
  2. -
  3. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>/samples/Calculator/deploy/sample.calculator.client
    • -
    • ./runclient.sh
    • -
    -
  4. -
-

Calculator with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/Calculator/deploy/sample.calculator -
    4. -
    5. ./runwsserver.sh
    6. -
    -
  4. -
  5. Run the client: -
      -
    1. The following environment variable is required: -
        -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/Calculator/deploy/sample.calculator.wsclient
    4. -
    5. ./runwsclient.sh
    6. -
    -
  6. -
-
- -
-

Building the Calculator sample on Windows

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. You must have set up the environment for Microsoft Visual C++ tools. - The build command will call vcvars32 to set the environment. Ensure the - directory containing this is on your path. This will be where you - installed the compiler. -
  4. -
  5. Build the source, either via the Visual Studio 6 or 7 projects under - <tuscany_sca_install_dir>\samples\ides or via the command-line build file - found at <tuscany_sca_install_dir>\samples\ides\devstudio6\projects\Calculator\build.cmd - which will build and deploy the samples. -
  6. -
-
- -
-

Running the Calculator sample on Windows

-

Calculator with basic client

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  2. -
  3. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\Calculator\deploy\sample.calculator.client
    • -
    • runclient.bat
    • -
    -
  4. -
-

Calculator with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\Calculator\deploy\sample.calculator
    4. -
    5. runwsserver.bat
    6. -
    -
  4. -
  5. Run the client: -
      -
    1. The following environment variable is required: -
        -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\Calculator\deploy\sample.calculator.wsclient
    4. -
    5. runwsclient.bat
    6. -
    -
  6. -
-
- - - -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploy.bat deleted file mode 100644 index efd18e8219..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploy.bat +++ /dev/null @@ -1,67 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA Calculator sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -set package=sample.calculator - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set calcdir=%samplesdir%\Calculator -set calcdeploydir=%calcdir%\deploy -set samplecalc=%calcdeploydir%\%package% - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %calcdir% mkdir %calcdir% -if not exist %calcdeploydir% mkdir %calcdeploydir% -if not exist %samplecalc% mkdir %samplecalc% - -set samplecalcsrc=%srcdir%\%package% -copy %srcdir%\%package%.solution.composite %calcdeploydir% -copy %samplecalcsrc%\*.wsdl %samplecalc% -copy %samplecalcsrc%\*.composite %samplecalc% -copy %samplecalcsrc%\*.componentType %samplecalc% -copy %samplecalcsrc%\runwsserver.bat %samplecalc% - -set library=Calculator -copy %inpath%\%library%.dll %samplecalc% - -if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %samplecalc% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deployclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deployclient.bat deleted file mode 100644 index bf4fd47d43..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deployclient.bat +++ /dev/null @@ -1,63 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA Calculator sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -set package=sample.calculator.client - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set calcdir=%samplesdir%\Calculator -set calcdeploydir=%calcdir%\deploy -set clientdir=%calcdeploydir%\%package% - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %calcdir% mkdir %calcdir% -if not exist %calcdeploydir% mkdir %calcdeploydir% -if not exist %clientdir% mkdir %clientdir% - -set clientdirsrc=%srcdir%\%package% -copy %clientdirsrc%\runclient.bat %clientdir% - -set library=calculator_client -copy %inpath%\%library%.exe %clientdir% - -if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %clientdir% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploywsclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploywsclient.bat deleted file mode 100644 index 8b1b1a53c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/deploywsclient.bat +++ /dev/null @@ -1,63 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA Calculator sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -set package=sample.calculator.wsclient - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set calcdir=%samplesdir%\Calculator -set calcdeploydir=%calcdir%\deploy -set clientdir=%calcdeploydir%\%package% - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %calcdir% mkdir %calcdir% -if not exist %calcdeploydir% mkdir %calcdeploydir% -if not exist %clientdir% mkdir %clientdir% - -set clientdirsrc=%srcdir%\%package% -copy %clientdirsrc%\runwsclient.bat %clientdir% - -set library=calculator_wsclient -copy %inpath%\%library%.exe %clientdir% - -if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %clientdir% - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/CalculatorClient.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/CalculatorClient.cpp deleted file mode 100644 index 9ec8b04bd1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/CalculatorClient.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "Calculator.h" - -#include "osoa/sca/sca.h" -using namespace osoa::sca; - -#include "tuscany/sca/core/TuscanyRuntime.h" -using namespace tuscany::sca; - -#include -#include -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 << "calculator_client: Argument 1 is not a number" << endl; - usage(); - } - else - { - arg1 = atof(argv[2]); - } - - if (!IsNumber(argv[3])) - { - cout << "calculator_client: Argument 2 is not a number" << endl; - usage(); - } - else - { - arg2 = atof(argv[3]); - } - } - else - { - usage(); - } - - try - { - // Locate a service - CompositeContext myContext = CompositeContext::getCurrent(); - Calculator *calcService = (Calculator*) myContext.locateService("CalculatorComponent/CalculatorService"); - if (calcService == 0) - { - cout << "calculator_client: Unable to find Calculator service" << endl; - } - else - { - try - { - float result = 0; - if (strcmp(operation, "add") == 0) - { - result = calcService->add(arg1, arg2); - cout << "calculator_client: add(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - if (strcmp(operation, "sub") == 0) - { - result = calcService->sub(arg1, arg2); - cout << "calculator_client: sub(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - if (strcmp(operation, "mul") == 0) - { - result = calcService->mul(arg1, arg2); - cout << "calculator_client: mul(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - if (strcmp(operation, "div") == 0) - { - result = calcService->div(arg1, arg2); - cout << "calculator_client: div(" << arg1 << "," << arg2 << ") = " << result << endl; - } - else - { - cout << "calculator_client: Unrecognized operation: " << operation << endl; - } - } - catch (char* x) - { - cout << "calculator_client: exception caught: " << x << endl; - } - } - - } - catch (ServiceRuntimeException& ex) - { - cout << ex << endl; - } - return 0; -} - -void usage() -{ - cout << "Usage: calculator_client add|sub|mul|div arg1 arg2" << endl; - exit(1); -} - -bool IsNumber (const char *p) -{ - int len = strlen(p); - int pointcount = 0; - - if (!isdigit (p[0]) && p[0] != '-' && p[0] != '+') - { - return false; - } - for (int i = 1; i < len; i++) - { - if (!isdigit (p[i])) - { - if (p[i] == '.') - { - if (pointcount > 0) return false; - pointcount++; - } - else - { - return false; - } - } - } - return true; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/Makefile.am deleted file mode 100644 index ced28cf042..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/Calculator/deploy -clientdir=$(deploydir)/sample.calculator.client - -client_PROGRAMS = calculator_client -client_SCRIPTS = runclient.sh -EXTRA_DIST = runclient.sh - -AM_CPPFLAGS = $(CPPFLAGS) -calculator_client_SOURCES = \ -CalculatorClient.cpp - -calculator_client_LDADD = \ --L${TUSCANY_SCACPP}/lib \ - -ltuscany_sca \ --L${TUSCANY_SCACPP}/extensions/cpp/lib \ - -ltuscany_sca_cpp \ --L${TUSCANY_SDOCPP}/lib \ - -ltuscany_sdo \ - -ltuscany_sdo_axiom \ --L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -lwoden \ - -lwoden_wsdl \ - -laxis2_xml_schema \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -laxis2_http_sender \ - -laxis2_http_receiver - -INCLUDES = \ --I$(TUSCANY_SCACPP)/extensions/cpp/include \ --I${TUSCANY_SCACPP}/include \ --I${TUSCANY_SDOCPP}/include \ --I../sample.calculator diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.bat deleted file mode 100644 index f4308ff739..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.bat +++ /dev/null @@ -1,48 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -.\calculator_client.exe div 5 2 - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.sh deleted file mode 100755 index ec4b3bb643..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.client/runclient.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -./calculator_client div 5 2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.solution.composite deleted file mode 100644 index 0445d645e4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.solution.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/CalculatorWSClient.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/CalculatorWSClient.cpp deleted file mode 100644 index 267baf1722..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/CalculatorWSClient.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "axis2_Calculator_stub.h" -#include -#include -#include -#include -#include - -axiom_node_t * -build_om_programatically(const axis2_env_t *env, - const axis2_char_t *operation, - const axis2_char_t *param1, - const axis2_char_t *param2); - -int main(int argc, char** argv) -{ - axis2_stub_t *stub = NULL; - axiom_node_t *node = NULL; - axis2_status_t status = AXIS2_FAILURE; - const axis2_env_t *env = NULL; - const axis2_char_t *address = NULL; - const axis2_char_t *client_home = NULL; - axiom_node_t *ret_node = NULL; - - const axis2_char_t *operation = "add"; - const axis2_char_t *param1 = "40"; - const axis2_char_t *param2 = "8"; - - env = axis2_env_create_all( "CalculatorService_blocking.log", AXIS2_LOG_LEVEL_TRACE); - - client_home = AXIS2_GETENV("AXIS2C_HOME"); - if (!client_home) - client_home = "../../deploy"; - - address = "http://localhost:9090/axis2/services/CalculatorService"; - if (argc > 1 ) - operation = argv[1]; - if (AXIS2_STRCMP(operation, "-h") == 0) - { - printf("Usage : %s [operation] [param1] [param2] [endpoint_url]\n", argv[0]); - printf("use -h for help\n"); - printf("default operation add\n"); - printf("default param1 %s\n", param1); - printf("default param2 %s\n", param2); - printf("default endpoint_url %s\n", address); - printf("NOTE: command line arguments must appear in given order, with trailing ones being optional\n"); - return 0; - } - if (argc > 2 ) - param1 = argv[2]; - if (argc > 3 ) - param2 = argv[3]; - if (argc > 4 ) - address = argv[4]; - - printf ("Using endpoint : %s\n", address); - printf ("\nInvoking operation %s with params %s and %s\n", operation, param1, param2); - - node = build_om_programatically(env, operation, param1, param2); - stub = - axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(env, address, client_home); - /* create node and invoke Calculator */ - ret_node = axis2_Calculator_stub_add(stub, env, node); - if(ret_node) - { - axis2_char_t *om_str = NULL; - om_str = AXIOM_NODE_TO_STRING(ret_node, env); - if(om_str) - { - printf("\nOM returned = %s\n", om_str); - } - - if (AXIOM_NODE_GET_NODE_TYPE(ret_node, env) == AXIOM_ELEMENT) - { - axis2_char_t *result = NULL; - axiom_node_t *result_node = (axiom_node_t*)AXIOM_NODE_GET_FIRST_CHILD(ret_node, env); - axiom_element_t *data_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT(result_node, env); - - result = AXIOM_ELEMENT_GET_TEXT(data_ele, env, result_node); - printf( "\nResult = %s\n", result); - } - else - { - axiom_xml_writer_t *writer = NULL; - axiom_output_t *om_output = NULL; - axis2_char_t *buffer = NULL; - writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0, - AXIS2_XML_PARSER_TYPE_BUFFER); - om_output = axiom_output_create (env, writer); - - AXIOM_NODE_SERIALIZE (ret_node, env, om_output); - buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, env); - printf ("\nReceived invalid OM as result : %s\n", buffer); - if(NULL != buffer) - { - AXIS2_FREE(env->allocator, buffer); - buffer = NULL; - } - if(NULL != om_output) - { - AXIOM_OUTPUT_FREE(om_output, env); - om_output = NULL; - } - } - } - else - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - printf("Calculator stub invoke FAILED!\n"); - } - if (stub) - { - AXIS2_STUB_FREE(stub, env); - } - return status; -} - -axiom_node_t * -build_om_programatically(const axis2_env_t *env, - const axis2_char_t *operation, - const axis2_char_t *param1, - const axis2_char_t *param2) -{ - axiom_node_t *Calculator_om_node = NULL; - axiom_element_t* Calculator_om_ele = NULL; - axiom_node_t* text_om_node = NULL; - axiom_element_t * text_om_ele = NULL; - axiom_namespace_t *ns1 = NULL; - - - axiom_xml_writer_t *xml_writer = NULL; - axiom_output_t *om_output = NULL; - axis2_char_t *buffer = NULL; - - ns1 = axiom_namespace_create (env, "http://sample/calculator", "ns1"); - - Calculator_om_ele = axiom_element_create(env, NULL, operation, ns1, &Calculator_om_node); - - text_om_ele = axiom_element_create(env, Calculator_om_node, "param1", NULL, &text_om_node); - AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param1, text_om_node); - - text_om_ele = axiom_element_create(env, Calculator_om_node, "param2", NULL, &text_om_node); - AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param2, text_om_node); - - xml_writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE, - AXIS2_XML_PARSER_TYPE_BUFFER); - om_output = axiom_output_create( env, xml_writer); - - AXIOM_NODE_SERIALIZE(Calculator_om_node, env, om_output); - buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(xml_writer, env); - AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "\nSending OM node in XML : %s \n", buffer); - if(NULL != buffer) - { - AXIS2_FREE(env->allocator, buffer); - buffer = NULL; - } - if(NULL != om_output) - { - AXIOM_OUTPUT_FREE(om_output, env); - om_output = NULL; - } - - return Calculator_om_node; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/Makefile.am deleted file mode 100644 index 5d0af5df1f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/Calculator/deploy -wsclientdir=$(deploydir)/sample.calculator.wsclient - -wsclient_PROGRAMS = calculator_wsclient -wsclient_SCRIPTS = runwsclient.sh -EXTRA_DIST = runwsclient.sh - -AM_CPPFLAGS = $(CPPFLAGS) - -calculator_wsclient_SOURCES = \ -axis2_Calculator_stub.cpp \ -CalculatorWSClient.cpp - -noinst_HEADERS = *.h - -calculator_wsclient_LDADD = \ --L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -lwoden \ - -lwoden_wsdl \ - -laxis2_xml_schema \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -laxis2_http_sender \ - -laxis2_http_receiver - -INCLUDES = -I${AXIS2C_HOME}/include diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp deleted file mode 100644 index a24a3c9ed6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "axis2_Calculator_stub.h" - - -axis2_stub_t * -axis2_Calculator_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env, - axis2_endpoint_ref_t *endpoint_ref, - axis2_char_t *client_home) -{ - axis2_stub_t *stub = NULL; - - AXIS2_ENV_CHECK(env, NULL); - - stub = (axis2_stub_t *) - axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref, - client_home); - if(NULL == stub) - { - AXIS2_ERROR_SET(env->error, - AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE); - return NULL; - } - axis2_populate_axis_service( stub, env); - return stub; -} - -void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env) -{ - axis2_svc_client_t* svc_client = NULL; - axis2_qname_t *op_qname = NULL; - axis2_svc_t* svc = NULL; - axis2_op_t* op = NULL; - - /*Modifying the Service*/ - svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env ); - svc = (axis2_svc_t*)AXIS2_SVC_CLIENT_GET_AXIS_SERVICE ( svc_client, env ); - - /*creating the operations*/ - - op_qname = axis2_qname_create(env,"add" , "", NULL); - op = axis2_op_create_with_qname(env, op_qname); - AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN); - AXIS2_SVC_ADD_OP(svc, env, op); - - op_qname = axis2_qname_create(env,"sub" , "", NULL); - op = axis2_op_create_with_qname(env, op_qname); - AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN); - AXIS2_SVC_ADD_OP(svc, env, op); - - op_qname = axis2_qname_create(env,"mul" , "", NULL); - op = axis2_op_create_with_qname(env, op_qname); - AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN); - AXIS2_SVC_ADD_OP(svc, env, op); - - op_qname = axis2_qname_create(env,"div" , "", NULL); - op = axis2_op_create_with_qname(env, op_qname); - AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN); - AXIS2_SVC_ADD_OP(svc, env, op); -} - -axis2_stub_t * -axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env, - const axis2_char_t *endpoint_uri, - const axis2_char_t *client_home) -{ - axis2_stub_t *stub = NULL; - - AXIS2_ENV_CHECK(env, NULL); - - stub = (axis2_stub_t *) - axis2_stub_create_with_endpoint_uri_and_client_home(env, endpoint_uri, - client_home); - if(NULL == stub) - { - AXIS2_ERROR_SET(env->error, - AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE); - return NULL; - } - - axis2_populate_axis_service( stub, env); - - return stub; -} - -/***************************Function implementation****************************/ - -axiom_node_t * -axis2_Calculator_stub_add(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node) -{ - axis2_svc_client_t *svc_client = NULL; - axiom_node_t *ret_node = NULL; - axis2_qname_t *op_qname = NULL; - - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env); - op_qname = axis2_qname_create(env, "add" , "", NULL); - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node); - - return ret_node; -} - -axiom_node_t * -axis2_Calculator_stub_sub(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node) -{ - axis2_svc_client_t *svc_client = NULL; - axiom_node_t *ret_node = NULL; - axis2_qname_t *op_qname = NULL; - - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env); - op_qname = axis2_qname_create(env, "sub" , "", NULL); - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node); - - return ret_node; -} - -axiom_node_t * -axis2_Calculator_stub_mul(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node) -{ - axis2_svc_client_t *svc_client = NULL; - axiom_node_t *ret_node = NULL; - axis2_qname_t *op_qname = NULL; - - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env); - op_qname = axis2_qname_create(env, "mul" , "", NULL); - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node); - - return ret_node; -} - -axiom_node_t * -axis2_Calculator_stub_div(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node) -{ - axis2_svc_client_t *svc_client = NULL; - axiom_node_t *ret_node = NULL; - axis2_qname_t *op_qname = NULL; - - AXIS2_ENV_CHECK(env, AXIS2_FAILURE); - - svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env); - op_qname = axis2_qname_create(env, "div" , "", NULL); - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node); - - return ret_node; -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.h deleted file mode 100644 index 833c6f85c6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/axis2_Calculator_stub.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 AXIS2_ECHO_STUB_H -#define AXIS2_ECHO_STUB_H - -/** - * @file axis2_Calculator_stub.h - * @brief axis2 Calculator stub interface - */ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -axiom_node_t * -axis2_Calculator_stub_add(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node); - -axiom_node_t * -axis2_Calculator_stub_sub(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node); - -axiom_node_t * -axis2_Calculator_stub_mul(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node); - -axiom_node_t * -axis2_Calculator_stub_div(axis2_stub_t *stub, - const axis2_env_t *env, - axiom_node_t *node); -/** - * populate services - */ -void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env); - -/** - * Creates axis2_stub struct - * @param endpoint reference - * @return pointer to newly created axis2_stub struct - */ -axis2_stub_t * -axis2_Calculator_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env, - axis2_endpoint_ref_t *endpoint_ref, - axis2_char_t *client_home); - -/** - * Creates axis2_stub struct - * @param endpoint uri - * @return pointer to newly created axis2_stub struct - */ -axis2_stub_t * -axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env, - const axis2_char_t *endpoint_uri, - const axis2_char_t *client_home); -/** @} */ - -#ifdef __cplusplus -} -#endif -#endif /* AXIS2_ECHO_STUB_H */ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat deleted file mode 100644 index 6d50f23370..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME%" - -rem Run the client -.\calculator_wsclient.exe div 5 2 - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh deleted file mode 100755 index 51d8dbac22..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator.wsclient/runwsclient.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -export LD_LIBRARY_PATH=$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -./calculator_wsclient div 5 2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.h deleted file mode 100644 index 1a88c9cb67..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sample_calculator_h -#define sample_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 // sample_calculator_h - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.wsdl deleted file mode 100644 index 37529c06c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Calculator.wsdl +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.componentType deleted file mode 100644 index 72fe9842e8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.componentType +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.cpp deleted file mode 100644 index 73abf2f1df..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "CalculatorImpl.h" -#include - -#include "Divide.h" -#include "osoa/sca/ComponentContext.h" -#include "osoa/sca/ServiceRuntimeException.h" - -CalculatorImpl::CalculatorImpl() -{ -} - -CalculatorImpl::~CalculatorImpl() -{ -} - -// Calculator interface -float CalculatorImpl::add(float arg1, float arg2) -{ - float result = arg1 + arg2; - - printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result); - return result; -} - -float CalculatorImpl::sub(float arg1, float arg2) -{ - float result = arg1 - arg2; - printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result); - return result; -} - -float CalculatorImpl::mul(float arg1, float arg2) -{ - float result = arg1 * arg2; - printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result); - return result; -} - -float CalculatorImpl::div(float arg1, float arg2) -{ - float result = 0; - - // This method shows how to invoke a service on a different component from within a component - - // First, get the current ComponentContext - osoa::sca::ComponentContext myContext = osoa::sca::ComponentContext::getCurrent(); - - try - { - // Find the required service, as referenced in CalculatorImpl.componentType - Divide* divideService = (Divide*)myContext.getService("divideService"); - - // Finally, invoke the service - result = divideService->divide(arg1, arg2); - - printf("CalculatorImpl::div Divide returned result: %f\n", result); - - } - catch (osoa::sca::ServiceRuntimeException& e) - { - // Print out error message and carry on - printf("CalculatorImpl::div Error whilst invoking Divide: %s", e.getMessageText()); - } - - return result; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.h deleted file mode 100644 index af8a5eeab1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/CalculatorImpl.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sample_calculatorimpl_h -#define sample_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 // sample_calculatorimpl_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Divide.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Divide.h deleted file mode 100644 index 6e171ed733..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Divide.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sample_divide_h -#define sample_divide_h - -class Divide -{ -public: - virtual float divide(float arg1, float arg2) = 0; -}; - -#endif // sample_divide_h - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.componentType deleted file mode 100644 index d7369e3ff0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.cpp deleted file mode 100644 index 8b9db46ecb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "DivideImpl.h" -#include - -DivideImpl::DivideImpl() -{ -} - -DivideImpl::~DivideImpl() -{ -} - -// Divide interface -float DivideImpl::divide(float arg1, float arg2) -{ - if(arg2 == 0.0) - { - printf("DivideImpl::div %f / %f !! Cannot divide by zero, so returning 0\n", arg1, arg2); - return 0; - } - - float result = arg1 / arg2; - printf("DivideImpl::div %f / %f = %f\n", arg1, arg2, result); - return result; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.h deleted file mode 100644 index 64045f1899..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/DivideImpl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sample_divideimpl_h -#define sample_divideimpl_h - -#include "Divide.h" - -class DivideImpl : public Divide -{ -public: - DivideImpl(); - virtual ~DivideImpl(); - - // Divide interface - virtual float divide(float arg1, float arg2); -}; - -#endif // sample_divideimpl_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Makefile.am deleted file mode 100644 index c57d0c9fe5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/Calculator/deploy -compositedir=$(deploydir)/sample.calculator - -BUILT_SOURCES = scagen - -noinst_HEADERS = *.h - -scagen: - java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output . - -composite_SCRIPTS = runwsserver.sh - -composite_LTLIBRARIES = libCalculator.la -composite_DATA = *.composite *.componentType *.wsdl -EXTRA_DIST = *.composite *.componentType *.wsdl runwsserver.sh - -dist_libCalculator_la_SOURCES = \ -CalculatorImpl.cpp \ -DivideImpl.cpp - -nodist_libCalculator_la_SOURCES = \ -CalculatorImpl_CalculatorService_Proxy.cpp \ -CalculatorImpl_CalculatorService_Wrapper.cpp \ -CalculatorImpl_divideService_Proxy.cpp \ -DivideImpl_DivideService_Proxy.cpp \ -DivideImpl_DivideService_Wrapper.cpp - -libCalculator_la_LIBADD = \ --L${TUSCANY_SCACPP}/lib \ - -ltuscany_sca \ --L${TUSCANY_SCACPP}/extensions/cpp/lib \ - -ltuscany_sca_cpp - -INCLUDES = \ --I$(TUSCANY_SCACPP)/extensions/cpp/include \ --I$(TUSCANY_SCACPP)/include \ --I${TUSCANY_SDOCPP}/include - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.bat deleted file mode 100644 index 160152e6a9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %AXIS2C_HOME%\bin -.\axis2_http_server.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.sh deleted file mode 100755 index b94d841d66..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/runwsserver.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -cd $AXIS2C_HOME/bin -./axis2_http_server diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/sample.calculator.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/sample.calculator.composite deleted file mode 100644 index ae4657b366..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Calculator/sample.calculator/sample.calculator.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - CalculatorComponent/CalculatorService - - - - - DivideComponent/DivideService - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ChangeLog b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/GettingStarted.html b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/GettingStarted.html deleted file mode 100644 index d151185171..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/GettingStarted.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - Tuscany SCA C++ Samples - Getting Started - - - -
-
-
-

Tuscany Samples - Getting Started - SCA C++ Milestone release 2

- -

Tuscany SCA C++ includes a set of simple technology samples that demonstrates some of the functionality of - the Tuscany SCA C++ runtime. This page describes the samples and links to the documents that describe how to - build and run them -

-
- -
-

Samples

- - - - - - - - - - - - - - - - - - - - - - - -
Calculator - A very simple sample to show how an SCA composite can wire - together two C++ components to implement a Calculator service - and expose that service as a Web Service -
PythonCalculator - A very simple sample to show how an SCA composite can wire - together two Python components to implement a Calculator service - and expose that service as a Web Service -
RubyCalculator - A very simple sample to show how an SCA composite can wire - together two Ruby components to implement a Calculator service - and expose that service as a Web Service -
BigBank - A more complex sample that implements the "Simplified BigBank" scenario. A whitepaper describing - the scenario based on the SCA 0.9 Assembly specification can be found - here. - This sample uses multiple C++ components, calls out to an external Web Service via a reference, - exposes the service as a Web Service and also provides a PHP based client. -
RubyBank - A more complex sample that implements the "Simplified BigBank" scenario. This sample uses multiple - Ruby components, calls out to an external Web Service via a reference and exposes the service as a - Web Service. -
-
-
-
-

Getting Help

- -

The first place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

- - -

 

- -

 

- -

 

- - - - - - -
- -

Thank you for your interest in Tuscany.

-The - Tuscany Development Team -
-
- -
- -
- - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/INSTALL b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/INSTALL deleted file mode 100644 index 3d7155367d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -Please read the GettingStarted.html document for information on -building, installing and running Tuscany SCA for C++ Samples \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/LICENSE b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/LICENSE deleted file mode 100755 index f433b1a53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/LICENSE +++ /dev/null @@ -1,177 +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 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Makefile.am deleted file mode 100644 index bf35b2c21f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -if WANT_ALL_SAMPLES - CPP_SAMPLES = Calculator BigBank - PYTHON_SAMPLES = PythonCalculator - RUBY_SAMPLES = RubyCalculator RubyBank -endif -if WANT_CPP_SAMPLES - CPP_SAMPLES = Calculator BigBank -endif -if WANT_PYTHON_SAMPLES - PYTHON_SAMPLES = PythonCalculator -endif -if WANT_RUBY_SAMPLES - RUBY_SAMPLES = RubyCalculator RubyBank -endif -if WANT_PHP_SAMPLES -endif -SUBDIRS = ${CPP_SAMPLES} ${PYTHON_SAMPLES} ${RUBY_SAMPLES} ${PHP_SAMPLES} - -EXTRA_DIST = GettingStarted.html diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/Makefile.am deleted file mode 100644 index dd71fa8f83..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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 -lxml2 - -INCLUDES = -I.. \ - -I$(top_builddir)/runtime/core/src \ - -I${TUSCANY_SDOCPP}/include diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/MyValueClient.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/MyValueClient.cpp deleted file mode 100755 index 0919c539da..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Client/MyValueClient.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#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 - -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-1.0-incubating-M2-RC3/sca/samples/MyValue/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Makefile.am deleted file mode 100644 index 9f00a2ad9a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = MyValueComposite Client - -deploy_dir = $(top_builddir)/samples/runtime -deploy_composite = $(deploy_dir)/packages/MyValueComposite - -install-exec-local: - cp MyValueSubsystem/sca.subsystem $(deploy_dir)/configuration/MyValueSubsystem - cp MyValueComposite/sca.composite $(deploy_composite) - cp MyValueComposite/CustomerInfo.fragment $(deploy_composite) - cp MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType $(deploy_composite)/CustomerInfo - cp MyValueComposite/CustomerInfo/.libs/libCustomerInfo$libsuffix) $(deploy_composite)/CustomerInfo - cp MyValueComposite/CustomerInfo/CustomerInfo.h $(deploy_composite)/CustomerInfo - cp MyValueComposite/CustomerInfo/CustomerInfoImpl.h $(deploy_composite)/CustomerInfo - cp MyValueComposite/MyValue/MyValueImpl.componentType $(deploy_composite)/MyValue - cp MyValueComposite/MyValue/MyValue.h $(deploy_composite)/MyValue - cp MyValueComposite/MyValue/MyValueImpl.h $(deploy_composite)/MyValue - cp MyValueComposite/MyValue/MyValueService.wsdl $(deploy_composite)/MyValue - cp MyValueComposite/MyValue/.libs/libMyValue$libsuffix) $(deploy_composite)/MyValue - cp MyValueComposite/StockQuoteService/StockQuoteService.h $(deploy_composite)/StockQuoteService - cp MyValueComposite/StockQuoteService/StockQuoteService.wsdl $(deploy_composite)/StockQuoteService - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment deleted file mode 100755 index 2227f730dd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h deleted file mode 100755 index 61d3e18133..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType deleted file mode 100755 index caed4c5327..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp deleted file mode 100755 index 1a50dd4426..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp deleted file mode 100755 index 5c0d5506d3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// -// 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-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h deleted file mode 100755 index 6380dac5e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl deleted file mode 100755 index 6ea196e311..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd deleted file mode 100755 index ab2f25a826..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h deleted file mode 100755 index fda8a80e89..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl deleted file mode 100755 index 159d15c2d8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/sca.composite deleted file mode 100755 index 52461c7650..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueComposite/sca.composite +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueSubsystem/sca.subsystem b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueSubsystem/sca.subsystem deleted file mode 100755 index 7336b818b7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/MyValueSubsystem/sca.subsystem +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/runMyValueClient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/runMyValueClient.sh deleted file mode 100755 index 6a8a60c490..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/runMyValueClient.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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_COMPOSITE=SubSystem1 - -cd $TUSCANY_SCACPP/bin/test -./tuscany_sca_test diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/server.wsdd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/server.wsdd deleted file mode 100755 index 1a82ab85a7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/MyValue/server.wsdd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/NEWS b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/NOTICE b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/NOTICE deleted file mode 100644 index bfb81409ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/Makefile.am deleted file mode 100644 index 5f234f1d65..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/PythonCalculator/deploy -SUBDIRS = sample.calculator sample.calculator.client sample.calculator.wsclient -EXTRA_DIST = *.composite README.html -deploy_DATA = *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README deleted file mode 100644 index b9e787c768..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README +++ /dev/null @@ -1,24 +0,0 @@ -Tuscany SCA for C++ Samples - Calculator Sample -=============================================== - -This is a very simple sample to show how an SCA composite can wire together -two components to implement a Calculator service and expose that service as -a Web Service. - -There are three sub projects in this workspace: - - sample.calculator - This contains the source code and SCDL artifacts for the SCA Calculator. - composite implementing the sample Calculator. - - - sample.calculator.client - A sample client which does a local call to the Calculator service. - - - sample.calculator.wsclient - A sample Axis2 Web Service client which calls the Calculator Web service. - - -Additionally, there is the sample.calculator.solution.composite file. This -describes the configuration of the SCA Calculator composite deployed to the -SCA runtime. - -See the README.html file for instructions to build and run this sample diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README.html b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README.html deleted file mode 100644 index aa1e0c6d4f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/README.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ Samples - PythonCalculator Sample - - - -
-
-
-

Tuscany SCA for C++ Samples - PythonCalculator Sample

- -

This is a very simple sample to show how an SCA composite can wire - together two Python components to implement a Calculator service and expose - that service as a Web Service. -

-

See the Python extension - documentation for information about building the Tuscany Python extension - and using Python in SCA composites. -

-

There are three sub projects in this workspace:

-
    -
  • sample.calculator
    - This contains the Python scripts and SCDL artifacts for the SCA Calculator - composite implementing the sample Calculator. -
  • -
  • sample.calculator.client
    - A sample client which does a local call to the Calculator service. -
  • -
  • sample.calculator.wsclient
    - A sample client which does a local call to a composite that contains a Web Service reference - that calls the Calculator Web Service. -
  • -
-

Additionally, there is the sample.calculator.solution.composite file. This - describes the configuration of the SCA Calculator composite deployed to the SCA - runtime. -

- -
- - - - -
-

Building the Python samples on Linux

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. As the PythonCalculator sample is based on Python scripts, a specific compilation step is not necessary - - only deployment is required. Deploy the Python samples only with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>/samples
    • -
    • ./configure --enable-python --enable-cpp=no --prefix=$TUSCANY_SCACPP
    • -
    • make install
    • -
    - NOTE: If you don't provide the --prefix configure option, it will by default install into - /usr/local/tuscany/sca/samples/PythonCalculator
  4. -
-
- -
-

Running the PythonCalculator sample on Linux

-

PythonCalculator with basic client

-
    -
  1. Ensure you have enabled the Tuscany Python extension. Follow the instructions - found here. -
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  4. -
  5. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>/samples/PythonCalculator/deploy/sample.calculator.client
    • -
    • ./runclient.sh
    • -
    -
  6. -
-

PythonCalculator with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Ensure you have enabled the Tuscany Python extension. Follow the instructions - found here. -
  4. -
  5. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/PythonCalculator/deploy/sample.calculator
    4. -
    5. ./runwsserver.sh
    6. -
    -
  6. -
  7. Run the client: -
      -
    1. The following environment variable is required: -
        -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/PythonCalculator/deploy/sample.calculator.wsclient
    4. -
    5. ./runwsclient.sh
    6. -
    -
  8. -
-
- -
-

Building the PythonCalculator sample on Windows

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. As this sample is based on Python scripts, a specific compilation step is not necessary - - only deployment is required. Deploy the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\PythonCalculator
    • -
    • deploy.cmd
    • -
    -
  4. -
-
- -
-

Running the PythonCalculator sample on Windows

-

PythonCalculator with basic client

-
    -
  1. Ensure you have enabled the Tuscany Python extension. Follow the instructions - found here. -
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  4. -
  5. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\PythonCalculator\deploy\sample.calculator.client
    • -
    • runclient.bat
    • -
    -
  6. -
-

PythonCalculator with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Ensure you have enabled the Tuscany Python extension. Follow the instructions - found here. -
  4. -
  5. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\PythonCalculator\deploy\sample.calculator
    4. -
    5. runwsserver.bat
    6. -
    -
  6. -
  7. Run the client: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\PythonCalculator\deploy\sample.calculator.wsclient
    4. -
    5. runwsclient.bat
    6. -
    -
  8. -
-
- -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/deploy.cmd deleted file mode 100644 index 7db890865a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/deploy.cmd +++ /dev/null @@ -1,57 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set currentPath=%~d0%~p0 -set sourcePath=%currentPath% - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set calcdir=%samplesdir%\PythonCalculator - -if . == %1. ( -set destinationPath=%calcdir%\deploy -) ELSE ( -set destinationPath=%1 -) - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %calcdir% mkdir %calcdir% -if not exist %destinationPath% mkdir %destinationPath% -if not exist %destinationPath%\sample.calculator mkdir %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\*.componentType %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\*.composite %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\*.py %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\Calculator.wsdl %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\runwsserver.bat %destinationPath%\sample.calculator - -if not exist %destinationPath%\sample.calculator.client mkdir %destinationPath%\sample.calculator.client -copy %sourcePath%\sample.calculator.client\calculator_client.py %destinationPath%\sample.calculator.client -copy %sourcePath%\sample.calculator.client\runclient.bat %destinationPath%\sample.calculator.client - -if not exist %destinationPath%\sample.calculator.wsclient mkdir %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\calculator_wsclient.py %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\sample.calculator.wsclient.composite %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\Calculator.wsdl %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\runwsclient.bat %destinationPath%\sample.calculator.wsclient - -copy %sourcePath%\*.composite %destinationPath% - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am deleted file mode 100644 index 2f569db441..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/PythonCalculator/deploy -clientdir=$(deploydir)/sample.calculator.client - -client_DATA = *.py -client_SCRIPTS = runclient.sh -EXTRA_DIST = runclient.sh *.py diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py deleted file mode 100644 index 58d6f45606..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/calculator_client.py +++ /dev/null @@ -1,50 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# -# This Python code is a simple sample that provides a Python -# client for the Calculator sample - - -import sys -import sca - -op = sys.argv[1] -val1 = sys.argv[2] -val2 = sys.argv[3] - -# Locate the calculator service -calc = sca.locateservice("CalculatorComponent") - -# Invoke the calculator operations -if op == 'add': - result = calc.add(val1, val2) - -elif op == 'sub': - result = calc.sub(val1, val2) - -elif op == 'mul': - result = calc.mul(val1, val2) - -elif op == 'div': - result = calc.div(val1, val2) - - -print "calculator_client: ",op,"(",val1,",",val2,") = ",result - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat deleted file mode 100644 index d02d5fced8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% -set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin - -cd %TUSCANY_SCACPP_SYSTEM_ROOT%\sample.calculator.client -python calculator_client.py div 5 2 - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh deleted file mode 100755 index ced35b5f6b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.client/runclient.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/python/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH -export PYTHONPATH=$TUSCANY_SCACPP/extensions/python/lib:$PYTHONPATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -cd $TUSCANY_SCACPP_SYSTEM_ROOT/sample.calculator.client -python calculator_client.py div 5 2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.solution.composite deleted file mode 100644 index 0a8ae343db..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.solution.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl deleted file mode 100644 index f74c3d5c33..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Calculator.wsdl +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am deleted file mode 100644 index 931612432a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/PythonCalculator/deploy -wsclientdir=$(deploydir)/sample.calculator.wsclient - -wsclient_DATA = *.py *.wsdl *.composite -wsclient_SCRIPTS = runwsclient.sh -EXTRA_DIST = runwsclient.sh *.py *.wsdl *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py deleted file mode 100644 index 1ec1f66d83..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/calculator_wsclient.py +++ /dev/null @@ -1,50 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# -# This Python code is a simple sample that provides a Python -# client for the Calculator sample - - -import sys -import sca - -op = sys.argv[1] -val1 = sys.argv[2] -val2 = sys.argv[3] - -# Locate the calculator service -calc = sca.locateservice("CalculatorService") - -# Invoke the calculator operations -if op == 'add': - result = calc.add(val1, val2) - -elif op == 'sub': - result = calc.sub(val1, val2) - -elif op == 'mul': - result = calc.mul(val1, val2) - -elif op == 'div': - result = calc.div(val1, val2) - - -print "calculator_wsclient: ",op,"(",val1,",",val2,") = ",result - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat deleted file mode 100644 index dbcdf06313..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% -set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin - -cd %TUSCANY_SCACPP_SYSTEM_ROOT%\sample.calculator.wsclient -python calculator_wsclient.py div 5 2 - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh deleted file mode 100755 index a02f607d08..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/runwsclient.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/python/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH -export PYTHONPATH=$TUSCANY_SCACPP/extensions/python/lib:$PYTHONPATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent - -cd $TUSCANY_SCACPP_SYSTEM_ROOT/sample.calculator.wsclient -python calculator_wsclient.py div 5 2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite deleted file mode 100644 index 6ee1169645..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl deleted file mode 100644 index 37529c06c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Calculator.wsdl +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.componentType deleted file mode 100644 index b54b4e22b1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.componentType +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py deleted file mode 100644 index 86dbef9e4d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/CalculatorImpl.py +++ /dev/null @@ -1,56 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# -# This Python code is a simple sample that provides a Python implementation of -# the Calculator sample -# - - -# The module-level add function -def add(val1, val2): - result = float(val1) + float(val2) - print "Python - CalculatorImpl.add " + str(val1) + " + " + str(val2) + " = " + str(result) - return result - -# The module-level sub function -def sub(val1, val2): - result = float(val1) - float(val2) - print "Python - CalculatorImpl.sub " + str(val1) + " - " + str(val2) + " = " + str(result) - return result - -# The module-level mul function -def mul(val1, val2): - result = float(val1) * float(val2) - print "Python - CalculatorImpl.mul " + str(val1) + " * " + str(val2) + " = " + str(result) - return result - -# The module-level div function -def div(val1, val2): - - - print "Python - CalculatorImpl.div calling divideService to determine " + str(val1) + " / " + str(val2) - - # Use the divideService reference - result = divideService.divide(val1, val2) - - print "Python - CalculatorImpl.div divideService returned " + str(result) - - return result - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.componentType deleted file mode 100644 index fa2938279a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.componentType +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py deleted file mode 100644 index 3921731de6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/DivideImpl.py +++ /dev/null @@ -1,65 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# -# This Python code is a simple sample that provides a Python implementation of -# the Divide Service used in the Calculator sample -# -# Either use the divide function in the DivideClass class (using classes allows -# composite scoping to be used) -# e.g. in CalculatorComposite.composite use the line: -# -# -# Or just use the module-level divide function -# e.g. in CalculatorComposite.composite use the line: -# -# - - -class DivideClass: - "A class to handle dividing" - - def __init__(self): - print "Python - DivideImpl.DivideClass constructor" - - # The class-level divide function - def divide(self, val1, val2): - result = float(val1) / float(val2) - - print "Python - DivideImpl.DivideClass.divide " + str( val1 ) + " / " + str(val2) + " = " + str(result) - - # Use the doRounding property - if doRounding: - result = round(result) - print "Python - DivideImpl.DivideClass.divide is rounding the result to " + str(result) - - return result - -# The module-level divide function -def divide(val1, val2): - result = float(val1) / float(val2) - print "Python - DivideImpl.divide " + str(val1) + " / " + str(val2) + " = " + str(result) - - # Use the doRounding property - if doRounding: - result = round(result) - print "Python - DivideImpl.divide is rounding the result to " + str(result) - - return result - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Makefile.am deleted file mode 100644 index 7c0cbd7b88..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/PythonCalculator/deploy -compositedir=$(deploydir)/sample.calculator - -composite_DATA = *.composite *.componentType *.wsdl *.py -composite_SCRIPTS = runwsserver.sh -EXTRA_DIST = *.composite *.componentType *.wsdl *.py runwsserver.sh - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.bat deleted file mode 100644 index 2e5df325b2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% -set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin - -cd %AXIS2C_HOME%\bin -.\axis2_http_server.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.sh deleted file mode 100755 index 570a439b4f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/runwsserver.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/python/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH -export PYTHONPATH=$TUSCANY_SCACPP/extensions/python/lib:$PYTHONPATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -cd $AXIS2C_HOME/bin -./axis2_http_server diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite deleted file mode 100644 index caac112edf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/PythonCalculator/sample.calculator/sample.calculator.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - CalculatorComponent - - - - - DivideComponent - - - - - true - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/README deleted file mode 100644 index 3d7155367d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/README +++ /dev/null @@ -1,2 +0,0 @@ -Please read the GettingStarted.html document for information on -building, installing and running Tuscany SCA for C++ Samples \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/Makefile.am deleted file mode 100644 index 69b34906a1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyBank/deploy -SUBDIRS = bigbank.account bigbank.client -EXTRA_DIST = *.composite README.html -deploy_DATA = *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README deleted file mode 100644 index 266b66cc9a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README +++ /dev/null @@ -1,22 +0,0 @@ -Tuscany SCA for C++ Samples - RubyBank Sample -=============================================== - -This sample implements the "Simplified BigBank" scenario. A whitepaper -describing the scenario based on the SCA 0.9 Assembly specification can be -found here. This sample uses multiple Ruby components, calls out to an -external Web Service via a reference, exposes the service as a Web Service -and also provides a PHP based client. - -There are two sub projects in this workspace: - - bigbank.account - This contains the source code and SCDL artifacts for the SCA BigBank - composite implementing the account services. - - - bigbank.client - A sample client which does a local call to the BigBank service. - -Additionally, there is the bigbank.accountmanagement.composite file. This -describes the configuration of the SCA Calculator composite deployed to the -SCA runtime. - -See the README.html file for instructions to build and run this sample diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README.html b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README.html deleted file mode 100644 index f27d2752d3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/README.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ Samples - RubyBank Sample - - - -
-
-
-

Tuscany SCA for C++ Samples - RubyBank Sample

- -

This sample implements the "Simplified RubyBank" scenario. A whitepaper describing - the scenario based on the SCA 0.9 Assembly specification can be found - here. - This sample uses multiple Ruby components, calls out to an external Web Service via a reference - and exposes the service as a Web Service. -

-

There are two sub projects in this workspace:

-
    -
  • bigbank.account
    - This contains the source code and SCDL artifacts for the SCA RubyBank - composite implementing the account services. -
  • -
  • bigbank.client
    - A sample client which does a local call to the RubyBank service. -
  • -
-

Additionally, there is the bigbank.accountmanagement.composite file. This - describes the configuration of the SCA Calculator composite deployed to the SCA - runtime. -

-
- - - - -
-

Building the C++ samples on Linux

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. As the RubyBank sample is based on Ruby scripts, a specific compilation step is not necessary - - only deployment is required. Deploy the Ruby samples only with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>/samples
    • -
    • ./configure --enable-ruby --enable-cpp=no --prefix=$TUSCANY_SCACPP
    • -
    • make install
    • -
    - NOTE: If you don't provide the --prefix configure option, it will by default install into - /usr/local/tuscany/sca/samples/RubyBank -
  4. -
-
- -
-

Running the RubyBank sample on Linux

-

RubyBank with basic client

-
    -
  1. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.92>
    • -
    -
  4. -
  5. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.client
    • -
    • ./runclient.sh
    • -
    -
  6. -
-

RubyBank with Web Service clients

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  4. -
  5. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.account -
    4. -
    5. ./runwsserver.sh
    6. -
    -
  6. -
  7. The Web Service client and PHP web client detailed in the - BigBank sample can both be used - with the RubyBank service that is served by the Axis2C http server started above. -
  8. -
-
- -
-

Building the RubyBank sample on Windows

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. As this sample is based on Ruby scripts, a specific compilation step is not necessary - - only deployment is required. Deploy the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\RubyBank
    • -
    • deploy.cmd
    • -
    -
  4. -
-
- -
-

Running the RubyBank sample on Windows

-

RubyBank with basic client

-
    -
  1. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  4. -
  5. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\RubyBank\deploy\bigbank.client
    • -
    • runclient.bat
    • -
    -
  6. -
-

RubyBank with Web Service clients

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  4. -
  5. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\RubyBank\deploy\bigbank.account -
    4. -
    5. runwsserver.bat
    6. -
    -
  6. -
  7. The Web Service client and PHP web client detailed in the - BigBank sample can both be used - with the RubyBank service that is served by the Axis2C http server started above. -
  8. -
-
- - - -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at - http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb deleted file mode 100644 index 8ae0e23bab..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -require "rexml/document" -include REXML - -class AccountDataServiceImpl - - def initialize() - print "Ruby - AccountDataServiceImpl.initialize\n" - end - - def getCheckingAccount(id) - print "Ruby - AccountDataServiceImpl.getCheckingAccount ", id, "\n" - - result = Document.new <<-eof - - #{ id.to_s + "_CHA12345"} - 1500.0 - - eof - - return result - end - - def getSavingsAccount(id) - print "Ruby - AccountDataServiceImpl.getSavingsAccount ", id, "\n" - - result = Document.new <<-eof - - #{ id.to_s + "_SAA12345"} - 1500.0 - - eof - - return result - end - - def getStockAccount(id) - print "Ruby - AccountDataServiceImpl.getStockAccount ", id, "\n" - - result = Document.new <<-eof - - #{ id.to_s + "_STA12345"} - IBM - 100 - - - eof - - return result - end - -end diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountService.wsdl deleted file mode 100644 index cbfe180692..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountService.wsdl +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb deleted file mode 100644 index a82b226a76..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb +++ /dev/null @@ -1,94 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -require "rexml/document" -include REXML - -class AccountServiceImpl - - attr_writer :accountDataService - attr_writer :stockQuoteService - attr_writer :currency - - def initialize() - print "Ruby - AccountServiceImpl.initialize\n" - end - - def getAccountReport(customerID) - - checking = @accountDataService.getCheckingAccount(customerID) - - savings = @accountDataService.getSavingsAccount(customerID) - - stock = @accountDataService.getStockAccount(customerID); - symbol = stock.root.elements["symbol"].text - quantity = stock.root.elements["quantity"].text - - price = @stockQuoteService.getQuote(symbol); - - balance = fromUSDollarToCurrency(price.to_f * quantity.to_f) - - report = Document.new <<-eof - - - - - #{ checking.root.elements["accountNumber"].text } - - - #{ fromUSDollarToCurrency(checking.root.elements["balance"].text) } - - - - - - #{ savings.root.elements["accountNumber"].text } - - - #{ fromUSDollarToCurrency(savings.root.elements["balance"].text) } - - - - - - #{ stock.root.elements["accountNumber"].text } - - - #{ symbol } - - - #{ quantity } - - - #{ balance } - - - - - eof - - return report - end - - def fromUSDollarToCurrency(value) - return value.to_f * 0.8 if @currency == "EURO" - return value.to_f - end - -end diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/Makefile.am deleted file mode 100644 index 19059a004f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyBank/deploy -compositedir=$(deploydir)/bigbank.account - -composite_SCRIPTS = runwsserver.sh - -composite_DATA = *.composite *.wsdl *.xsd *.rb -EXTRA_DIST = *.composite *.wsdl *.xsd runwsserver.sh *.rb diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb deleted file mode 100644 index c8bbe248a3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb +++ /dev/null @@ -1,41 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -require "rexml/document" -include REXML - -class StockQuoteServiceImpl - - attr_writer :webService - - def initialize() - print "Ruby - StockQuoteServiceImpl.initialize\n" - end - - def getQuote(symbol) - print "Ruby - StockQuoteServiceImpl.getQuote ", symbol, "\n" - - result = @webService.GetQuote(symbol) - doc = Document.new(result) - - price = doc.root.elements["Stock"].elements["Last"].text; - - return price.to_f - end - -end \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd deleted file mode 100644 index 2f7012b5fb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl deleted file mode 100644 index c14f97c87b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get Stock quote for a company Symbol - - - - - - - - - - Get Stock quote for a company Symbol - - - - - - - - - - Get Stock quote for a company Symbol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/bigbank.account.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/bigbank.account.composite deleted file mode 100644 index 96f0bd652f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/bigbank.account.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - AccountServiceComponent - - - - - AccountDataServiceComponent - StockQuoteServiceComponent - EURO - - - - - - - - - StockQuoteWebService - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.bat deleted file mode 100644 index f95d5136ef..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.bat +++ /dev/null @@ -1,51 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo Using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo Using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME% - -set APFULLDIR=%~d0%~p0 -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -rem Run the client -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %AXIS2C_HOME%\bin -.\axis2_http_server.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.sh deleted file mode 100755 index eb20a3d670..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.account/runwsserver.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -cd $AXIS2C_HOME/bin -./axis2_http_server diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.accountmanagement.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.accountmanagement.composite deleted file mode 100644 index f5f0bbbb57..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.accountmanagement.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/AccountClient.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/AccountClient.rb deleted file mode 100644 index 731c77c9ce..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/AccountClient.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -require("tuscany_sca_ruby") - -accountService = SCA::locateService("AccountServiceComponent") - -report = accountService.getAccountReport(1234) - -print report diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/Makefile.am deleted file mode 100644 index a289a22914..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyBank/deploy -clientdir=$(deploydir)/bigbank.client - -client_DATA = *.rb -client_SCRIPTS = runclient.sh -EXTRA_DIST = runclient.sh *.rb diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.bat deleted file mode 100644 index f50bc2aa2d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.bat +++ /dev/null @@ -1,51 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo Using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo Using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME% - -set APFULLDIR=%~d0%~p0 -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -rem Run the client -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %TUSCANY_SCACPP_SYSTEM_ROOT%\bigbank.client -ruby -I%TUSCANY_SCACPP%\extensions\ruby\bin AccountClient.rb - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.sh deleted file mode 100755 index 7ed579d393..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/bigbank.client/runclient.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent - -cd $TUSCANY_SCACPP_SYSTEM_ROOT/bigbank.client -ruby -I$TUSCANY_SCACPP/extensions/ruby/lib AccountClient.rb diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/deploy.cmd deleted file mode 100644 index 59b797e564..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyBank/deploy.cmd +++ /dev/null @@ -1,53 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set currentPath=%~d0%~p0 -set sourcePath=%currentPath% - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set bbdir=%samplesdir%\RubyBank - - -if . == %1. ( -set destinationPath=%bbdir%\deploy -) ELSE ( -set destinationPath=%1 -) - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %bbdir% mkdir %bbdir% -if not exist %destinationPath% mkdir %destinationPath% -if not exist %destinationPath%\bigbank.account mkdir %destinationPath%\bigbank.account -if not exist %destinationPath%\bigbank.client mkdir %destinationPath%\bigbank.client - -copy %sourcePath%\bigbank.account\*.rb %destinationPath%\bigbank.account -copy %sourcePath%\bigbank.account\*.composite %destinationPath%\bigbank.account -copy %sourcePath%\bigbank.account\*.wsdl %destinationPath%\bigbank.account -copy %sourcePath%\bigbank.account\*.xsd %destinationPath%\bigbank.account -copy %sourcePath%\bigbank.account\*.bat %destinationPath%\bigbank.account - -copy %sourcePath%\bigbank.client\*.rb %destinationPath%\bigbank.client -copy %sourcePath%\bigbank.client\*.bat %destinationPath%\bigbank.client - -copy %sourcePath%\*.composite %destinationPath% - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/Makefile.am deleted file mode 100644 index e111e518cf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyCalculator/deploy -SUBDIRS = sample.calculator sample.calculator.client sample.calculator.wsclient -EXTRA_DIST = *.composite README.html -deploy_DATA = *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README deleted file mode 100644 index 4104ff46b6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README +++ /dev/null @@ -1,23 +0,0 @@ -Tuscany SCA for C++ Samples - Calculator Sample -=============================================== - -This is a very simple sample to show how an SCA composite can wire together -two components to implement a Calculator service and expose that service as -a Web Service. - -There are three sub projects in this workspace: - - sample.calculator - This contains the source code and SCDL artifacts for the SCA Calculator. - composite implementing the sample Calculator. - - - sample.calculator.client - A sample client which does a local call to the Calculator service. - - - sample.calculator.wsclient - A sample Axis2 Web Service client which calls the Calculator Web service. - -Additionally, there is the sample.calculator.solution.composite file. This -describes the configuration of the SCA Calculator composite deployed to the -SCA runtime. - -See the README.html file for instructions to build and run this sample diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README.html b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README.html deleted file mode 100644 index 6fb00eb23a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/README.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - - - - - Tuscany SCA for C++ Samples - RubyCalculator Sample - - - -
-
-
-

Tuscany SCA for C++ Samples - RubyCalculator Sample

- -

This is a very simple sample to show how an SCA composite can wire - together two Ruby components to implement a Calculator service and expose - that service as a Web Service. -

-

There are three sub projects in this workspace:

-
    -
  • sample.calculator
    - This contains the Ruby scripts and SCDL artifacts for the SCA Calculator - composite implementing the sample Calculator. -
  • -
  • sample.calculator.client
    - A sample client which does a local call to the Calculator service. -
  • -
  • sample.calculator.wsclient
    - A sample client which does a local call to a composite that contains a Web Service reference - that calls the Calculator Web Service. -
  • -
-

Additionally, there is the sample.calculator.solution.composite file. This - describes the configuration of the SCA Calculator composite deployed to the SCA - runtime. -

-
- - - - -
-

Building the Ruby samples on Linux

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. As the RubyCalculator sample is based on Ruby scripts, a specific compilation step is not necessary - - only deployment is required. Deploy the Ruby samples only with the following command sequence: -
      -
    • cd <tuscany_sca_install_dir>/samples
    • -
    • ./configure --enable-ruby --enable-cpp=no --prefix=$TUSCANY_SCACPP
    • -
    • make install
    • -
    - NOTE: If you don't provide the --prefix configure option, it will by default install into - /usr/local/tuscany/sca/samples/RubyCalculator
  4. -
-
- -
-

Running the RubyCalculator sample on Linux

-

RubyCalculator with basic client

-
    -
  1. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  4. -
  5. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>/samples/RubyCalculator/deploy/sample.calculator.client
    • -
    • ./runclient.sh
    • -
    -
  6. -
-

RubyCalculator with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  4. -
  5. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/RubyCalculator/deploy/sample.calculator
    4. -
    5. ./runwsserver.sh
    6. -
    -
  6. -
  7. Run the client: -
      -
    1. The following environment variable is required: -
        -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>/samples/RubyCalculator/deploy/sample.calculator.wsclient
    4. -
    5. ./runwsclient.sh
    6. -
    -
  8. -
-
- -
-

Building the RubyCalculator sample on Windows

-

If using the binary distribution the samples are built and installed in - <tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.

-
    -
  1. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA> -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
  2. - -
  3. As this sample is based on Ruby scripts, a specific compilation step is not necessary - - only deployment is required. Deploy the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\RubyCalculator
    • -
    • deploy.cmd
    • -
    -
  4. -
-
- -
-

Running the RubyCalculator sample on Windows

-

RubyCalculator with basic client

-
    -
  1. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  2. -
  3. The following environment variables are required: -
      -
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • -
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • -
    • AXIS2C_HOME=<path to axis2c version 0.94>
    • -
    -
  4. -
  5. Run the sample with the following commands: -
      -
    • cd <tuscany_sca_install_dir>\samples\RubyCalculator\deploy\sample.calculator.client
    • -
    • runclient.bat
    • -
    -
  6. -
-

RubyCalculator with Web Service client

-
    -
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions - found here. -
  2. -
  3. Ensure you have enabled the Tuscany Ruby extension. Follow the instructions - found here. -
  4. -
  5. Start the Axis2C simple http server: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\RubyCalculator\deploy\sample.calculator
    4. -
    5. runwsserver.bat
    6. -
    -
  6. -
  7. Run the client: -
      -
    1. The following environment variables are required: -
        -
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • -
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • -
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • -
      -
    2. -
    3. cd <tuscany_sca_install_dir>\samples\RubyCalculator\deploy\sample.calculator.wsclient
    4. -
    5. runwsclient.bat
    6. -
    -
  8. -
-
- - - -
-

Getting Help

- -

First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

- -

Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

-
-
-
- - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/deploy.cmd deleted file mode 100644 index 2609c3b1e5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/deploy.cmd +++ /dev/null @@ -1,56 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set currentPath=%~d0%~p0 -set sourcePath=%currentPath% - -set deploydir=%TUSCANY_SCACPP% -set samplesdir=%deploydir%\samples -set calcdir=%samplesdir%\RubyCalculator - -if . == %1. ( -set destinationPath=%calcdir%\deploy -) ELSE ( -set destinationPath=%1 -) - -if not exist %samplesdir% mkdir %samplesdir% -if not exist %calcdir% mkdir %calcdir% -if not exist %destinationPath% mkdir %destinationPath% -if not exist %destinationPath%\sample.calculator mkdir %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\*.composite %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\*.rb %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\Calculator.wsdl %destinationPath%\sample.calculator -copy %sourcePath%\sample.calculator\runwsserver.bat %destinationPath%\sample.calculator - -if not exist %destinationPath%\sample.calculator.client mkdir %destinationPath%\sample.calculator.client -copy %sourcePath%\sample.calculator.client\CalculatorClient.rb %destinationPath%\sample.calculator.client -copy %sourcePath%\sample.calculator.client\runclient.bat %destinationPath%\sample.calculator.client - -if not exist %destinationPath%\sample.calculator.wsclient mkdir %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\CalculatorWSClient.rb %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\sample.calculator.wsclient.composite %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\Calculator.wsdl %destinationPath%\sample.calculator.wsclient -copy %sourcePath%\sample.calculator.wsclient\runwsclient.bat %destinationPath%\sample.calculator.wsclient - -copy %sourcePath%\*.composite %destinationPath% - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb deleted file mode 100644 index 253928df0c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/CalculatorClient.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -require("tuscany_sca_ruby") - -calculator = SCA::locateService("CalculatorComponent") - -x = calculator.div(5, 2) -print x, "\n" diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am deleted file mode 100644 index 536a5f1072..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyCalculator/deploy -clientdir=$(deploydir)/sample.calculator.client - -client_DATA = *.rb -client_SCRIPTS = runclient.sh -EXTRA_DIST = runclient.sh *.rb diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat deleted file mode 100644 index 4e9cc0f2cd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %TUSCANY_SCACPP_SYSTEM_ROOT%\sample.calculator.client -ruby -I%TUSCANY_SCACPP%\extensions\ruby\bin CalculatorClient.rb - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh deleted file mode 100755 index 974dd2e41c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.client/runclient.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -cd $TUSCANY_SCACPP_SYSTEM_ROOT/sample.calculator.client -ruby -I$TUSCANY_SCACPP/extensions/ruby/lib CalculatorClient.rb diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.solution.composite deleted file mode 100644 index 0a8ae343db..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.solution.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl deleted file mode 100644 index f74c3d5c33..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Calculator.wsdl +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb deleted file mode 100644 index 4022f8a636..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/CalculatorWSClient.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -require("tuscany_sca_ruby") - -calculator = SCA::locateService("CalculatorService") - -x = calculator.div(5, 2) -print x, "\n" diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am deleted file mode 100644 index baef3cbb92..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyCalculator/deploy -wsclientdir=$(deploydir)/sample.calculator.wsclient - -wsclient_DATA = *.rb *.wsdl *.composite -wsclient_SCRIPTS = runwsclient.sh -EXTRA_DIST = runwsclient.sh *.rb *.wsdl *.composite diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat deleted file mode 100644 index f9a1ad62a7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %TUSCANY_SCACPP_SYSTEM_ROOT%\sample.calculator.wsclient -ruby -I%TUSCANY_SCACPP%\extensions\ruby\bin CalculatorWSClient.rb - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh deleted file mode 100755 index ec4053fb74..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/runwsclient.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorWSClientComponent - -cd $TUSCANY_SCACPP_SYSTEM_ROOT/sample.calculator.wsclient -ruby -I$TUSCANY_SCACPP/extensions/ruby/lib CalculatorWSClient.rb diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite deleted file mode 100644 index 22d31b539c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator.wsclient/sample.calculator.wsclient.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl deleted file mode 100644 index f74c3d5c33..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb deleted file mode 100644 index 36ed15ff9b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb +++ /dev/null @@ -1,48 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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 CalculatorImpl - - attr_writer :divideService - - def initialize() - print "Ruby - CalculatorImpl.initialize\n" - end - - def div(arg1, arg2) - print "Ruby - CalculatorImpl.div\n" - @divideService.divide(arg1.to_f, arg2.to_f) - end - - def add(arg1, arg2) - print "Ruby - CalculatorImpl.add\n" - arg1.to_f + arg2.to_f - end - - def sub(arg1, arg2) - print "Ruby - CalculatorImpl.sub\n" - arg1.to_f - arg2.to_f - end - - def mul(arg1, arg2) - print "Ruby - CalculatorImpl.mul\n" - arg1.to_f * arg2.to_f - end - -end \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb deleted file mode 100644 index c6615bfcfa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/DivideImpl.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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 DivideImpl - - attr_writer :round - - def initialize() - print "Ruby - DivideImpl.initialize\n" - end - - def divide(arg1, arg2) - print "Ruby - DivideImpl.divide ", arg1, " / ", arg2, "\n" - res = arg1.to_f / arg2.to_f - if @round then - res = res.round - print "DivideImpl.divide rounding\n" - end - print "DivideImpl.divide ", res, "\n" - res - end - -end \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Makefile.am deleted file mode 100644 index 2508e53093..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/RubyCalculator/deploy -compositedir=$(deploydir)/sample.calculator - -composite_SCRIPTS = runwsserver.sh - -composite_DATA = *.composite *.wsdl *.rb -EXTRA_DIST = *.composite *.wsdl *.rb runwsserver.sh diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.bat deleted file mode 100644 index 9870d4600d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %AXIS2C_HOME%\bin -.\axis2_http_server.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.sh deleted file mode 100755 index 69906579b2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/runwsserver.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent - -cd $AXIS2C_HOME/bin -./axis2_http_server diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite deleted file mode 100644 index 90f68e8234..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/RubyCalculator/sample.calculator/sample.calculator.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - CalculatorComponent - - - - - DivideComponent - - - - - true - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo.solution.composite deleted file mode 100644 index cf0df165ae..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo.solution.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - supplychain.Retailer/RetailerService - supplychain.Logging/LoggingService - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/DemoClientImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/DemoClientImpl.componentType deleted file mode 100644 index a63e4c37d3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/DemoClientImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/supplychain.demo.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/supplychain.demo.composite deleted file mode 100644 index 20b0e49ec1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.demo/supplychain.demo.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - retailer - logging - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggerImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggerImpl.componentType deleted file mode 100644 index e78e602635..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggerImpl.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggingFacility.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggingFacility.wsdl deleted file mode 100644 index c78357b1a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/LoggingFacility.wsdl +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/supplychain.logging.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/supplychain.logging.composite deleted file mode 100644 index 2b28c8f9e2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.logging/supplychain.logging.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - Logger/Logging - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/Manufacturer.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/Manufacturer.wsdl deleted file mode 100644 index fb0c8a5676..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/Manufacturer.wsdl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/ManufacturerImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/ManufacturerImpl.componentType deleted file mode 100644 index 63530bc0ee..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/ManufacturerImpl.componentType +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/WarehouseCallback.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/WarehouseCallback.wsdl deleted file mode 100644 index 256671f64f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/WarehouseCallback.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/supplychain.manufacturer.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/supplychain.manufacturer.composite deleted file mode 100644 index c61657c0a7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturer/supplychain.manufacturer.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - ManufacturerProcess/ManufacturerService - - - - - - - callback - logging - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerA.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerA.solution.composite deleted file mode 100644 index 17449e51fa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerA.solution.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - supplychain.Logging/LoggingService - manufacturerA - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerB.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerB.solution.composite deleted file mode 100644 index 94535d704a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerB.solution.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - supplychain.Logging/LoggingService - manufacturerB - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerC.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerC.solution.composite deleted file mode 100644 index b4b9380af0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.manufacturerC.solution.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - supplychain.Logging/LoggingService - manufacturerC - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer.solution.composite deleted file mode 100644 index f7bad01614..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer.solution.composite +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - supplychain.WarehouseA/WarehouseService - supplychain.WarehouseB/WarehouseService - supplychain.WarehouseC/WarehouseService - supplychain.Logging/LoggingService - - - - - supplychain.manufacturerA/ManufacturerService - supplychain.Logging/LoggingService - warehouseA - - - - - supplychain.manufacturerB/ManufacturerService - supplychain.Logging/LoggingService - warehouseB - - - - - supplychain.manufacturerA/ManufacturerService - supplychain.Logging/LoggingService - warehouseC - - - - supplychain.manufacturerA/callback - supplychain.WarehouseA/WarehouseCallbackService - - - supplychain.manufacturerB/callback - supplychain.WarehouseB/WarehouseCallbackService - - - supplychain.manufacturerC/callback - supplychain.WarehouseC/WarehouseCallbackService - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/Retailer.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/Retailer.wsdl deleted file mode 100644 index 39bd1963f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/Retailer.wsdl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/RetailerImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/RetailerImpl.componentType deleted file mode 100644 index fb381ec9a6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/RetailerImpl.componentType +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/supplychain.retailer.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/supplychain.retailer.composite deleted file mode 100644 index 51a2b96b1b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.retailer/supplychain.retailer.composite +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - RetailerProcess/RetailerService - - - - - warehouses - logging - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/Warehouse.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/Warehouse.wsdl deleted file mode 100644 index a007f9957b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/Warehouse.wsdl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseCallbackImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseCallbackImpl.componentType deleted file mode 100644 index fbc1edb462..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseCallbackImpl.componentType +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseImpl.componentType deleted file mode 100644 index 7f63d3b571..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/WarehouseImpl.componentType +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/supplychain.warehouse.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/supplychain.warehouse.composite deleted file mode 100644 index e44b964eb4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/SupplyChain/supplychain.warehouse/supplychain.warehouse.composite +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - WarehouseProcess/WarehouseService - - - - - - WarehouseCallbackProcess/WarehouseCallbackService - - - - - - - manufacturer - logging - - - - - - logging - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/autogen.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/autogen.sh deleted file mode 100755 index 18277601c8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/autogen.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -for i in "libtoolize --force" 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-1.0-incubating-M2-RC3/sca/samples/build.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/build.sh deleted file mode 100755 index c332defce0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/build.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -if [ x$PYTHON_LIB = x ]; then -echo "PYTHON_LIB not set. Python extension will not be built" -elif [ x$PYTHON_INCLUDE = x ]; then -echo "PYTHON_INCLUDE not set. Python extension will not be built" -elif [ x$PYTHON_VERSION = x ]; then -echo "PYTHON_VERSION not set. Python extension will not be built" -else -echo "Building PYTHON extension with Python $PYTHON_VERSION installed at $PYTHON_LIB, $PYTHON_INCLUDE" -ENABLE_PYTHON=--enable-python -fi - -if [ x$RUBY_LIB = x ]; then -echo "RUBY_LIB not set. Ruby extension will not be built" -elif [ x$RUBY_INCLUDE = x ]; then -echo "RUBY_INCLUDE not set. Ruby extension will not be built" -else -echo "Building Ruby extension with Ruby installed at $RUBY_LIB, $RUBY_INCLUDE" -ENABLE_RUBY=--enable-ruby -fi - -./configure --prefix=${TUSCANY_SCACPP} --enable-static=no ${ENABLE_RUBY} ${ENABLE_PYTHON} -make -make install - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/configure.ac b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/configure.ac deleted file mode 100644 index f59c04ba2d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/configure.ac +++ /dev/null @@ -1,168 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -dnl run autogen.sh to generate the configure script. - -AC_PREREQ(2.59) -AC_INIT(tuscany_sca_samples, 1.0-incubator-M2) -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AC_PREFIX_DEFAULT(/usr/local/tuscany/sca/samples) - -# 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 - -# Check for dynamic library suffixes -AC_MSG_CHECKING([checking for dynamic library suffix]) -AC_CHECK_HEADER([sys/appleapiopts.h], - [AC_SUBST([libsuffix],[".dylib"]) AC_MSG_RESULT([using .dylib])], - [AC_SUBST([libsuffix],[".so"]) AC_MSG_RESULT([using .so])] -) - -# 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_MSG_CHECKING(whether to build all samples) -AC_ARG_ENABLE(all-samples, [AS_HELP_STRING([--enable-all-samples],[build all samples [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_all_samples=false - ;; - *) - AC_MSG_RESULT(yes) - want_all_samples=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_all_samples=false ] -) -AM_CONDITIONAL([WANT_ALL_SAMPLES], [test x$want_all_samples = xtrue]) - -AC_MSG_CHECKING(whether to build C++ samples) -AC_ARG_ENABLE(cpp, [AS_HELP_STRING([--enable-cpp],[build C++ samples [default=yes]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_cpp_samples=false - ;; - *) - AC_MSG_RESULT(yes) - want_cpp_samples=true - ;; - esac ], -[ AC_MSG_RESULT(yes) - want_cpp_samples=true ] -) -AM_CONDITIONAL([WANT_CPP_SAMPLES], [test x$want_cpp_samples = xtrue]) - -AC_MSG_CHECKING(whether to build Python samples) -AC_ARG_ENABLE(python, [AS_HELP_STRING([--enable-python],[build Python samples [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_python_samples=false - ;; - *) - AC_MSG_RESULT(yes) - want_python_samples=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_python_samples=false ] -) -AM_CONDITIONAL([WANT_PYTHON_SAMPLES], [test x$want_python_samples = xtrue]) - -AC_MSG_CHECKING(whether to build Ruby samples) -AC_ARG_ENABLE(ruby, [AS_HELP_STRING([--enable-ruby],[build Ruby samples [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_ruby_samples=false - ;; - *) - AC_MSG_RESULT(yes) - want_ruby_samples=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_ruby_samples=false ] -) -AM_CONDITIONAL([WANT_RUBY_SAMPLES], [test x$want_ruby_samples = xtrue]) - -AC_MSG_CHECKING(whether to build PHP samples) -AC_ARG_ENABLE(php, [AS_HELP_STRING([--enable-php],[build PHP samples [default=no]])], -[ case "${enableval}" in - no) - AC_MSG_RESULT(no) - want_php_samples=false - ;; - *) - AC_MSG_RESULT(yes) - want_php_samples=true - ;; - esac ], -[ AC_MSG_RESULT(no) - want_php_samples=false ] -) -AM_CONDITIONAL([WANT_PHP_SAMPLES], [test x$want_php_samples = xtrue]) - -AC_CONFIG_FILES([Makefile - Calculator/Makefile - Calculator/sample.calculator/Makefile - Calculator/sample.calculator.client/Makefile - Calculator/sample.calculator.wsclient/Makefile - RubyCalculator/Makefile - RubyCalculator/sample.calculator/Makefile - RubyCalculator/sample.calculator.client/Makefile - RubyCalculator/sample.calculator.wsclient/Makefile - PythonCalculator/Makefile - PythonCalculator/sample.calculator/Makefile - PythonCalculator/sample.calculator.client/Makefile - PythonCalculator/sample.calculator.wsclient/Makefile - BigBank/Makefile - BigBank/bigbank.account/Makefile - BigBank/bigbank.client/Makefile - BigBank/bigbank.wsclient/Makefile - BigBank/bigbank.phpwsclient/Makefile - RubyBank/Makefile - RubyBank/bigbank.account/Makefile - RubyBank/bigbank.client/Makefile - ]) -AC_OUTPUT diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.dsp deleted file mode 100644 index afc73a11e9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.dsp +++ /dev/null @@ -1,116 +0,0 @@ -# Microsoft Developer Studio Project File - Name="AccountClient" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=AccountClient - 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 "AccountClient.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 "AccountClient.mak" CFG="AccountClient - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "AccountClient - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "AccountClient - 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)" == "AccountClient - 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 "..\..\..\..\..\BigBank\bigbank.account" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib /nologo /subsystem:console /machine:I386 /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\BigBank\deployclient.bat ..\..\..\..\..\BigBank Release call ..\..\..\..\..\scagen.bat ..\..\..\..\..\BigBank\bigbank.account -# End Special Build Tool - -!ELSEIF "$(CFG)" == "AccountClient - 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 "..\..\..\..\..\BigBank\bigbank.account" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\BigBank\deployclient.bat ..\..\..\..\..\BigBank Debug call ..\..\..\..\..\scagen.bat ..\..\..\..\..\BigBank\bigbank.account -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "AccountClient - Win32 Release" -# Name "AccountClient - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.client\AccountClient.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.client\AccountService.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-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.mak deleted file mode 100644 index 0368231581..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/AccountClient/AccountClient.mak +++ /dev/null @@ -1,214 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on AccountClient.dsp -!IF "$(CFG)" == "" -CFG=AccountClient - Win32 Debug -!MESSAGE No configuration specified. Defaulting to AccountClient - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "AccountClient - Win32 Release" && "$(CFG)" != "AccountClient - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "AccountClient.mak" CFG="AccountClient - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "AccountClient - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "AccountClient - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "AccountClient - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\AccountClient.exe" - - -CLEAN : - -@erase "$(INTDIR)\AccountClient.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\AccountClient.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\BigBank\bigbank.account" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\AccountClient.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\AccountClient.pdb" /machine:I386 /out:"$(OUTDIR)\AccountClient.exe" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -LINK32_OBJS= \ - "$(INTDIR)\AccountClient.obj" - -"$(OUTDIR)\AccountClient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\AccountClient.exe" - call ..\..\..\..\..\BigBank\deployclient.bat ..\..\..\..\..\BigBank Release - call ..\..\..\..\..\scagen.bat ..\..\..\..\..\BigBank\bigbank.account - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "AccountClient - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\AccountClient.exe" - - -CLEAN : - -@erase "$(INTDIR)\AccountClient.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\AccountClient.exe" - -@erase "$(OUTDIR)\AccountClient.ilk" - -@erase "$(OUTDIR)\AccountClient.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\BigBank\bigbank.account" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\AccountClient.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\AccountClient.pdb" /debug /machine:I386 /out:"$(OUTDIR)\AccountClient.exe" /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -LINK32_OBJS= \ - "$(INTDIR)\AccountClient.obj" - -"$(OUTDIR)\AccountClient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\AccountClient.exe" - call ..\..\..\..\..\BigBank\deployclient.bat ..\..\..\..\..\BigBank Debug - call ..\..\..\..\..\scagen.bat ..\..\..\..\..\BigBank\bigbank.account - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("AccountClient.dep") -!INCLUDE "AccountClient.dep" -!ELSE -!MESSAGE Warning: cannot find "AccountClient.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "AccountClient - Win32 Release" || "$(CFG)" == "AccountClient - Win32 Debug" -SOURCE=..\..\..\..\..\BigBank\bigbank.client\AccountClient.cpp - -"$(INTDIR)\AccountClient.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.dsp deleted file mode 100644 index 91b6640c91..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.dsp +++ /dev/null @@ -1,253 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Accounts" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=Accounts - 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 "Accounts.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 "Accounts.mak" CFG="Accounts - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Accounts - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Accounts - 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)" == "Accounts - 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 "ACCOUNTS_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_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 tuscany_sca.lib tuscany_sca_cpp.lib /nologo /dll /machine:I386 /out:"Release/Account.dll" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\BigBank\deploy.bat ..\..\..\..\..\BigBank Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "Accounts - 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 "ACCOUNTS_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib /nologo /dll /debug /machine:I386 /out:"Debug/Account.dll" /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\BigBank\deploy.bat ..\..\..\..\..\BigBank Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "Accounts - Win32 Release" -# Name "Accounts - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl_AccountDataService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl_AccountDataService_Wrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_accountDataService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_AccountService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_AccountService_Wrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_stockQuoteService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_StockQuoteService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_webService_Proxy.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataService.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl_AccountDataService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl_AccountDataService_Wrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountService.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_accountDataService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_AccountService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_AccountService_Wrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_stockQuoteService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteService.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_StockQuoteService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_StockQuoteService_Wrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_webService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteWebService.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" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl.componentType -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountService.wsdl -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl.componentType -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\bigbank.account.composite -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl.componentType -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteTypes.xsd -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteWebService.wsdl -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.mak deleted file mode 100644 index b173c70132..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Accounts/Accounts.mak +++ /dev/null @@ -1,344 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Accounts.dsp -!IF "$(CFG)" == "" -CFG=Accounts - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Accounts - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Accounts - Win32 Release" && "$(CFG)" != "Accounts - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "Accounts.mak" CFG="Accounts - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Accounts - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Accounts - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Accounts - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\Account.dll" - -!ELSE - -ALL : "AccountClient - Win32 Release" "$(OUTDIR)\Account.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"AccountClient - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\AccountDataServiceImpl.obj" - -@erase "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Proxy.obj" - -@erase "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Wrapper.obj" - -@erase "$(INTDIR)\AccountServiceImpl.obj" - -@erase "$(INTDIR)\AccountServiceImpl_accountDataService_Proxy.obj" - -@erase "$(INTDIR)\AccountServiceImpl_AccountService_Proxy.obj" - -@erase "$(INTDIR)\AccountServiceImpl_AccountService_Wrapper.obj" - -@erase "$(INTDIR)\AccountServiceImpl_stockQuoteService_Proxy.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Proxy.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Wrapper.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl_webService_Proxy.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\Account.dll" - -@erase "$(OUTDIR)\Account.exp" - -@erase "$(OUTDIR)\Account.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\Accounts.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\Account.pdb" /machine:I386 /out:"$(OUTDIR)\Account.dll" /implib:"$(OUTDIR)\Account.lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -LINK32_OBJS= \ - "$(INTDIR)\AccountDataServiceImpl.obj" \ - "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Proxy.obj" \ - "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Wrapper.obj" \ - "$(INTDIR)\AccountServiceImpl.obj" \ - "$(INTDIR)\AccountServiceImpl_accountDataService_Proxy.obj" \ - "$(INTDIR)\AccountServiceImpl_AccountService_Proxy.obj" \ - "$(INTDIR)\AccountServiceImpl_AccountService_Wrapper.obj" \ - "$(INTDIR)\AccountServiceImpl_stockQuoteService_Proxy.obj" \ - "$(INTDIR)\StockQuoteServiceImpl.obj" \ - "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Proxy.obj" \ - "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Wrapper.obj" \ - "$(INTDIR)\StockQuoteServiceImpl_webService_Proxy.obj" - -"$(OUTDIR)\Account.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "AccountClient - Win32 Release" "$(OUTDIR)\Account.dll" - call ..\..\..\..\..\BigBank\deploy.bat ..\..\..\..\..\BigBank Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "Accounts - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\Account.dll" - -!ELSE - -ALL : "AccountClient - Win32 Debug" "$(OUTDIR)\Account.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"AccountClient - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\AccountDataServiceImpl.obj" - -@erase "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Proxy.obj" - -@erase "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Wrapper.obj" - -@erase "$(INTDIR)\AccountServiceImpl.obj" - -@erase "$(INTDIR)\AccountServiceImpl_accountDataService_Proxy.obj" - -@erase "$(INTDIR)\AccountServiceImpl_AccountService_Proxy.obj" - -@erase "$(INTDIR)\AccountServiceImpl_AccountService_Wrapper.obj" - -@erase "$(INTDIR)\AccountServiceImpl_stockQuoteService_Proxy.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Proxy.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Wrapper.obj" - -@erase "$(INTDIR)\StockQuoteServiceImpl_webService_Proxy.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\Account.dll" - -@erase "$(OUTDIR)\Account.exp" - -@erase "$(OUTDIR)\Account.ilk" - -@erase "$(OUTDIR)\Account.lib" - -@erase "$(OUTDIR)\Account.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\Accounts.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\Account.pdb" /debug /machine:I386 /out:"$(OUTDIR)\Account.dll" /implib:"$(OUTDIR)\Account.lib" /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" -LINK32_OBJS= \ - "$(INTDIR)\AccountDataServiceImpl.obj" \ - "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Proxy.obj" \ - "$(INTDIR)\AccountDataServiceImpl_AccountDataService_Wrapper.obj" \ - "$(INTDIR)\AccountServiceImpl.obj" \ - "$(INTDIR)\AccountServiceImpl_accountDataService_Proxy.obj" \ - "$(INTDIR)\AccountServiceImpl_AccountService_Proxy.obj" \ - "$(INTDIR)\AccountServiceImpl_AccountService_Wrapper.obj" \ - "$(INTDIR)\AccountServiceImpl_stockQuoteService_Proxy.obj" \ - "$(INTDIR)\StockQuoteServiceImpl.obj" \ - "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Proxy.obj" \ - "$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Wrapper.obj" \ - "$(INTDIR)\StockQuoteServiceImpl_webService_Proxy.obj" - -"$(OUTDIR)\Account.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "AccountClient - Win32 Debug" "$(OUTDIR)\Account.dll" - call ..\..\..\..\..\BigBank\deploy.bat ..\..\..\..\..\BigBank Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Accounts.dep") -!INCLUDE "Accounts.dep" -!ELSE -!MESSAGE Warning: cannot find "Accounts.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Accounts - Win32 Release" || "$(CFG)" == "Accounts - Win32 Debug" -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl.cpp - -"$(INTDIR)\AccountDataServiceImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl_AccountDataService_Proxy.cpp - -"$(INTDIR)\AccountDataServiceImpl_AccountDataService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountDataServiceImpl_AccountDataService_Wrapper.cpp - -"$(INTDIR)\AccountDataServiceImpl_AccountDataService_Wrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl.cpp - -"$(INTDIR)\AccountServiceImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_accountDataService_Proxy.cpp - -"$(INTDIR)\AccountServiceImpl_accountDataService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_AccountService_Proxy.cpp - -"$(INTDIR)\AccountServiceImpl_AccountService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_AccountService_Wrapper.cpp - -"$(INTDIR)\AccountServiceImpl_AccountService_Wrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\AccountServiceImpl_stockQuoteService_Proxy.cpp - -"$(INTDIR)\AccountServiceImpl_stockQuoteService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl.cpp - -"$(INTDIR)\StockQuoteServiceImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_StockQuoteService_Proxy.cpp - -"$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp - -"$(INTDIR)\StockQuoteServiceImpl_StockQuoteService_Wrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.account\StockQuoteServiceImpl_webService_Proxy.cpp - -"$(INTDIR)\StockQuoteServiceImpl_webService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "Accounts - Win32 Release" - -"AccountClient - Win32 Release" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Release" - cd "..\Accounts" - -"AccountClient - Win32 ReleaseCLEAN" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Release" RECURSE=1 CLEAN - cd "..\Accounts" - -!ELSEIF "$(CFG)" == "Accounts - Win32 Debug" - -"AccountClient - Win32 Debug" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Debug" - cd "..\Accounts" - -"AccountClient - Win32 DebugCLEAN" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Debug" RECURSE=1 CLEAN - cd "..\Accounts" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.dsw b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.dsw deleted file mode 100644 index 5771d655c1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.dsw +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "AccountClient"=.\AccountClient\AccountClient.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Accounts"=.\Accounts\Accounts.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name AccountClient - End Project Dependency -}}} - -############################################################################### - -Project: "Build"=.\Build\Build.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name Accounts - End Project Dependency - Begin Project Dependency - Project_Dep_Name AccountClient - End Project Dependency - Begin Project Dependency - Project_Dep_Name WSAccountClient - End Project Dependency -}}} - -############################################################################### - -Project: "WSAccountClient"=.\WSAccountClient\WSAccountClient.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.ncb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.ncb deleted file mode 100644 index e2b54fa05d..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.ncb and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.opt b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.opt deleted file mode 100644 index 3abec54f7b..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/BigBank.opt and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.dsp deleted file mode 100644 index 9a8320cefb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Build" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=Build - 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 "Build.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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - 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)" == "Build - 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)" == "Build - 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 "Build - Win32 Release" -# Name "Build - Win32 Debug" -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.mak deleted file mode 100644 index 452df03c2d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/Build/Build.mak +++ /dev/null @@ -1,152 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Build.dsp -!IF "$(CFG)" == "" -CFG=Build - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Build - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Build - Win32 Release" && "$(CFG)" != "Build - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -OUTDIR=.\Release -INTDIR=.\Release - -!IF "$(RECURSE)" == "0" - -ALL : - -!ELSE - -ALL : "WSAccountClient - Win32 Release" "AccountClient - Win32 Release" "Accounts - Win32 Release" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"Accounts - Win32 ReleaseCLEAN" "AccountClient - Win32 ReleaseCLEAN" "WSAccountClient - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -MTL=midl.exe - -!IF "$(CFG)" == "Build - Win32 Release" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -!ENDIF - -MTL_PROJ= - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Build.dep") -!INCLUDE "Build.dep" -!ELSE -!MESSAGE Warning: cannot find "Build.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Build - Win32 Release" || "$(CFG)" == "Build - Win32 Debug" - -!IF "$(CFG)" == "Build - Win32 Release" - -"Accounts - Win32 Release" : - cd "..\Accounts" - $(MAKE) /$(MAKEFLAGS) /F .\Accounts.mak CFG="Accounts - Win32 Release" - cd "..\Build" - -"Accounts - Win32 ReleaseCLEAN" : - cd "..\Accounts" - $(MAKE) /$(MAKEFLAGS) /F .\Accounts.mak CFG="Accounts - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"Accounts - Win32 Debug" : - cd "..\Accounts" - $(MAKE) /$(MAKEFLAGS) /F .\Accounts.mak CFG="Accounts - Win32 Debug" - cd "..\Build" - -"Accounts - Win32 DebugCLEAN" : - cd "..\Accounts" - $(MAKE) /$(MAKEFLAGS) /F .\Accounts.mak CFG="Accounts - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"AccountClient - Win32 Release" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Release" - cd "..\Build" - -"AccountClient - Win32 ReleaseCLEAN" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"AccountClient - Win32 Debug" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Debug" - cd "..\Build" - -"AccountClient - Win32 DebugCLEAN" : - cd "..\AccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\AccountClient.mak CFG="AccountClient - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"WSAccountClient - Win32 Release" : - cd "..\WSAccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSAccountClient.mak CFG="WSAccountClient - Win32 Release" - cd "..\Build" - -"WSAccountClient - Win32 ReleaseCLEAN" : - cd "..\WSAccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSAccountClient.mak CFG="WSAccountClient - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"WSAccountClient - Win32 Debug" : - cd "..\WSAccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSAccountClient.mak CFG="WSAccountClient - Win32 Debug" - cd "..\Build" - -"WSAccountClient - Win32 DebugCLEAN" : - cd "..\WSAccountClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSAccountClient.mak CFG="WSAccountClient - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.dsp deleted file mode 100644 index 1c240d56d4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.dsp +++ /dev/null @@ -1,120 +0,0 @@ -# Microsoft Developer Studio Project File - Name="WSAccountClient" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=WSAccountClient - 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 "WSAccountClient.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 "WSAccountClient.mak" CFG="WSAccountClient - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "WSAccountClient - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "WSAccountClient - 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)" == "WSAccountClient - 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 "$(AXIS2C_HOME)\include" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /machine:I386 /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(AXIS2C_HOME)/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\BigBank\deploywsclient.bat ..\..\..\..\..\BigBank Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "WSAccountClient - 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 "$(AXIS2C_HOME)\include" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(AXIS2C_HOME)/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\BigBank\deploywsclient.bat ..\..\..\..\..\BigBank Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "WSAccountClient - Win32 Release" -# Name "WSAccountClient - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.wsclient\AccountWSClient.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.wsclient\axis2_Account_stub.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\BigBank\bigbank.wsclient\axis2_Account_stub.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-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.mak deleted file mode 100644 index 9f6881a584..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/WSAccountClient/WSAccountClient.mak +++ /dev/null @@ -1,189 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on WSAccountClient.dsp -!IF "$(CFG)" == "" -CFG=WSAccountClient - Win32 Debug -!MESSAGE No configuration specified. Defaulting to WSAccountClient - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "WSAccountClient - Win32 Release" && "$(CFG)" != "WSAccountClient - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "WSAccountClient.mak" CFG="WSAccountClient - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "WSAccountClient - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "WSAccountClient - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "WSAccountClient - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\WSAccountClient.exe" - - -CLEAN : - -@erase "$(INTDIR)\AccountWSClient.obj" - -@erase "$(INTDIR)\axis2_Account_stub.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\WSAccountClient.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "$(AXIS2C_HOME)\include" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\WSAccountClient.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\WSAccountClient.pdb" /machine:I386 /out:"$(OUTDIR)\WSAccountClient.exe" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(AXIS2C_HOME)/lib" -LINK32_OBJS= \ - "$(INTDIR)\AccountWSClient.obj" \ - "$(INTDIR)\axis2_Account_stub.obj" - -"$(OUTDIR)\WSAccountClient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\WSAccountClient.exe" - call ..\..\..\..\..\BigBank\deploywsclient.bat ..\..\..\..\..\BigBank Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "WSAccountClient - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\WSAccountClient.exe" - - -CLEAN : - -@erase "$(INTDIR)\AccountWSClient.obj" - -@erase "$(INTDIR)\axis2_Account_stub.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\WSAccountClient.exe" - -@erase "$(OUTDIR)\WSAccountClient.ilk" - -@erase "$(OUTDIR)\WSAccountClient.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(AXIS2C_HOME)\include" /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SCACPP)\extensions\cpp\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\WSAccountClient.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\WSAccountClient.pdb" /debug /machine:I386 /out:"$(OUTDIR)\WSAccountClient.exe" /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(AXIS2C_HOME)/lib" -LINK32_OBJS= \ - "$(INTDIR)\AccountWSClient.obj" \ - "$(INTDIR)\axis2_Account_stub.obj" - -"$(OUTDIR)\WSAccountClient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\WSAccountClient.exe" - call ..\..\..\..\..\BigBank\deploywsclient.bat ..\..\..\..\..\BigBank Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("WSAccountClient.dep") -!INCLUDE "WSAccountClient.dep" -!ELSE -!MESSAGE Warning: cannot find "WSAccountClient.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "WSAccountClient - Win32 Release" || "$(CFG)" == "WSAccountClient - Win32 Debug" -SOURCE=..\..\..\..\..\BigBank\bigbank.wsclient\AccountWSClient.cpp - -"$(INTDIR)\AccountWSClient.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\BigBank\bigbank.wsclient\axis2_Account_stub.cpp - -"$(INTDIR)\axis2_Account_stub.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/build.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/build.cmd deleted file mode 100644 index 0cf0ac8e3e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/BigBank/build.cmd +++ /dev/null @@ -1,24 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal -call vcvars32 -cd Build -nmake -f Build.mak CFG="Build - Win32 Release" -cd .. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.dsp deleted file mode 100644 index 9a8320cefb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Build" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=Build - 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 "Build.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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - 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)" == "Build - 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)" == "Build - 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 "Build - Win32 Release" -# Name "Build - Win32 Debug" -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.mak deleted file mode 100644 index 1c01e71a39..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Build/Build.mak +++ /dev/null @@ -1,155 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Build.dsp -!IF "$(CFG)" == "" -CFG=Build - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Build - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Build - Win32 Release" && "$(CFG)" != "Build - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -OUTDIR=.\Release -INTDIR=.\Release - -!IF "$(RECURSE)" == "0" - -ALL : - -!ELSE - -ALL : "WSClient - Win32 Release" "Client - Win32 Release" "Calculator - Win32 Release" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"Calculator - Win32 ReleaseCLEAN" "Client - Win32 ReleaseCLEAN" "WSClient - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -!IF "$(CFG)" == "Build - Win32 Release" - -MTL=midl.exe -MTL_PROJ= - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -MTL=midl.exe -MTL_PROJ= - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Build.dep") -!INCLUDE "Build.dep" -!ELSE -!MESSAGE Warning: cannot find "Build.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Build - Win32 Release" || "$(CFG)" == "Build - Win32 Debug" - -!IF "$(CFG)" == "Build - Win32 Release" - -"Calculator - Win32 Release" : - cd "..\Calculator" - $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Release" - cd "..\Build" - -"Calculator - Win32 ReleaseCLEAN" : - cd "..\Calculator" - $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"Calculator - Win32 Debug" : - cd "..\Calculator" - $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Debug" - cd "..\Build" - -"Calculator - Win32 DebugCLEAN" : - cd "..\Calculator" - $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"Client - Win32 Release" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Release" - cd "..\Build" - -"Client - Win32 ReleaseCLEAN" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"Client - Win32 Debug" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Debug" - cd "..\Build" - -"Client - Win32 DebugCLEAN" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"WSClient - Win32 Release" : - cd "..\WSClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSClient.mak CFG="WSClient - Win32 Release" - cd "..\Build" - -"WSClient - Win32 ReleaseCLEAN" : - cd "..\WSClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSClient.mak CFG="WSClient - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"WSClient - Win32 Debug" : - cd "..\WSClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSClient.mak CFG="WSClient - Win32 Debug" - cd "..\Build" - -"WSClient - Win32 DebugCLEAN" : - cd "..\WSClient" - $(MAKE) /$(MAKEFLAGS) /F .\WSClient.mak CFG="WSClient - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw deleted file mode 100644 index 05f9141d98..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Build"=.\Build\Build.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name Calculator - End Project Dependency - Begin Project Dependency - Project_Dep_Name Client - End Project Dependency - Begin Project Dependency - Project_Dep_Name WSClient - End Project Dependency -}}} - -############################################################################### - -Project: "Calculator"=.\Calculator\Calculator.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name Client - End Project Dependency -}}} - -############################################################################### - -Project: "Client"=.\Client\Client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "WSClient"=.\WSClient\WSClient.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb deleted file mode 100644 index fde3e53f96..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt deleted file mode 100644 index 790ea91cd2..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp deleted file mode 100644 index 2dbc91fcf0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp +++ /dev/null @@ -1,197 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Calculator" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=Calculator - 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 "Calculator.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 "Calculator.mak" CFG="Calculator - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Calculator - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Calculator - 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)" == "Calculator - 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 "CALCULATOR_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_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_cpp.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\Calculator\deploy.bat ..\..\..\..\..\Calculator Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "Calculator - 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 "CALCULATOR_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_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_cpp.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\Calculator\deploy.bat ..\..\..\..\..\Calculator Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "Calculator - Win32 Release" -# Name "Calculator - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_CalculatorService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_CalculatorService_Wrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_divideService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl_DivideService_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl_DivideService_Wrapper.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\Calculator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_CalculatorService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_CalculatorService_Wrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_divideService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\Divide.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl_DivideService_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl_DivideService_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" -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\CalculatorComposite\Calculator.wsdl -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\CalculatorComposite\sca.composite -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\CalculatorSubsystem\sca.subsystem -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\CalculatorComposite\services.xml -# End Source File -# Begin Source File - -SOURCE="..\..\..\..\..\Calculator\CalculatorComposite\Tuscany-model.config" -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak deleted file mode 100644 index c0ecc9fecf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak +++ /dev/null @@ -1,328 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Calculator.dsp -!IF "$(CFG)" == "" -CFG=Calculator - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Calculator - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Calculator - Win32 Release" && "$(CFG)" != "Calculator - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "Calculator.mak" CFG="Calculator - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Calculator - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Calculator - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "Calculator - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\Calculator.dll" - -!ELSE - -ALL : "Client - Win32 Release" "$(OUTDIR)\Calculator.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"Client - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\CalculatorImpl.obj" - -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" - -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" - -@erase "$(INTDIR)\CalculatorImpl_divideService_Proxy.obj" - -@erase "$(INTDIR)\DivideImpl.obj" - -@erase "$(INTDIR)\DivideImpl_DivideService_Proxy.obj" - -@erase "$(INTDIR)\DivideImpl_DivideService_Wrapper.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\Calculator.dll" - -@erase "$(OUTDIR)\Calculator.exp" - -@erase "$(OUTDIR)\Calculator.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\Calculator.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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_cpp.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\Calculator.pdb" /machine:I386 /out:"$(OUTDIR)\Calculator.dll" /implib:"$(OUTDIR)\Calculator.lib" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -LINK32_OBJS= \ - "$(INTDIR)\CalculatorImpl.obj" \ - "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" \ - "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" \ - "$(INTDIR)\CalculatorImpl_divideService_Proxy.obj" \ - "$(INTDIR)\DivideImpl.obj" \ - "$(INTDIR)\DivideImpl_DivideService_Proxy.obj" \ - "$(INTDIR)\DivideImpl_DivideService_Wrapper.obj" - -"$(OUTDIR)\Calculator.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "Client - Win32 Release" "$(OUTDIR)\Calculator.dll" - call ..\..\..\..\..\Calculator\deploy.bat ..\..\..\..\..\Calculator Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "Calculator - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\Calculator.dll" - -!ELSE - -ALL : "Client - Win32 Debug" "$(OUTDIR)\Calculator.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"Client - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\CalculatorImpl.obj" - -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" - -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" - -@erase "$(INTDIR)\CalculatorImpl_divideService_Proxy.obj" - -@erase "$(INTDIR)\DivideImpl.obj" - -@erase "$(INTDIR)\DivideImpl_DivideService_Proxy.obj" - -@erase "$(INTDIR)\DivideImpl_DivideService_Wrapper.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\Calculator.dll" - -@erase "$(OUTDIR)\Calculator.exp" - -@erase "$(OUTDIR)\Calculator.ilk" - -@erase "$(OUTDIR)\Calculator.lib" - -@erase "$(OUTDIR)\Calculator.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\Calculator.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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_cpp.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\Calculator.pdb" /debug /machine:I386 /out:"$(OUTDIR)\Calculator.dll" /implib:"$(OUTDIR)\Calculator.lib" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -LINK32_OBJS= \ - "$(INTDIR)\CalculatorImpl.obj" \ - "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" \ - "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" \ - "$(INTDIR)\CalculatorImpl_divideService_Proxy.obj" \ - "$(INTDIR)\DivideImpl.obj" \ - "$(INTDIR)\DivideImpl_DivideService_Proxy.obj" \ - "$(INTDIR)\DivideImpl_DivideService_Wrapper.obj" - -"$(OUTDIR)\Calculator.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "Client - Win32 Debug" "$(OUTDIR)\Calculator.dll" - call ..\..\..\..\..\Calculator\deploy.bat ..\..\..\..\..\Calculator Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Calculator.dep") -!INCLUDE "Calculator.dep" -!ELSE -!MESSAGE Warning: cannot find "Calculator.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Calculator - Win32 Release" || "$(CFG)" == "Calculator - Win32 Debug" -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl.cpp - -"$(INTDIR)\CalculatorImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_CalculatorService_Proxy.cpp - -"$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_CalculatorService_Wrapper.cpp - -"$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\CalculatorImpl_divideService_Proxy.cpp - -"$(INTDIR)\CalculatorImpl_divideService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl.cpp - -"$(INTDIR)\DivideImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl_DivideService_Proxy.cpp - -"$(INTDIR)\DivideImpl_DivideService_Proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator\DivideImpl_DivideService_Wrapper.cpp - -"$(INTDIR)\DivideImpl_DivideService_Wrapper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "Calculator - Win32 Release" - -"Client - Win32 Release" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Release" - cd "..\Calculator" - -"Client - Win32 ReleaseCLEAN" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Release" RECURSE=1 CLEAN - cd "..\Calculator" - -!ELSEIF "$(CFG)" == "Calculator - Win32 Debug" - -"Client - Win32 Debug" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Debug" - cd "..\Calculator" - -"Client - Win32 DebugCLEAN" : - cd "..\Client" - $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Debug" RECURSE=1 CLEAN - cd "..\Calculator" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp deleted file mode 100644 index 2efa614a43..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp +++ /dev/null @@ -1,113 +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 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 "..\..\..\..\..\Calculator\sample.calculator" /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib /nologo /subsystem:console /machine:I386 /out:"Release/calculator_client.exe" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\Calculator\deployclient.bat ..\..\..\..\..\Calculator Release call ..\..\..\..\..\scagen.bat ..\..\..\..\..\Calculator\sample.calculator -# End Special Build Tool - -!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 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 "..\..\..\..\..\Calculator\sample.calculator" /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /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_sdo.lib tuscany_sca.lib tuscany_sca_cpp.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/calculator_client.exe" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\Calculator\deployclient.bat ..\..\..\..\..\Calculator Debug call ..\..\..\..\..\scagen.bat ..\..\..\..\..\Calculator\sample.calculator -# End Special Build Tool - -!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=..\..\..\..\..\Calculator\sample.calculator.client\CalculatorClient.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# 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-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak deleted file mode 100644 index cef2af3f3f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak +++ /dev/null @@ -1,214 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Client.dsp -!IF "$(CFG)" == "" -CFG=Client - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Client - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Client - Win32 Release" && "$(CFG)" != "Client - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "Client - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\calculator_client.exe" - - -CLEAN : - -@erase "$(INTDIR)\CalculatorClient.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\calculator_client.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\Calculator\sample.calculator" /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\Client.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\calculator_client.pdb" /machine:I386 /out:"$(OUTDIR)\calculator_client.exe" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -LINK32_OBJS= \ - "$(INTDIR)\CalculatorClient.obj" - -"$(OUTDIR)\calculator_client.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\calculator_client.exe" - call ..\..\..\..\..\Calculator\deployclient.bat ..\..\..\..\..\Calculator Release - call ..\..\..\..\..\scagen.bat ..\..\..\..\..\Calculator\sample.calculator - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "Client - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\calculator_client.exe" - - -CLEAN : - -@erase "$(INTDIR)\CalculatorClient.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\calculator_client.exe" - -@erase "$(OUTDIR)\calculator_client.ilk" - -@erase "$(OUTDIR)\calculator_client.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\Calculator\sample.calculator" /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /I "$(TUSCANY_SCACPP)/extensions/cpp/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\Client.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 tuscany_sca_cpp.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\calculator_client.pdb" /debug /machine:I386 /out:"$(OUTDIR)\calculator_client.exe" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SCACPP)/extensions/cpp/lib" -LINK32_OBJS= \ - "$(INTDIR)\CalculatorClient.obj" - -"$(OUTDIR)\calculator_client.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\calculator_client.exe" - call ..\..\..\..\..\Calculator\deployclient.bat ..\..\..\..\..\Calculator Debug - call ..\..\..\..\..\scagen.bat ..\..\..\..\..\Calculator\sample.calculator - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Client.dep") -!INCLUDE "Client.dep" -!ELSE -!MESSAGE Warning: cannot find "Client.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Client - Win32 Release" || "$(CFG)" == "Client - Win32 Debug" -SOURCE=..\..\..\..\..\Calculator\sample.calculator.client\CalculatorClient.cpp - -"$(INTDIR)\CalculatorClient.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp deleted file mode 100644 index 0c5c7f825e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp +++ /dev/null @@ -1,120 +0,0 @@ -# Microsoft Developer Studio Project File - Name="WSClient" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=WSClient - 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 "WSClient.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 "WSClient.mak" CFG="WSClient - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "WSClient - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "WSClient - 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)" == "WSClient - 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 /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /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_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /machine:I386 /out:"Release/calculator_wsclient.exe" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\Calculator\deploywsclient.bat ..\..\..\..\..\Calculator Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "WSClient - 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 /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /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_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/calculator_wsclient.exe" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=call ..\..\..\..\..\Calculator\deploywsclient.bat ..\..\..\..\..\Calculator Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "WSClient - Win32 Release" -# Name "WSClient - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator.wsclient\axis2_Calculator_stub.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator.wsclient\CalculatorWSClient.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\Calculator\sample.calculator.wsclient\axis2_Calculator_stub.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-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak deleted file mode 100644 index 366db95229..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak +++ /dev/null @@ -1,222 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on WSClient.dsp -!IF "$(CFG)" == "" -CFG=WSClient - Win32 Debug -!MESSAGE No configuration specified. Defaulting to WSClient - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "WSClient - Win32 Release" && "$(CFG)" != "WSClient - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "WSClient.mak" CFG="WSClient - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "WSClient - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "WSClient - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "WSClient - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\calculator_wsclient.exe" - - -CLEAN : - -@erase "$(INTDIR)\axis2_Calculator_stub.obj" - -@erase "$(INTDIR)\CalculatorWSClient.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\calculator_wsclient.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\WSClient.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\calculator_wsclient.pdb" /machine:I386 /out:"$(OUTDIR)\calculator_wsclient.exe" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\axis2_Calculator_stub.obj" \ - "$(INTDIR)\CalculatorWSClient.obj" - -"$(OUTDIR)\calculator_wsclient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\calculator_wsclient.exe" - call ..\..\..\..\..\Calculator\deploywsclient.bat ..\..\..\..\..\Calculator Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "WSClient - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\calculator_wsclient.exe" - - -CLEAN : - -@erase "$(INTDIR)\axis2_Calculator_stub.obj" - -@erase "$(INTDIR)\CalculatorWSClient.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\calculator_wsclient.exe" - -@erase "$(OUTDIR)\calculator_wsclient.ilk" - -@erase "$(OUTDIR)\calculator_wsclient.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\WSClient.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\calculator_wsclient.pdb" /debug /machine:I386 /out:"$(OUTDIR)\calculator_wsclient.exe" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\axis2_Calculator_stub.obj" \ - "$(INTDIR)\CalculatorWSClient.obj" - -"$(OUTDIR)\calculator_wsclient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\calculator_wsclient.exe" - call ..\..\..\..\..\Calculator\deploywsclient.bat ..\..\..\..\..\Calculator Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("WSClient.dep") -!INCLUDE "WSClient.dep" -!ELSE -!MESSAGE Warning: cannot find "WSClient.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "WSClient - Win32 Release" || "$(CFG)" == "WSClient - Win32 Debug" -SOURCE=..\..\..\..\..\Calculator\sample.calculator.wsclient\axis2_Calculator_stub.cpp - -"$(INTDIR)\axis2_Calculator_stub.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\Calculator\sample.calculator.wsclient\CalculatorWSClient.cpp - -"$(INTDIR)\CalculatorWSClient.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/build.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/build.cmd deleted file mode 100644 index 0cf0ac8e3e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/build.cmd +++ /dev/null @@ -1,24 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal -call vcvars32 -cd Build -nmake -f Build.mak CFG="Build - Win32 Release" -cd .. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd deleted file mode 100644 index 6e956aa4e6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd +++ /dev/null @@ -1,73 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA Calculator sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - - -set deploydir=%TUSCANY_SCACPP%\deploy -set samplesdir=%deploydir%\samples -set calcdir=%samplesdir%\Calculator -set calcdeploydir=%calcdir%\deploy - -if not exist %deploydir% mkdir %deploydir% -if not exist %samplesir% mkdir %samplesir% -if not exist %calcdir% mkdir %calcdir% -if not exist %calcdeploydir% mkdir %calcdeploydir% - -if not exist %destinationPath%\packages mkdir %destinationPath%\packages -if not exist %destinationPath%\packages\CalculatorComposite mkdir %destinationPath%\packages\CalculatorComposite - -copy %sourcePath%\CalculatorComposite\*.componentType %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\*.composite %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\Calculator.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\CalculatorImpl.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\DivideService.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\DivideServiceImpl.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\Calculator.wsdl %destinationPath%\packages\CalculatorComposite -copy %currentPath%\Calculator\%buildMode%\CalculatorComposite.dll %destinationPath%\packages\CalculatorComposite - -if not exist %destinationPath%\bin mkdir %destinationPath%\bin -copy %currentPath%\Client\%buildMode%\Client.exe %destinationPath%\bin -if %buildMode% == Debug ( -copy %currentPath%\Client\%buildMode%\Client.pdb %destinationPath%\bin -) -copy %sourcePath%\Client\runclient.cmd %destinationPath%\bin - - -if not exist %destinationPath%\configuration mkdir %destinationPath%\configuration -if not exist %destinationPath%\configuration\CalculatorSubsystem mkdir %destinationPath%\configuration\CalculatorSubsystem - -copy %sourcePath%\CalculatorSubsystem\*.composite %destinationPath%\configuration\CalculatorSubsystem - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd deleted file mode 100644 index 5c4f5fac71..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd +++ /dev/null @@ -1,64 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set currentPath=%~d0%~p0 -set sourcePath=%currentPath%..\..\..\..\Calculator - -set buildMode=Release -if .Debug == .%1 ( -set buildMode=Debug -) - - -if . == %2. ( -set destinationPath=%sourcePath%\deploy -) ELSE ( -set destinationPath=%2 -) - - -if not exist %destinationPath%\packages mkdir %destinationPath%\packages -if not exist %destinationPath%\packages\CalculatorComposite mkdir %destinationPath%\packages\CalculatorComposite - -copy %sourcePath%\CalculatorComposite\*.componentType %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\*.composite %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\Calculator.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\CalculatorImpl.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\DivideService.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\DivideServiceImpl.h %destinationPath%\packages\CalculatorComposite -copy %sourcePath%\CalculatorComposite\Calculator.wsdl %destinationPath%\packages\CalculatorComposite -copy %currentPath%\Calculator\%buildMode%\CalculatorComposite.dll %destinationPath%\packages\CalculatorComposite - -if not exist %destinationPath%\bin mkdir %destinationPath%\bin -copy %currentPath%\WSClient\%buildMode%\WSClient.exe %destinationPath%\bin -if %buildMode% == Debug ( -copy %currentPath%\WSClient\%buildMode%\WSClient.pdb %destinationPath%\bin -) -copy %sourcePath%\WSClient\runwsclient.cmd %destinationPath%\bin - - -if not exist %destinationPath%\configuration mkdir %destinationPath%\configuration -if not exist %destinationPath%\configuration\CalculatorSubsystem mkdir %destinationPath%\configuration\CalculatorSubsystem - -copy %sourcePath%\CalculatorSubsystem\*.composite %destinationPath%\configuration\CalculatorSubsystem - - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/AccountClient/AccountClient.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/AccountClient/AccountClient.vcproj deleted file mode 100644 index bf9e9aa352..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/AccountClient/AccountClient.vcproj +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/Accounts/Accounts.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/Accounts/Accounts.vcproj deleted file mode 100644 index dbeb962b36..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/Accounts/Accounts.vcproj +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/BigBank.sln b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/BigBank.sln deleted file mode 100644 index 26a497d219..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/BigBank.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AccountClient", "AccountClient\AccountClient.vcproj", "{297C9F3A-EDB1-4EA1-86ED-473B0863B996}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Accounts", "Accounts\Accounts.vcproj", "{87372DC7-582B-46C6-AA0F-960A47972503}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WSAccountClient", "WSAccountClient\WSAccountClient.vcproj", "{E7F4DDEC-6592-434B-B5D6-4E538298C898}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {297C9F3A-EDB1-4EA1-86ED-473B0863B996}.Debug.ActiveCfg = Debug|Win32 - {297C9F3A-EDB1-4EA1-86ED-473B0863B996}.Debug.Build.0 = Debug|Win32 - {297C9F3A-EDB1-4EA1-86ED-473B0863B996}.Release.ActiveCfg = Release|Win32 - {297C9F3A-EDB1-4EA1-86ED-473B0863B996}.Release.Build.0 = Release|Win32 - {87372DC7-582B-46C6-AA0F-960A47972503}.Debug.ActiveCfg = Debug|Win32 - {87372DC7-582B-46C6-AA0F-960A47972503}.Debug.Build.0 = Debug|Win32 - {87372DC7-582B-46C6-AA0F-960A47972503}.Release.ActiveCfg = Release|Win32 - {87372DC7-582B-46C6-AA0F-960A47972503}.Release.Build.0 = Release|Win32 - {E7F4DDEC-6592-434B-B5D6-4E538298C898}.Debug.ActiveCfg = Debug|Win32 - {E7F4DDEC-6592-434B-B5D6-4E538298C898}.Debug.Build.0 = Debug|Win32 - {E7F4DDEC-6592-434B-B5D6-4E538298C898}.Release.ActiveCfg = Release|Win32 - {E7F4DDEC-6592-434B-B5D6-4E538298C898}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/WSAccountClient/WSAccountClient.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/WSAccountClient/WSAccountClient.vcproj deleted file mode 100644 index ad6e7bfa89..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/BigBank/WSAccountClient/WSAccountClient.vcproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln deleted file mode 100644 index 271c1ae327..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln +++ /dev/null @@ -1,39 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Calculator", "Calculator\Calculator.vcproj", "{B1C1917A-4423-456D-9F68-3C600C885A1F}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Client", "Client\Client.vcproj", "{CA2CB545-D0E2-416C-BE93-90BC4DD82B90}" - ProjectSection(ProjectDependencies) = postProject - {B1C1917A-4423-456D-9F68-3C600C885A1F} = {B1C1917A-4423-456D-9F68-3C600C885A1F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WSClient", "WSClient\WSClient.vcproj", "{3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}" - ProjectSection(ProjectDependencies) = postProject - {B1C1917A-4423-456D-9F68-3C600C885A1F} = {B1C1917A-4423-456D-9F68-3C600C885A1F} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {B1C1917A-4423-456D-9F68-3C600C885A1F}.Debug.ActiveCfg = Debug|Win32 - {B1C1917A-4423-456D-9F68-3C600C885A1F}.Debug.Build.0 = Debug|Win32 - {B1C1917A-4423-456D-9F68-3C600C885A1F}.Release.ActiveCfg = Release|Win32 - {B1C1917A-4423-456D-9F68-3C600C885A1F}.Release.Build.0 = Release|Win32 - {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Debug.ActiveCfg = Debug|Win32 - {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Debug.Build.0 = Debug|Win32 - {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Release.ActiveCfg = Release|Win32 - {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Release.Build.0 = Release|Win32 - {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Debug.ActiveCfg = Debug|Win32 - {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Debug.Build.0 = Debug|Win32 - {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Release.ActiveCfg = Release|Win32 - {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo deleted file mode 100644 index 99ec75542f..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj deleted file mode 100644 index a2b02ca4d9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj deleted file mode 100644 index a53a3eccf3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj deleted file mode 100644 index 8427616332..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/scagen.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/samples/scagen.bat deleted file mode 100644 index a717341086..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/samples/scagen.bat +++ /dev/null @@ -1,37 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA Calculator sample. - -setlocal - -if . == .%1 ( -echo source path not specified -goto usage -) -set srcdir=%1 - -%TUSCANY_SCACPP%\bin\scagen.cmd -dir %srcdir% -output %srcdir% -verbose - -goto end -:usage -echo Usage: scagen -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/scatest.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/scatest.bat deleted file mode 100644 index d749d5e084..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/scatest.bat +++ /dev/null @@ -1,47 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -@setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -set TUSCANY_SCACPP=%cd%\deploy -) -echo using TUSCANY_SCACPP: %TUSCANY_SCACPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C: %AXIS2C_HOME%" - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using TUSCANY_SDOCPP: %TUSCANY_SDOCPP% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%cd%\projects\tuscany_sca\tuscany_sca_test\testSCASystem -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd projects\tuscany_sca\tuscany_sca_test -Release\tuscany_sca_test -:end -@endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/scatest.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/scatest.sh deleted file mode 100755 index 45d5367550..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/scatest.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -SCA4CPP_HOME=`pwd` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_ROOT=$SCA4CPP_HOME/runtime/core/test - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT - -if [ `uname -s` = Darwin ] -then - export DYLD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$DYLD_LIBRARY_PATH -else - export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH -fi - -cd $TUSCANY_SCACPP/bin/test -./tuscany_sca_test diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/AUTHORS b/tags/cpp-1.0-incubating-M2-RC3/sca/test/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/COPYING b/tags/cpp-1.0-incubating-M2-RC3/sca/test/COPYING deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/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-1.0-incubating-M2-RC3/sca/test/ChangeLog b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/INSTALL b/tags/cpp-1.0-incubating-M2-RC3/sca/test/INSTALL deleted file mode 100644 index b8a53409ed..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/INSTALL +++ /dev/null @@ -1,10 +0,0 @@ -Building and installing the Tuscany SCA for C++ tests ------------------------------------------------------ - -Run the following commands from the tuscany/cpp/sca directory: - -./autogen.sh -./build.sh - -The deployed tests should be in tuscany/cpp/sca/deploy/test - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/LICENSE b/tags/cpp-1.0-incubating-M2-RC3/sca/test/LICENSE deleted file mode 100755 index f433b1a53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/LICENSE +++ /dev/null @@ -1,177 +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 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/test/Makefile.am deleted file mode 100644 index 24292e8033..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = ws.service.interop diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/NEWS b/tags/cpp-1.0-incubating-M2-RC3/sca/test/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/NOTICE b/tags/cpp-1.0-incubating-M2-RC3/sca/test/NOTICE deleted file mode 100644 index bfb81409ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/README b/tags/cpp-1.0-incubating-M2-RC3/sca/test/README deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c deleted file mode 100644 index 115858f09a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 -#include -#include -#include -#include - -axiom_node_t * -build_om_payload_for_WSEntryPointTestRPC_svc(axis2_env_t *env); - - -int main(int argc, char** argv) -{ - axis2_env_t *env = NULL; - axis2_char_t *address = NULL; - axis2_endpoint_ref_t* endpoint_ref = NULL; - axis2_options_t *options = NULL; - axis2_char_t *client_home = NULL; - axis2_svc_client_t* svc_client = NULL; - axiom_node_t *payload = NULL; - axiom_node_t *ret_node = NULL; - - /* Set up the envioronment */ - env = axis2_env_create_all("wsentrypointtestrpc.log", AXIS2_LOG_LEVEL_TRACE); - - /* Set end point reference of echo service */ - address = "http://localhost:9090/axis2/services/WSEntryPointTestRPC"; - if (argc > 1 ) - address = argv[1]; - if (AXIS2_STRCMP(address, "-h") == 0) - { - printf("Usage : %s [endpoint_url]\n", argv[0]); - printf("use -h for help\n"); - return 0; - } - printf ("Using endpoint : %s\n", address); - - /* Create EPR with given address */ - endpoint_ref = axis2_endpoint_ref_create(env, address); - - /* Setup options */ - options = axis2_options_create(env); - AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); - AXIS2_OPTIONS_SET_ACTION(options, env, - "http://www.WSEntryPointTest.org/WSEntryPointTestRPC/doString"); - - /* Set up deploy folder. It is from the deploy folder, the configuration is picked up - * using the axis2.xml file. - * In this sample client_home points to the Axis2/C default deploy folder. The client_home can - * be different from this folder on your system. For example, you may have a different folder - * (say, my_client_folder) with its own axis2.xml file. my_client_folder/packages will have the - * composites that the client uses - */ - client_home = AXIS2_GETENV("AXIS2C_HOME"); - if (!client_home) - { - printf("Please ensure AXIS2C_HOME is set as an env variable\n"); - return 0; - } - - /* Create service client */ - svc_client = axis2_svc_client_create(env, client_home); - if (!svc_client) - { - printf("Error creating service client\n"); - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - } - - /* Set service client options */ - AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, &env, options); - - /* Engage addressing composite */ - AXIS2_SVC_CLIENT_ENGAGE_COMPOSITE(svc_client, &env, AXIS2_COMPOSITE_ADDRESSING); - - /* Build the SOAP request message payload using OM API.*/ - payload = build_om_payload_for_WSEntryPointTestRPC_svc(env); - - /* Send request */ - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); - - if(ret_node) - { - axis2_char_t *om_str = NULL; - om_str = AXIOM_NODE_TO_STRING(ret_node, env); - if (om_str) - printf("\nReceived OM : %s\n", om_str); - printf("\nWSEntryPointTestRPC client invoke SUCCESSFUL!\n"); - } - else - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - printf("WSEntryPointTestRPC client invoke FAILED!\n"); - } - - if (svc_client) - { - AXIS2_SVC_CLIENT_FREE(svc_client, env); - svc_client = NULL; - } - if (endpoint_ref) - { - AXIS2_ENDPOINT_REF_FREE(endpoint_ref, &env); - endpoint_ref = NULL; - } - return 0; -} - -/* build SOAP request message content using OM */ -axiom_node_t * -build_om_payload_for_WSEntryPointTestRPC_svc(axis2_env_t *env) -{ - axiom_node_t* req_om_node = NULL; - axiom_element_t* req_om_elem = NULL; - axiom_node_t* param_om_node = NULL; - axiom_element_t* param_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTestRPC/", "ns1"); - req_om_elem = axiom_element_create(env, NULL, "doString", ns1, &req_om_node); - param_om_elem = axiom_element_create(env, req_om_node, "doStringRequest", ns1, ¶m_om_node); - AXIOM_ELEMENT_SET_TEXT(param_om_elem, env, "WSEntryPointTestRPC Client Call", param_om_node); - - om_str = AXIOM_NODE_TO_STRING(req_om_node, env); - if (om_str) - printf("\nSending OM : %s\n", om_str); - - return req_om_node; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj deleted file mode 100644 index 5c48a3a683..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h deleted file mode 100644 index c804494b46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h +++ /dev/null @@ -1,30 +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 WSEENTRYPOINTTESTRPC_H -#define WSEENTRYPOINTTESTRPC_H -class WSCompositeServiceTestRPC -{ -public: - virtual char* doString(char* arg1) = 0; -}; - -#endif - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl deleted file mode 100644 index 1706534042..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCComposite.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCComposite.vcproj deleted file mode 100644 index f82221700b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCComposite.vcproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType deleted file mode 100644 index 15287150e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.cpp deleted file mode 100644 index e2ca28345d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.cpp +++ /dev/null @@ -1,38 +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 "WSCompositeServiceTestRPCImpl.h" -#include - -WSCompositeServiceTestRPCImpl::WSCompositeServiceTestRPCImpl() -{ -} - -WSCompositeServiceTestRPCImpl::~WSCompositeServiceTestRPCImpl() -{ -} - -// WSCompositeServiceTestRPC interface -char* WSCompositeServiceTestRPCImpl::doString(char* arg1) -{ - printf("WSCompositeServiceTestRPCImpl::doString %s\n", arg1); - - return "WSCompositeServiceTestRPCImpl::doString response"; -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h deleted file mode 100644 index 7d3b355b8a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h +++ /dev/null @@ -1,36 +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 WSEENTRYPOINTTESTRPCIMPL_H -#define WSEENTRYPOINTTESTRPCIMPL_H - -#include "WSCompositeServiceTestRPC.h" - -class WSCompositeServiceTestRPCImpl : public WSCompositeServiceTestRPC -{ -public: - WSCompositeServiceTestRPCImpl(); - virtual ~WSCompositeServiceTestRPCImpl(); - - // WSCompositeServiceTestRPC interface - virtual char* doString(char* arg1); -}; - -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp deleted file mode 100644 index f38fd95c79..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp +++ /dev/null @@ -1,63 +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 "WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_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 - WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy* WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy_Factory(ServiceWrapper* target) - { - return new WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy(target); - } - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - void WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy_Destructor(void* proxy) - { - delete (WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy*)proxy; - } -} - -WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy::WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy(ServiceWrapper* targ) : target(targ) -{ -} - -WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy::~WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy() -{ - if (target) - delete target; -} - -char* WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy::doString( char* arg0) -{ - Operation operation("doString"); - operation.addParameter(&arg0); - char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h deleted file mode 100644 index a2da07322c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_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 WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy_h -#define WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy_h - -#include "WSCompositeServiceTestRPC.h" -#include "tuscany/sca/core/ServiceWrapper.h" - -class WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy : public WSCompositeServiceTestRPC -{ -public: - WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy(tuscany::sca::ServiceWrapper*); - virtual ~WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy(); - virtual char* doString( char* arg1); -private: - tuscany::sca::ServiceWrapper* target; -}; - -#endif // WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Proxy_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp deleted file mode 100644 index 93f6cf7a28..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp +++ /dev/null @@ -1,70 +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 "WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_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 - WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper* WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper_Factory(tuscany::sca::model::Service* target) - { - return new WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper(target); - } -} - -WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper::WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper(Service* target) : CPPServiceWrapper(target) -{ - impl = (WSCompositeServiceTestRPCImpl*)getImplementation(); -} - -WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper::~WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper() -{ - releaseImplementation(); -} - -void* WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper::newImplementation() -{ - return new WSCompositeServiceTestRPCImpl; -} - -void WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper::deleteImplementation() -{ - delete impl; -} - -void WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper::invokeService(Operation& operation) -{ - const string& operationName = operation.getName(); - - if (operationName == "doString") - { - char* p0 = *( char**)operation.getParameterValue(0); - *(char**)operation.getReturnValue() = impl->doString(p0); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h deleted file mode 100644 index 3f7b011749..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_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 WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper_h -#define WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper_h - -#include "WSCompositeServiceTestRPCImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -public: - WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper(tuscany::sca::model::Service* target); - virtual ~WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper(); - virtual void invokeService(tuscany::sca::Operation& operation); - virtual void* newImplementation(); - virtual void deleteImplementation(); -private: - WSCompositeServiceTestRPCImpl* impl; -}; - -#endif // WSCompositeServiceTestRPCImpl_WSCompositeServiceTestRPCService_Wrapper_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/sca.composite deleted file mode 100644 index f454a5bde0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/sca.composite +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - WSEntryPointTestRPCServiceComponent - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/services.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/services.xml deleted file mode 100644 index 2fd4580526..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCComposite/services.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - tuscany_sca - D:/tuscany/cpp/sca/test/WSEntryPointTestRPC/runtime - WSEntryPointTestRPCSubsystem/WSEntryPointTestRPCService/WSEntryPointTestRPCEntrypoint - - - This is a testing service , to test the system is working or not - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem deleted file mode 100644 index 91d3105f5b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/configuration/WSEntryPointTestRPCSubsystem/sca.subsystem b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/configuration/WSEntryPointTestRPCSubsystem/sca.subsystem deleted file mode 100644 index 91d3105f5b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/configuration/WSEntryPointTestRPCSubsystem/sca.subsystem +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h deleted file mode 100644 index c804494b46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.h +++ /dev/null @@ -1,30 +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 WSEENTRYPOINTTESTRPC_H -#define WSEENTRYPOINTTESTRPC_H -class WSCompositeServiceTestRPC -{ -public: - virtual char* doString(char* arg1) = 0; -}; - -#endif - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl deleted file mode 100644 index 1706534042..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPC.wsdl +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType deleted file mode 100644 index 15287150e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.componentType +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h deleted file mode 100644 index 7d3b355b8a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/WSEntryPointTestRPCImpl.h +++ /dev/null @@ -1,36 +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 WSEENTRYPOINTTESTRPCIMPL_H -#define WSEENTRYPOINTTESTRPCIMPL_H - -#include "WSCompositeServiceTestRPC.h" - -class WSCompositeServiceTestRPCImpl : public WSCompositeServiceTestRPC -{ -public: - WSCompositeServiceTestRPCImpl(); - virtual ~WSCompositeServiceTestRPCImpl(); - - // WSCompositeServiceTestRPC interface - virtual char* doString(char* arg1); -}; - -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/sca.composite deleted file mode 100644 index f454a5bde0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/WSEntryPointTestRPC/runtime/packages/WSEntryPointTestRPCComposite/sca.composite +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - WSEntryPointTestRPCServiceComponent - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/autogen.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/test/autogen.sh deleted file mode 100755 index af38864985..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/autogen.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -for i in "libtoolize --force" 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-1.0-incubating-M2-RC3/sca/test/build.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/test/build.sh deleted file mode 100755 index 7a3c439e8b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/build.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -./configure --prefix=${TUSCANY_SCACPP} --enable-static=no -make -make install - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/configure.ac b/tags/cpp-1.0-incubating-M2-RC3/sca/test/configure.ac deleted file mode 100644 index f84c32ab1e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/configure.ac +++ /dev/null @@ -1,34 +0,0 @@ -dnl run autogen.sh to generate the configure script. - -AC_PREREQ(2.59) -AC_INIT(tuscany_sca_tests, 0.1.incubating-M1) -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AC_PREFIX_DEFAULT(/usr/local/tuscany/sca/test) - -# 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 - -# Check for dynamic library suffixes -AC_MSG_CHECKING([checking for dynamic library suffix]) -AC_CHECK_HEADER([sys/appleapiopts.h], - [AC_SUBST([libsuffix],[".dylib"]) AC_MSG_RESULT([using .dylib])], - [AC_SUBST([libsuffix],[".so"]) AC_MSG_RESULT([using .so])] -) - - -AC_CONFIG_FILES([Makefile - ws.service.interop/Makefile - ws.service.interop/resources/Makefile - ws.service.interop/ws.service.interop/Makefile - ws.service.interop/ws.service.interop.client/Makefile - ]) -AC_OUTPUT - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/deploy.cmd deleted file mode 100644 index d6d0c72cb9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/deploy.cmd +++ /dev/null @@ -1,57 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set currentPath=%~d0%~p0 -set sourcePath=%currentPath% - - -set destinationPath=%sourcePath%\deploy - -if not exist %destinationPath%\packages mkdir %destinationPath%\packages -if not exist %destinationPath%\packages\ws.binding.service mkdir %destinationPath%\packages\ws.binding.service - -copy %sourcePath%\ws.binding.service\TestImpl.componentType %destinationPath%\packages\ws.binding.service -copy %sourcePath%\ws.binding.service\ws.binding.service.composite %destinationPath%\packages\ws.binding.service -copy %sourcePath%\ws.binding.service\Test.h %destinationPath%\packages\ws.binding.service -copy %sourcePath%\ws.binding.service\TestImpl.h %destinationPath%\packages\ws.binding.service -copy %sourcePath%\ws.binding.service\Test.wsdl %destinationPath%\packages\ws.binding.service -copy %sourcePath%\ws.binding.service\Debug\ws.binding.service.dll %destinationPath%\packages\ws.binding.service - -if not exist %destinationPath%\bin mkdir %destinationPath%\bin -copy %sourcePath%\ws.binding.service.client\Debug\ws.binding.service.client.exe %destinationPath%\bin -copy %sourcePath%\ws.binding.service.client\Debug\ws.binding.service.client.pdb %destinationPath%\bin -copy %sourcePath%\ws.binding.service.client\runclient.bat %destinationPath%\bin - - -if not exist %destinationPath%\configuration mkdir %destinationPath%\configuration -if not exist %destinationPath%\configuration\ws.binding.service.solution mkdir %destinationPath%\configuration\ws.binding.service.solution - -copy %sourcePath%\ws.binding.service\ws.binding.service.solution.composite %destinationPath%\configuration\ws.binding.service.solution - - -if not exist %AXIS2C_HOME%\services\ws.binding.service mkdir %AXIS2C_HOME%\services\ws.binding.service - -copy %sourcePath%\ws.binding.service\services.xml %AXIS2C_HOME%\services\ws.binding.service -copy %TUSCANY_SCACPP%\extensions\ws\service\bin\tuscany_sca_ws_service.dll %AXIS2C_HOME%\services\ws.binding.service - - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/TestClient.c b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/TestClient.c deleted file mode 100644 index bb728dc916..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/TestClient.c +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 -#include -#include -#include -#include - -axiom_node_t * -build_om_payload_for_doDataObject(axis2_env_t *env); - -axiom_node_t * -build_om_payload_for_doDataObject_Failure(axis2_env_t *env); - -axiom_node_t * -build_om_payload_for_doAny(axis2_env_t *env); - -axiom_node_t * -build_om_payload_for_doMixed(axis2_env_t *env); - -axiom_node_t * -build_om_payload_for_doSingleData(axis2_env_t *env, char* name, char* data); - -void runCall(axis2_env_t* env, char* endpoint, char* opName, axiom_node_t* payload, int expectFailure); - -int main(int argc, char** argv) -{ - axis2_env_t *env = NULL; - axis2_char_t *address = NULL; - axis2_endpoint_ref_t* endpoint_ref = NULL; - axis2_options_t *options = NULL; - axis2_char_t *client_home = NULL; - axis2_svc_client_t* svc_client = NULL; - axiom_node_t *payload = NULL; - axiom_node_t *ret_node = NULL; - - /* Set up the envioronment */ - env = axis2_env_create_all("ws.binding.service.test.log", AXIS2_LOG_LEVEL_TRACE); - - /* Set end point reference of echo service */ - address = "http://localhost:9090/axis2/services/ws.binding.service"; - if (argc > 1 ) - address = argv[1]; - if (AXIS2_STRCMP(address, "-h") == 0) - { - printf("Usage : %s [endpoint_url]\n", argv[0]); - printf("use -h for help\n"); - return 0; - } - printf ("Using endpoint : %s\n", address); - - - /* do all the single data types */ - payload = build_om_payload_for_doSingleData(env, "doChars", "Here is some char* data"); - runCall(env, address, "doChars", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doLong", "123456789"); - runCall(env, address, "doLong", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doInt", "123456789"); - runCall(env, address, "doInt", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doFloat", "123.45"); - runCall(env, address, "doFloat", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doLongDouble", "12345.67891"); - runCall(env, address, "doLongDouble", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doDouble", "1234.4567"); - runCall(env, address, "doDouble", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doBool", "true"); - runCall(env, address, "doBool", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doShort", "12345"); - runCall(env, address, "doShort", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doBytes", "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"); - runCall(env, address, "doBytes", payload, 0); - payload = build_om_payload_for_doSingleData(env, "doByte", "66"); - runCall(env, address, "doByte", payload, 0); - payload = build_om_payload_for_doDataObject(env); - runCall(env, address, "doDataObject", payload, 0); - payload = build_om_payload_for_doMixed(env); - runCall(env, address, "doMixed", payload, 0); - payload = build_om_payload_for_doAny(env); - runCall(env, address, "doAny", payload, 0); - - payload = build_om_payload_for_doDataObject_Failure(env); - runCall(env, address, "doDataObject", payload, 1); - - return 0; -} - -void runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload, int expectFailure) -{ - axis2_char_t *address = endpoint; - axis2_endpoint_ref_t* endpoint_ref = NULL; - axis2_options_t *options = NULL; - axis2_char_t *client_home = NULL; - axis2_svc_client_t* svc_client = NULL; - axiom_node_t *ret_node = NULL; - char action [100]; - int len = 0; - - printf("runSingleDataCall with endpoint %s, opName %s\n", endpoint, opName); - - client_home = AXIS2_GETENV("AXIS2C_HOME"); - - /* Create EPR with given address */ - endpoint_ref = axis2_endpoint_ref_create(env, address); - - svc_client = axis2_svc_client_create(env, client_home); - if (!svc_client) - { - printf("Error creating service client\n"); - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - } - - options = axis2_options_create(env); - - AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); - - len = sprintf(action, "http://www.WSEntryPointTest.org/WSEntryPointTest/%s", opName); - AXIS2_OPTIONS_SET_ACTION(options, env, action); - - /* Set service client options */ - AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options); - - /* Engage addressing composite */ - AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING); - - /* Send request */ - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); - if(ret_node) - { - axis2_char_t *om_str = NULL; - om_str = AXIOM_NODE_TO_STRING(ret_node, env); - if (om_str) - printf("\nReceived OM : %s\n", om_str); - printf("\nWSEntryPointTest %s invoke SUCCESSFUL!\n", opName); - } - else - { - if(expectFailure) - { - printf("\nWSEntryPointTest %s failure as expected: SUCCESSFUL!\n", opName); - } - else - { - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - printf("WSEntryPointTest %s invoke FAILED!\n", opName); - } - } - - if (svc_client) - { - AXIS2_SVC_CLIENT_FREE(svc_client, env); - svc_client = NULL; - } - if (endpoint_ref) - { - AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env); - endpoint_ref = NULL; - } -} - -/* build SOAP request message content using OM */ -axiom_node_t * -build_om_payload_for_doDataObject(axis2_env_t *env) -{ - axiom_node_t* req_om_node = NULL; - axiom_element_t* req_om_elem = NULL; - axiom_node_t* someData_om_node = NULL; - axiom_element_t* someData_om_elem = NULL; - axiom_node_t* someStringData_om_node = NULL; - axiom_element_t* someStringData_om_elem = NULL; - axiom_node_t* someIntData_om_node = NULL; - axiom_element_t* someIntData_om_elem = NULL; - axiom_node_t* someFloatData_om_node = NULL; - axiom_element_t* someFloatData_om_elem = NULL; - axiom_node_t* someDateData_om_node = NULL; - axiom_element_t* someDateData_om_elem = NULL; - axiom_node_t* someListData_om_node = NULL; - axiom_element_t* someListData_om_elem = NULL; - axiom_node_t* listItem1_om_node = NULL; - axiom_element_t* listItem1_om_elem = NULL; - axiom_node_t* listItem2_om_node = NULL; - axiom_element_t* listItem2_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); - req_om_elem = axiom_element_create(env, NULL, "doDataObject", ns1, &req_om_node); - someData_om_elem = axiom_element_create(env, req_om_node, "someData", ns1, &someData_om_node); - someStringData_om_elem = axiom_element_create(env, someData_om_node, "someStringData", ns1, &someStringData_om_node); - AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node); - someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node); - AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); - someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node); - AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); - someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node); - AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); - someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node); - listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); - listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); - - om_str = AXIOM_NODE_TO_STRING(req_om_node, env); - if (om_str) - printf("\nSending OM : %s\n", om_str); - - return req_om_node; -} - -/* build SOAP request message content using OM */ -axiom_node_t * -build_om_payload_for_doDataObject_Failure(axis2_env_t *env) -{ - axiom_node_t* req_om_node = NULL; - axiom_element_t* req_om_elem = NULL; - axiom_node_t* someData_om_node = NULL; - axiom_element_t* someData_om_elem = NULL; - axiom_node_t* someStringData_om_node = NULL; - axiom_element_t* someStringData_om_elem = NULL; - axiom_node_t* someIntData_om_node = NULL; - axiom_element_t* someIntData_om_elem = NULL; - axiom_node_t* someFloatData_om_node = NULL; - axiom_element_t* someFloatData_om_elem = NULL; - axiom_node_t* someDateData_om_node = NULL; - axiom_element_t* someDateData_om_elem = NULL; - axiom_node_t* someListData_om_node = NULL; - axiom_element_t* someListData_om_elem = NULL; - axiom_node_t* listItem1_om_node = NULL; - axiom_element_t* listItem1_om_elem = NULL; - axiom_node_t* listItem2_om_node = NULL; - axiom_element_t* listItem2_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - // Create bad Axiom doc - ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); - req_om_elem = axiom_element_create(env, NULL, "doDataObject", ns1, &req_om_node); - someData_om_elem = axiom_element_create(env, req_om_node, "someUnknownData", ns1, &someData_om_node); - someStringData_om_elem = axiom_element_create(env, someData_om_node, "someStringData", ns1, &someStringData_om_node); - AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node); - someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node); - AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); - someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node); - AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); - someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node); - AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); - someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node); - listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); - listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); - - om_str = AXIOM_NODE_TO_STRING(req_om_node, env); - if (om_str) - printf("\nSending OM : %s\n", om_str); - - return req_om_node; -} - - - -/* build SOAP request message content using OM */ -axiom_node_t * -build_om_payload_for_doMixed(axis2_env_t *env) -{ - axiom_node_t* req_om_node = NULL; - axiom_element_t* req_om_elem = NULL; - axiom_node_t* arg1_om_node = NULL; - axiom_element_t* arg1_om_elem = NULL; - axiom_node_t* arg2_om_node = NULL; - axiom_element_t* arg2_om_elem = NULL; - axiom_node_t* arg3_om_node = NULL; - axiom_element_t* arg3_om_elem = NULL; - axiom_node_t* arg4_om_node = NULL; - axiom_element_t* arg4_om_elem = NULL; - axiom_node_t* arg5_om_node = NULL; - axiom_element_t* arg5_om_elem = NULL; - axiom_node_t* someStringData_om_node = NULL; - axiom_element_t* someStringData_om_elem = NULL; - axiom_node_t* someIntData_om_node = NULL; - axiom_element_t* someIntData_om_elem = NULL; - axiom_node_t* someFloatData_om_node = NULL; - axiom_element_t* someFloatData_om_elem = NULL; - axiom_node_t* someDateData_om_node = NULL; - axiom_element_t* someDateData_om_elem = NULL; - axiom_node_t* someListData_om_node = NULL; - axiom_element_t* someListData_om_elem = NULL; - axiom_node_t* listItem1_om_node = NULL; - axiom_element_t* listItem1_om_elem = NULL; - axiom_node_t* listItem2_om_node = NULL; - axiom_element_t* listItem2_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); - req_om_elem = axiom_element_create(env, NULL, "doMixed", ns1, &req_om_node); - arg1_om_elem = axiom_element_create(env, req_om_node, "arg1", ns1, &arg1_om_node); - AXIOM_ELEMENT_SET_TEXT(arg1_om_elem, env, "Here is some char* data", arg1_om_node); - arg2_om_elem = axiom_element_create(env, req_om_node, "arg2", ns1, &arg2_om_node); - AXIOM_ELEMENT_SET_TEXT(arg2_om_elem, env, "123456789", arg2_om_node); - arg3_om_elem = axiom_element_create(env, req_om_node, "arg3", ns1, &arg3_om_node); - arg4_om_elem = axiom_element_create(env, req_om_node, "arg4", ns1, &arg4_om_node); - AXIOM_ELEMENT_SET_TEXT(arg4_om_elem, env, "true", arg4_om_node); - arg5_om_elem = axiom_element_create(env, req_om_node, "arg5", ns1, &arg5_om_node); - AXIOM_ELEMENT_SET_TEXT(arg5_om_elem, env, "1234.5678", arg5_om_node); - someStringData_om_elem = axiom_element_create(env, arg3_om_node, "someStringData", ns1, &someStringData_om_node); - AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node); - someIntData_om_elem = axiom_element_create(env, arg3_om_node, "", ns1, &someIntData_om_node); - AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); - someFloatData_om_elem = axiom_element_create(env, arg3_om_node, "someFloatData", ns1, &someFloatData_om_node); - AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); - someDateData_om_elem = axiom_element_create(env, arg3_om_node, "someDateData", ns1, &someDateData_om_node); - AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); - someListData_om_elem = axiom_element_create(env, arg3_om_node, "someListData", ns1, &someListData_om_node); - listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); - listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); - - om_str = AXIOM_NODE_TO_STRING(req_om_node, env); - if (om_str) - printf("\nSending OM : %s\n", om_str); - - return req_om_node; -} - - -axiom_node_t * -build_om_payload_for_doSingleData(axis2_env_t *env, char* name, char* data) -{ - axiom_node_t* req_om_node = NULL; - axiom_element_t* req_om_elem = NULL; - axiom_node_t* someData_om_node = NULL; - axiom_element_t* someData_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); - req_om_elem = axiom_element_create(env, NULL, name, ns1, &req_om_node); - someData_om_elem = axiom_element_create(env, req_om_node, "someData", ns1, &someData_om_node); - AXIOM_ELEMENT_SET_TEXT(someData_om_elem, env, data, someData_om_node); - - om_str = AXIOM_NODE_TO_STRING(req_om_node, env); - if (om_str) - printf("\nSending OM : %s\n", om_str); - - return req_om_node; -} - - -axiom_node_t * -build_om_payload_for_doAny(axis2_env_t *env) -{ - axiom_node_t* req_om_node = NULL; - axiom_element_t* req_om_elem = NULL; - axiom_node_t* someData_om_node = NULL; - axiom_element_t* someData_om_elem = NULL; - axiom_node_t* someStringData_om_node = NULL; - axiom_element_t* someStringData_om_elem = NULL; - axiom_node_t* someIntData_om_node = NULL; - axiom_element_t* someIntData_om_elem = NULL; - axiom_node_t* someFloatData_om_node = NULL; - axiom_element_t* someFloatData_om_elem = NULL; - axiom_node_t* someDateData_om_node = NULL; - axiom_element_t* someDateData_om_elem = NULL; - axiom_node_t* someListData_om_node = NULL; - axiom_element_t* someListData_om_elem = NULL; - axiom_node_t* listItem1_om_node = NULL; - axiom_element_t* listItem1_om_elem = NULL; - axiom_node_t* listItem2_om_node = NULL; - axiom_element_t* listItem2_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); - req_om_elem = axiom_element_create(env, NULL, "doAny", ns1, &req_om_node); - someData_om_elem = axiom_element_create(env, req_om_node, "anElem", ns1, &someData_om_node); - someStringData_om_elem = axiom_element_create(env, someData_om_node, "hello", ns1, &someStringData_om_node); - AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "world", someStringData_om_node); - someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node); - AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); - someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node); - AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); - someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node); - AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); - someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node); - listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); - listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); - AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); - - om_str = AXIOM_NODE_TO_STRING(req_om_node, env); - if (om_str) - printf("\nSending OM : %s\n", om_str); - - return req_om_node; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/runclient.bat deleted file mode 100644 index 13f3164751..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/runclient.bat +++ /dev/null @@ -1,33 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME% - -rem Run the client -.\ws.binding.service.client.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/ws.binding.service.client.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/ws.binding.service.client.vcproj deleted file mode 100644 index 03c007662b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.client/ws.binding.service.client.vcproj +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.sln b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.sln deleted file mode 100644 index b1de123e0a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws.binding.service", "ws.binding.service\ws.binding.service.vcproj", "{25B65303-B2E2-47AF-968C-89D9E58611F8}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws.binding.service.client", "ws.binding.service.client\ws.binding.service.client.vcproj", "{136C4966-3073-4EB0-9259-BC5E3B987D19}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevClient", "DevClient\DevClient.vcproj", "{2598A8C7-079E-4B56-A95D-134EAF52C59A}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Debug.ActiveCfg = Debug|Win32 - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Debug.Build.0 = Debug|Win32 - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Release.ActiveCfg = Release|Win32 - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Release.Build.0 = Release|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Debug.ActiveCfg = Debug|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Debug.Build.0 = Debug|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Release.ActiveCfg = Release|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Release.Build.0 = Release|Win32 - {2598A8C7-079E-4B56-A95D-134EAF52C59A}.Debug.ActiveCfg = Debug|Win32 - {2598A8C7-079E-4B56-A95D-134EAF52C59A}.Debug.Build.0 = Debug|Win32 - {2598A8C7-079E-4B56-A95D-134EAF52C59A}.Release.ActiveCfg = Release|Win32 - {2598A8C7-079E-4B56-A95D-134EAF52C59A}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.h deleted file mode 100644 index aaff35a6cc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| | -| Licensed under the Apache License, Version 2.0 (the "License"); you | -| may not use this file except in compliance with the License. You may | -| obtain a copy of the License at | -| http://www.apache.org/licenses/LICENSE-2.0 | -| | -| Unless required by applicable law or agreed to in writing, software | -| distributed under the License is distributed on an "AS IS" BASIS, | -| WITHOUT 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 TEST_H -#define TEST_H - -#include -#include - -class Test -{ -public: - virtual char* doChars(char* arg1) = 0; - virtual long doLong(long arg1) = 0; - virtual int doInt(int arg1) = 0; - virtual float doFloat(float arg1) = 0; - virtual long double doLongDouble(long double arg1) = 0; - virtual double doDouble(double arg1) = 0; - virtual bool doBool(bool arg1) = 0; - virtual short doShort(short arg1) = 0; - virtual char* doBytes(char* arg1) = 0; - virtual char doByte(char arg1) = 0; - virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0; - virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0; - virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0; -// These don't work because they are passing pointers around -// virtual int[] doIntArray(int[] arg1, int arg2); -// virtual string doString(string arg1); -// This doesn't work because there is no mapping from XSD types to SDO CharacterType -// virtual wchar_t doWChar(wchar_t arg1); -// This doesn't work because Operation does not support int64_t yet -// virtual int64_t doInt64(int64_t arg1); -}; - -#endif - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.wsdl deleted file mode 100644 index 23ab8b08e4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/Test.wsdl +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.componentType deleted file mode 100644 index d0cca1882d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.componentType +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp deleted file mode 100644 index e24534701d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp +++ /dev/null @@ -1,158 +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 "TestImpl.h" -#include -#include -using namespace tuscany::sca; -#include -#include -using namespace commonj::sdo; -using namespace commonj::sdo_axiom; - -TestImpl::TestImpl() -{ -} - -TestImpl::~TestImpl() -{ -} - -char* TestImpl::doChars(char* arg1) -{ - printf("TestImpl::doChars %s\n", arg1); - return arg1; -} - - -long TestImpl::doLong(long arg1) -{ - printf("TestImpl::doLong %d\n", arg1); - return arg1; -} - -int TestImpl::doInt(int arg1) -{ - printf("TestImpl::doInt %d\n", arg1); - return arg1; -} - -float TestImpl::doFloat(float arg1) -{ - printf("TestImpl::doFloat %f\n", arg1); - return arg1; -} - -long double TestImpl::doLongDouble(long double arg1) -{ - printf("TestImpl::doLongDouble %f\n", arg1); - return arg1; -} - -double TestImpl::doDouble(double arg1) -{ - printf("TestImpl::doDouble %f\n", arg1); - return arg1; -} - - -bool TestImpl::doBool(bool arg1) -{ - printf("TestImpl::doBool %d\n", arg1); - return arg1; -} - -short TestImpl::doShort(short arg1) -{ - printf("TestImpl::doShort %d\n", arg1); - return arg1; -} - -char* TestImpl::doBytes(char* arg1) -{ - printf("TestImpl::doBytes %s\n", arg1); - return arg1; -} - -char TestImpl::doByte(char arg1) -{ - printf("TestImpl::doByte %c\n", arg1); - return arg1; -} - -DataObjectPtr TestImpl::doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) -{ - printf("TestImpl::doMixed %s %d %s %d %d\n", arg1, arg2, arg3->getType().getURI(), arg4, arg5); - Utils::printDO(arg3); - return arg3; -} - -DataObjectPtr TestImpl::doDataObject(DataObjectPtr arg1) -{ - printf("TestImpl::doDataObject %s\n", arg1->getType().getURI()); - Utils::printDO(arg1); - return arg1; -} - -DataObjectPtr TestImpl::doAny(DataObjectPtr arg1) -{ - printf("TestImpl::doAny %s#%s\n", arg1->getType().getURI(), arg1->getType().getName()); - Utils::printDO(arg1); - //return arg1; - - DataFactoryPtr factory = arg1->getDataFactory(); - DataObjectPtr data = factory->create(Type::SDOTypeNamespaceURI, "OpenDataObject"); - data->setCString("stringData", "Here is some string data"); - data->setBoolean("boolData", true); - DataObjectList& list = data->getList("intDataList"); - list.append((long)123456789); - list.append((long)111111111); - list.append((long)222222222); - Utils::printDO(data); - return data; -} - -//int[] TestImpl::doIntArray(int[] arg1, int arg2) -//{ -// printf("TestImpl::doIntArray with length %d\n", arg2); -// for(int i=0; i - - tuscany_sca_ws_service - D:/tuscany/cpp/sca/test/ws.binding.service/deploy - ws.binding.service.solution.component/ws.binding.service - - - This is a testing service , to test the system is working or not - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.composite deleted file mode 100644 index 98393813f3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.composite +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - ws.binding.service.component/TestService - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.solution.composite deleted file mode 100644 index e1e402454b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.solution.composite +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.vcproj deleted file mode 100644 index 22c601b695..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.binding.service/ws.binding.service/ws.binding.service.vcproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/Makefile.am deleted file mode 100644 index bc0e430ee7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/test/ws.service.interop/deploy/configuration -SUBDIRS = ws.service.interop ws.service.interop.client resources -EXTRA_DIST = ws.service.interop.solution -deploy_DATA = ws.service.interop/ws.service.interop.solution.composite - -TESTS = runtest.sh -TESTS_ENVIRONMENT = $(SHELL) -x - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/deploy.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/deploy.cmd deleted file mode 100644 index 3aab273673..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/deploy.cmd +++ /dev/null @@ -1,58 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rem Will copy the correct files from the source tree for packaging and deployment of the -rem SCA sample. -setlocal -set currentPath=%~d0%~p0 -set sourcePath=%currentPath% - - -set destinationPath=%sourcePath%\deploy - -if not exist %destinationPath% mkdir %destinationPath% -if not exist %destinationPath%\packages mkdir %destinationPath%\packages -if not exist %destinationPath%\packages\ws.service.interop mkdir %destinationPath%\packages\ws.service.interop - -copy %sourcePath%\ws.service.interop\TestImpl.componentType %destinationPath%\packages\ws.service.interop -copy %sourcePath%\ws.service.interop\ws.service.interop.composite %destinationPath%\packages\ws.service.interop -copy %sourcePath%\ws.service.interop\Test.h %destinationPath%\packages\ws.service.interop -copy %sourcePath%\ws.service.interop\TestImpl.h %destinationPath%\packages\ws.service.interop -copy %sourcePath%\resources\interop.wsdl %destinationPath%\packages\ws.service.interop -copy %sourcePath%\resources\*.xsd %destinationPath%\packages\ws.service.interop -copy %sourcePath%\resources\*.xml %destinationPath%\packages\ws.service.interop -copy %sourcePath%\ws.service.interop\Debug\ws_service_interop.dll %destinationPath%\packages\ws.service.interop - - -if not exist %destinationPath%\bin mkdir %destinationPath%\bin -if not exist %destinationPath%\bin\resources mkdir %destinationPath%\bin\resources - -copy %sourcePath%\ws.service.interop.client\Debug\ws.service.interop.client.exe %destinationPath%\bin -copy %sourcePath%\ws.service.interop.client\Debug\ws.service.interop.client.pdb %destinationPath%\bin -copy %sourcePath%\ws.service.interop.client\runclient.bat %destinationPath%\bin -copy %sourcePath%\ws.service.interop\runwsserver.bat %destinationPath%\bin -copy %sourcePath%\resources\*.xsd %destinationPath%\bin\resources -copy %sourcePath%\resources\*.xml %destinationPath%\bin\resources - - -if not exist %destinationPath%\configuration mkdir %destinationPath%\configuration -if not exist %destinationPath%\configuration\ws.service.interop.solution mkdir %destinationPath%\configuration\ws.service.interop.solution - -copy %sourcePath%\ws.service.interop\ws.service.interop.solution.composite %destinationPath%\configuration\ws.service.interop.solution - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/Makefile.am deleted file mode 100644 index 0a482e82f1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/test/ws.service.interop/deploy -compositedir=$(deploydir)/packages/ws.service.interop -binresourcedir=$(deploydir)/bin/resources - -composite_DATA = *.xsd *.xml *.wsdl -binresource_DATA = *.xsd *.xml *.wsdl -EXTRA_DIST = *.xsd *.xml *.wsdl - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/datagraph.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/datagraph.xsd deleted file mode 100644 index 30727473a0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/datagraph.xsd +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Expected type is emof:Package. - - - - - - - - - - - Expected type is xsd:schema. - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/importschema.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/importschema.xsd deleted file mode 100644 index 082c389211..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/importschema.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop.wsdl deleted file mode 100644 index 258b31b2bd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop.wsdl +++ /dev/null @@ -1,1814 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01-in.xml deleted file mode 100644 index be5da658c2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01-in.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01.xsd deleted file mode 100644 index 083966d9f9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop01.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02-in.xml deleted file mode 100644 index d57593625b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02-in.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SimpleTypeWithName - - SomeString - SomeString - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02.xsd deleted file mode 100644 index a46c21c4f9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop02.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03-in.xml deleted file mode 100644 index f4f50bf28c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03-in.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03.xsd deleted file mode 100644 index 631dc0bfff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop03.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04-in.xml deleted file mode 100644 index ae06607013..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04-in.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04.xsd deleted file mode 100644 index 4d968e7b3c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop04.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06-in.xml deleted file mode 100644 index 168c41d380..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - RootElement6 - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06.xsd deleted file mode 100644 index acedc99232..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop06.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07-in.xml deleted file mode 100644 index 029387c5d4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07.xsd deleted file mode 100644 index e1cfc492d2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop07.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08-in.xml deleted file mode 100644 index 5a8c0de3b9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08.xsd deleted file mode 100644 index b7ca9dc916..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop08.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - SDO 2.0.1 - - A schema that tests the presence of annotations in schema read by SDO - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09-in.xml deleted file mode 100644 index 37d72454c0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09.xsd deleted file mode 100644 index 3a793fd8c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop09.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10-in.xml deleted file mode 100644 index 164b7242b4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - SimpleTypeWithName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10.xsd deleted file mode 100644 index 593860b84b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop10.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11-in.xml deleted file mode 100644 index 5e5d9af4a7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeAnonymous - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11.xsd deleted file mode 100644 index a72cda91e5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop11.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12-in.xml deleted file mode 100644 index 09fc39d2e1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - SimpleTypeWithSDOName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12.xsd deleted file mode 100644 index f428e65bf8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop12.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13-in.xml deleted file mode 100644 index 256f42646d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - SimpleTypeWithAbstractBase - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13.xsd deleted file mode 100644 index 3d553a7171..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop13.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14-in.xml deleted file mode 100644 index eb73036a8b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithInstanceClass - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14.xsd deleted file mode 100644 index 0155718348..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop14.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15-in.xml deleted file mode 100644 index 2376cbae06..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithExtendedInstanceClass - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15.xsd deleted file mode 100644 index ad59a9710b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop15.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16-in.xml deleted file mode 100644 index 94b51e764f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - listmember1 listmember2 - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16.xsd deleted file mode 100644 index f6518cfb3f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop16.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17-in.xml deleted file mode 100644 index 4e6895d46f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17-in.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - EN - 01:02:03 - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17.xsd deleted file mode 100644 index bbfc755fb7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop17.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18-in.xml deleted file mode 100644 index ea28b230ea..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18.xsd deleted file mode 100644 index de8dc5b79e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop18.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19-in.xml deleted file mode 100644 index 77d828227c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19.xsd deleted file mode 100644 index 7d28e0d9b3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop19.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20-in.xml deleted file mode 100644 index 8b0e8df4ba..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20.xsd deleted file mode 100644 index 1c4ffa6a5c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop20.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21-in.xml deleted file mode 100644 index 3bb03bb36f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21.xsd deleted file mode 100644 index 4888a7d385..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop21.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22-in.xml deleted file mode 100644 index 4ee0a343a4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22-in.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - BaseElement - ExtensionElement - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22.xsd deleted file mode 100644 index 11c8d5c980..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop22.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23-in.xml deleted file mode 100644 index 7f0d845be2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23.xsd deleted file mode 100644 index b2f358c69e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop23.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24-in.xml deleted file mode 100644 index 913004272e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24-in.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - SimpleTypeWithName - SimpleTypeWithNameExtended - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24.xsd deleted file mode 100644 index c7c5a7f1af..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop24.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop25-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop25-in.xml deleted file mode 100644 index 4a87e3e401..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop25-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ComplexTypeExtendingSimpeType - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26-in.xml deleted file mode 100644 index 28ef8e7eaf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26.xsd deleted file mode 100644 index dc72404fae..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop26.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop27-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop27-in.xml deleted file mode 100644 index c596e781ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop27-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ComplexTypeSimpleContentRestrictingComplexType - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28-in.xml deleted file mode 100644 index ea47654916..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28-in.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Some - Mixed - SimpleTypeWithName - Content - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28.xsd deleted file mode 100644 index 36ca723a0c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop28.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29-in.xml deleted file mode 100644 index 37dc992ac0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29.xsd deleted file mode 100644 index febb95142e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop29.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30-in.xml deleted file mode 100644 index 1f802101c4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30-in.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Some - Mixed - SimpleTypeWithName - Content - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30.xsd deleted file mode 100644 index d42361b509..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop30.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31-in.xml deleted file mode 100644 index 3cd54829a9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - SimpleTypeWithName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31.xsd deleted file mode 100644 index 9ba51daca8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop31.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32-in.xml deleted file mode 100644 index 72dc7ceb44..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32-in.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - some data string - - - - idvalue2 - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32.xsd deleted file mode 100644 index bf33516371..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop32.xsd +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33-in.xml deleted file mode 100644 index 61a0fdf2aa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33-in.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33.xsd deleted file mode 100644 index 27f6c22d12..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop33.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34-in.xml deleted file mode 100644 index 3c488be77c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - ElementWithSDOName - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34.xsd deleted file mode 100644 index 8fe33e9776..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop34.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35-in.xml deleted file mode 100644 index 63f84a91da..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ElementWithSDOAliasName - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35.xsd deleted file mode 100644 index 706326b22f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop35.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36-in.xml deleted file mode 100644 index 2a4b63f958..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36-in.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - ElementWithMaxOccurs - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36.xsd deleted file mode 100644 index 2e1c95b1c3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop36.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37-in.xml deleted file mode 100644 index f25366e905..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37-in.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - Element1InChoice - Element2InChoice - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37.xsd deleted file mode 100644 index b2afa51290..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop37.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38-in.xml deleted file mode 100644 index 5a97314a46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38-in.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - ElementInAllOne - ElementInAllTwo - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38.xsd deleted file mode 100644 index a4b406550a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop38.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop39-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop39-in.xml deleted file mode 100644 index d6ec278d2a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop39-in.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40-in.xml deleted file mode 100644 index ac7a3835b7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40-in.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - ElementInSubstitutionGroupBase - - - - Some Data - - - - ElementInSubstitutionGroupBase - - - ElementInSubstitutionGroupExtends - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40.xsd deleted file mode 100644 index 3e2ca8765a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop40.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41-in.xml deleted file mode 100644 index 6fe9f99157..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ElementOfSimpleTypeWithDefaultDefault - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41.xsd deleted file mode 100644 index a473626f03..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop41.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42-in.xml deleted file mode 100644 index 427f07b22b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ElementOfSimpleTypeWithFixedFixed - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42.xsd deleted file mode 100644 index 99a9afecd1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop42.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43-in.xml deleted file mode 100644 index 005879cf42..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ElementOfSimpleTypeWithSDOString - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43.xsd deleted file mode 100644 index 60d31e94cc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop43.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44-in.xml deleted file mode 100644 index 1170e4a991..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - idvalue0 - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44.xsd deleted file mode 100644 index 45c74b90fa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop44.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45-in.xml deleted file mode 100644 index f0160f713a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - idvalue0 - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45.xsd deleted file mode 100644 index 7a6236c9eb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop45.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46-in.xml deleted file mode 100644 index f5ddf4a859..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46-in.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ElementOfSimpleTypeWithSDODataType - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46.xsd deleted file mode 100644 index 54573c0bdb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop46.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47-in.xml deleted file mode 100644 index 4cff425ea2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47-in.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - ChangeSummaryText - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47.xsd deleted file mode 100644 index be67383db3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop47.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50-in.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50-in.xml deleted file mode 100644 index 5aa3d442a9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50-in.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - anySimpleType - AnyTypeString - http://tempuri.org - ABCD - true - false - 1 - 0 - 128 - -127 - 2001-01-01 - 2001-12-31T12:00:00 - -1.23456789 - 1.23456789 - 0.0 - 12.3E-4 - P1D - 0.0 - ---01 - --01-- - --01-01 - 2001 - 2001-01 - 0F00 - idvalue0 - idvalue0 - idvalue0 - -2147483648 - 2147483647 - -2147483648 - 2147483647 - EN - -9223372036854775808 - 9223372036854775807 - Name - NCName - -1 - NMTOKEN - NMTOKENS - 0 - 0 - normalizedString - tns:interop50 - 1 - QName - -32768 - 32767 - string - - token - 0 - 255 - 0 - 4294967295 - 0 - 18446744073709551615 - 0 - 65535 - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50.xsd deleted file mode 100644 index f2d4ed7679..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/resources/interop50.xsd +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/runtest.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/runtest.sh deleted file mode 100755 index 831246bbc6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/runtest.sh +++ /dev/null @@ -1,31 +0,0 @@ - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -cd $TUSCANY_SCACPP/test/ws.service.interop/deploy/bin - -# Start the axis http server. Output goes to a log file -./runwsserver.sh > runwsserver.log & - -# The wget command makes sure the server has fully started up -wget -O - http://localhost:9090/axis2/services - -# Run the tests against the server -./runclient.sh - -# Finally, kill the axis http server by finding the PID -kill -9 `ps | grep axis2_http_serv | cut -c1-6` diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/Makefile.am deleted file mode 100644 index 9fef007b19..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/test/ws.service.interop/deploy -prgbindir=$(deploydir)/bin - -prgbin_PROGRAMS = ws.service.interop.client -prgbin_SCRIPTS = runclient.sh -EXTRA_DIST = runclient.sh - -AM_CPPFLAGS = $(CPPFLAGS) - -ws_service_interop_client_SOURCES = \ -TestClient.cpp - -ws_service_interop_client_LDADD = \ --L$(TUSCANY_SCACPP)/lib \ - -ltuscany_sca \ --L$(TUSCANY_SDOCPP)/lib \ - -ltuscany_sdo \ - -ltuscany_sdo_axiom \ --L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_wsdl \ - -laxis2_engine \ - -laxis2_parser \ - -laxis2_minizip \ - -lpthread \ - -laxis2_http_sender \ - -laxis2_http_receiver - -INCLUDES = \ --I${AXIS2C_HOME}/include \ --I${TUSCANY_SCACPP}/include \ --I${TUSCANY_SDOCPP}/include - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp deleted file mode 100644 index da3a90cff4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 -#include -#include -#include - -#include -using namespace commonj::sdo; - -#include -using namespace commonj::sdo_axiom; - -#include -using namespace tuscany::sca; - -#include -#include -using namespace std; - -axiom_node_t* get_om_payload_from_xml_file(axis2_env_t *env, const char* currentTest); -axiom_node_t* runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload); -void loadAllXSD(); -bool compareAxiomNodes(axiom_node_t* returned_payload, axiom_node_t* payload_data); - -XSDHelperPtr xsdHelper = NULL; -XMLHelperPtr xmlHelper = NULL; - - -int main(int argc, char** argv) -{ - axis2_env_t *env = NULL; - axis2_char_t *address = NULL; - axis2_char_t *testNumberString = "-1"; - - axis2_endpoint_ref_t* endpoint_ref = NULL; - axis2_options_t *options = NULL; - axis2_char_t *client_home = NULL; - axis2_svc_client_t* svc_client = NULL; - axiom_node_t *payload = NULL; - axiom_node_t *ret_node = NULL; - - /* Set up the envioronment */ - env = axis2_env_create_all("ws.service.interop.client.log", AXIS2_LOG_LEVEL_TRACE); - - /* Set end point reference of echo service */ - address = "http://localhost:9090/axis2/services/ws.service"; - if (argc > 1 ) - testNumberString = argv[1]; - if (argc > 2 ) - address = argv[2]; - if (AXIS2_STRCMP(testNumberString, "-h") == 0) - { - cout<<"Usage : "<< argv[0] <<"[test_number] [endpoint_url]"< 0 && testNumber <= 50) - { - cout<<"Running test : "<< testNumber << endl; - } - else - { - testNumber = -1; - cout<<"Running all tests" << endl; - } - - cout<<"Using endpoint : "<< address << endl; - - const string interop = "interop"; - - string currentTest; - - int testsPassed = 0; - int testsRun = 0; - string failedTests = ""; - string unsupportedTests = ""; - - loadAllXSD(); - - // Tests 1 to 50 - for(int i=1; i<=50; i++) - { - if( testNumber != i && - testNumber > 0 ) - { - // Only running a single, chosen test - continue; - } - if( i==13 || - i==48 || - i==49 ) - { - // Ignore non-existant schemas - continue; - } - - currentTest = interop; - if(i<10) - { - currentTest.append("0"); - } - char buf[3]; - sprintf(buf, "%d", i); - currentTest.append(buf); - - cout << "Running test " << currentTest << endl; - - if( i==5 || - i==25 || - i==27 || - i==39 ) - { - cout << "We do not currently support schema " << currentTest << endl; - unsupportedTests += currentTest + " "; - continue; - } - - testsRun++; - - payload = get_om_payload_from_xml_file(env, currentTest.c_str()); - axiom_node_t* returned_payload = NULL; - bool success = false; - if(payload) - { - returned_payload = runCall(env, address, (char*) currentTest.c_str(), payload); - } - - if(returned_payload) - { - // Get the inner node to compare - axiom_node_t* payload_data = AXIOM_NODE_GET_FIRST_CHILD(payload, env); - success = compareAxiomNodes(returned_payload, payload_data); - } - - if(success) - { - cout << currentTest << " PASSED!" << endl; - testsPassed++; - } - else - { - failedTests += currentTest + " "; - cout << currentTest << " FAILED!" << endl; - } - - } - cout << "Passed " << testsPassed << " of " << testsRun << " tests" << endl; - if(failedTests.size() > 0) - { - string expectedFailedTests = "interop04 interop28 interop30 interop32 interop33 interop40 interop50"; - cout << " Failed Tests: " << failedTests << endl; - cout << "Expected failures: " << expectedFailedTests << endl; - } - if(unsupportedTests.size() > 0) - { - cout << "Unsupported: " << unsupportedTests << endl; - } - return 0; -} - -axiom_node_t* runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload) -{ - axis2_char_t *address = endpoint; - axis2_endpoint_ref_t* endpoint_ref = NULL; - axis2_options_t *options = NULL; - axis2_char_t *client_home = NULL; - axis2_svc_client_t* svc_client = NULL; - axiom_node_t *ret_node = NULL; - axiom_node_t *ret = NULL; - char action [100]; - int len = 0; - - client_home = AXIS2_GETENV("AXIS2C_HOME"); - - /* Create EPR with given address */ - endpoint_ref = axis2_endpoint_ref_create(env, address); - - svc_client = axis2_svc_client_create(env, client_home); - if (!svc_client) - { - printf("Error creating service client\n"); - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - return NULL; - } - - options = axis2_options_create(env); - - AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); - - len = sprintf(action, "http://www.WSEntryPointTest.org/WSEntryPointTest/%s", opName); - AXIS2_OPTIONS_SET_ACTION(options, env, action); - - /* Set service client options */ - AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options); - - /* Engage addressing composite */ - AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING); - - - /* Send request */ - ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); - if(ret_node) - { - ret = AXIOM_NODE_GET_FIRST_CHILD(ret_node, env); - if(!ret) - { - cout << "No data in response - failure on server" << endl; - } - } - else - { - cout << "request failed" << endl; - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" - " %d :: %s", env->error->error_number, - AXIS2_ERROR_GET_MESSAGE(env->error)); - } - - if (svc_client) - { - AXIS2_SVC_CLIENT_FREE(svc_client, env); - svc_client = NULL; - } - if (endpoint_ref) - { - // The following line is commented out due to it causing a segmentation fault on Linux with Axis2C 0.93 - // AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env); - endpoint_ref = NULL; - } - - return ret; -} - - -bool compareAxiomNodes(axiom_node_t* returned_payload, axiom_node_t* expected_payload) -{ - bool success = false; - - AxiomHelper* axiomHelper = AxiomHelper::getHelper(); - DataObjectPtr expectedDO = axiomHelper->toSdo(expected_payload, xsdHelper->getDataFactory()); - DataObjectPtr returnedDO = axiomHelper->toSdo(returned_payload, xsdHelper->getDataFactory()); - - string diff; - success = Utils::compareDataObjects(expectedDO, returnedDO, diff); - - if(!success) - { - cout << "Expected data does not match returned data:\n" << diff << "\nExpected data:"<defineFile(xsdFileName.c_str()); - } - - } - catch(SDORuntimeException& ex) - { - cout << "SDORuntimeException whilst loading xsd" << endl; - cout << ex.getMessageText() << endl; - } -} - -/* build SOAP request message content using OM */ -axiom_node_t* get_om_payload_from_xml_file(axis2_env_t *env, const char* currentTest) -{ - axiom_node_t* req_om_node = NULL; - axiom_node_t* payload_om_node = NULL; - const string resourcesDir = "./resources/"; - const string dotxml = "-in.xml"; - - string xmlFileName = resourcesDir + currentTest + dotxml; - - try - { - - xmlHelper = HelperProvider::getXMLHelper(xsdHelper->getDataFactory()); - - XMLDocumentPtr payloadFile = xmlHelper->loadFile(xmlFileName.c_str()); - string rootElemURI = payloadFile->getRootElementURI(); - string rootElemName = payloadFile->getRootElementName(); - - DataObjectPtr payloadDO = payloadFile->getRootDataObject(); - - AxiomHelper* axiomHelper = AxiomHelper::getHelper(); - payload_om_node = axiomHelper->toAxiomNode(payloadDO, rootElemURI.c_str(), rootElemName.c_str()); - - if(!payload_om_node) - { - payload_om_node = axiomHelper->toAxiomNode(payloadDO); - } - - if(payload_om_node) - { - axiom_element_t* req_om_elem = NULL; - axiom_namespace_t *ns1 = NULL; - axis2_char_t *om_str = NULL; - - ns1 = axiom_namespace_create (env, "http://www.apache.org/tuscany/interop", "ns1"); - req_om_elem = axiom_element_create(env, NULL, currentTest, ns1, &req_om_node); - AXIOM_NODE_DETACH(payload_om_node, env); - AXIOM_NODE_ADD_CHILD(req_om_node, env, payload_om_node); - } - else - { - cout << "Could not convert xml document("<< xmlFileName <<") to Axiom" << endl; - return NULL; - } - - } - catch(SDORuntimeException& ex) - { - cout << "SDORuntimeException whilst loading xml ("<< xmlFileName <<") & converting to Axiom" << endl; - cout << ex.getMessageText() << endl; - return NULL; - } - - return req_om_node; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.bat deleted file mode 100644 index 4ab0ea4cf3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo Using Axis2C installed at %AXIS2C_HOME% - -rem Run the client -.\ws.service.interop.client.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.sh deleted file mode 100755 index 57e4b6b90f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/runclient.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -./ws.service.interop.client - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/ws.service.interop.client.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/ws.service.interop.client.vcproj deleted file mode 100644 index 2646bb025c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.client/ws.service.interop.client.vcproj +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.sln b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.sln deleted file mode 100644 index b0bda8950b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop.sln +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws.service.interop", "ws.service.interop\ws.service.interop.vcproj", "{25B65303-B2E2-47AF-968C-89D9E58611F8}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws.service.interop.client", "ws.service.interop.client\ws.service.interop.client.vcproj", "{136C4966-3073-4EB0-9259-BC5E3B987D19}" - ProjectSection(ProjectDependencies) = postProject - {25B65303-B2E2-47AF-968C-89D9E58611F8} = {25B65303-B2E2-47AF-968C-89D9E58611F8} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Debug.ActiveCfg = Debug|Win32 - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Debug.Build.0 = Debug|Win32 - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Release.ActiveCfg = Release|Win32 - {25B65303-B2E2-47AF-968C-89D9E58611F8}.Release.Build.0 = Release|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Debug.ActiveCfg = Debug|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Debug.Build.0 = Debug|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Release.ActiveCfg = Release|Win32 - {136C4966-3073-4EB0-9259-BC5E3B987D19}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Makefile.am deleted file mode 100644 index d8a82e241a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/test/ws.service.interop/deploy -compositedir=$(deploydir)/packages/ws.service.interop -prgbindir=$(deploydir)/bin - -BUILT_SOURCES = TestImpl_TestService_Proxy.cpp \ -TestImpl_TestService_Wrapper.cpp - -noinst_HEADERS = *.h - -${BUILT_SOURCES}: ws.service.interop.composite - java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output . -verbose - -prgbin_SCRIPTS = runwsserver.sh - -composite_LTLIBRARIES = libws_service_interop.la -composite_DATA = ws.service.interop.composite *.componentType -EXTRA_DIST = ws.service.interop.composite *.componentType runwsserver.sh - -libws_service_interop_la_SOURCES = \ -TestImpl.cpp \ -TestImpl_TestService_Proxy.cpp \ -TestImpl_TestService_Wrapper.cpp - -libws_service_interop_la_LIBADD = \ --L${TUSCANY_SCACPP}/lib \ - -ltuscany_sca \ --L${TUSCANY_SCACPP}/extensions/cpp/lib \ - -ltuscany_sca_cpp \ --L${TUSCANY_SDOCPP}/lib \ - -ltuscany_sdo - -INCLUDES = \ --I$(TUSCANY_SCACPP)/extensions/cpp/include \ --I$(TUSCANY_SCACPP)/include \ --I${TUSCANY_SDOCPP}/include - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Test.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Test.h deleted file mode 100644 index 59f55984e7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/Test.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| | -| Licensed under the Apache License, Version 2.0 (the "License"); you | -| may not use this file except in compliance with the License. You may | -| obtain a copy of the License at | -| http://www.apache.org/licenses/LICENSE-2.0 | -| | -| Unless required by applicable law or agreed to in writing, software | -| distributed under the License is distributed on an "AS IS" BASIS, | -| WITHOUT 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 TEST_H -#define TEST_H - -#include -#include -#include -using std::string; - -class Test -{ -public: - virtual DataObjectPtr interop01(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop02(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop03(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop04(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop05(DataObjectPtr arg1) = 0; - virtual string interop06(string arg1) = 0; - virtual DataObjectPtr interop07(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop08(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop09(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop10(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop11(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop12(DataObjectPtr arg1) = 0; - //virtual DataObjectPtr interop13(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop14(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop15(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop16(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop17(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop18(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop19(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop20(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop21(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop22(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop23(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop24(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop25(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop26(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop27(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop28(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop29(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop30(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop31(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop32(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop33(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop34(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop35(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop36(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop37(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop38(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop39(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop40(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop41(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop42(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop43(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop44(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop45(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop46(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop47(DataObjectPtr arg1) = 0; - //virtual DataObjectPtr interop48(DataObjectPtr arg1) = 0; - //virtual DataObjectPtr interop49(DataObjectPtr arg1) = 0; - virtual DataObjectPtr interop50(DataObjectPtr arg1) = 0; -}; - -#endif - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.componentType deleted file mode 100644 index d0cca1882d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.componentType +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp deleted file mode 100644 index c99667e362..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp +++ /dev/null @@ -1,509 +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 "TestImpl.h" - -#include -#include -#include -#include -using namespace tuscany::sca; -#include -using namespace commonj::sdo; - -#include - -#include -using std::string; - -TestImpl::TestImpl() -{ -} - -TestImpl::~TestImpl() -{ -} - -bool TestImpl::compareWithFile(DataObjectPtr suppliedDO, string test) -{ - Composite* composite = SCARuntime::getInstance()->getCurrentComponent()->getComposite(); - string rootPath = composite->getRoot(); - string xmlFileName = rootPath+"/"+test+"-in.xml"; - - XMLHelperPtr helper = composite->getXMLHelper(); - XMLDocumentPtr expectedDoc = helper->loadFile(xmlFileName.c_str()); - DataObjectPtr expectedDO = expectedDoc->getRootDataObject(); - - printf( "Comparing supplied DataObject against expected DataObject\n"); - - string diff = ""; - bool result = Utils::compareDataObjects(suppliedDO, expectedDO, diff); - if(!result) - { - printf("Supplied DO differs from expected DO:\n%s\nSupplied DO:\n", diff.c_str() ); - Utils::printDO(suppliedDO); - printf("Expected DO:\n"); - Utils::printDO(expectedDO); - } - else - { - printf("DataObjects match!\n"); - } - - return result; -} - -DataObjectPtr TestImpl::interop01(DataObjectPtr arg1) -{ - printf("TestImpl::interop01 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop01")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop02(DataObjectPtr arg1) -{ - printf("TestImpl::interop02 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop02")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop03(DataObjectPtr arg1) -{ - printf("TestImpl::interop03 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop03")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop04(DataObjectPtr arg1) -{ - printf("TestImpl::interop04 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop04")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop05(DataObjectPtr arg1) -{ - printf("TestImpl::interop05 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop05")) - { - return arg1; - } - return NULL; -} -string TestImpl::interop06(string arg1) -{ - printf("TestImpl::interop06 %s\n", arg1.c_str()); - return arg1; -} -DataObjectPtr TestImpl::interop07(DataObjectPtr arg1) -{ - printf("TestImpl::interop07 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop07")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop08(DataObjectPtr arg1) -{ - printf("TestImpl::interop08 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop08")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop09(DataObjectPtr arg1) -{ - printf("TestImpl::interop09 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop09")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop10(DataObjectPtr arg1) -{ - printf("TestImpl::interop10 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop10")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop11(DataObjectPtr arg1) -{ - printf("TestImpl::interop11 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop11")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop12(DataObjectPtr arg1) -{ - printf("TestImpl::interop12 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop12")) - { - return arg1; - } - return NULL; -} -// DataObjectPtr TestImpl::interop13(DataObjectPtr arg1) -// { -// printf("TestImpl::interop13 %s\n", arg1->getType().getURI()); -// Utils::printDO(arg1); -// return arg1; -// } -DataObjectPtr TestImpl::interop14(DataObjectPtr arg1) -{ - printf("TestImpl::interop14 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop14")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop15(DataObjectPtr arg1) -{ - printf("TestImpl::interop15 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop15")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop16(DataObjectPtr arg1) -{ - printf("TestImpl::interop16 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop16")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop17(DataObjectPtr arg1) -{ - printf("TestImpl::interop17 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop17")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop18(DataObjectPtr arg1) -{ - printf("TestImpl::interop18 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop18")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop19(DataObjectPtr arg1) -{ - printf("TestImpl::interop19 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop19")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop20(DataObjectPtr arg1) -{ - printf("TestImpl::interop20 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop20")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop21(DataObjectPtr arg1) -{ - printf("TestImpl::interop21 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop21")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop22(DataObjectPtr arg1) -{ - printf("TestImpl::interop22 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop22")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop23(DataObjectPtr arg1) -{ - printf("TestImpl::interop23 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop23")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop24(DataObjectPtr arg1) -{ - printf("TestImpl::interop24 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop24")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop25(DataObjectPtr arg1) -{ - printf("TestImpl::interop25 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop25")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop26(DataObjectPtr arg1) -{ - printf("TestImpl::interop26 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop26")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop27(DataObjectPtr arg1) -{ - printf("TestImpl::interop27 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop27")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop28(DataObjectPtr arg1) -{ - printf("TestImpl::interop28 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop28")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop29(DataObjectPtr arg1) -{ - printf("TestImpl::interop29 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop29")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop30(DataObjectPtr arg1) -{ - printf("TestImpl::interop30 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop30")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop31(DataObjectPtr arg1) -{ - printf("TestImpl::interop31 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop31")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop32(DataObjectPtr arg1) -{ - printf("TestImpl::interop32 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop32")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop33(DataObjectPtr arg1) -{ - printf("TestImpl::interop33 %s\n", arg1->getType().getURI()); - bool result = compareWithFile(arg1, "interop33"); - if(result) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop34(DataObjectPtr arg1) -{ - printf("TestImpl::interop34 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop34")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop35(DataObjectPtr arg1) -{ - printf("TestImpl::interop35 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop35")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop36(DataObjectPtr arg1) -{ - printf("TestImpl::interop36 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop36")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop37(DataObjectPtr arg1) -{ - printf("TestImpl::interop37 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop37")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop38(DataObjectPtr arg1) -{ - printf("TestImpl::interop38 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop38")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop39(DataObjectPtr arg1) -{ - printf("TestImpl::interop39 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop39")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop40(DataObjectPtr arg1) -{ - printf("TestImpl::interop40 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop40")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop41(DataObjectPtr arg1) -{ - printf("TestImpl::interop41 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop41")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop42(DataObjectPtr arg1) -{ - printf("TestImpl::interop42 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop42")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop43(DataObjectPtr arg1) -{ - printf("TestImpl::interop43 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop43")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop44(DataObjectPtr arg1) -{ - printf("TestImpl::interop44 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop44")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop45(DataObjectPtr arg1) -{ - printf("TestImpl::interop45 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop45")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop46(DataObjectPtr arg1) -{ - printf("TestImpl::interop46 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop46")) - { - return arg1; - } - return NULL; -} -DataObjectPtr TestImpl::interop47(DataObjectPtr arg1) -{ - printf("TestImpl::interop47 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop47")) - { - return arg1; - } - return NULL; -} -// DataObjectPtr TestImpl::interop48(DataObjectPtr arg1) -// { -// printf("TestImpl::interop48 %s\n", arg1->getType().getURI()); -// Utils::printDO(arg1); -// return arg1; -// } -// DataObjectPtr TestImpl::interop49(DataObjectPtr arg1) -// { -// printf("TestImpl::interop49 %s\n", arg1->getType().getURI()); -// Utils::printDO(arg1); -// return arg1; -// } -DataObjectPtr TestImpl::interop50(DataObjectPtr arg1) -{ - printf("TestImpl::interop50 %s\n", arg1->getType().getURI()); - if(compareWithFile(arg1, "interop50")) - { - return arg1; - } - return NULL; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.h deleted file mode 100644 index 2f4f57e475..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/TestImpl.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -+----------------------------------------------------------------------+ -| | -| Licensed under the Apache License, Version 2.0 (the "License"); you | -| may not use this file except in compliance with the License. You may | -| obtain a copy of the License at | -| http://www.apache.org/licenses/LICENSE-2.0 | -| | -| Unless required by applicable law or agreed to in writing, software | -| distributed under the License is distributed on an "AS IS" BASIS, | -| WITHOUT 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 TESTIMPL_H -#define TESTIMPL_H - -#include "Test.h" - -class TestImpl : public Test -{ -public: - TestImpl(); - virtual ~TestImpl(); - - // Test interface - virtual DataObjectPtr interop01(DataObjectPtr arg1); - virtual DataObjectPtr interop02(DataObjectPtr arg1); - virtual DataObjectPtr interop03(DataObjectPtr arg1); - virtual DataObjectPtr interop04(DataObjectPtr arg1); - virtual DataObjectPtr interop05(DataObjectPtr arg1); - virtual string interop06(string arg1); - virtual DataObjectPtr interop07(DataObjectPtr arg1); - virtual DataObjectPtr interop08(DataObjectPtr arg1); - virtual DataObjectPtr interop09(DataObjectPtr arg1); - virtual DataObjectPtr interop10(DataObjectPtr arg1); - virtual DataObjectPtr interop11(DataObjectPtr arg1); - virtual DataObjectPtr interop12(DataObjectPtr arg1); - //virtual DataObjectPtr interop13(DataObjectPtr arg1); - virtual DataObjectPtr interop14(DataObjectPtr arg1); - virtual DataObjectPtr interop15(DataObjectPtr arg1); - virtual DataObjectPtr interop16(DataObjectPtr arg1); - virtual DataObjectPtr interop17(DataObjectPtr arg1); - virtual DataObjectPtr interop18(DataObjectPtr arg1); - virtual DataObjectPtr interop19(DataObjectPtr arg1); - virtual DataObjectPtr interop20(DataObjectPtr arg1); - virtual DataObjectPtr interop21(DataObjectPtr arg1); - virtual DataObjectPtr interop22(DataObjectPtr arg1); - virtual DataObjectPtr interop23(DataObjectPtr arg1); - virtual DataObjectPtr interop24(DataObjectPtr arg1); - virtual DataObjectPtr interop25(DataObjectPtr arg1); - virtual DataObjectPtr interop26(DataObjectPtr arg1); - virtual DataObjectPtr interop27(DataObjectPtr arg1); - virtual DataObjectPtr interop28(DataObjectPtr arg1); - virtual DataObjectPtr interop29(DataObjectPtr arg1); - virtual DataObjectPtr interop30(DataObjectPtr arg1); - virtual DataObjectPtr interop31(DataObjectPtr arg1); - virtual DataObjectPtr interop32(DataObjectPtr arg1); - virtual DataObjectPtr interop33(DataObjectPtr arg1); - virtual DataObjectPtr interop34(DataObjectPtr arg1); - virtual DataObjectPtr interop35(DataObjectPtr arg1); - virtual DataObjectPtr interop36(DataObjectPtr arg1); - virtual DataObjectPtr interop37(DataObjectPtr arg1); - virtual DataObjectPtr interop38(DataObjectPtr arg1); - virtual DataObjectPtr interop39(DataObjectPtr arg1); - virtual DataObjectPtr interop40(DataObjectPtr arg1); - virtual DataObjectPtr interop41(DataObjectPtr arg1); - virtual DataObjectPtr interop42(DataObjectPtr arg1); - virtual DataObjectPtr interop43(DataObjectPtr arg1); - virtual DataObjectPtr interop44(DataObjectPtr arg1); - virtual DataObjectPtr interop45(DataObjectPtr arg1); - virtual DataObjectPtr interop46(DataObjectPtr arg1); - virtual DataObjectPtr interop47(DataObjectPtr arg1); - //virtual DataObjectPtr interop48(DataObjectPtr arg1); - //virtual DataObjectPtr interop49(DataObjectPtr arg1); - virtual DataObjectPtr interop50(DataObjectPtr arg1); -private: - virtual bool compareWithFile(DataObjectPtr arg1, string test); -}; - -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.bat b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.bat deleted file mode 100644 index 804688fc56..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal - -if "%TUSCANY_SCACPP%" == "" ( -echo "TUSCANY_SCACPP not set" -goto end -) -echo using SCA installed at %TUSCANY_SCACPP% - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using SDO installed at %TUSCANY_SDOCPP% - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C installed at %AXIS2C_HOME% - -set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\ -set TUSCANY_SCACPP_DEFAULT_COMPONENT=ws.service.interop.solution.component - -set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - -cd %AXIS2C_HOME%\bin -.\axis2_http_server.exe - -:end -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.sh deleted file mode 100755 index ec0a75188b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/runwsserver.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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` - -if [ x$TUSCANY_SCACPP = x ]; then -echo "TUSCANY_SCACPP not set" -exit; -fi -echo "Using SCA installed at $TUSCANY_SCACPP" - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -TEST_SYSTEM=$APFULLDIR/../ - -export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH - -export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM -export TUSCANY_SCACPP_DEFAULT_COMPONENT=ws.service.interop.solution.component - -cd $AXIS2C_HOME/bin -./axis2_http_server diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.composite deleted file mode 100644 index 997aebfdc0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.composite +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - ws.service.interop.component/TestService - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.solution.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.solution.composite deleted file mode 100644 index 4a47d431a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.solution.composite +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.vcproj deleted file mode 100644 index 56ffe19400..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/test/ws.service.interop/ws.service.interop/ws.service.interop.vcproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/Makefile.am deleted file mode 100644 index 5bea4c88d5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = scagen \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/LICENSE b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/LICENSE deleted file mode 100755 index f433b1a53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/LICENSE +++ /dev/null @@ -1,177 +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 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/NOTICE b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/NOTICE deleted file mode 100644 index bfb81409ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/README b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/README deleted file mode 100644 index 2831dadd94..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/META-INF/README +++ /dev/null @@ -1,19 +0,0 @@ -Apache Tuscany C++ M1 build (July, 2006) -=================================== - -http://incubator.apache.org/tuscany - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - -Thank you for using Tuscany! - -The Tuscany Team. diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/Makefile.am deleted file mode 100644 index a9df10fc30..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = - -BUILT_SOURCES = scagen_build -EXTRA_DIST = build.xml scagen.sh scagen.cmd src META-INF -bin_SCRIPTS = scagen.sh scagen.cmd - -scagen_build: - ant - touch scagen_build - -clean: - rm -f scagen_build - -install-exec-hook: - cp bld/scagen.jar $(bindir) - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/build.xml b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/build.xml deleted file mode 100644 index a7bb207ee3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/build.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SCA for C++ Tools]]> - - - Copyright 2005 The Apache Software Foundation or its licensors, as applicable.]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java deleted file mode 100644 index d7af1ab841..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java +++ /dev/null @@ -1,32 +0,0 @@ - - -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 testCalculatorCompositeAndComponent() { - testComposite("CalculatorCompositeAndComponent", check_results); - } -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java deleted file mode 100644 index 870937b6ca..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java +++ /dev/null @@ -1,47 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceComposite SCA composite 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\composites\MyValueServiceComposite - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceComposite", check_results); - } - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java deleted file mode 100644 index 9e70d06b7f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java +++ /dev/null @@ -1,90 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr SCA composite as - * input data. - */ -public class ImplClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public ImplClassWithNameSpaceButNotInClassAttrTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\composites\MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr", check_results); - } - -} -* -* Copyright 2005 The Apache Software Foundation or its licensors, as applicable. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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; - -/** - * 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\composites\MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr SCA composite as - * input data. - */ -public class ImplClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public ImplClassWithNameSpaceButNotInClassAttrTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\composites\MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr", check_results); - } - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java deleted file mode 100644 index 94b7c70854..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java +++ /dev/null @@ -1,47 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceComposite SCA composite 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\composites\MyValueServiceComposite - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceCompositeImplClassWithNamespace", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java deleted file mode 100644 index 7dd2abdc98..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java +++ /dev/null @@ -1,47 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceComposite SCA composite 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\composites\MyValueServiceComposite - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr", check_results); - } - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java deleted file mode 100644 index 90c4d7dcac..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java +++ /dev/null @@ -1,47 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceComposite SCA composite 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\composites\MyValueServiceComposite - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceCompositeIntfClassWithNamespace", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingCompositeAndFragmentTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingCompositeAndFragmentTest.java deleted file mode 100644 index a094a1c66c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingCompositeAndFragmentTest.java +++ /dev/null @@ -1,47 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceComposite SCA composite as - * input data. - */ -public class MissingCompositeAndFragmentTest extends TuscanyTestCase { - - /** - * Constructor for CustomerInfoTestOLD. - * - * @param arg0 - */ - public MissingCompositeAndFragmentTest(String arg0) { - super(arg0); - } - - /** - * Test the Hydra.sca.core\test\testSCASystem\composites\MyValueServiceComposite - * proxy and wrapper generation. - */ - public void testEnvHandler() { - testComposite("MyValueServiceCompositeMissingScaComposite",check_results); - } - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java deleted file mode 100644 index cb980e6d27..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java +++ /dev/null @@ -1,48 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -/** - * 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\composites\MyValueServiceComposite SCA composite 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\composites\MyValueServiceComposite - * proxy and wrapper generation. - */ - public void testEnvHandler() { - - testComposite("SimplePublicPrivateProtectedTest", check_results); - } - -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllCompositesTest.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllCompositesTest.java deleted file mode 100644 index f72ade38d3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllCompositesTest.java +++ /dev/null @@ -1,88 +0,0 @@ - - -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 composites placed in the "composites" directory - * against the results in their repectice "expected_results" folders. - */ -public class TestAllCompositesTest extends TuscanyTestCase { - - String testsDir = TuscanyTestCase.junit_composites; - - Set excludes = new HashSet(); - - public TestAllCompositesTest(String arg0) { - super(arg0); - excludes.add("MyValueServiceCompositeMissingScaComposite"); - excludes.add("CVS"); - excludes.add(".svn"); - } - - - /* main exists to allow running from the java ant task */ - public static void main(String[] args) { - TestAllCompositesTest test = new TestAllCompositesTest(""); - test.testAllCompositesRegression(); - } - - public void testAllCompositesRegression() { - File dir = new File(testsDir); - - if (dir.isDirectory()) { - System.out.println("Testing all composites under " - + dir.getAbsolutePath()); - String[] test_composites = dir.list(); - - for (int i = 0; i < test_composites.length; i++) { - File test_composite = new File(testsDir, test_composites[i]); - - String composite_name = null; - if (test_composite.isDirectory()) { - composite_name = test_composite.getName(); - if (!excludes.contains(composite_name.intern())) { - testComposite(composite_name, check_results); - System.out.println("Test of composite \"" + composite_name - + "\" passed."); - continue; - } else { - System.out - .println("Ignoring excluded composite subdirectory \"" - + composite_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\\composites directory under there."); - } - - System.out.println("testAllComposites test passed."); - } - -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java deleted file mode 100644 index 0c5fad7429..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java +++ /dev/null @@ -1,96 +0,0 @@ - - -package org.apache.tuscany.sca.cpp.tools.junit; - -import java.io.File; -import java.util.HashSet; -import java.util.Set; - -/** - * This test case will test all the composites placed in the "composites" directory - * against the results in their repectice "expected_results" folders. - */ -public class TestDeployAssistTool extends TuscanyTestCase { - - String testsDir = TuscanyTestCase.junit_composites; - - Set excludes = new HashSet(); - - public TestDeployAssistTool(String arg0) { - super(arg0); - excludes.add("MyValueServiceCompositeMissingScaComposite"); - 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); - TestAllCompositesTest t = new TestAllCompositesTest(""); - File dir = new File(testsDir); - - if (dir.isDirectory()) { - String[] test_composites = dir.list(); - - for (int i = 0; i < test_composites.length; i++) { - File test_composite = new File(testsDir, test_composites[i]); - String composite_name = null; - if (test_composite.isDirectory()) { - composite_name = test_composite.getName(); - if (!excludes.contains(composite_name.intern())) { - t.testCompositeDeploy(composite_name, create_results, "c:\\colin", "cp"); - } - } - System.out.println(""); - } - } - } - - public void testDeployToolNullParms() { - //Utils.setReportArtefacts(true); - TestAllCompositesTest t = new TestAllCompositesTest(""); - File dir = new File(testsDir); - - if (dir.isDirectory()) { - String[] test_composites = dir.list(); - - for (int i = 0; i < test_composites.length; i++) { - File test_composite = new File(testsDir, test_composites[i]); - String composite_name = null; - if (test_composite.isDirectory()) { - composite_name = test_composite.getName(); - if (!excludes.contains(composite_name.intern())) { - t.testCompositeDeploy(composite_name, create_results, null, null); - } - } - System.out.println(""); - } - } - } -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java deleted file mode 100644 index d531010419..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java +++ /dev/null @@ -1,340 +0,0 @@ - - -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 = "d:\\tuscany\\cpp\\sca\\tools\\scagen\\junit\\"; - - public static String junit_composites = root + "testinput\\composites\\"; - - 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 testComposite 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") || child.getName().equals(".svn"))) { - clearDirButNotExpectedOutputSubDir(dir - .getAbsolutePath() - + File.separator + files[i]); - } - } - else - { - if( !child.delete() ) - { - System.out.println("File "+outputDir+"/"+child.getName()+" could not be deleted"); - } - } - } - } - - } - - public void testComposite(String composite, boolean check) { - - Options.reset(); - setTestcase(composite); - 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 testCompositeDeploy(String composite, boolean check, - String deployDir, String command) { - - Options.reset(); - setTestcase(composite); - 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_composites + 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd deleted file mode 100644 index 21a08cebb5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd +++ /dev/null @@ -1,20 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -rm -rf out -java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\packages\MyValueServiceComposite -output c:\hydra\out diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd deleted file mode 100644 index da8305031b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -java -jar scagen.jar -dirX c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\packages\MyValueServiceComposite -output c:\hydra\out diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd deleted file mode 100644 index 79432708b2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -java -jar scagen.jar -dir x:\not_there -output c:\hydra\irrelevant diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd deleted file mode 100644 index 302ccdb06a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\packages\MyValueServiceComposite -output r:\hydra\out diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd deleted file mode 100644 index 2c67915811..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -copy c:\workspaces\wid60-no-core\Hydra.sca.tools\scagen.jar . \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/Calculator.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/Calculator.h deleted file mode 100644 index 99c4158d1a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/Calculator.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.componentType deleted file mode 100644 index 41bbb22bde..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.componentType +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.h deleted file mode 100644 index 3f97eacef2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/CalculatorImpl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/sca.composite deleted file mode 100644 index 04d3e8fbdb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorCompositeAndComponent/sca.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h deleted file mode 100644 index bc14167841..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h deleted file mode 100644 index af140f9575..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/sca.composite deleted file mode 100644 index d527d9c358..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/sca.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType deleted file mode 100644 index 9d226cd5dc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h deleted file mode 100644 index d10bfb4b1a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType deleted file mode 100644 index d717e8636e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h deleted file mode 100644 index 182d9d89f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment deleted file mode 100644 index 733b4700e7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h deleted file mode 100644 index d1a634999c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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: -//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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType deleted file mode 100644 index bb81f4d66b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h deleted file mode 100644 index c325a90b1e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment deleted file mode 100644 index cb63dd1f06..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h deleted file mode 100644 index 85fac59da8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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: -//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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType deleted file mode 100644 index bb81f4d66b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h deleted file mode 100644 index 95b70c3017..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.fragment deleted file mode 100644 index 5c5cb78b87..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfo.h deleted file mode 100644 index 7bd355b3ab..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.componentType deleted file mode 100644 index bb81f4d66b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.h deleted file mode 100644 index 540873174b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/CustomerInfoImpl.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValue.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValue.h deleted file mode 100644 index 4334c82eca..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValue.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.componentType deleted file mode 100644 index b83a65be8c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.componentType +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.hpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.hpp deleted file mode 100644 index 98a342fcb0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 3f9feeed30..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/StockQuoteService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/StockQuoteService.h deleted file mode 100644 index 6a8fd51534..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/StockQuoteService.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/sca.composite deleted file mode 100644 index 42c50da77f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceComposite/sca.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.fragment deleted file mode 100644 index 48d34f7957..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.h deleted file mode 100644 index 928480df1f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfo.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -}; - - -class CustomerInfoSecond -{ -public: - virtual const char* getCustomerInformationSecond(const char* customerID) = 0; - -}; - - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.componentType deleted file mode 100644 index bb81f4d66b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.h deleted file mode 100644 index 8d2f810db0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/CustomerInfoImpl.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValue.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValue.h deleted file mode 100644 index 4334c82eca..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValue.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.componentType deleted file mode 100644 index b83a65be8c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.componentType +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.hpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.hpp deleted file mode 100644 index 98a342fcb0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 3f9feeed30..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/StockQuoteService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/StockQuoteService.h deleted file mode 100644 index 6a8fd51534..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/StockQuoteService.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/sca.composite deleted file mode 100644 index 42c50da77f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespace/sca.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValue.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValue.h deleted file mode 100644 index af7687892d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValue.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// MyValue.h: interface for the MyValueImpl class. -// -////////////////////////////////////////////////////////////////////// - -#ifndef MyValue_h -#define MyValue_h -#include -using std::string; - -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 - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType deleted file mode 100644 index 05e70d64f7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp deleted file mode 100644 index d9c7823f4b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ -// Class definition for the implementation - -#ifndef MyValueImpl_h -#define MyValueImpl_h - -#include "MyValue.h" - - -namespace myvaluecorp -{ - namespace implns - { - - 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 - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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" - - -namespace myvaluecorp -{ - namespace implns - { - - 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/sca.composite deleted file mode 100644 index 2f1749a4a1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/sca.composite +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValue.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValue.h deleted file mode 100644 index bbfcf15ed1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValue.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.componentType deleted file mode 100644 index f5921f4216..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.componentType +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.hpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.hpp deleted file mode 100644 index 98a342fcb0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/MyValueImpl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/sca.composite deleted file mode 100644 index 6171c47fba..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespace/sca.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValue.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValue.h deleted file mode 100644 index 10c59480a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValue.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType deleted file mode 100644 index be5bc060c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp deleted file mode 100644 index 98a342fcb0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/sca.composite deleted file mode 100644 index 6171c47fba..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/sca.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/CustomerInfo.fragmentX b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/CustomerInfo.fragmentX deleted file mode 100644 index 717ce02ede..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/CustomerInfo.fragmentX +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/sca.compositeX b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/sca.compositeX deleted file mode 100644 index bbda577c28..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeMissingScaComposite/sca.compositeX +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.fragment deleted file mode 100644 index 5c5cb78b87..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.fragment +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.h deleted file mode 100644 index 928480df1f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfo.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -}; - - -class CustomerInfoSecond -{ -public: - virtual const char* getCustomerInformationSecond(const char* customerID) = 0; - -}; - - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.componentType deleted file mode 100644 index bb81f4d66b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.h deleted file mode 100644 index c275383ab4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/CustomerInfoImpl.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValue.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValue.h deleted file mode 100644 index 4334c82eca..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValue.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.componentType deleted file mode 100644 index b83a65be8c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.componentType +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.hpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.hpp deleted file mode 100644 index 98a342fcb0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index 3f9feeed30..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/StockQuoteService.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/StockQuoteService.h deleted file mode 100644 index 6a8fd51534..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/StockQuoteService.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/sca.composite b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/sca.composite deleted file mode 100644 index 42c50da77f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/MyValueServiceCompositeTwoClasses/sca.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - MyValueServiceComponent - - - - - - - - CustomerInfoComponent - StockQuoteService - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment deleted file mode 100644 index 27d28368f5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - x - 23 - 42 - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.h deleted file mode 100644 index 32bf7572dc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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* 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType deleted file mode 100644 index bb81f4d66b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h deleted file mode 100644 index 55f5813303..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp deleted file mode 100644 index 290124a2d7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - long ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h deleted file mode 100644 index 00b163ba76..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp deleted file mode 100644 index ceb34034e3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(long*)operation.getReturnValue() = impl->subtract(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h deleted file mode 100644 index 63bae2f75c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorCompositeAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CalculatorImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CalculatorImpl_CalculatorService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp deleted file mode 100644 index 19725c6fff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - long ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -long CalculatorBackImpl_CalculatorService_Proxy::addBack( long arg0, long arg1) -{ - Operation operation("addBack"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - long ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h deleted file mode 100644 index 277a3afb06..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp deleted file mode 100644 index 648fa5c8cb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(long*)operation.getReturnValue() = impl->subtractBack(p0, p1); - return; - } - if (operationName == "addBack") - { - long& p0 = *( long*)operation.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(long*)operation.getReturnValue() = impl->addBack(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h deleted file mode 100644 index bfa203598c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "subFolder/CalculatorBackImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CalculatorBackImpl_CalculatorService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp deleted file mode 100644 index 3f2b560cbc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - long ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -long CalculatorForwardImpl_CalculatorService_Proxy::addForward( long arg0, long arg1) -{ - Operation operation("addForward"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - long ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h deleted file mode 100644 index 9213ec625b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp deleted file mode 100644 index 4f5ab80728..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(long*)operation.getReturnValue() = impl->subtractForward(p0, p1); - return; - } - if (operationName == "addForward") - { - long& p0 = *( long*)operation.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(long*)operation.getReturnValue() = impl->addForward(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h deleted file mode 100644 index 0cb8404ca3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "subFolder/CalculatorForwardImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CalculatorForwardImpl_CalculatorService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index f1bb7cafaf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,596 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar( char* arg0, const char* arg1) -{ - Operation operation("getCustomerInfoAChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0, char* arg1) -{ - Operation operation("getCustomerInfoBChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char* arg0, char arg1) -{ - Operation operation("getCustomerInfoCChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char* arg0, char arg1) -{ - Operation operation("getCustomerInfoDChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0, char* arg1) -{ - Operation operation("getCustomerInfoEChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0, char* arg1, char* arg2) -{ - Operation operation("getCustomerInfoFChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - operation.addParameter(&arg2); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( char* arg0, char* arg1, char* arg2, signed char* arg3) -{ - Operation operation("getCustomerInfoGChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - operation.addParameter(&arg2); - operation.addParameter(&arg3); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char arg1) -{ - Operation operation("getCustomerInfoHChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char* arg1) -{ - Operation operation("getCustomerInfoHChar"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0, const long* arg1) -{ - Operation operation("getCustomerInformationLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0, const long* arg1) -{ - Operation operation("getCustomerInfoALong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0, long* arg1) -{ - Operation operation("getCustomerInfoBLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0, long arg1) -{ - Operation operation("getCustomerInfoCLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0, long arg1) -{ - Operation operation("getCustomerInfoDLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0, long* arg1) -{ - Operation operation("getCustomerInfoELong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0, long* arg1) -{ - Operation operation("getCustomerInfoFLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0, signed long* arg1) -{ - Operation operation("getCustomerInfoGLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( signed long* arg0, signed long* arg1) -{ - Operation operation("getCustomerInfoHLong"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt( char* arg0, const int* arg1) -{ - Operation operation("getCustomerInformationInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt( char* arg0, const int* arg1) -{ - Operation operation("getCustomerInfoAInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( char* arg0, int* arg1) -{ - Operation operation("getCustomerInfoBInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( char* arg0, int arg1) -{ - Operation operation("getCustomerInfoCInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( char* arg0, int arg1) -{ - Operation operation("getCustomerInfoDInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( char* arg0, int* arg1) -{ - Operation operation("getCustomerInfoEInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( char* arg0, int* arg1) -{ - Operation operation("getCustomerInfoFInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( char* arg0, signed int* arg1) -{ - Operation operation("getCustomerInfoGInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( char* arg0, unsigned int* arg1) -{ - Operation operation("getCustomerInfoHInt"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64( Diamond& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInformationint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64( Diamond& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInfoAint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( Diamond& arg0, __int64* arg1) -{ - Operation operation("getCustomerInfoBint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( Diamond& arg0, __int64 arg1) -{ - Operation operation("getCustomerInfoCint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( Diamond& arg0, __int64 arg1) -{ - Operation operation("getCustomerInfoDint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( Diamond& arg0, __int64* arg1) -{ - Operation operation("getCustomerInfoEint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( Diamond& arg0, __int64* arg1) -{ - Operation operation("getCustomerInfoFint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( Diamond& arg0, signed __int64* arg1) -{ - Operation operation("getCustomerInfoGint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64(const Diamond& arg0, unsigned int64* arg1) -{ - Operation operation("getCustomerInfoHint64"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid( float& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInformationVoid"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const void* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const float& arg0, const __int64* arg1) -{ - Operation operation("getCustomerInfoAVoid"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - target->invoke(operation); - return; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid() -{ - Operation operation("getCustomerInfoBVoid"); - target->invoke(operation); - return; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid() -{ - Operation operation("getCustomerInfoCVoid"); - target->invoke(operation); - return; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid() -{ - Operation operation("getCustomerInfoDVoid"); - operation.addParameter(&arg0); - target->invoke(operation); - return; -} - -char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEVoid() -{ - Operation operation("getCustomerInfoEVoid"); - operation.addParameter(&arg0); - char ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFVoid() -{ - Operation operation("getCustomerInfoFVoid"); - char ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGVoid() -{ - Operation operation("getCustomerInfoGVoid"); - operation.addParameter(&arg0); - char ret; - operation.setReturnValue(&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"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - operation.addParameter(&arg2); - operation.addParameter(&arg3); - operation.addParameter(&arg4); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( int* arg0, int* arg1, int* arg2, char* customer arg3) -{ - Operation operation("getCustomerInfoBInline"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - operation.addParameter(&arg2); - operation.addParameter(&arg3); - int ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0) -{ - Operation operation("getCustomerInfoCInline"); - operation.addParameter(&arg0); - friend const unsigned int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0, const char arg1) -{ - Operation operation("getCustomerInfoTrickyA"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - int ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0, int arg1) -{ - Operation operation("getCustomerInfoTrickyB"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - int ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index cb9e4e6e2a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 1f35f8fc96..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInformationChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoAChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoAChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoBChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - char* p1 = *( char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoBChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoCChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - char& p1 = *( char*)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoCChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoDChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - char& p1 = *( char*)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoDChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoEChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - char* p1 = *( char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoEChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoFChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - char* p1 = *( char**)operation.getParameterValue(1); - char* p2 = *( char**)operation.getParameterValue(2); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoFChar(p0, p1, p2); - return; - } - if (operationName == "getCustomerInfoGChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - char* p1 = *( char**)operation.getParameterValue(1); - char* p2 = *( char**)operation.getParameterValue(2); - signed char* p3 = *( signed char**)operation.getParameterValue(3); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoGChar(p0, p1, p2, p3); - return; - } - if (operationName == "getCustomerInfoHChar") - { - unsigned char* p0 = *( unsigned char**)operation.getParameterValue(0); - const char& p1 = *(const char*)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoHChar(p0, p1); - return; - } - if (operationName == "getCustomerInfoHChar") - { - unsigned char* p0 = *( unsigned char**)operation.getParameterValue(0); - const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoHChar(p0, p1); - return; - } - if (operationName == "getCustomerInformationLong") - { - const long* p0 = *(const long**)operation.getParameterValue(0); - const long* p1 = *(const long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInformationLong(p0, p1); - return; - } - if (operationName == "getCustomerInfoALong") - { - const long* p0 = *(const long**)operation.getParameterValue(0); - const long* p1 = *(const long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoALong(p0, p1); - return; - } - if (operationName == "getCustomerInfoBLong") - { - long* p0 = *( long**)operation.getParameterValue(0); - long* p1 = *( long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoBLong(p0, p1); - return; - } - if (operationName == "getCustomerInfoCLong") - { - long& p0 = *( long*)operation.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoCLong(p0, p1); - return; - } - if (operationName == "getCustomerInfoDLong") - { - long& p0 = *( long*)operation.getParameterValue(0); - long& p1 = *( long*)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoDLong(p0, p1); - return; - } - if (operationName == "getCustomerInfoELong") - { - long* p0 = *( long**)operation.getParameterValue(0); - long* p1 = *( long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoELong(p0, p1); - return; - } - if (operationName == "getCustomerInfoFLong") - { - long* p0 = *( long**)operation.getParameterValue(0); - long* p1 = *( long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoFLong(p0, p1); - return; - } - if (operationName == "getCustomerInfoGLong") - { - signed long* p0 = *( signed long**)operation.getParameterValue(0); - signed long* p1 = *( signed long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoGLong(p0, p1); - return; - } - if (operationName == "getCustomerInfoHLong") - { - signed long* p0 = *( signed long**)operation.getParameterValue(0); - signed long* p1 = *( signed long**)operation.getParameterValue(1); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoHLong(p0, p1); - return; - } - if (operationName == "getCustomerInformationInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - const int* p1 = *(const int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInformationInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoAInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - const int* p1 = *(const int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoAInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoBInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - int* p1 = *( int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoBInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoCInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - int& p1 = *( int*)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoCInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoDInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - int& p1 = *( int*)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoDInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoEInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - int* p1 = *( int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoEInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoFInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - int* p1 = *( int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoFInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoGInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - signed int* p1 = *( signed int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoGInt(p0, p1); - return; - } - if (operationName == "getCustomerInfoHInt") - { - char* p0 = *( char**)operation.getParameterValue(0); - unsigned int* p1 = *( unsigned int**)operation.getParameterValue(1); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoHInt(p0, p1); - return; - } - if (operationName == "getCustomerInformationint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - const __int64* p1 = *(const __int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInformationint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoAint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - const __int64* p1 = *(const __int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoAint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoBint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - __int64* p1 = *( __int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoBint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoCint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - __int64& p1 = *( __int64*)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoCint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoDint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - __int64& p1 = *( __int64*)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoDint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoEint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - __int64* p1 = *( __int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoEint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoFint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - __int64* p1 = *( __int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoFint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoGint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - signed __int64* p1 = *( signed __int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoGint64(p0, p1); - return; - } - if (operationName == "getCustomerInfoHint64") - { - Diamond& p0 = *(Diamond*)operation.getParameterValue(0); - unsigned int64* p1 = *( unsigned int64**)operation.getParameterValue(1); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoHint64(p0, p1); - return; - } - if (operationName == "getCustomerInformationVoid") - { - float& p0 = *(float*)operation.getParameterValue(0); - const __int64* p1 = *(const __int64**)operation.getParameterValue(1); - *(const void**)operation.getReturnValue() = impl->getCustomerInformationVoid(p0, p1); - return; - } - if (operationName == "getCustomerInfoAVoid") - { - float& p0 = *(float*)operation.getParameterValue(0); - const __int64* p1 = *(const __int64**)operation.getParameterValue(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.getParameterValue(0); - int& p1 = *( int*)operation.getParameterValue(1); - int& p2 = *( int*)operation.getParameterValue(2); - int& p3 = *( int*)operation.getParameterValue(3); - char* customer p4 = *( char* customer*)operation.getParameterValue(4); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoAInline(p0, p1, p2, p3, p4); - return; - } - if (operationName == "getCustomerInfoBInline") - { - int* p0 = *( int**)operation.getParameterValue(0); - int* p1 = *( int**)operation.getParameterValue(1); - int* p2 = *( int**)operation.getParameterValue(2); - char* customer p3 = *( char* customer*)operation.getParameterValue(3); - *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0, p1, p2, p3); - return; - } - if (operationName == "getCustomerInfoCInline") - { - char* customer p0 = *( char* customer*)operation.getParameterValue(0); - *(friend const unsigned int**)operation.getReturnValue() = impl->getCustomerInfoCInline(p0); - return; - } - if (operationName == "getCustomerInfoTrickyA") - { - const char& p0 = *(const char*)operation.getParameterValue(0); - const char& p1 = *(const char*)operation.getParameterValue(1); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0, p1); - return; - } - if (operationName == "getCustomerInfoTrickyB") - { - int& p0 = *( int*)operation.getParameterValue(0); - int& p1 = *( int*)operation.getParameterValue(1); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 94b1d5cb4d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index 2dd37cba99..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar(const char* arg0) -{ - Operation operation("getCustomerInfoAChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0) -{ - Operation operation("getCustomerInfoBChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char arg0) -{ - Operation operation("getCustomerInfoCChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char arg0) -{ - Operation operation("getCustomerInfoDChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0) -{ - Operation operation("getCustomerInfoEChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0) -{ - Operation operation("getCustomerInfoFChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( signed char* arg0) -{ - Operation operation("getCustomerInfoGChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0) -{ - Operation operation("getCustomerInfoHChar"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0) -{ - Operation operation("getCustomerInformationLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0) -{ - Operation operation("getCustomerInfoALong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0) -{ - Operation operation("getCustomerInfoBLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0) -{ - Operation operation("getCustomerInfoCLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0) -{ - Operation operation("getCustomerInfoDLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0) -{ - Operation operation("getCustomerInfoELong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0) -{ - Operation operation("getCustomerInfoFLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0) -{ - Operation operation("getCustomerInfoGLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( unsigned long* arg0) -{ - Operation operation("getCustomerInfoHLong"); - operation.addParameter(&arg0); - const long* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt(const int* arg0) -{ - Operation operation("getCustomerInformationInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt(const int* arg0) -{ - Operation operation("getCustomerInfoAInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( int* arg0) -{ - Operation operation("getCustomerInfoBInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( int arg0) -{ - Operation operation("getCustomerInfoCInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( int arg0) -{ - Operation operation("getCustomerInfoDInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( int* arg0) -{ - Operation operation("getCustomerInfoEInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( int* arg0) -{ - Operation operation("getCustomerInfoFInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( signed int* arg0) -{ - Operation operation("getCustomerInfoGInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( unsigned int* arg0) -{ - Operation operation("getCustomerInfoHInt"); - operation.addParameter(&arg0); - const int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64(const __int64* arg0) -{ - Operation operation("getCustomerInformationint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64(const __int64* arg0) -{ - Operation operation("getCustomerInfoAint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( __int64* arg0) -{ - Operation operation("getCustomerInfoBint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( __int64 arg0) -{ - Operation operation("getCustomerInfoCint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( __int64 arg0) -{ - Operation operation("getCustomerInfoDint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( __int64* arg0) -{ - Operation operation("getCustomerInfoEint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( __int64* arg0) -{ - Operation operation("getCustomerInfoFint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( signed __int64* arg0) -{ - Operation operation("getCustomerInfoGint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64( unsigned int64* arg0) -{ - Operation operation("getCustomerInfoHint64"); - operation.addParameter(&arg0); - const __int64* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid(const __int64* arg0) -{ - Operation operation("getCustomerInformationVoid"); - operation.addParameter(&arg0); - const void* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const __int64* arg0) -{ - Operation operation("getCustomerInfoAVoid"); - operation.addParameter(&arg0); - target->invoke(operation); - return; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid() -{ - Operation operation("getCustomerInfoBVoid"); - target->invoke(operation); - return; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid() -{ - Operation operation("getCustomerInfoCVoid"); - target->invoke(operation); - return; -} - -void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid() -{ - Operation operation("getCustomerInfoDVoid"); - operation.addParameter(&arg0); - target->invoke(operation); - return; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( char* customer arg0) -{ - Operation operation("getCustomerInfoAInline"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( char* customer arg0) -{ - Operation operation("getCustomerInfoBInline"); - operation.addParameter(&arg0); - int ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0) -{ - Operation operation("getCustomerInfoCInline"); - operation.addParameter(&arg0); - friend const unsigned int* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0) -{ - Operation operation("getCustomerInfoTrickyA"); - operation.addParameter(&arg0); - int ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0) -{ - Operation operation("getCustomerInfoTrickyB"); - operation.addParameter(&arg0); - int ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index 75f912d3ae..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index e0da638ea0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInformationChar(p0); - return; - } - if (operationName == "getCustomerInfoAChar") - { - const char* p0 = *(const char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoAChar(p0); - return; - } - if (operationName == "getCustomerInfoBChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoBChar(p0); - return; - } - if (operationName == "getCustomerInfoCChar") - { - char& p0 = *( char*)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoCChar(p0); - return; - } - if (operationName == "getCustomerInfoDChar") - { - char& p0 = *( char*)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoDChar(p0); - return; - } - if (operationName == "getCustomerInfoEChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoEChar(p0); - return; - } - if (operationName == "getCustomerInfoFChar") - { - char* p0 = *( char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoFChar(p0); - return; - } - if (operationName == "getCustomerInfoGChar") - { - signed char* p0 = *( signed char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoGChar(p0); - return; - } - if (operationName == "getCustomerInfoHChar") - { - unsigned char* p0 = *( unsigned char**)operation.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoHChar(p0); - return; - } - if (operationName == "getCustomerInformationLong") - { - const long* p0 = *(const long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInformationLong(p0); - return; - } - if (operationName == "getCustomerInfoALong") - { - const long* p0 = *(const long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoALong(p0); - return; - } - if (operationName == "getCustomerInfoBLong") - { - long* p0 = *( long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoBLong(p0); - return; - } - if (operationName == "getCustomerInfoCLong") - { - long& p0 = *( long*)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoCLong(p0); - return; - } - if (operationName == "getCustomerInfoDLong") - { - long& p0 = *( long*)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoDLong(p0); - return; - } - if (operationName == "getCustomerInfoELong") - { - long* p0 = *( long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoELong(p0); - return; - } - if (operationName == "getCustomerInfoFLong") - { - long* p0 = *( long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoFLong(p0); - return; - } - if (operationName == "getCustomerInfoGLong") - { - signed long* p0 = *( signed long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoGLong(p0); - return; - } - if (operationName == "getCustomerInfoHLong") - { - unsigned long* p0 = *( unsigned long**)operation.getParameterValue(0); - *(const long**)operation.getReturnValue() = impl->getCustomerInfoHLong(p0); - return; - } - if (operationName == "getCustomerInformationInt") - { - const int* p0 = *(const int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInformationInt(p0); - return; - } - if (operationName == "getCustomerInfoAInt") - { - const int* p0 = *(const int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoAInt(p0); - return; - } - if (operationName == "getCustomerInfoBInt") - { - int* p0 = *( int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoBInt(p0); - return; - } - if (operationName == "getCustomerInfoCInt") - { - int& p0 = *( int*)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoCInt(p0); - return; - } - if (operationName == "getCustomerInfoDInt") - { - int& p0 = *( int*)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoDInt(p0); - return; - } - if (operationName == "getCustomerInfoEInt") - { - int* p0 = *( int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoEInt(p0); - return; - } - if (operationName == "getCustomerInfoFInt") - { - int* p0 = *( int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoFInt(p0); - return; - } - if (operationName == "getCustomerInfoGInt") - { - signed int* p0 = *( signed int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoGInt(p0); - return; - } - if (operationName == "getCustomerInfoHInt") - { - unsigned int* p0 = *( unsigned int**)operation.getParameterValue(0); - *(const int**)operation.getReturnValue() = impl->getCustomerInfoHInt(p0); - return; - } - if (operationName == "getCustomerInformationint64") - { - const __int64* p0 = *(const __int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInformationint64(p0); - return; - } - if (operationName == "getCustomerInfoAint64") - { - const __int64* p0 = *(const __int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoAint64(p0); - return; - } - if (operationName == "getCustomerInfoBint64") - { - __int64* p0 = *( __int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoBint64(p0); - return; - } - if (operationName == "getCustomerInfoCint64") - { - __int64& p0 = *( __int64*)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoCint64(p0); - return; - } - if (operationName == "getCustomerInfoDint64") - { - __int64& p0 = *( __int64*)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoDint64(p0); - return; - } - if (operationName == "getCustomerInfoEint64") - { - __int64* p0 = *( __int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoEint64(p0); - return; - } - if (operationName == "getCustomerInfoFint64") - { - __int64* p0 = *( __int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoFint64(p0); - return; - } - if (operationName == "getCustomerInfoGint64") - { - signed __int64* p0 = *( signed __int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoGint64(p0); - return; - } - if (operationName == "getCustomerInfoHint64") - { - unsigned int64* p0 = *( unsigned int64**)operation.getParameterValue(0); - *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoHint64(p0); - return; - } - if (operationName == "getCustomerInformationVoid") - { - const __int64* p0 = *(const __int64**)operation.getParameterValue(0); - *(const void**)operation.getReturnValue() = impl->getCustomerInformationVoid(p0); - return; - } - if (operationName == "getCustomerInfoAVoid") - { - const __int64* p0 = *(const __int64**)operation.getParameterValue(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.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoAInline(p0); - return; - } - if (operationName == "getCustomerInfoBInline") - { - char* customer p0 = *( char* customer*)operation.getParameterValue(0); - *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0); - return; - } - if (operationName == "getCustomerInfoCInline") - { - char* customer p0 = *( char* customer*)operation.getParameterValue(0); - *(friend const unsigned int**)operation.getReturnValue() = impl->getCustomerInfoCInline(p0); - return; - } - if (operationName == "getCustomerInfoTrickyA") - { - const char& p0 = *(const char*)operation.getParameterValue(0); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0); - return; - } - if (operationName == "getCustomerInfoTrickyB") - { - int& p0 = *( int*)operation.getParameterValue(0); - *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 94b1d5cb4d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp deleted file mode 100644 index a9d033d415..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h deleted file mode 100644 index 594f404d13..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index ba75bde415..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h deleted file mode 100644 index b85533cfd4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index eeb977a62a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index d61c806e44..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index f626664679..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index d3eef80e8f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index f21b0dd83c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index 3d1d279b7c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 6d418bc330..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - commonj::sdo::DataObjectPtr ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index ad5cee3ca7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceComposite/expected_output/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index 3dcfbb5a08..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index 2bf1b90e87..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index b2f23f5cf1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -using Other::CustomerInfoImpl; - -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) : CPPServiceWrapper(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.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 82995c96b0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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: - Other::CustomerInfoImpl* impl; -}; - -#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index eeb977a62a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index d61c806e44..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index f03b0fbc10..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -using Other::MyValueImpl; - -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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index df388bf43d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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: - Other::MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index f21b0dd83c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index 3d1d279b7c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 6d418bc330..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - commonj::sdo::DataObjectPtr ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index ad5cee3ca7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index 2e32caea94..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) -{ - Operation operation("getMyValueSOther"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) -{ - Operation operation("getCustnameOther"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) -{ - Operation operation("getCustnamecsOther"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) -{ - Operation operation("getMyValueSOther"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) -{ - Operation operation("getCustnameOther"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) -{ - Operation operation("getCustnamecsOther"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index d3b173ee57..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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 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 - - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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 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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index 0495bb9abc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -using myvaluecorp::implns::MyValueImpl; - -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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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; - -using myvaluecorp::implns::MyValueImpl; - -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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index 5522cde72a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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: - myvaluecorp::implns::MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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: - myvaluecorp::implns::MyValueImpl* impl; -}; - -#endif // MyValueImpl_MyValueService_Wrapper_h - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index 70643f76f6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) -{ - Operation operation("getMyValueSOther"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) -{ - Operation operation("getCustnameOther"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) -{ - Operation operation("getCustnamecsOther"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 210da9a64c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index e924448d4c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index d3eef80e8f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index 70643f76f6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0) -{ - Operation operation("getMyValueSOther"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0) -{ - Operation operation("getCustnameOther"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0) -{ - Operation operation("getCustnamecsOther"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 210da9a64c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index e924448d4c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueOther(p0); - return; - } - if (operationName == "getMyValueSOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0); - return; - } - if (operationName == "getCustnameOther") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustnameOther(p0); - return; - } - if (operationName == "getCustnamecsOther") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecsOther(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index d3eef80e8f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp deleted file mode 100644 index a9d033d415..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h deleted file mode 100644 index 594f404d13..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 86b12f82e1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h deleted file mode 100644 index b85533cfd4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp deleted file mode 100644 index eeb977a62a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0) -{ - Operation operation("getMyValueS"); - operation.addParameter(&arg0); - float ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0) -{ - Operation operation("getCustname"); - operation.addParameter(&arg0); - string ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0) -{ - Operation operation("getCustnamecs"); - operation.addParameter(&arg0); - target->invoke(operation); - return *(const string*)operation.getReturnValue(); -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h deleted file mode 100644 index 742947ca69..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h +++ /dev/null @@ -1,41 +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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp deleted file mode 100644 index 9d8604c587..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValue(p0); - return; - } - if (operationName == "getMyValueS") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(float*)operation.getReturnValue() = impl->getMyValueS(p0); - return; - } - if (operationName == "getCustname") - { - string& p0 = *(string*)operation.getParameterValue(0); - *(string*)operation.getReturnValue() = impl->getCustname(p0); - return; - } - if (operationName == "getCustnamecs") - { - string& p0 = *( string*)operation.getParameterValue(0); - const string& ret = impl->getCustnamecs(p0); - operation.setReturnValue(&ret); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h deleted file mode 100644 index d3eef80e8f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "MyValueImpl.hpp" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp deleted file mode 100644 index f21b0dd83c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h deleted file mode 100644 index 3d1d279b7c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp deleted file mode 100644 index 6d418bc330..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - commonj::sdo::DataObjectPtr ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h deleted file mode 100644 index ad5cee3ca7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/MyValueServiceCompositeTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp deleted file mode 100644 index 2a060fc47e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoACharPublic( char* arg0, const char* arg1) -{ - Operation operation("getCustomerInfoACharPublic"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - -const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBCharPublic( char* arg0, char* arg1) -{ - Operation operation("getCustomerInfoBCharPublic"); - operation.addParameter(&arg0); - operation.addParameter(&arg1); - const char* ret; - operation.setReturnValue(&ret); - target->invoke(operation); - return ret; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h deleted file mode 100644 index a9b56bdb5c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#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-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp deleted file mode 100644 index 9672e5efc7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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) : CPPServiceWrapper(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.getParameterValue(0); - const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInformationCharPublic(p0, p1); - return; - } - if (operationName == "getCustomerInfoACharPublic") - { - char* p0 = *( char**)operation.getParameterValue(0); - const char* p1 = *(const char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoACharPublic(p0, p1); - return; - } - if (operationName == "getCustomerInfoBCharPublic") - { - char* p0 = *( char**)operation.getParameterValue(0); - char* p1 = *( char**)operation.getParameterValue(1); - *(const char**)operation.getReturnValue() = impl->getCustomerInfoBCharPublic(p0, p1); - return; - } - - - throw ServiceRuntimeException("Invalid operation"); - -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h deleted file mode 100644 index 94b1d5cb4d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "CustomerInfoImpl.h" -#include "tuscany/sca/cpp/CPPServiceWrapper.h" - -class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/tools/scagen/lib/readme.txt b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/lib/readme.txt deleted file mode 100644 index d99c666c6a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/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-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.cmd b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.cmd deleted file mode 100644 index 8ab5e4abdf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.cmd +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -@java -jar %~d0%~p0scagen.jar %* diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.sh b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.sh deleted file mode 100755 index c50f28b98f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/scagen.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java deleted file mode 100644 index 4ccbe0c750..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java deleted file mode 100644 index 669901b4b5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java deleted file mode 100644 index 246a489c9c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java deleted file mode 100644 index 36d0af18b3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java deleted file mode 100644 index a2bb4ba858..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java deleted file mode 100644 index b6bdf92878..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java deleted file mode 100644 index 533e1fd14a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java deleted file mode 100644 index 235d0a13d8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java +++ /dev/null @@ -1,425 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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; - } - - } - - if(currentNamespace == null) - { - currentNamespace = word; - } - else - { - 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java deleted file mode 100644 index 317ad2fc44..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java deleted file mode 100644 index a25610c1f9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java deleted file mode 100644 index 6e951f03de..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java deleted file mode 100644 index 2d98e0a836..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java +++ /dev/null @@ -1,216 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java deleted file mode 100644 index 876d2dc3e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java deleted file mode 100644 index e51b2d781c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java deleted file mode 100644 index d7052b7843..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java +++ /dev/null @@ -1,506 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* - * 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java deleted file mode 100644 index 4bc0a455e7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java +++ /dev/null @@ -1,548 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -/* -* 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 COMPOSITE_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 composite root - * - * - */ - - static String scagenInputDir = "COMPOSITE_ROOT"; - - static String scagenOutputDir = "SCAGEN_OUTPUT"; - - static String newCompositeRoot = "NEW_COMPOSITE_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_COMPOSITE_ROOT\dest" output - // and - // false will result in a "inputDir c:\fred" - // "outputDir c:\bob" - // "input c:\fred\sca.composite" - // "output c:\bob\proxy.h" type output - String command = null; - - try { - newCompositeRoot = (String) Options.getOption("-deploy"); - command = (String) Options.getOption("-command"); - } catch (Exception e) { - // let it default - } - - if (null == newCompositeRoot) { - newCompositeRoot = "DEPLOY_COMPOSITE_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(newCompositeRoot, 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(newCompositeRoot, 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("/") || newCompositeRoot.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 = newCompositeRoot + 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html deleted file mode 100644 index c423477193..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html +++ /dev/null @@ -1,58 +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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java deleted file mode 100644 index 28974b41a6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 composite 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 compositeOrFragmentFile = (File) parameters - .get("compositeOrFragmentFile"); - File implHeaderFile = null; - if (null != compositeOrFragmentFile) { - File dir = compositeOrFragmentFile.getParentFile(); - implHeaderFile = new File(dir, implHeader); - } else { - throw new InternalError( - "Internal error: composite or fragment file not present in internal 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("/compositeFragment/component/@name"); - Utils - .screenMessage("Problem interpreting header or class attributes in " - + compName - + " component, in " - + compositeOrFragmentFile.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("implNamespace", 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 fully qualified classname of the - // first service method - Signature s = (Signature) methods.get(0); - String className = s.getTrimClassName(); - String namespace = s.getNamespace(); - if( namespace != null && namespace.length() > 0) - { - className = namespace + "::" + className; - } - - return className; - } - } - - /** - * 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; - } - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java deleted file mode 100644 index 6c86fa25b5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 compositeXML - * the composite 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 composite = ((File) parameters.get("compositeOrFragmentFile")).getPath(); - if (null == composite) { - composite = "unknown"; - } - - String component = (String) parameters.get("/composite/component/@name"); - if (null == component) { - component = (String) parameters - .get("/compositeFragment/component/@name"); - } - if (null == component) { - composite = "unknown"; - } - - String msg = "when processing composite " + composite; - - msg = msg - + "\nin this composite 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java deleted file mode 100644 index 3eb8dc7d98..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 CompositeOrFragmentFileHandler 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("composite", gdnh); - handlers.put("compositeFragment", 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 compositeXML - * the composite 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 compositeXML, File target, int depth) - throws Exception { - - if (null == compositeXML || null == target) { - return; - } - - parameters.put("compositeOrFragmentFile", compositeXML); - - Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, compositeXML - .getAbsolutePath()); - - Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, - "Scagen processing SCA composite file " - + compositeXML.getAbsolutePath()); - - super.actOnFile(compositeXML, target, depth); - - } -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java deleted file mode 100644 index 9cf7952afa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 composite 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 composite 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 composite - // 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java deleted file mode 100644 index 0756b5fc3b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java deleted file mode 100644 index 37c2a1a81c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java deleted file mode 100644 index 1ec393959d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 library name to the deployment tool if required. - if ("library".equals(attr.getNodeName())) { - //This is a path relative to the composite root. - //so we need to add it in. - File mod = (File) parameters.get("compositeOrFragmentFile"); - 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 /compositeFragment and /composite - // subtrees when we come across the root of either.. - if (contextXPath.equals("/compositeFragment")) { - //clear both this and "composite" - contextXPath = "/composite"; - } - - 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java deleted file mode 100644 index e7036037c6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java deleted file mode 100644 index 5a79b49092..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 "composite_root" - * - * @param parameters - * the map of name-value parameters. - */ - private void createProxyForReference(Map parameters) { - try { - String mr = (String) Options.getOption("-dir"); - parameters.put("composite_root", mr); - ServicesGenerator.handleInterfaceHeader(parameters, true); - - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java deleted file mode 100644 index 19e983c6b1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 - * Composite/FragmentFile handler visitor and pass it to a DirectoryScanner for - * processing. - */ -public class Scagen extends CParsingTool { - - public static Set COMPOSITE_EXTENSIONS = new HashSet(Arrays - .asList(new Object[] { "composite", "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 .composite 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); - CompositeOrFragmentFileHandler composite_handler = new CompositeOrFragmentFileHandler(); - - // Check and access the input SCA composite directory - String name = (String) Options.getOption("-dir"); - if (null == name) { - Utils - .screenMessage("Please provide a SCA composite 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 composite 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(composite_handler, - COMPOSITE_EXTENSIONS); - scanner.walkTree(source, outputDir, 1); - - if (0 == composite_handler.getFilesActedOn()) { - Utils - .screenMessage("No SCA composite or fragment files were found in: " - + source); - } - - failed = composite_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 composites)"); - 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 composite 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 composite'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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java deleted file mode 100644 index c4ad140bfd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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("composite_root", mr); - ServicesGenerator.handleInterfaceHeader(parameters, false); - - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java deleted file mode 100644 index 956db364a1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java +++ /dev/null @@ -1,831 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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_composite_root = (String) Options.getOption("-dir"); - parameters.put("composite_root", sca_composite_root); - - if (sca_composite_root != null && interfaceHeaderFilename != null - && interfaceHeaderFilename.length() > 0) { - String separator; - // Stick in a "/" (File.separator) if required. - if ((interfaceHeaderFilename.substring(0, 1).equals("/") || sca_composite_root - .substring(sca_composite_root.length() - 1, - sca_composite_root.length()).equals("/")) - || (interfaceHeaderFilename.substring(0, 1).equals("\\") || sca_composite_root - .substring(sca_composite_root.length() - 1, - sca_composite_root.length()).equals("\\")) - - ) { - separator = ""; - } else { - separator = File.separator; - } - interfaceHeaderFilename = sca_composite_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 compositeXmlFileHeader = null; - String compositeXmlFileHeaderNoExt = null; - Object compositeh = parameters - .get("/composite/component/implementation.cpp/@header"); - - if (compositeh == null) { - compositeh = parameters - .get("/compositeFragment/component/implementation.cpp/@header"); - } - - if (compositeh instanceof String) { - File f = new File((String) compositeh); - compositeXmlFileHeader = (String) compositeh; - - String fname = f.getName(); - compositeXmlFileHeaderNoExt = fname.substring(0, fname - .lastIndexOf('.')); - - } - - String implClassNameAttrFromCompositeFile = (String) parameters - .get("implClass"); - String implClassNamespaceAttrFromCompositeFile = (String) parameters - .get("implNamespace"); - - if(implClassNamespaceAttrFromCompositeFile == null || implClassNamespaceAttrFromCompositeFile.length() == 0) - { - implClassNamespaceAttrFromCompositeFile = ""; - } - else - { - implClassNamespaceAttrFromCompositeFile += "::"; - } - - 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, compositeXmlFileHeader, - compositeXmlFileHeaderNoExt, intfNamespace, - interfaceClassNameAttrFromComponentTypeFile, - implClassNameAttrFromCompositeFile, implClassNamespaceAttrFromCompositeFile); - -// // Print out the generated DOM -// StringWriter sw = new StringWriter(); -// OutputFormat outputFormat = new OutputFormat("xml", "UTF-8", true); -// XMLSerializer serializer = new XMLSerializer(sw, outputFormat); -// serializer.serialize(dom); -// System.out.println("DOM:\n"+sw.toString()); - - - 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 = "nocompositeXmlFileHeaderDefined"; - - 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 = "nocompositeXmlFileHeaderDefined"; - - 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 = "nocompositeXmlFileHeaderDefined"; - - 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 compositeXmlFileImplHeaderNameWithPathAndExt - * the source filename - * @param compositeXmlFileHeaderNoExtorPath - * 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 compositeXmlFileImplHeaderNameWithPathAndExt, - String compositeXmlFileHeaderNoExtorPath, String intfNamespace, - String intfClass, String implClass, String implNamespace) { - - 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", compositeXmlFileHeaderNoExtorPath); - } - - if (implClass != null) { - root.setAttribute("implNamespace", implNamespace); - } - - // 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 (compositeXmlFileImplHeaderNameWithPathAndExt == null) { - compositeXmlFileImplHeaderNameWithPathAndExt = "compositeXmlFileImplHeader"; - } - root.setAttribute("compositeXmlFileHeader", - compositeXmlFileImplHeaderNameWithPathAndExt); - - if (compositeXmlFileHeaderNoExtorPath == null) { - compositeXmlFileHeaderNoExtorPath = "compositeXmlFileHeaderNoExt"; - } - root.setAttribute("compositeXmlFileHeaderNoExt", - compositeXmlFileHeaderNoExtorPath); - - } 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java deleted file mode 100644 index dd260c9787..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* @version $Rev$ $Date$ */ - -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 compositeXML - * the composite 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 compositeXML, File target, int depth) - throws Exception { - - if (null == compositeXML || null == target) { - return; - } - - filesActedOn++; - - parameters.put("sourceFile", compositeXML); - parameters.put("targetFile", target); - - if (transformerFactory.getFeature(DOMSource.FEATURE) - && transformerFactory.getFeature(DOMResult.FEATURE)) { - Document dom = createDomFromXMLFile(compositeXML); - 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html deleted file mode 100644 index ea15ca587b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html +++ /dev/null @@ -1,159 +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 composite 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 composite root directory. All the sca.composite 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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl deleted file mode 100644 index b45fbb7b40..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - - - - - - - - - - - - - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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); - - - - - - - - - - - - return; - - - - - - - return *(*)operation.getReturnValue(); - - - - return *(*)operation.getReturnValue(); - - - - - - - - - - - - - - - - - ret; - operation.setReturnValue(&ret); - - - - - - - - - - - - - - operation.addParameter(&); - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl deleted file mode 100644 index 2f5edb3a93..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - - - - - #if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - - - - - - - - - - #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-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl deleted file mode 100644 index 915549788d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -using ; - - - - - - - - - - - - - - - - - - _ - - _Wrapper - -extern "C" -{ - - #if defined(WIN32) || defined(_WINDOWS) - __declspec(dllexport) - #endif - -* - -_Factory(tuscany::sca::model::Service* target) - { - return new (target); - } -} - - -::(Service* target) : CPPServiceWrapper(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.getParameterValue(); - - - - const - p = *( - const - - *)operation.getParameterValue(); - - - - DataObjectPtr& p = *(DataObjectPtr*)operation.getParameterValue(); - - - const & p = *( - const - - *)operation.getParameterValue(); - - - - - - - - - - - - - - - ; - - - ret = ; - - operation.setReturnValue(&ret); - - - - if(operation.getReturnValue() != NULL) - { - *(*)operation.getReturnValue() = ; - } - else - { - * ret = new ; - *ret = ; - operation.setReturnValue((const *)ret); - } - - - - - - impl->( - - - - - - - - - -) - - - -p - - - - , - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl b/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl deleted file mode 100644 index c8157fe2f6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - - - - - #if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - - - - - - - - - - #include "" - - - - #include "tuscany/sca/cpp/CPPServiceWrapper.h" - - - - - - - - - - -class - - : public tuscany::sca::cpp::CPPServiceWrapper -{ -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-1.0-incubating-M2-RC3/sca/xsd/sca-core.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-core.xsd deleted file mode 100644 index d7661e3994..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-core.xsd +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-composite.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-composite.xsd deleted file mode 100644 index 4bcc6747ba..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-composite.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-java.xsd deleted file mode 100644 index e20f0a9b50..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-implementation-java.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-java.xsd deleted file mode 100644 index a6028c1434..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-java.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-wsdl.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-wsdl.xsd deleted file mode 100644 index a3de838b7e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca-interface-wsdl.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca.xsd deleted file mode 100644 index 8853f25c11..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/sca.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/tuscany.xsd b/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/tuscany.xsd deleted file mode 100644 index 8bad940782..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sca/xsd/tuscany.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/AUTHORS b/tags/cpp-1.0-incubating-M2-RC3/sdo/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/COPYING b/tags/cpp-1.0-incubating-M2-RC3/sdo/COPYING deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/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-1.0-incubating-M2-RC3/sdo/ChangeLog b/tags/cpp-1.0-incubating-M2-RC3/sdo/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/Committers Guide.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/Committers Guide.txt deleted file mode 100644 index 5f82e39c14..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/Committers Guide.txt +++ /dev/null @@ -1,69 +0,0 @@ -Tuscany SDO Committers Guide -============================ - -All classes should be in the commonj/sdo namespace. - -The Tuscany SDO codebase consists of a number of abstract classes representing the SDO API. These -are accompanied by a set of classes whose names end in Impl, which are the implementations of the -API. For example the DataObject API is represented by the DataObject class, and implemented by -the DataObjectImpl class. - -When pointers to classes are handed out by the library, they are really pointing at instances of -the Impl class, but the application must not make that assumption. - -DataObjects and DataFactories inherit from a base class which maintains a reference count on -itself (RefCountingObject). The pointers handed out are really classes holding a pointer to -the object, such that they can contribute to the reference count when copied. These RefCountingPointers -must not be deleted, they dispose of the underlying object when the reference count drops to -zero. - -There is trace commented out of RefCountingObject, which can count and report the references. It is -particularly useful to check that all instances are cleared at the end of a program run. - -The API for metadata consists of the DataFactory, Property and Type classes. All Properties and Types -handed out to the client are const, so setting up the modifying the types is done using APIS of the -data factory. - -The process of creating types is usually done by loading them from XSD, but can also be performed -by using the data factory. Properties and Types may both be defined, but the data factory 'locks' -itself as soon as the first DataObject is created. It does this because at that point it needs to -resolve the type hierarchy, and perform validation. For consistency a Type may not be modified once -an instance has been created. - -A data object contains properties, which are of a particular Type, however the API allows access to -all properties using any of the methods. getString() may be called on a Boolean property etc. The -conversion is attempted by the Type class, and either throws an exception or passes back a converted -value according to the tables in the specification. - -The get/set APIs of DataObject are supplied by a set of macros in DataObjectImpl.cpp. These are -duplicated for string and non-string, and also make it hard to debug effectively. They will be -removed and replaced by methods in the future. For now, the easiest way to debug them is to be -aware that each eventually calls the private no-params method, so for example all the getString(...) -methods eventually call getString(). - -The internal string handling is partially working with the SDOXMLString class, and partially still uses -allocated char* buffers, these will be replaced by SDOXMLStrings in the future. - -The parsers for XML are absed on the SAX2Parser class, but the bulk of the processing is done by the -startElementNS and similar methods in the SDOSchemaSAX2parser and SDOSAX2Parser classes. These are called -back by the libxml2 library, and build a picture of the information which it then decoded by the XSDhelper -or XMLHelper class into metadata or data. - -There are easy targets for improvements of performance, particularly in DataObject and parsing of XSD -input, here is a list of a few that I can think of: - -DataObject frequently maps from Property to index, and this could be re-organized to avoid most of these. - -The allocation of space for property values could in most cases be dropped - its usually s fixed size -element. - -The use of DataObject as a means of storing lists of primitives is not optimal, and should be replaced. - -The ChangeSummary class holds the previous value of any property when it is changed. At present, for many- -valued properties, it holds the entire list as it was before an addition. This could just keep a record of -the changes, and only save the old list when serializing. - -Parsing the XSD loops though types checking that all substitutes are covered, it would be good to -replace this. - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/GettingStarted.html b/tags/cpp-1.0-incubating-M2-RC3/sdo/GettingStarted.html deleted file mode 100644 index 3573403e78..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/GettingStarted.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - Tuscany - Getting Started - - - -
      -
      -
      -

      Tuscany - Getting Started - SDO C++ Milestone release 2

      - -

      Tuscany SDO C++ is an implementation of the - Service Data Objects - for C++ 2.01 specification. - This page describes what is needed to install Tuscany SDO for C++.
      If you haven't already done so, the first - step is to download the SDO C++ Milestone release 2 of Apache Tuscany from our - download page.
      -

      -
      - - -
      -

      System Requirements

      - -

      In order to use Tuscany SDO there are some minimum requirements:

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      SoftwareDownload Link
      Operating systems: -
        -
      • Windows XP SP2
      • -
      • Linux
      • -
      -
      -
      Axis2C Release 0.94 - http://ws.apache.org/axis2/c/download.cgi
      - Please download and follow the installation instructions. Ensure you can run the Axis2C samples -
      libxml2 version 2.6.20 - http://xmlsoft.org/downloads.html
      - Most Linux systems have libxml2 by default. On Windows you need to download - and install libxml2 from - http://www.zlatkovic.com/libxml.en.html
      - Please read the installation notes for libxml2 particularly regarding it's - pre-req's iconv and zlib on Windows.
      - These libraries will need to be on the PATH in order to run Tuscany SDO. -
      Optional: STDCXX Release 4.1.3 - http://incubator.apache.org/stdcxx/download.html
      - STDCXX is the Apache implementation of the C++ Standard Library. Tuscany SDO - can be built using this library implementation rather than the default - platform libraries available on your operating system.
      - If you wish to use STDCXX please follow - these instructions to build STDCXX for Tuscany SDO - before following the instructions below to build SDO with STDCXX.
      -
      -
      -
      -

      Installing Tuscany SDO for C++

      -

      Getting Tuscany SDO for C++ working with the binary release on Linux

      -
        -
      1. Extract the binary tar package to a folder <tuscany_sdo_install_dir>
      2. -
      3. Add the <tuscany_sdo_install_dir>/lib directory to the LD_LIBRARY_PATH environment variable
      4. -
      -

      Getting Tuscany SDO for C++ working with the source release on Linux

      -
        -
      1. Extract the source tar package to a folder <tuscany_sdo_install_dir>
      2. -
      3. The following environment variables are required: -
          -
        • LIBXML2_INCLUDE=<path to libxml2 includes> -
        • LIBXML2_LIB=<path to libxml2 lib>
          - Note: If you are using the default installation of libxml2 these are usually:
          - LIBXML2_LIB=/usr/lib
          - LIBXML2_INCLUDE=/usr/include/libxml2
        • - -
        • AXIS2C_HOME=<path to axis2c version 0.94>
        • -
      4. -
      5. Build the source with the following command sequence: -
          -
        • ./configure --prefix=<tuscany_sdo_install_dir>/deploy --enable-static=no
        • -
        • make
        • -
        • make install
        • -
        - NOTE: If you don't provide a --prefix configure option, it will by default install into - /usr/local/tuscany/sdo. Use ./configure --help to see all the available options
      6. -
      7. Run the test: -
          -
        • cd to <tuscany_sdo_install_dir>/runtime/core/test
        • -
        • ./tuscany_sdo_test
        • -
      8. -
      - - -

      Getting Tuscany SDO for C++ working with the binary release on Windows

      -
        -
      1. Unzip the supplied zip file to a folder <tuscany_sdo_install_dir>
      2. -
      3. Add the <tuscany_sdo_install_dir>\bin directory to the PATH environment variable
      4. -
      -

      Getting Tuscany SDO for C++ working with the source release on Windows

      -
        -
      1. Unzip the supplied source zip file to a folder <tuscany_sdo_install_dir>
      2. -
      3. The following environment variables are required: -
          -
        • LIBXML2_HOME=<path to installed libxml2>
          -
        • AXIS2C_HOME=<path to axis2c version 0.94>
        • -
      4. -
      5. You must have set up the environment for Microsoft Visual C++ tools. The build command - will call vcvars32 to set the environment. Ensure the directory containing this is on your path. - This will be where you installed the compiler.
      6. -
      7. Build the source: -
          -
        • cd <tuscany_sdo_install_dir>
        • -
        • build
        • -
        - This will build all the projects and put the required output into the <tuscany_sdo_install_dir>\deploy directory
      8. -
      9. Run the test program: -
          -
        • sdotest.bat
        • -
        - The output will indicate the number of test run and passed. For example: -using Axis2C: D:\axis2c-bin-0.94-win32" -using TUSCANY_SDOCPP: d:\tuscany_sdo_cpp-1.0-incubator-M2-src\deploy -I/O warning : failed to load external entity "not_present.xsd" -I/O warning : failed to load external entity "not-present.xml" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -I/O warning : failed to load external entity "sca-policy.xsd" -Total tests:111 Tests passed:111 - -The I/O warning messages can be ignored. -
      10. -
      11. Add the <tuscany_sdo_install_dir>\deploy\bin directory to the PATH environment variable
      12. -
      -

      Getting Tuscany SDO for C++ working with the source release and Apache STDCXX on Windows

      -

      STDCXX is an implementation of the C++ Standard Library provided by Apache. - The website is at http://incubator.apache.org/stdcxx/. -

      -

      You must begin by downloading and building STDCXX as described here -

      -

      STDCXX is supported only when used with Microsoft Visual Studio C++ V7.1. Launch the - MSVC++ 7.1 studio by opening the file <tuscany_sdo_install_dir>\projectsvc7\tuscany_sdo\tuscany_sdo.sln -

      -

      Both the sdo_runtime and sdo_test projects include build configurations that - use STDCXX. There are several ways to access the build configurations, and all - are equally effective. As an example, open the Property pages for sdo_test by - right clicking on sdo_test in the Solution Explorer pane and selecting - Properties. The Configuration property in the top left corner of the pane is a - drop down box offering four options: Debug, Release, stdcxx-Debug, - stdcxx-Release. Choose the one you want and then launch the build. -

      -

      All components that are linked (by the linker) must all use the same C++ - Standard library. Therefore, if either sdo_test or sdo_runtime are built with - STDCXX then both must be. -

      -

      Tuscany SCA does not currently offer the option to build with stdcxx and so it - cannot be used with a version of SDO built using stdcxx. -

      -
      - -
      -

      Samples

      - - - - - - - -
      SDO Technology samples - Simple samples that emphasize how to to use SDO technology. Follow the - instructions on the samples Getting Started - page to build and run the Tuscany SDO samples -
      -
      -
      -

      Getting Help

      - -

      First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

      - -

      Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

      - - -

       

      - -

       

      - -

       

      - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/INSTALL b/tags/cpp-1.0-incubating-M2-RC3/sdo/INSTALL deleted file mode 100644 index 07946d51f4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -Please read the GettingStarted.html document for information on -building and installing Tuscany SDO for C++ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/LICENSE b/tags/cpp-1.0-incubating-M2-RC3/sdo/LICENSE deleted file mode 100755 index f433b1a53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/LICENSE +++ /dev/null @@ -1,177 +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 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/Makefile.am deleted file mode 100644 index 05bd99526f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = runtime -DIST_SUBDIRS = runtime samples -datadir=$(prefix) - -data_DATA = INSTALL README LICENSE COPYING NOTICE GettingStarted.html -EXTRA_DIST = LICENSE COPYING INSTALL README NOTICE sdotest.sh GettingStarted.html doc -dist-hook: - rm -rf `find $(distdir)/ -type d -name .svn` - rm -rf `find $(distdir)/ -type d -name .deps` - -install-data-hook: - rm -rf $(prefix)/samples - cp -r samples $(prefix) - rm -rf `find $(prefix)/samples -type d -name .svn` - rm -rf `find $(prefix)/samples -type d -name .deps` - rm -rf $(prefix)/doc - cp -r doc $(prefix) - rm -rf `find $(prefix)/doc -type d -name .svn` - rm -rf `find $(prefix)/doc -type d -name .deps` - -bindist: dist - rm -rf ${PACKAGE}-${PACKAGE_VERSION} - rm -rf ${PACKAGE}-${PACKAGE_VERSION}-src - rm -rf ${PACKAGE}-${PACKAGE_VERSION}-bin - gunzip -f ${PACKAGE}-${PACKAGE_VERSION}.tar.gz - tar -xf ${PACKAGE}-${PACKAGE_VERSION}.tar - mv ${PACKAGE}-${PACKAGE_VERSION} ${PACKAGE}-${PACKAGE_VERSION}-src - tar -cf - ${PACKAGE}-${PACKAGE_VERSION}-src | gzip -c > ${PACKAGE}-${PACKAGE_VERSION}-src.tar.gz - cd ${PACKAGE}-${PACKAGE_VERSION}-src \ - && sh ../makebindist.sh - mkdir ${PACKAGE}-${PACKAGE_VERSION}-bin - cp -r ${PACKAGE}-${PACKAGE_VERSION}-src/deploy/* ${PACKAGE}-${PACKAGE_VERSION}-bin - tar -cf - ${PACKAGE}-${PACKAGE_VERSION}-bin | gzip -c > ${PACKAGE}-${PACKAGE_VERSION}-bin.tar.gz diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/NEWS b/tags/cpp-1.0-incubating-M2-RC3/sdo/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/NOTICE b/tags/cpp-1.0-incubating-M2-RC3/sdo/NOTICE deleted file mode 100644 index bfb81409ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/README b/tags/cpp-1.0-incubating-M2-RC3/sdo/README deleted file mode 100644 index 61cca53eb8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/README +++ /dev/null @@ -1,97 +0,0 @@ -Apache Tuscany C++ M2 build (October, 2006) -=========================================== - -http://incubator.apache.org/tuscany - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - - -Getting Started -=============== - -Documentation describing the system requirements and the steps to install -Tuscany SDO C++ and run the samples can be found in the GettingStarted.html -file. - - -About Tuscany SDO for C++ -========================= - -Tuscany SDO is an implementation of the Service Data Objects for C++ 2.01 -specification found at -http://www.osoa.org/display/Main/SDO+-+Previously+Published+Specifications - -Supported SDO features - * All features are supported unless listed under the known restrictions - below. See the Service Data Objects for C++ 2.01 specification. - -New features in this release - * Optional build on Windows with Apache STDCXX - * Improved memory management - * Multiple bug fixes and internal enhancements - -Known Restrictions -The implementation adheres closely to the specification, but there are a number -of features which did not make it into this release. These are documented -below. - -Generic get/set: -The C++ implementation defines a set of access methods directly appropriate to -each Type. For example getString(), setString(), getBoolean(), setBoolean(). -There is no generic get() method as there is no common base object to return - -unlike the java implementation which can return an Object. - -Typesafe interface: -There is no code generation in this version, so there is no interface such that -a property called "Name" can be accessed via object->getName(). The name must -be accessed via object->getString("Name"); - -Change Summary Serialization: -Change summaries contain creations, deletions and modifications to data graphs. -The specification indicates that these will be serialized to XML such that -creations and deletions will become attributes of the change summary element, -whilst changes become elements within the change summary element. This -implementation saves all creations, deletions and changes as elements within -the change summary element. - -Change Summary Undo: -The undo method of a change summary is not implemented. - -Read-Only: -Read-only data elements are not supported by this implementation. Properties -may be set read-only, but the property may still be modified without an error. - -Opposites: -Opposites are not supported by this implementation. - -Date and Time: -Date support is limited to using a time_t. There are no calendar or duration -style objects, and no helpers for conversions. - -BigDecimal and BigInteger: -The equivalent of the java BigDecimal and BigInteger objects are not -implemented. - -NLS support: -Data objects may contain multi-byte data in the form of an SDO string, but -locale information is not stored with the data. The creation API only allows -properties and types to have ascii names (taking a char* as the name). - -Inheritance: -Type inheritance is single only. - - - - -Thank you for using Tuscany! - -The Tuscany Team. diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/autogen.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/autogen.sh deleted file mode 100755 index 18277601c8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/autogen.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -for i in "libtoolize --force" 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-1.0-incubating-M2-RC3/sdo/build.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/build.bat deleted file mode 100644 index c8f66f3a71..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/build.bat +++ /dev/null @@ -1,44 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -@setlocal - -if "%LIBXML2_HOME%" == "" ( -echo "LIBXML2_HOME not set" -goto end -) -echo using LIBXML2: %LIBXML2_HOME% - -if "%ICONV_HOME%" == "" ( -echo "ICONV_HOME not set" -goto end -) -echo using ICONV: %ICONV_HOME%" - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using AXIS2C: %AXIS2C_HOME% - -call vcvars32 -cd projects\tuscany_sdo -build.cmd - -@endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/build.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/build.sh deleted file mode 100755 index a08a0db238..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/build.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -if [ x$LIBXML2_INCLUDE = x ]; then -echo "LIBXML2_INCLUDE not set" -exit; -fi -if [ x$LIBXML2_LIB = x ]; then -echo "LIBXML2_LIB not set" -exit; -fi - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -./autogen.sh - -if [ x$TUSCANY_SDOCPP = x ]; then -TUSCANY_SDOCPP=`pwd`/deploy -fi - -./configure --prefix=${TUSCANY_SDOCPP} --enable-static=no -make -make install diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/configure.ac b/tags/cpp-1.0-incubating-M2-RC3/sdo/configure.ac deleted file mode 100644 index e46bc227cf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/configure.ac +++ /dev/null @@ -1,69 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -dnl run autogen.sh to generate the configure script. - -AC_PREREQ(2.59) -AC_INIT(tuscany_sdo_cpp, 1.0-incubator-M2) -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AC_PREFIX_DEFAULT(/usr/local/tuscany/sdo) - -# 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 - -# Check for dynamic library suffixes -AC_MSG_CHECKING([checking for dynamic library suffix]) -AC_CHECK_HEADER([sys/appleapiopts.h], - [AC_SUBST([libsuffix],[".dylib"]) AC_MSG_RESULT([using .dylib])], - [AC_SUBST([libsuffix],[".so"]) AC_MSG_RESULT([using .so])] -) - -# Checks for libraries. - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([inttypes.h stdlib.h string.h sys/time.h wchar.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_STRUCT_TM - -# Checks for library functions. -AC_FUNC_ERROR_AT_LINE -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([strchr strrchr]) - -AC_CONFIG_FILES([Makefile - runtime/Makefile - runtime/core/Makefile - runtime/core/src/Makefile - runtime/core/src/commonj/Makefile - runtime/core/src/commonj/sdo/Makefile - runtime/core/test/Makefile - runtime/core/sdo_axiom/Makefile - runtime/core/sdo_axiom_test/Makefile]) -AC_OUTPUT - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/BuildingSTDCXX.html b/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/BuildingSTDCXX.html deleted file mode 100644 index 283aa8bb48..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/BuildingSTDCXX.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - Tuscany SDO C++ - Building STDCXX for Tuscany SDO - - - -
      -
      -
      -

      Tuscany SDO C++ - Building STDCXX for Tuscany SDO

      - -

      STDCXX is an implementation of the C++ Standard Library provided by Apache. -

      -

      The website is at http://incubator.apache.org/stdcxx/. -

      -

      At the time of writing, the current release is 4.1.3 and is available as - source distribution only. This document explains how to build stdcxx for - Windows XP and Red Hat Enterprise Linux 3 in the way required by the SDO build - process. -

      -
      -
      -

      Contents

      -
        -
      1. Building STDCXX.. -
      2. -
      -
      - -
      -

      Building STDCXX

      -

      Building STDCXX on Linux

      - -
        -
      1. The release is distributed as a gzipped tar file, called - stdcxx-incubating-4.1.3.tar.gz. Extract the contents of this file into a - convenient directory. For this example, let's assume it is - /home/Tuscany/stdcxx-4.1.3 -
      2. -
      3. Define the STDCXX_HOME environment variable to refer to this directory. The - Tuscany SDO build system uses this environment variable to locate stdcxx. -
      4. -
      5. Change directory to STDCXX_HOME. Then build a debug version of the stdcxx - library using the following command: -
        gmake BUILDDIR=$STDCXX_HOME/Debug BUILDTYPE=15d CONFIG=gcc.config
        - This will create a sub-directory of STDCXX_HOME called Debug and place the - build products below that. -
      6. -
      7. For a release version the command is: -
        gmake BUILDDIR=$STDCXX_HOME/Release BUILDTYPE=12d CONFIG=gcc.config
        -
      8. -
      -

      This provides Tuscany SDO with the versions of stdcxx that it needs for both - Release and Debug builds. -

      -

      Building STDCXX on Windows

      -

      STDCXX is supported only when used with Microsoft Visual Studio C++ V7.1 -

      -
        -
      1. The release is distributed as a gzipped tar file, called stdcxx-incubating-4.1.3.tar.gz. - Extract the contents of this file into a convenient directory. For this example let's - assume it is C:\Tuscany\stdcxx-4.1.3 -
      2. -
      3. Define the STDCXX_HOME environment variable to refer to this directory. The - Tuscany SDO build system uses this environment variable to locate stdcxx. -
      4. -
      5. Create two directories to contain the results of building stdcxx. The first is - for the debug enabled version and must be: -
        <STDCXX_HOME>\Debug
        -
      6. -
      7. The second is for the release (ie optimised) version and must be -
        <STDCXX_HOME>\Release
        -
      8. -
      9. Launch an MSVC++ 7.1 command window. In the command window, set the default - directory to <STDCXX_HOME> where there is a file called generate.bat. Create - the project definitions that MSVC++ 7.1 will need in order to build stdcxx by - running generate.bat using the following command: -
        .\generate.bat /BUILDDIR:<STDCXX_HOME>\Debug /CONFIG:VC71
        - It is necessary to provide the full, absolute path to the build directory - it - is not sufficient to provide a relative path. (This restriction will be fixed - in a future release.) -
      10. -
      11. Repeat this operation for the release build, via the command: -
        .\generate.bat /BUILDDIR:<STDCXX_HOME>\Release /CONFIG:VC71
        -
      12. -
      13. Still using the MSVC++ 7.1 command window, set the default directory to one of - the two build directories eg -
        cd <STDCXX_HOME>\Debug
        -
      14. -
      15. Then launch the developer studio via -
        cd <STDCXX_HOME>\Debug
        -
      16. -
      17. Select the configuration to build. For the Debug version of SDO this will be - "15d Debug Thread-safe Dll". Then select "Build Solution". The build will take - a while to complete and runs a test suite when it is finished. The test suite - is extensive and produces a scattering of errors, however the library build - itself is fine. -
      18. -
      19. Repeat this process for the release version, setting the default directory to -
        cd <STDCXX_HOME>\Release
        - and choosing "12d Optimized Thread-safe Dll" as the build configuration. -
      20. -
      -

      This provides Tuscany SDO with the versions of stdcxx that it needs for both - Release and Debug builds. -

      -
      -
      -
      - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-base.css b/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-base.css deleted file mode 100644 index f2c4be6f4e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-base.css +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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:$ */ - -body { - margin: 0px; - padding: 0px; -} -img { - border:none; -} -table { - padding:0px; - width: 100%; - margin-left: -2px; - margin-right: -2px; -} -acronym { - cursor: help; - border-bottom: 1px dotted #feb; -} -table.bodyTable th, table.bodyTable td { - padding: 2px 4px 2px 4px; - vertical-align: top; -} -div.clear{ - clear:both; - visibility: hidden; -} -div.clear hr{ - display: none; -} -#bannerLeft, #bannerRight { - font-size: xx-large; - font-weight: bold; -} -#bannerLeft img, #bannerRight img { - margin: 0px; -} -.xleft, #bannerLeft img { - float:left; - text-shadow: #7CFC00; -} -.xright, #bannerRight img { - float:right; - text-shadow: #7CFC00; -} -#banner { - padding: 0px; -} -#banner img { - border: none; -} -#breadcrumbs { - padding: 3px 10px 3px 10px; -} -#leftColumn { - width: 150px; - float:left; -} -#bodyColumn { - margin-right: 1.5em; - margin-left: 177px; -} -#legend { - padding: 8px 0 8px 0; -} -#navcolumn { - padding: 8px 4px 0 8px; -} -#navcolumn h5 { - margin: 0; - padding: 0; - font-size: small; -} -#navcolumn ul { - margin: 0; - padding: 0; - font-size: small; -} -#navcolumn li { - list-style-type: none; - background-image: none; - background-repeat: no-repeat; - background-position: 0 0.4em; - padding-left: 16px; - list-style-position: ouside; - line-height: 1.2em; - font-size: smaller; -} -#navcolumn li.expanded { - background-image: url(../images/expanded.gif); -} -#navcolumn li.collapsed { - background-image: url(../images/collapsed.gif); -} -#poweredBy { - text-align: center; -} -#navcolumn img { - margin-top: 10px; - margin-bottom: 3px; -} -#poweredBy img { - display:block; - margin: 20px 0 20px 17px; - border: 1px solid black; - width: 90px; - height: 30px; -} -#search img { - margin: 0px; - display: block; -} -#search #q, #search #btnG { - border: 1px solid #999; - margin-bottom:10px; -} -#search form { - margin: 0px; -} -#lastPublished { - font-size: x-small; -} -.navSection { - margin-bottom: 2px; - padding: 8px; -} -.navSectionHead { - font-weight: bold; - font-size: x-small; -} -.section { - padding: 4px; -} -#footer { - padding: 3px 10px 3px 10px; - font-size: x-small; -} -#breadcrumbs { - font-size: x-small; - margin: 0pt; -} -.source { - padding: 12px; - margin: 1em 7px 1em 7px; -} -.source pre { - margin: 0px; - padding: 0px; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-theme.css b/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-theme.css deleted file mode 100644 index f0c0a9ac48..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/doc/css/maven-theme.css +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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:$ */ - -body { - padding: 0px 0px 10px 0px; -} -body, td, select, input, li{ - font-family: Verdana, Helvetica, Arial, sans-serif; - font-size: 13px; - padding: 4px 4px 4px 4px; - line-height: 1.5em; -} -code{ - font-family: Courier, monospace; - font-size: 13px; -} -a { - text-decoration: none; -} -a:link { - color:#36a; -} -a:visited { - color:#47a; -} -a:active, a:hover { - color:#69c; -} -#legend li.externalLink { - background: url(../images/external.png) left top no-repeat; - padding-left: 18px; -} -a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover { - background: url(../images/external.png) right center no-repeat; - padding-right: 18px; -} -#legend li.newWindow { - background: url(../images/newwindow.png) left top no-repeat; - padding-left: 18px; -} -a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover { - background: url(../images/newwindow.png) right center no-repeat; - padding-right: 18px; -} -h2 { - padding: 4px 4px 4px 6px; - border: 1px solid #999; - color: #900; - background-color: #ddd; - font-weight:900; - font-size: x-large; -} -h3 { - padding: 4px 4px 4px 6px; - border: 1px solid #aaa; - color: #900; - background-color: #eee; - font-weight: normal; - font-size: large; -} -h4 { - padding: 4px 4px 4px 6px; - border: 1px solid #bbb; - color: #900; - background-color: #fff; - font-weight: normal; - font-size: large; -} -h5 { - padding: 4px 4px 4px 6px; - color: #900; - font-size: normal; -} -p { - line-height: 1.5em; - font-size: small; -} -#breadcrumbs { - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - background-color: #ccc; -} -#leftColumn { - margin: 10px 0 0 5px; - border: 1px solid #999; - background-color: #eee; -} -#navcolumn h5 { - font-size: smaller; - border-bottom: 1px solid #aaaaaa; - padding-top: 2px; - color: #000; -} - -table.bodyTable th { - color: white; - background-color: #bbb; - text-align: left; - font-weight: bold; -} - -table.bodyTable th, table.bodyTable td { - font-size: 1em; -} - -table.bodyTable tr.a { - background-color: #ddd; -} - -table.bodyTable tr.b { - background-color: #eee; -} - -.source { - border: 1px solid #999; -} -dl { - padding: 4px 4px 4px 6px; - border: 1px solid #aaa; - background-color: #ffc; -} -dt { - color: #900; -} -#organizationLogo img, #projectLogo img, #projectLogo span{ - margin: 8px; -} -#banner { - border-bottom: 1px solid #fff; -} -.sourcecode { - border: 1px solid #999; - font-family: Courier, monospace; - font-size: 13px; - white-space: pre; - padding: 4px 4px 4px 6px; - margin: 4px 4px 4px 6px; -} -pre { - border: 1px solid #999; - font-family: Courier, monospace; - font-size: 13px; - white-space: pre; - padding: 4px 4px 4px 6px; - margin: 4px 4px 4px 6px; -} - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/makebindist.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/makebindist.sh deleted file mode 100755 index 25ac4226b3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/makebindist.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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_SDOCPP_HOME=`pwd` - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -cd ${TUSCANY_SDOCPP_HOME} -./configure --prefix=${TUSCANY_SDOCPP_HOME}/deploy --enable-static=no -make -make install - -cd ${TUSCANY_SDOCPP_HOME}/samples -export TUSCANY_SDOCPP=${TUSCANY_SDOCPP_HOME}/deploy -./configure --prefix=${TUSCANY_SDOCPP_HOME}/deploy --enable-static=no -make -make install - -cd ${TUSCANY_SDOCPP_HOME}/deploy -for i in `find . -name "*.la"` -do - rm $i -done \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/makedist.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/makedist.sh deleted file mode 100755 index 0a981895f0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/makedist.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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_SDOCPP_HOME=`pwd` - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -if [ x$LIBXML2_INCLUDE = x ]; then -echo "LIBXML2_INCLUDE not set" -exit; -fi -if [ x$LIBXML2_LIB = x ]; then -echo "LIBXML2_LIB not set" -exit; -fi -echo "Using libxml2 installed at $LIBXML2_LIB, $LIBXML2_INCLUDE" - -cd ${TUSCANY_SDOCPP_HOME}/samples -./autogen.sh -./configure --prefix=${TUSCANY_SDOCPP_HOME}/deploy --enable-static=no - -cd $TUSCANY_SDOCPP_HOME -./autogen.sh -./configure --prefix=${TUSCANY_SDOCPP_HOME}/deploy --enable-static=no - -make bindist - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dep b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dep deleted file mode 100644 index b62497b7d8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dep +++ /dev/null @@ -1,2 +0,0 @@ -# Microsoft Developer Studio Generated Dependency File, included by Build.mak - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dsp b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dsp deleted file mode 100644 index 9a8320cefb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Build" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=Build - 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 "Build.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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - 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)" == "Build - 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)" == "Build - 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 "Build - Win32 Release" -# Name "Build - Win32 Debug" -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.mak b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.mak deleted file mode 100644 index a393cc94e1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/Build/Build.mak +++ /dev/null @@ -1,181 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on Build.dsp -!IF "$(CFG)" == "" -CFG=Build - Win32 Debug -!MESSAGE No configuration specified. Defaulting to Build - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "Build - Win32 Release" && "$(CFG)" != "Build - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "Build.mak" CFG="Build - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -OUTDIR=.\Release -INTDIR=.\Release - -!IF "$(RECURSE)" == "0" - -ALL : - -!ELSE - -ALL : "sdo_test - Win32 Release" "sdo_runtime - Win32 Release" "sdo_axiom_test - Win32 Release" "sdo_axiom - Win32 Release" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_axiom - Win32 ReleaseCLEAN" "sdo_axiom_test - Win32 ReleaseCLEAN" "sdo_runtime - Win32 ReleaseCLEAN" "sdo_test - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -!IF "$(CFG)" == "Build - Win32 Release" - -MTL=midl.exe -MTL_PROJ= - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -MTL=midl.exe -MTL_PROJ= - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("Build.dep") -!INCLUDE "Build.dep" -!ELSE -!MESSAGE Warning: cannot find "Build.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "Build - Win32 Release" || "$(CFG)" == "Build - Win32 Debug" - -!IF "$(CFG)" == "Build - Win32 Release" - -"sdo_axiom - Win32 Release" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Release" - cd "..\Build" - -"sdo_axiom - Win32 ReleaseCLEAN" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"sdo_axiom - Win32 Debug" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Debug" - cd "..\Build" - -"sdo_axiom - Win32 DebugCLEAN" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"sdo_axiom_test - Win32 Release" : - cd "..\sdo_axiom_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom_test.mak CFG="sdo_axiom_test - Win32 Release" - cd "..\Build" - -"sdo_axiom_test - Win32 ReleaseCLEAN" : - cd "..\sdo_axiom_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom_test.mak CFG="sdo_axiom_test - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"sdo_axiom_test - Win32 Debug" : - cd "..\sdo_axiom_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom_test.mak CFG="sdo_axiom_test - Win32 Debug" - cd "..\Build" - -"sdo_axiom_test - Win32 DebugCLEAN" : - cd "..\sdo_axiom_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom_test.mak CFG="sdo_axiom_test - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"sdo_runtime - Win32 Release" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" - cd "..\Build" - -"sdo_runtime - Win32 ReleaseCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"sdo_runtime - Win32 Debug" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" - cd "..\Build" - -"sdo_runtime - Win32 DebugCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - -!IF "$(CFG)" == "Build - Win32 Release" - -"sdo_test - Win32 Release" : - cd "..\sdo_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_test.mak CFG="sdo_test - Win32 Release" - cd "..\Build" - -"sdo_test - Win32 ReleaseCLEAN" : - cd "..\sdo_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_test.mak CFG="sdo_test - Win32 Release" RECURSE=1 CLEAN - cd "..\Build" - -!ELSEIF "$(CFG)" == "Build - Win32 Debug" - -"sdo_test - Win32 Debug" : - cd "..\sdo_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_test.mak CFG="sdo_test - Win32 Debug" - cd "..\Build" - -"sdo_test - Win32 DebugCLEAN" : - cd "..\sdo_test" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_test.mak CFG="sdo_test - Win32 Debug" RECURSE=1 CLEAN - cd "..\Build" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/build.cmd b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/build.cmd deleted file mode 100644 index b52e9694c9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/build.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal -cd Build -NMAKE /f "Build.mak" CFG="Build - Win32 Release" -cd .. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.dsp b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.dsp deleted file mode 100644 index 0124c874ec..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.dsp +++ /dev/null @@ -1,125 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sdo_axiom" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=sdo_axiom - 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 "sdo_axiom.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 "sdo_axiom.mak" CFG="sdo_axiom - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_axiom - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "sdo_axiom - 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)" == "sdo_axiom - 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 "SDO_AXIOM_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_AXIOM_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 axis2_parser.lib axis2_util.lib axiom.lib tuscany_sdo.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 /dll /machine:I386 /out:"Release/tuscany_sdo_axiom.dll" /libpath:"..\..\..\deploy\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\core\sdo_axiom\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "sdo_axiom - 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 "SDO_AXIOM_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_AXIOM_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 axis2_parser.lib axis2_util.lib axiom.lib tuscany_sdo.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 /dll /debug /machine:I386 /out:"Debug/tuscany_sdo_axiom.dll" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(AXIS2C_HOME)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\runtime\core\sdo_axiom\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "sdo_axiom - Win32 Release" -# Name "sdo_axiom - 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\sdo_axiom\sdo_axiom.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\core\sdo_axiom\sdo_axiom.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\sdo_axiom\sdo_axiom_export.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-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.mak b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.mak deleted file mode 100644 index 01fc7df575..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom/sdo_axiom.mak +++ /dev/null @@ -1,270 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on sdo_axiom.dsp -!IF "$(CFG)" == "" -CFG=sdo_axiom - Win32 Debug -!MESSAGE No configuration specified. Defaulting to sdo_axiom - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "sdo_axiom - Win32 Release" && "$(CFG)" != "sdo_axiom - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "sdo_axiom.mak" CFG="sdo_axiom - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_axiom - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "sdo_axiom - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "sdo_axiom - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sdo_axiom.dll" - -!ELSE - -ALL : "sdo_runtime - Win32 Release" "$(OUTDIR)\tuscany_sdo_axiom.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_runtime - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\sdo_axiom.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.dll" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.exp" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_AXIOM_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_axiom.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_parser.lib axis2_util.lib axiom.lib tuscany_sdo.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 /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sdo_axiom.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sdo_axiom.dll" /implib:"$(OUTDIR)\tuscany_sdo_axiom.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\sdo_axiom.obj" \ - "..\sdo_runtime\Release\tuscany_sdo.lib" - -"$(OUTDIR)\tuscany_sdo_axiom.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "sdo_runtime - Win32 Release" "$(OUTDIR)\tuscany_sdo_axiom.dll" - ..\..\..\runtime\core\sdo_axiom\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "sdo_axiom - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\tuscany_sdo_axiom.dll" - -!ELSE - -ALL : "sdo_runtime - Win32 Debug" "$(OUTDIR)\tuscany_sdo_axiom.dll" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_runtime - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\sdo_axiom.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.dll" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.exp" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.ilk" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.lib" - -@erase "$(OUTDIR)\tuscany_sdo_axiom.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_AXIOM_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_axiom.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=axis2_parser.lib axis2_util.lib axiom.lib tuscany_sdo.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 /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sdo_axiom.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sdo_axiom.dll" /implib:"$(OUTDIR)\tuscany_sdo_axiom.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(AXIS2C_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\sdo_axiom.obj" \ - "..\sdo_runtime\Debug\tuscany_sdo.lib" - -"$(OUTDIR)\tuscany_sdo_axiom.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "sdo_runtime - Win32 Debug" "$(OUTDIR)\tuscany_sdo_axiom.dll" - ..\..\..\runtime\core\sdo_axiom\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("sdo_axiom.dep") -!INCLUDE "sdo_axiom.dep" -!ELSE -!MESSAGE Warning: cannot find "sdo_axiom.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "sdo_axiom - Win32 Release" || "$(CFG)" == "sdo_axiom - Win32 Debug" -SOURCE=..\..\..\runtime\core\sdo_axiom\sdo_axiom.cpp - -"$(INTDIR)\sdo_axiom.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "sdo_axiom - Win32 Release" - -"sdo_runtime - Win32 Release" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" - cd "..\sdo_axiom" - -"sdo_runtime - Win32 ReleaseCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" RECURSE=1 CLEAN - cd "..\sdo_axiom" - -!ELSEIF "$(CFG)" == "sdo_axiom - Win32 Debug" - -"sdo_runtime - Win32 Debug" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" - cd "..\sdo_axiom" - -"sdo_runtime - Win32 DebugCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" RECURSE=1 CLEAN - cd "..\sdo_axiom" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.dsp b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.dsp deleted file mode 100644 index 87c1b8a4bd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sdo_axiom_test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sdo_axiom_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 "sdo_axiom_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 "sdo_axiom_test.mak" CFG="sdo_axiom_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_axiom_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sdo_axiom_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)" == "sdo_axiom_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 "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /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 tuscany_sdo.lib tuscany_sdo_axiom.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 /libpath:"..\..\..\deploy\lib" - -!ELSEIF "$(CFG)" == "sdo_axiom_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 "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /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 tuscany_sdo.lib tuscany_sdo_axiom.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 /libpath:"..\..\..\deploy\lib" - -!ENDIF - -# Begin Target - -# Name "sdo_axiom_test - Win32 Release" -# Name "sdo_axiom_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\sdo_axiom_test\sdo_axiom_test.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\core\sdo_axiom_test\sdo_axiom_test.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-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.mak b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.mak deleted file mode 100644 index e3539d4602..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.mak +++ /dev/null @@ -1,264 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on sdo_axiom_test.dsp -!IF "$(CFG)" == "" -CFG=sdo_axiom_test - Win32 Debug -!MESSAGE No configuration specified. Defaulting to sdo_axiom_test - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "sdo_axiom_test - Win32 Release" && "$(CFG)" != "sdo_axiom_test - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "sdo_axiom_test.mak" CFG="sdo_axiom_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_axiom_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sdo_axiom_test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "sdo_axiom_test - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\sdo_axiom_test.exe" - -!ELSE - -ALL : "sdo_runtime - Win32 Release" "sdo_axiom - Win32 Release" "$(OUTDIR)\sdo_axiom_test.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_axiom - Win32 ReleaseCLEAN" "sdo_runtime - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\sdo_axiom_test.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\sdo_axiom_test.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_axiom_test.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=tuscany_sdo.lib tuscany_sdo_axiom.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 /incremental:no /pdb:"$(OUTDIR)\sdo_axiom_test.pdb" /machine:I386 /out:"$(OUTDIR)\sdo_axiom_test.exe" /libpath:"..\..\..\deploy\lib" -LINK32_OBJS= \ - "$(INTDIR)\sdo_axiom_test.obj" \ - "..\sdo_axiom\Release\tuscany_sdo_axiom.lib" \ - "..\sdo_runtime\Release\tuscany_sdo.lib" - -"$(OUTDIR)\sdo_axiom_test.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "sdo_axiom_test - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\sdo_axiom_test.exe" - -!ELSE - -ALL : "sdo_runtime - Win32 Debug" "sdo_axiom - Win32 Debug" "$(OUTDIR)\sdo_axiom_test.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_axiom - Win32 DebugCLEAN" "sdo_runtime - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\sdo_axiom_test.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\sdo_axiom_test.exe" - -@erase "$(OUTDIR)\sdo_axiom_test.ilk" - -@erase "$(OUTDIR)\sdo_axiom_test.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\deploy\include" /I "$(AXIS2C_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_axiom_test.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=tuscany_sdo.lib tuscany_sdo_axiom.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 /incremental:yes /pdb:"$(OUTDIR)\sdo_axiom_test.pdb" /debug /machine:I386 /out:"$(OUTDIR)\sdo_axiom_test.exe" /pdbtype:sept /libpath:"..\..\..\deploy\lib" -LINK32_OBJS= \ - "$(INTDIR)\sdo_axiom_test.obj" \ - "..\sdo_axiom\Debug\tuscany_sdo_axiom.lib" \ - "..\sdo_runtime\Debug\tuscany_sdo.lib" - -"$(OUTDIR)\sdo_axiom_test.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("sdo_axiom_test.dep") -!INCLUDE "sdo_axiom_test.dep" -!ELSE -!MESSAGE Warning: cannot find "sdo_axiom_test.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "sdo_axiom_test - Win32 Release" || "$(CFG)" == "sdo_axiom_test - Win32 Debug" -SOURCE=..\..\..\runtime\core\sdo_axiom_test\sdo_axiom_test.cpp - -"$(INTDIR)\sdo_axiom_test.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "sdo_axiom_test - Win32 Release" - -"sdo_axiom - Win32 Release" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Release" - cd "..\sdo_axiom_test" - -"sdo_axiom - Win32 ReleaseCLEAN" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Release" RECURSE=1 CLEAN - cd "..\sdo_axiom_test" - -!ELSEIF "$(CFG)" == "sdo_axiom_test - Win32 Debug" - -"sdo_axiom - Win32 Debug" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Debug" - cd "..\sdo_axiom_test" - -"sdo_axiom - Win32 DebugCLEAN" : - cd "..\sdo_axiom" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_axiom.mak CFG="sdo_axiom - Win32 Debug" RECURSE=1 CLEAN - cd "..\sdo_axiom_test" - -!ENDIF - -!IF "$(CFG)" == "sdo_axiom_test - Win32 Release" - -"sdo_runtime - Win32 Release" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" - cd "..\sdo_axiom_test" - -"sdo_runtime - Win32 ReleaseCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" RECURSE=1 CLEAN - cd "..\sdo_axiom_test" - -!ELSEIF "$(CFG)" == "sdo_axiom_test - Win32 Debug" - -"sdo_runtime - Win32 Debug" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" - cd "..\sdo_axiom_test" - -"sdo_runtime - Win32 DebugCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" RECURSE=1 CLEAN - cd "..\sdo_axiom_test" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.dsp b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.dsp deleted file mode 100644 index 015f97a75e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.dsp +++ /dev/null @@ -1,751 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sdo_runtime" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=sdo_runtime - 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 "sdo_runtime.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 "sdo_runtime.mak" CFG="sdo_runtime - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_runtime - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "sdo_runtime - 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)" == "sdo_runtime - 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 "SDO_RUNTIME_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\runtime\core\src" /I "$(LIBXML2_HOME)\include" /I "$(ICONV_HOME)\include" /I "$(ZLIB_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_EXPORTS" /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 libxml2.lib /nologo /dll /machine:I386 /out:"Release\tuscany_sdo.dll" /libpath:"$(LIBXML2_HOME)\lib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=deploy -PostBuild_Cmds=..\..\..\runtime\core\src\deploy.bat ..\..\..\ Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "sdo_runtime - 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 "SDO_RUNTIME_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\runtime\core\src" /I "$(LIBXML2_HOME)\include" /I "$(ICONV_HOME)\include" /I "$(ZLIB_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_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 libxml2.lib /nologo /dll /debug /machine:I386 /out:"Debug\tuscany_sdo.dll" /pdbtype:sept /libpath:"$(LIBXML2_HOME)\lib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=deploy -PostBuild_Cmds=..\..\..\runtime\core\src\deploy.bat ..\..\..\ Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "sdo_runtime - Win32 Release" -# Name "sdo_runtime - 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\src\commonj\sdo\ChangedDataObjectListImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummary.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummaryBuilder.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummaryImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\CopyHelper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASProperty.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASType.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASValues.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataFactory.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataFactoryImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataGraph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataGraphImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectInstance.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectListImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DefaultLogWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\EqualityHelper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\GroupDefinition.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\GroupEvent.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\HelperProvider.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Logger.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\LogWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ParserErrorSetter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Property.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyDefinition.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyDefinitionImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertySetting.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\RefCountingObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\RefCountingPointer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Attribute.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Attributes.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Namespaces.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Parser.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SchemaInfo.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SdoCheck.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDODate.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SdoRuntime.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDORuntimeException.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSAX2Parser.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSchemaSAX2Parser.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOUtils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLBufferWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLFileWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLStreamWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLString.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDBufferWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDFileWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDStreamWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDWriter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Sequence.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SequenceImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Setting.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SettingList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Type.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinition.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitionImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitions.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitionsImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLDocument.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLDocumentImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLHelper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLHelperImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLQName.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XpathHelper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDHelper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDHelperImpl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDPropertyInfo.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDTypeInfo.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangedDataObjectList.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangedDataObjectListImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummary.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummaryBuilder.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummaryImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\CopyHelper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASProperty.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASType.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASValues.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataFactory.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataFactoryImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataGraph.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataGraphImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectInstance.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectList.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectListImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DefaultLogWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\disable_warn.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\EqualityHelper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\export.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\GroupDefinition.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\GroupEvent.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\HelperProvider.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Logger.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Logging.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\LogWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ParserErrorSetter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Property.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyDefinition.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyDefinitionImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyList.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertySetting.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\RefCountingObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\RefCountingPointer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Attribute.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Attributes.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Namespaces.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Parser.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SchemaInfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDO.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SdoCheck.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDODate.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SdoRuntime.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDORuntimeException.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSAX2Parser.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSchemaSAX2Parser.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSPI.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOString.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOUtils.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLBufferWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLFileWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLStreamWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLString.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDBufferWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDFileWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDStreamWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDWriter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Sequence.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SequenceImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Setting.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SettingList.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Type.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinition.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitionImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitions.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitionsImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeList.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLDocument.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLDocumentImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLHelper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLHelperImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLQName.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XpathHelper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDHelper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDHelperImpl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDPropertyInfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDTypeInfo.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-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.mak b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.mak deleted file mode 100644 index 2bed69ba31..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/sdo_runtime.mak +++ /dev/null @@ -1,972 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on sdo_runtime.dsp -!IF "$(CFG)" == "" -CFG=sdo_runtime - Win32 Debug -!MESSAGE No configuration specified. Defaulting to sdo_runtime - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "sdo_runtime - Win32 Release" && "$(CFG)" != "sdo_runtime - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "sdo_runtime.mak" CFG="sdo_runtime - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_runtime - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "sdo_runtime - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "sdo_runtime - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\tuscany_sdo.dll" - - -CLEAN : - -@erase "$(INTDIR)\ChangedDataObjectListImpl.obj" - -@erase "$(INTDIR)\ChangeSummary.obj" - -@erase "$(INTDIR)\ChangeSummaryBuilder.obj" - -@erase "$(INTDIR)\ChangeSummaryImpl.obj" - -@erase "$(INTDIR)\CopyHelper.obj" - -@erase "$(INTDIR)\DASProperty.obj" - -@erase "$(INTDIR)\DASType.obj" - -@erase "$(INTDIR)\DASValue.obj" - -@erase "$(INTDIR)\DASValues.obj" - -@erase "$(INTDIR)\DataFactory.obj" - -@erase "$(INTDIR)\DataFactoryImpl.obj" - -@erase "$(INTDIR)\DataGraph.obj" - -@erase "$(INTDIR)\DataGraphImpl.obj" - -@erase "$(INTDIR)\DataObject.obj" - -@erase "$(INTDIR)\DataObjectImpl.obj" - -@erase "$(INTDIR)\DataObjectInstance.obj" - -@erase "$(INTDIR)\DataObjectList.obj" - -@erase "$(INTDIR)\DataObjectListImpl.obj" - -@erase "$(INTDIR)\DefaultLogWriter.obj" - -@erase "$(INTDIR)\EqualityHelper.obj" - -@erase "$(INTDIR)\GroupDefinition.obj" - -@erase "$(INTDIR)\GroupEvent.obj" - -@erase "$(INTDIR)\HelperProvider.obj" - -@erase "$(INTDIR)\Logger.obj" - -@erase "$(INTDIR)\LogWriter.obj" - -@erase "$(INTDIR)\ParserErrorSetter.obj" - -@erase "$(INTDIR)\Property.obj" - -@erase "$(INTDIR)\PropertyDefinition.obj" - -@erase "$(INTDIR)\PropertyDefinitionImpl.obj" - -@erase "$(INTDIR)\PropertyImpl.obj" - -@erase "$(INTDIR)\PropertyList.obj" - -@erase "$(INTDIR)\PropertySetting.obj" - -@erase "$(INTDIR)\RefCountingObject.obj" - -@erase "$(INTDIR)\RefCountingPointer.obj" - -@erase "$(INTDIR)\SAX2Attribute.obj" - -@erase "$(INTDIR)\SAX2Attributes.obj" - -@erase "$(INTDIR)\SAX2Namespaces.obj" - -@erase "$(INTDIR)\SAX2Parser.obj" - -@erase "$(INTDIR)\SchemaInfo.obj" - -@erase "$(INTDIR)\SdoCheck.obj" - -@erase "$(INTDIR)\SDODate.obj" - -@erase "$(INTDIR)\SdoRuntime.obj" - -@erase "$(INTDIR)\SDORuntimeException.obj" - -@erase "$(INTDIR)\SDOSAX2Parser.obj" - -@erase "$(INTDIR)\SDOSchemaSAX2Parser.obj" - -@erase "$(INTDIR)\SDOUtils.obj" - -@erase "$(INTDIR)\SDOXMLBufferWriter.obj" - -@erase "$(INTDIR)\SDOXMLFileWriter.obj" - -@erase "$(INTDIR)\SDOXMLStreamWriter.obj" - -@erase "$(INTDIR)\SDOXMLString.obj" - -@erase "$(INTDIR)\SDOXMLWriter.obj" - -@erase "$(INTDIR)\SDOXSDBufferWriter.obj" - -@erase "$(INTDIR)\SDOXSDFileWriter.obj" - -@erase "$(INTDIR)\SDOXSDStreamWriter.obj" - -@erase "$(INTDIR)\SDOXSDWriter.obj" - -@erase "$(INTDIR)\Sequence.obj" - -@erase "$(INTDIR)\SequenceImpl.obj" - -@erase "$(INTDIR)\Setting.obj" - -@erase "$(INTDIR)\SettingList.obj" - -@erase "$(INTDIR)\Type.obj" - -@erase "$(INTDIR)\TypeDefinition.obj" - -@erase "$(INTDIR)\TypeDefinitionImpl.obj" - -@erase "$(INTDIR)\TypeDefinitions.obj" - -@erase "$(INTDIR)\TypeDefinitionsImpl.obj" - -@erase "$(INTDIR)\TypeImpl.obj" - -@erase "$(INTDIR)\TypeList.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\XMLDocument.obj" - -@erase "$(INTDIR)\XMLDocumentImpl.obj" - -@erase "$(INTDIR)\XMLHelper.obj" - -@erase "$(INTDIR)\XMLHelperImpl.obj" - -@erase "$(INTDIR)\XMLQName.obj" - -@erase "$(INTDIR)\XpathHelper.obj" - -@erase "$(INTDIR)\XSDHelper.obj" - -@erase "$(INTDIR)\XSDHelperImpl.obj" - -@erase "$(INTDIR)\XSDPropertyInfo.obj" - -@erase "$(INTDIR)\XSDTypeInfo.obj" - -@erase "$(OUTDIR)\tuscany_sdo.dll" - -@erase "$(OUTDIR)\tuscany_sdo.exp" - -@erase "$(OUTDIR)\tuscany_sdo.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\runtime\core\src" /I "$(LIBXML2_HOME)\include" /I "$(ICONV_HOME)\include" /I "$(ZLIB_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_runtime.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libxml2.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sdo.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sdo.dll" /implib:"$(OUTDIR)\tuscany_sdo.lib" /libpath:"$(LIBXML2_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\ChangedDataObjectListImpl.obj" \ - "$(INTDIR)\ChangeSummary.obj" \ - "$(INTDIR)\ChangeSummaryBuilder.obj" \ - "$(INTDIR)\ChangeSummaryImpl.obj" \ - "$(INTDIR)\CopyHelper.obj" \ - "$(INTDIR)\DASProperty.obj" \ - "$(INTDIR)\DASType.obj" \ - "$(INTDIR)\DASValue.obj" \ - "$(INTDIR)\DASValues.obj" \ - "$(INTDIR)\DataFactory.obj" \ - "$(INTDIR)\DataFactoryImpl.obj" \ - "$(INTDIR)\DataGraph.obj" \ - "$(INTDIR)\DataGraphImpl.obj" \ - "$(INTDIR)\DataObject.obj" \ - "$(INTDIR)\DataObjectImpl.obj" \ - "$(INTDIR)\DataObjectInstance.obj" \ - "$(INTDIR)\DataObjectList.obj" \ - "$(INTDIR)\DataObjectListImpl.obj" \ - "$(INTDIR)\DefaultLogWriter.obj" \ - "$(INTDIR)\EqualityHelper.obj" \ - "$(INTDIR)\GroupDefinition.obj" \ - "$(INTDIR)\GroupEvent.obj" \ - "$(INTDIR)\HelperProvider.obj" \ - "$(INTDIR)\Logger.obj" \ - "$(INTDIR)\LogWriter.obj" \ - "$(INTDIR)\ParserErrorSetter.obj" \ - "$(INTDIR)\Property.obj" \ - "$(INTDIR)\PropertyDefinition.obj" \ - "$(INTDIR)\PropertyDefinitionImpl.obj" \ - "$(INTDIR)\PropertyImpl.obj" \ - "$(INTDIR)\PropertyList.obj" \ - "$(INTDIR)\PropertySetting.obj" \ - "$(INTDIR)\RefCountingObject.obj" \ - "$(INTDIR)\RefCountingPointer.obj" \ - "$(INTDIR)\SAX2Attribute.obj" \ - "$(INTDIR)\SAX2Attributes.obj" \ - "$(INTDIR)\SAX2Namespaces.obj" \ - "$(INTDIR)\SAX2Parser.obj" \ - "$(INTDIR)\SchemaInfo.obj" \ - "$(INTDIR)\SdoCheck.obj" \ - "$(INTDIR)\SDODate.obj" \ - "$(INTDIR)\SdoRuntime.obj" \ - "$(INTDIR)\SDORuntimeException.obj" \ - "$(INTDIR)\SDOSAX2Parser.obj" \ - "$(INTDIR)\SDOSchemaSAX2Parser.obj" \ - "$(INTDIR)\SDOUtils.obj" \ - "$(INTDIR)\SDOXMLBufferWriter.obj" \ - "$(INTDIR)\SDOXMLFileWriter.obj" \ - "$(INTDIR)\SDOXMLStreamWriter.obj" \ - "$(INTDIR)\SDOXMLString.obj" \ - "$(INTDIR)\SDOXMLWriter.obj" \ - "$(INTDIR)\SDOXSDBufferWriter.obj" \ - "$(INTDIR)\SDOXSDFileWriter.obj" \ - "$(INTDIR)\SDOXSDStreamWriter.obj" \ - "$(INTDIR)\SDOXSDWriter.obj" \ - "$(INTDIR)\Sequence.obj" \ - "$(INTDIR)\SequenceImpl.obj" \ - "$(INTDIR)\Setting.obj" \ - "$(INTDIR)\SettingList.obj" \ - "$(INTDIR)\Type.obj" \ - "$(INTDIR)\TypeDefinition.obj" \ - "$(INTDIR)\TypeDefinitionImpl.obj" \ - "$(INTDIR)\TypeDefinitions.obj" \ - "$(INTDIR)\TypeDefinitionsImpl.obj" \ - "$(INTDIR)\TypeImpl.obj" \ - "$(INTDIR)\TypeList.obj" \ - "$(INTDIR)\XMLDocument.obj" \ - "$(INTDIR)\XMLDocumentImpl.obj" \ - "$(INTDIR)\XMLHelper.obj" \ - "$(INTDIR)\XMLHelperImpl.obj" \ - "$(INTDIR)\XMLQName.obj" \ - "$(INTDIR)\XpathHelper.obj" \ - "$(INTDIR)\XSDHelper.obj" \ - "$(INTDIR)\XSDHelperImpl.obj" \ - "$(INTDIR)\XSDPropertyInfo.obj" \ - "$(INTDIR)\XSDTypeInfo.obj" - -"$(OUTDIR)\tuscany_sdo.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -PostBuild_Desc=deploy -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sdo.dll" - ..\..\..\runtime\core\src\deploy.bat ..\..\..\ Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "sdo_runtime - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\tuscany_sdo.dll" - - -CLEAN : - -@erase "$(INTDIR)\ChangedDataObjectListImpl.obj" - -@erase "$(INTDIR)\ChangeSummary.obj" - -@erase "$(INTDIR)\ChangeSummaryBuilder.obj" - -@erase "$(INTDIR)\ChangeSummaryImpl.obj" - -@erase "$(INTDIR)\CopyHelper.obj" - -@erase "$(INTDIR)\DASProperty.obj" - -@erase "$(INTDIR)\DASType.obj" - -@erase "$(INTDIR)\DASValue.obj" - -@erase "$(INTDIR)\DASValues.obj" - -@erase "$(INTDIR)\DataFactory.obj" - -@erase "$(INTDIR)\DataFactoryImpl.obj" - -@erase "$(INTDIR)\DataGraph.obj" - -@erase "$(INTDIR)\DataGraphImpl.obj" - -@erase "$(INTDIR)\DataObject.obj" - -@erase "$(INTDIR)\DataObjectImpl.obj" - -@erase "$(INTDIR)\DataObjectInstance.obj" - -@erase "$(INTDIR)\DataObjectList.obj" - -@erase "$(INTDIR)\DataObjectListImpl.obj" - -@erase "$(INTDIR)\DefaultLogWriter.obj" - -@erase "$(INTDIR)\EqualityHelper.obj" - -@erase "$(INTDIR)\GroupDefinition.obj" - -@erase "$(INTDIR)\GroupEvent.obj" - -@erase "$(INTDIR)\HelperProvider.obj" - -@erase "$(INTDIR)\Logger.obj" - -@erase "$(INTDIR)\LogWriter.obj" - -@erase "$(INTDIR)\ParserErrorSetter.obj" - -@erase "$(INTDIR)\Property.obj" - -@erase "$(INTDIR)\PropertyDefinition.obj" - -@erase "$(INTDIR)\PropertyDefinitionImpl.obj" - -@erase "$(INTDIR)\PropertyImpl.obj" - -@erase "$(INTDIR)\PropertyList.obj" - -@erase "$(INTDIR)\PropertySetting.obj" - -@erase "$(INTDIR)\RefCountingObject.obj" - -@erase "$(INTDIR)\RefCountingPointer.obj" - -@erase "$(INTDIR)\SAX2Attribute.obj" - -@erase "$(INTDIR)\SAX2Attributes.obj" - -@erase "$(INTDIR)\SAX2Namespaces.obj" - -@erase "$(INTDIR)\SAX2Parser.obj" - -@erase "$(INTDIR)\SchemaInfo.obj" - -@erase "$(INTDIR)\SdoCheck.obj" - -@erase "$(INTDIR)\SDODate.obj" - -@erase "$(INTDIR)\SdoRuntime.obj" - -@erase "$(INTDIR)\SDORuntimeException.obj" - -@erase "$(INTDIR)\SDOSAX2Parser.obj" - -@erase "$(INTDIR)\SDOSchemaSAX2Parser.obj" - -@erase "$(INTDIR)\SDOUtils.obj" - -@erase "$(INTDIR)\SDOXMLBufferWriter.obj" - -@erase "$(INTDIR)\SDOXMLFileWriter.obj" - -@erase "$(INTDIR)\SDOXMLStreamWriter.obj" - -@erase "$(INTDIR)\SDOXMLString.obj" - -@erase "$(INTDIR)\SDOXMLWriter.obj" - -@erase "$(INTDIR)\SDOXSDBufferWriter.obj" - -@erase "$(INTDIR)\SDOXSDFileWriter.obj" - -@erase "$(INTDIR)\SDOXSDStreamWriter.obj" - -@erase "$(INTDIR)\SDOXSDWriter.obj" - -@erase "$(INTDIR)\Sequence.obj" - -@erase "$(INTDIR)\SequenceImpl.obj" - -@erase "$(INTDIR)\Setting.obj" - -@erase "$(INTDIR)\SettingList.obj" - -@erase "$(INTDIR)\Type.obj" - -@erase "$(INTDIR)\TypeDefinition.obj" - -@erase "$(INTDIR)\TypeDefinitionImpl.obj" - -@erase "$(INTDIR)\TypeDefinitions.obj" - -@erase "$(INTDIR)\TypeDefinitionsImpl.obj" - -@erase "$(INTDIR)\TypeImpl.obj" - -@erase "$(INTDIR)\TypeList.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\XMLDocument.obj" - -@erase "$(INTDIR)\XMLDocumentImpl.obj" - -@erase "$(INTDIR)\XMLHelper.obj" - -@erase "$(INTDIR)\XMLHelperImpl.obj" - -@erase "$(INTDIR)\XMLQName.obj" - -@erase "$(INTDIR)\XpathHelper.obj" - -@erase "$(INTDIR)\XSDHelper.obj" - -@erase "$(INTDIR)\XSDHelperImpl.obj" - -@erase "$(INTDIR)\XSDPropertyInfo.obj" - -@erase "$(INTDIR)\XSDTypeInfo.obj" - -@erase "$(OUTDIR)\tuscany_sdo.dll" - -@erase "$(OUTDIR)\tuscany_sdo.exp" - -@erase "$(OUTDIR)\tuscany_sdo.ilk" - -@erase "$(OUTDIR)\tuscany_sdo.lib" - -@erase "$(OUTDIR)\tuscany_sdo.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\runtime\core\src" /I "$(LIBXML2_HOME)\include" /I "$(ICONV_HOME)\include" /I "$(ZLIB_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SDO_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_runtime.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libxml2.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sdo.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sdo.dll" /implib:"$(OUTDIR)\tuscany_sdo.lib" /pdbtype:sept /libpath:"$(LIBXML2_HOME)\lib" -LINK32_OBJS= \ - "$(INTDIR)\ChangedDataObjectListImpl.obj" \ - "$(INTDIR)\ChangeSummary.obj" \ - "$(INTDIR)\ChangeSummaryBuilder.obj" \ - "$(INTDIR)\ChangeSummaryImpl.obj" \ - "$(INTDIR)\CopyHelper.obj" \ - "$(INTDIR)\DASProperty.obj" \ - "$(INTDIR)\DASType.obj" \ - "$(INTDIR)\DASValue.obj" \ - "$(INTDIR)\DASValues.obj" \ - "$(INTDIR)\DataFactory.obj" \ - "$(INTDIR)\DataFactoryImpl.obj" \ - "$(INTDIR)\DataGraph.obj" \ - "$(INTDIR)\DataGraphImpl.obj" \ - "$(INTDIR)\DataObject.obj" \ - "$(INTDIR)\DataObjectImpl.obj" \ - "$(INTDIR)\DataObjectInstance.obj" \ - "$(INTDIR)\DataObjectList.obj" \ - "$(INTDIR)\DataObjectListImpl.obj" \ - "$(INTDIR)\DefaultLogWriter.obj" \ - "$(INTDIR)\EqualityHelper.obj" \ - "$(INTDIR)\GroupDefinition.obj" \ - "$(INTDIR)\GroupEvent.obj" \ - "$(INTDIR)\HelperProvider.obj" \ - "$(INTDIR)\Logger.obj" \ - "$(INTDIR)\LogWriter.obj" \ - "$(INTDIR)\ParserErrorSetter.obj" \ - "$(INTDIR)\Property.obj" \ - "$(INTDIR)\PropertyDefinition.obj" \ - "$(INTDIR)\PropertyDefinitionImpl.obj" \ - "$(INTDIR)\PropertyImpl.obj" \ - "$(INTDIR)\PropertyList.obj" \ - "$(INTDIR)\PropertySetting.obj" \ - "$(INTDIR)\RefCountingObject.obj" \ - "$(INTDIR)\RefCountingPointer.obj" \ - "$(INTDIR)\SAX2Attribute.obj" \ - "$(INTDIR)\SAX2Attributes.obj" \ - "$(INTDIR)\SAX2Namespaces.obj" \ - "$(INTDIR)\SAX2Parser.obj" \ - "$(INTDIR)\SchemaInfo.obj" \ - "$(INTDIR)\SdoCheck.obj" \ - "$(INTDIR)\SDODate.obj" \ - "$(INTDIR)\SdoRuntime.obj" \ - "$(INTDIR)\SDORuntimeException.obj" \ - "$(INTDIR)\SDOSAX2Parser.obj" \ - "$(INTDIR)\SDOSchemaSAX2Parser.obj" \ - "$(INTDIR)\SDOUtils.obj" \ - "$(INTDIR)\SDOXMLBufferWriter.obj" \ - "$(INTDIR)\SDOXMLFileWriter.obj" \ - "$(INTDIR)\SDOXMLStreamWriter.obj" \ - "$(INTDIR)\SDOXMLString.obj" \ - "$(INTDIR)\SDOXMLWriter.obj" \ - "$(INTDIR)\SDOXSDBufferWriter.obj" \ - "$(INTDIR)\SDOXSDFileWriter.obj" \ - "$(INTDIR)\SDOXSDStreamWriter.obj" \ - "$(INTDIR)\SDOXSDWriter.obj" \ - "$(INTDIR)\Sequence.obj" \ - "$(INTDIR)\SequenceImpl.obj" \ - "$(INTDIR)\Setting.obj" \ - "$(INTDIR)\SettingList.obj" \ - "$(INTDIR)\Type.obj" \ - "$(INTDIR)\TypeDefinition.obj" \ - "$(INTDIR)\TypeDefinitionImpl.obj" \ - "$(INTDIR)\TypeDefinitions.obj" \ - "$(INTDIR)\TypeDefinitionsImpl.obj" \ - "$(INTDIR)\TypeImpl.obj" \ - "$(INTDIR)\TypeList.obj" \ - "$(INTDIR)\XMLDocument.obj" \ - "$(INTDIR)\XMLDocumentImpl.obj" \ - "$(INTDIR)\XMLHelper.obj" \ - "$(INTDIR)\XMLHelperImpl.obj" \ - "$(INTDIR)\XMLQName.obj" \ - "$(INTDIR)\XpathHelper.obj" \ - "$(INTDIR)\XSDHelper.obj" \ - "$(INTDIR)\XSDHelperImpl.obj" \ - "$(INTDIR)\XSDPropertyInfo.obj" \ - "$(INTDIR)\XSDTypeInfo.obj" - -"$(OUTDIR)\tuscany_sdo.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -PostBuild_Desc=deploy -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sdo.dll" - ..\..\..\runtime\core\src\deploy.bat ..\..\..\ Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("sdo_runtime.dep") -!INCLUDE "sdo_runtime.dep" -!ELSE -!MESSAGE Warning: cannot find "sdo_runtime.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "sdo_runtime - Win32 Release" || "$(CFG)" == "sdo_runtime - Win32 Debug" -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangedDataObjectListImpl.cpp - -"$(INTDIR)\ChangedDataObjectListImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummary.cpp - -"$(INTDIR)\ChangeSummary.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummaryBuilder.cpp - -"$(INTDIR)\ChangeSummaryBuilder.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ChangeSummaryImpl.cpp - -"$(INTDIR)\ChangeSummaryImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\CopyHelper.cpp - -"$(INTDIR)\CopyHelper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASProperty.cpp - -"$(INTDIR)\DASProperty.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASType.cpp - -"$(INTDIR)\DASType.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASValue.cpp - -"$(INTDIR)\DASValue.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DASValues.cpp - -"$(INTDIR)\DASValues.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataFactory.cpp - -"$(INTDIR)\DataFactory.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataFactoryImpl.cpp - -"$(INTDIR)\DataFactoryImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataGraph.cpp - -"$(INTDIR)\DataGraph.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataGraphImpl.cpp - -"$(INTDIR)\DataGraphImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObject.cpp - -"$(INTDIR)\DataObject.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectImpl.cpp - -"$(INTDIR)\DataObjectImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectInstance.cpp - -"$(INTDIR)\DataObjectInstance.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectList.cpp - -"$(INTDIR)\DataObjectList.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DataObjectListImpl.cpp - -"$(INTDIR)\DataObjectListImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\DefaultLogWriter.cpp - -"$(INTDIR)\DefaultLogWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\EqualityHelper.cpp - -"$(INTDIR)\EqualityHelper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\GroupDefinition.cpp - -"$(INTDIR)\GroupDefinition.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\GroupEvent.cpp - -"$(INTDIR)\GroupEvent.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\HelperProvider.cpp - -"$(INTDIR)\HelperProvider.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Logger.cpp - -"$(INTDIR)\Logger.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\LogWriter.cpp - -"$(INTDIR)\LogWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\ParserErrorSetter.cpp - -"$(INTDIR)\ParserErrorSetter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Property.cpp - -"$(INTDIR)\Property.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyDefinition.cpp - -"$(INTDIR)\PropertyDefinition.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyDefinitionImpl.cpp - -"$(INTDIR)\PropertyDefinitionImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyImpl.cpp - -"$(INTDIR)\PropertyImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertyList.cpp - -"$(INTDIR)\PropertyList.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\PropertySetting.cpp - -"$(INTDIR)\PropertySetting.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\RefCountingObject.cpp - -"$(INTDIR)\RefCountingObject.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\RefCountingPointer.cpp - -"$(INTDIR)\RefCountingPointer.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Attribute.cpp - -"$(INTDIR)\SAX2Attribute.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Attributes.cpp - -"$(INTDIR)\SAX2Attributes.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Namespaces.cpp - -"$(INTDIR)\SAX2Namespaces.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SAX2Parser.cpp - -"$(INTDIR)\SAX2Parser.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SchemaInfo.cpp - -"$(INTDIR)\SchemaInfo.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SdoCheck.cpp - -"$(INTDIR)\SdoCheck.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDODate.cpp - -"$(INTDIR)\SDODate.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SdoRuntime.cpp - -"$(INTDIR)\SdoRuntime.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDORuntimeException.cpp - -"$(INTDIR)\SDORuntimeException.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSAX2Parser.cpp - -"$(INTDIR)\SDOSAX2Parser.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOSchemaSAX2Parser.cpp - -"$(INTDIR)\SDOSchemaSAX2Parser.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOUtils.cpp - -"$(INTDIR)\SDOUtils.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLBufferWriter.cpp - -"$(INTDIR)\SDOXMLBufferWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLFileWriter.cpp - -"$(INTDIR)\SDOXMLFileWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLStreamWriter.cpp - -"$(INTDIR)\SDOXMLStreamWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLString.cpp - -"$(INTDIR)\SDOXMLString.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXMLWriter.cpp - -"$(INTDIR)\SDOXMLWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDBufferWriter.cpp - -"$(INTDIR)\SDOXSDBufferWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDFileWriter.cpp - -"$(INTDIR)\SDOXSDFileWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDStreamWriter.cpp - -"$(INTDIR)\SDOXSDStreamWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SDOXSDWriter.cpp - -"$(INTDIR)\SDOXSDWriter.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Sequence.cpp - -"$(INTDIR)\Sequence.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SequenceImpl.cpp - -"$(INTDIR)\SequenceImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Setting.cpp - -"$(INTDIR)\Setting.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\SettingList.cpp - -"$(INTDIR)\SettingList.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\Type.cpp - -"$(INTDIR)\Type.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinition.cpp - -"$(INTDIR)\TypeDefinition.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitionImpl.cpp - -"$(INTDIR)\TypeDefinitionImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitions.cpp - -"$(INTDIR)\TypeDefinitions.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeDefinitionsImpl.cpp - -"$(INTDIR)\TypeDefinitionsImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeImpl.cpp - -"$(INTDIR)\TypeImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\TypeList.cpp - -"$(INTDIR)\TypeList.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLDocument.cpp - -"$(INTDIR)\XMLDocument.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLDocumentImpl.cpp - -"$(INTDIR)\XMLDocumentImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLHelper.cpp - -"$(INTDIR)\XMLHelper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLHelperImpl.cpp - -"$(INTDIR)\XMLHelperImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XMLQName.cpp - -"$(INTDIR)\XMLQName.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XpathHelper.cpp - -"$(INTDIR)\XpathHelper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDHelper.cpp - -"$(INTDIR)\XSDHelper.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDHelperImpl.cpp - -"$(INTDIR)\XSDHelperImpl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDPropertyInfo.cpp - -"$(INTDIR)\XSDPropertyInfo.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\runtime\core\src\commonj\sdo\XSDTypeInfo.cpp - -"$(INTDIR)\XSDTypeInfo.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/tuscany_sdo.ilk b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/tuscany_sdo.ilk deleted file mode 100644 index f4fc233e2b..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_runtime/tuscany_sdo.ilk and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.dsp b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.dsp deleted file mode 100644 index 163664df97..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.dsp +++ /dev/null @@ -1,124 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sdo_test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sdo_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 "sdo_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 "sdo_test.mak" CFG="sdo_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sdo_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)" == "sdo_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 /I "..\..\..\deploy\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /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 tuscany_sdo.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\deploy\lib" -# SUBTRACT LINK32 /verbose /pdb:none - -!ELSEIF "$(CFG)" == "sdo_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 "..\..\..\deploy\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /Zm200 /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 tuscany_sdo.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 /libpath:"..\..\..\deploy\lib" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "sdo_test - Win32 Release" -# Name "sdo_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\main.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\SdoGenerate.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\sdotest.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\sdotest2.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\runtime\core\test\utils.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\sdotest.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-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.mak b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.mak deleted file mode 100644 index 2cabf691b9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/sdo_test/sdo_test.mak +++ /dev/null @@ -1,352 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on sdo_test.dsp -!IF "$(CFG)" == "" -CFG=sdo_test - Win32 Debug -!MESSAGE No configuration specified. Defaulting to sdo_test - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "sdo_test - Win32 Release" && "$(CFG)" != "sdo_test - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "sdo_test.mak" CFG="sdo_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sdo_test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "sdo_test - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\sdo_test.exe" - -!ELSE - -ALL : "sdo_runtime - Win32 Release" "$(OUTDIR)\sdo_test.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_runtime - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\SdoGenerate.obj" - -@erase "$(INTDIR)\sdotest.obj" - -@erase "$(INTDIR)\sdotest2.obj" - -@erase "$(INTDIR)\utils.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\sdo_test.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /I "..\..\..\deploy\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_test.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\sdo_test.pdb" /machine:I386 /out:"$(OUTDIR)\sdo_test.exe" /libpath:"..\..\..\deploy\lib" -LINK32_OBJS= \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\SdoGenerate.obj" \ - "$(INTDIR)\sdotest.obj" \ - "$(INTDIR)\sdotest2.obj" \ - "$(INTDIR)\utils.obj" \ - "..\sdo_runtime\Release\tuscany_sdo.lib" - -"$(OUTDIR)\sdo_test.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\sdo_test.exe" "$(OUTDIR)\sdo_test.bsc" - -!ELSE - -ALL : "sdo_runtime - Win32 Debug" "$(OUTDIR)\sdo_test.exe" "$(OUTDIR)\sdo_test.bsc" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"sdo_runtime - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\main.sbr" - -@erase "$(INTDIR)\SdoGenerate.obj" - -@erase "$(INTDIR)\SdoGenerate.sbr" - -@erase "$(INTDIR)\sdotest.obj" - -@erase "$(INTDIR)\sdotest.sbr" - -@erase "$(INTDIR)\sdotest2.obj" - -@erase "$(INTDIR)\sdotest2.sbr" - -@erase "$(INTDIR)\utils.obj" - -@erase "$(INTDIR)\utils.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\sdo_test.bsc" - -@erase "$(OUTDIR)\sdo_test.exe" - -@erase "$(OUTDIR)\sdo_test.ilk" - -@erase "$(OUTDIR)\sdo_test.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\deploy\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /Zm200 /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_test.bsc" -BSC32_SBRS= \ - "$(INTDIR)\main.sbr" \ - "$(INTDIR)\SdoGenerate.sbr" \ - "$(INTDIR)\sdotest.sbr" \ - "$(INTDIR)\sdotest2.sbr" \ - "$(INTDIR)\utils.sbr" - -"$(OUTDIR)\sdo_test.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=tuscany_sdo.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 /incremental:yes /pdb:"$(OUTDIR)\sdo_test.pdb" /debug /machine:I386 /out:"$(OUTDIR)\sdo_test.exe" /pdbtype:sept /libpath:"..\..\..\deploy\lib" -LINK32_OBJS= \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\SdoGenerate.obj" \ - "$(INTDIR)\sdotest.obj" \ - "$(INTDIR)\sdotest2.obj" \ - "$(INTDIR)\utils.obj" \ - "..\sdo_runtime\Debug\tuscany_sdo.lib" - -"$(OUTDIR)\sdo_test.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("sdo_test.dep") -!INCLUDE "sdo_test.dep" -!ELSE -!MESSAGE Warning: cannot find "sdo_test.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "sdo_test - Win32 Release" || "$(CFG)" == "sdo_test - Win32 Debug" -SOURCE=..\..\..\runtime\core\test\main.cpp - -!IF "$(CFG)" == "sdo_test - Win32 Release" - - -"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - - -"$(INTDIR)\main.obj" "$(INTDIR)\main.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\..\runtime\core\test\SdoGenerate.cpp - -!IF "$(CFG)" == "sdo_test - Win32 Release" - - -"$(INTDIR)\SdoGenerate.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - - -"$(INTDIR)\SdoGenerate.obj" "$(INTDIR)\SdoGenerate.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\..\runtime\core\test\sdotest.cpp - -!IF "$(CFG)" == "sdo_test - Win32 Release" - - -"$(INTDIR)\sdotest.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - - -"$(INTDIR)\sdotest.obj" "$(INTDIR)\sdotest.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\..\runtime\core\test\sdotest2.cpp - -!IF "$(CFG)" == "sdo_test - Win32 Release" - - -"$(INTDIR)\sdotest2.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - - -"$(INTDIR)\sdotest2.obj" "$(INTDIR)\sdotest2.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\..\runtime\core\test\utils.cpp - -!IF "$(CFG)" == "sdo_test - Win32 Release" - - -"$(INTDIR)\utils.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - - -"$(INTDIR)\utils.obj" "$(INTDIR)\utils.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -!IF "$(CFG)" == "sdo_test - Win32 Release" - -"sdo_runtime - Win32 Release" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" - cd "..\sdo_test" - -"sdo_runtime - Win32 ReleaseCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Release" RECURSE=1 CLEAN - cd "..\sdo_test" - -!ELSEIF "$(CFG)" == "sdo_test - Win32 Debug" - -"sdo_runtime - Win32 Debug" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" - cd "..\sdo_test" - -"sdo_runtime - Win32 DebugCLEAN" : - cd "..\sdo_runtime" - $(MAKE) /$(MAKEFLAGS) /F .\sdo_runtime.mak CFG="sdo_runtime - Win32 Debug" RECURSE=1 CLEAN - cd "..\sdo_test" - -!ENDIF - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.dsw b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.dsw deleted file mode 100644 index 9bbf975238..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.dsw +++ /dev/null @@ -1,101 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Build"=.\Build\Build.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name sdo_axiom - End Project Dependency - Begin Project Dependency - Project_Dep_Name sdo_axiom_test - End Project Dependency - Begin Project Dependency - Project_Dep_Name sdo_runtime - End Project Dependency - Begin Project Dependency - Project_Dep_Name sdo_test - End Project Dependency -}}} - -############################################################################### - -Project: "sdo_axiom"=.\sdo_axiom\sdo_axiom.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name sdo_runtime - End Project Dependency -}}} - -############################################################################### - -Project: "sdo_axiom_test"=.\sdo_axiom_test\sdo_axiom_test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name sdo_axiom - End Project Dependency - Begin Project Dependency - Project_Dep_Name sdo_runtime - End Project Dependency -}}} - -############################################################################### - -Project: "sdo_runtime"=.\sdo_runtime\sdo_runtime.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sdo_test"=.\sdo_test\sdo_test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name sdo_runtime - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.ncb b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.ncb deleted file mode 100644 index 404b3790d0..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.ncb and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.opt b/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.opt deleted file mode 100644 index 658f325cf3..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/projects/tuscany_sdo/tuscany_sdo.opt and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom/sdo_axiom.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom/sdo_axiom.vcproj deleted file mode 100644 index 854243b9fb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom/sdo_axiom.vcproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.vcproj deleted file mode 100644 index a72c97a3af..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_axiom_test/sdo_axiom_test.vcproj +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_interop/sdo_interop.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_interop/sdo_interop.vcproj deleted file mode 100644 index edc93e960b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_interop/sdo_interop.vcproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_runtime/sdo_runtime.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_runtime/sdo_runtime.vcproj deleted file mode 100644 index fdfb44b4a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_runtime/sdo_runtime.vcproj +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_samples/sdo_samples.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_samples/sdo_samples.vcproj deleted file mode 100644 index 6a27381a8f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_samples/sdo_samples.vcproj +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_test/sdo_test.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_test/sdo_test.vcproj deleted file mode 100644 index a326090099..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/sdo_test/sdo_test.vcproj +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.sln b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.sln deleted file mode 100644 index e0ce6b1e53..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.sln +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdo_axiom", "sdo_axiom\sdo_axiom.vcproj", "{BF03BF2B-8F39-4458-8AD9-E3420988EFCA}" - ProjectSection(ProjectDependencies) = postProject - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE} = {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdo_axiom_test", "sdo_axiom_test\sdo_axiom_test.vcproj", "{CE1FE92A-3F1C-4AD2-922C-E16703402234}" - ProjectSection(ProjectDependencies) = postProject - {C22D761C-F453-45EB-AA23-D13E2F3B786B} = {C22D761C-F453-45EB-AA23-D13E2F3B786B} - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE} = {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE} - {BF03BF2B-8F39-4458-8AD9-E3420988EFCA} = {BF03BF2B-8F39-4458-8AD9-E3420988EFCA} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdo_runtime", "sdo_runtime\sdo_runtime.vcproj", "{EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdo_test", "sdo_test\sdo_test.vcproj", "{C22D761C-F453-45EB-AA23-D13E2F3B786B}" - ProjectSection(ProjectDependencies) = postProject - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE} = {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {BF03BF2B-8F39-4458-8AD9-E3420988EFCA}.Debug.ActiveCfg = Debug|Win32 - {BF03BF2B-8F39-4458-8AD9-E3420988EFCA}.Debug.Build.0 = Debug|Win32 - {BF03BF2B-8F39-4458-8AD9-E3420988EFCA}.Release.ActiveCfg = Release|Win32 - {BF03BF2B-8F39-4458-8AD9-E3420988EFCA}.Release.Build.0 = Release|Win32 - {CE1FE92A-3F1C-4AD2-922C-E16703402234}.Debug.ActiveCfg = Debug|Win32 - {CE1FE92A-3F1C-4AD2-922C-E16703402234}.Debug.Build.0 = Debug|Win32 - {CE1FE92A-3F1C-4AD2-922C-E16703402234}.Release.ActiveCfg = Release|Win32 - {CE1FE92A-3F1C-4AD2-922C-E16703402234}.Release.Build.0 = Release|Win32 - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE}.Debug.ActiveCfg = Debug|Win32 - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE}.Debug.Build.0 = Debug|Win32 - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE}.Release.ActiveCfg = Release|Win32 - {EAA49F3B-30A9-4F59-BCD7-F5769A28C1CE}.Release.Build.0 = Release|Win32 - {C22D761C-F453-45EB-AA23-D13E2F3B786B}.Debug.ActiveCfg = Debug|Win32 - {C22D761C-F453-45EB-AA23-D13E2F3B786B}.Debug.Build.0 = Debug|Win32 - {C22D761C-F453-45EB-AA23-D13E2F3B786B}.Release.ActiveCfg = Release|Win32 - {C22D761C-F453-45EB-AA23-D13E2F3B786B}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.suo b/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.suo deleted file mode 100644 index d6d4944f83..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/projectsvc7/tuscany_sdo/tuscany_sdo.suo and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/Makefile.am deleted file mode 100644 index edc02bb540..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = core diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/Makefile.am deleted file mode 100644 index 905089e7f9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = src test sdo_axiom sdo_axiom_test diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.cpp deleted file mode 100644 index 7e4c480e26..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "interop.h" - -using namespace std; - -/* - * Ensure that SDO can read an XML file and - * write it back out again without changing the XML. The - * test XML files can be found in tuscany/interop/src/main/resources - */ -void Interop::test1ReadAndWriteXML(char *commonDir, char *filename) -{ - int i,j; - - cout << " \nC++ interop test1 - read and write XML: " << filename << endl; - try - { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - /** - * Get an XSD helper to load XSD information into the - * data factory - */ - XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg); - char fullxsdfilename[200]; - strcpy (fullxsdfilename, commonDir ); - strcat (fullxsdfilename, filename ); - strcat (fullxsdfilename,".xsd"); - cout << "Read the XSD file " << fullxsdfilename << endl; - myXSDHelper->defineFile(fullxsdfilename); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements were not - * understood - */ - if ((i = myXSDHelper->getErrorCount()) > 0) - { - cout << "XSD Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - /** - * Use the same data factory to load XML corresponding to - * data objects adhering to the previously loaded schema - */ - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - char fullxmlfilename[200]; - strcpy (fullxmlfilename, commonDir ); - strcat (fullxmlfilename, filename ); - strcat(fullxmlfilename,"-in.xml"); - cout << "Read the XML file " << fullxmlfilename << endl; - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile(fullxmlfilename, "http://www.apache.org/tuscany/interop"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements did not match - * the schema, or were malformed. - * - */ - if ((i = myXMLHelper->getErrorCount()) > 0) - { - cout << "XML Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - cout << "Get current state of DataObject\n"; - DataObjectPtr dc = newdob->getContainer(); - - if ( !dc ) - { - cout << "There is no container" << endl; - } - else - { - cout <<" Container of type " << dc->getType().getName(); - } - - PropertyList pl = newdob->getInstanceProperties(); -/* - // Print out the top level elements of the document - for ( int i=0; i < pl.size(); i++ ) - { - const Property& p = pl[i]; - if ( newdob->isSet(p)) - { - if ( p.getType().isDataType() ) - { - cout << "isDataType = TRUE \n"; - cout << p.getName() << "=" << newdob->getCString(i) << endl; - } - else - { - cout << "isDataType = FALSE \n"; - if ( p.isMany ) - { - cout << "isMany = TRUE \n"; - DataObjectList& dol= newdob->getList (i); - - for ( int i=0; i < dol.size(); i++ ) - { - cout << p.getName() << "[" << i << "] " << "=" << dol[i] << endl; - } - } - else - { - cout << "isMany = FALSE \n"; - cout << p.getName() << "=" << newdob->getDataObject(i) << endl; - } - } - } - } -*/ - // write the XML element back out to a file - char outxmlfilename[200]; - strcpy (outxmlfilename, filename ); - strcat (outxmlfilename, "-cpp-out.xml" ); - cout << "Write the XML file " << outxmlfilename << endl; - myXMLHelper->save(myXMLDocument, outxmlfilename); - - } - catch (SDORuntimeException e) - { - cout << "Exception in interop test" << endl; - cout << e.getMessageText(); - cout << e; - } -} - -/* - * Ensure that SDO can read an XSD file and - * write it back out again without changing the XSD. The - * test XML files can be found in tuscany/interop/src/main/resources - */ -void Interop::test4ReadAndWriteXSD(char *commonDir, char *filename) -{ - /** - * Get an XSD helper to load XSD information into the - * data factory - */ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg); - - char fullxsdfilename[200]; - strcpy (fullxsdfilename, commonDir ); - strcat (fullxsdfilename, filename ); - strcat (fullxsdfilename,".xsd"); - cout << "Read the XSD file " << fullxsdfilename << endl; - const char * URIOfRootType = myXSDHelper->defineFile(fullxsdfilename); - - cout << "URI of root type" << URIOfRootType << endl; - - /** - * Now write the XSD back again - */ - DataFactoryPtr df = myXSDHelper->getDataFactory(); - TypeList typeList = df->getTypes(); - - char outxsdfilename[200]; - strcpy (outxsdfilename, filename ); - strcat(outxsdfilename,"-cpp-out.xsd"); - cout << "Write an XSD back out " << outxsdfilename << endl; - myXSDHelper->generateFile(typeList, outxsdfilename); - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.h deleted file mode 100644 index deebc64082..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/interop.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDO.h" - - -using namespace commonj::sdo; - -class Interop -{ - public: - static void test1ReadAndWriteXML(char *, char *); - static void test4ReadAndWriteXSD(char *, char *); -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/main.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/main.cpp deleted file mode 100644 index b22ffe3d6c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/main.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "interop.h" - -using namespace std; -/* - * The interop tests exercised here do not actually interoperate with other - * SDO implementations but simply check that and data that is read - * in and written out remains unchanged - */ -int main (int argc, char** argv) -{ - char *commonDir = "..\\..\\..\\..\\..\\interop\\src\\main\\resources\\"; - - cout << "SOME TESTS COMMENTED OUT - CHECK SOURCE \n"; - - Interop::test1ReadAndWriteXML(commonDir, "interop01"); - Interop::test1ReadAndWriteXML(commonDir, "interop02"); - Interop::test1ReadAndWriteXML(commonDir, "interop03"); - //Interop::test1ReadAndWriteXML(commonDir, "interop04"); - Interop::test1ReadAndWriteXML(commonDir, "interop05"); - Interop::test1ReadAndWriteXML(commonDir, "interop06"); - Interop::test1ReadAndWriteXML(commonDir, "interop07"); - Interop::test1ReadAndWriteXML(commonDir, "interop08"); - Interop::test1ReadAndWriteXML(commonDir, "interop09"); - Interop::test1ReadAndWriteXML(commonDir, "interop10"); - Interop::test1ReadAndWriteXML(commonDir, "interop11"); - Interop::test1ReadAndWriteXML(commonDir, "interop12"); - //Interop::test1ReadAndWriteXML(commonDir, "interop13"); - Interop::test1ReadAndWriteXML(commonDir, "interop14"); - Interop::test1ReadAndWriteXML(commonDir, "interop15"); - Interop::test1ReadAndWriteXML(commonDir, "interop16"); - Interop::test1ReadAndWriteXML(commonDir, "interop17"); - Interop::test1ReadAndWriteXML(commonDir, "interop18"); - Interop::test1ReadAndWriteXML(commonDir, "interop19"); - Interop::test1ReadAndWriteXML(commonDir, "interop20"); - Interop::test1ReadAndWriteXML(commonDir, "interop21"); - Interop::test1ReadAndWriteXML(commonDir, "interop22"); - Interop::test1ReadAndWriteXML(commonDir, "interop23"); - Interop::test1ReadAndWriteXML(commonDir, "interop24"); - Interop::test1ReadAndWriteXML(commonDir, "interop25"); - Interop::test1ReadAndWriteXML(commonDir, "interop26"); - Interop::test1ReadAndWriteXML(commonDir, "interop27"); - Interop::test1ReadAndWriteXML(commonDir, "interop28"); - Interop::test1ReadAndWriteXML(commonDir, "interop29"); - Interop::test1ReadAndWriteXML(commonDir, "interop30"); - Interop::test1ReadAndWriteXML(commonDir, "interop31"); - Interop::test1ReadAndWriteXML(commonDir, "interop32"); - Interop::test1ReadAndWriteXML(commonDir, "interop33"); - Interop::test1ReadAndWriteXML(commonDir, "interop34"); - Interop::test1ReadAndWriteXML(commonDir, "interop35"); - Interop::test1ReadAndWriteXML(commonDir, "interop36"); - Interop::test1ReadAndWriteXML(commonDir, "interop37"); - Interop::test1ReadAndWriteXML(commonDir, "interop38"); - Interop::test1ReadAndWriteXML(commonDir, "interop39"); - Interop::test1ReadAndWriteXML(commonDir, "interop40"); - Interop::test1ReadAndWriteXML(commonDir, "interop41"); - Interop::test1ReadAndWriteXML(commonDir, "interop42"); - Interop::test1ReadAndWriteXML(commonDir, "interop43"); - Interop::test1ReadAndWriteXML(commonDir, "interop44"); - Interop::test1ReadAndWriteXML(commonDir, "interop45"); - Interop::test1ReadAndWriteXML(commonDir, "interop46"); - Interop::test1ReadAndWriteXML(commonDir, "interop47"); - Interop::test1ReadAndWriteXML(commonDir, "interop50"); - - Interop::test4ReadAndWriteXSD(commonDir, "interop01"); - - return 0; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/runinterop.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/runinterop.bat deleted file mode 100644 index 270687dbfd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/interop/runinterop.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -set SDO_BASE=..\..\.. - -set PATH=%LIBXML2_HOME%\bin;%ICONV_HOME%\bin;%ZLIB_HOME%\bin;%SDO_BASE%\deploy\bin - -Debug\sdo_interop.exe - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/Makefile.am deleted file mode 100644 index 87fda98097..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = - -nobase_include_HEADERS = sdo_axiom.h \ -sdo_axiom_export.h - -lib_LTLIBRARIES = libtuscany_sdo_axiom.la -AM_CPPFLAGS = $(CPPFLAGS) - -libtuscany_sdo_axiom_la_SOURCES = \ - sdo_axiom.cpp - -libtuscany_sdo_axiom_la_LIBADD = \ - -L$(top_builddir)/runtime/core/src/commonj/sdo -ltuscany_sdo \ - -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_parser - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I$(top_builddir)/runtime/core/sdo_axiom \ - -I${AXIS2C_HOME}/include - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/deploy.bat deleted file mode 100644 index ccbb253bf4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/deploy.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sdo root not specified -goto usage -) -set deploydir=%1\deploy -set srcdir=%1\runtime\core\sdo_axiom - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -copy %srcdir%\*.h %deploydir%\include\ - -copy %inpath%\tuscany_sdo_axiom.lib %deploydir%\lib -copy %inpath%\tuscany_sdo_axiom.dll %deploydir%\bin - -if exist %inpath%\tuscany_sdo_axiom.pdb copy %inpath%\tuscany_sdo_axiom.pdb %deploydir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.cpp deleted file mode 100644 index d68f594125..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#include "sdo_axiom.h" - -using namespace commonj::sdo; -using namespace std; - - -namespace commonj -{ - namespace sdo_axiom - { - - int AxiomHelper::axiswritercount = 0; - - AxiomHelper* AxiomHelper::getHelper() - { - return new AxiomHelper(); - } - - void AxiomHelper::releaseHelper(AxiomHelper* h) - { - if (h) delete h; - } - - void AxiomHelper::deleteEnv() - { - if (the_env)axis2_env_free(the_env); - } - - void AxiomHelper::createEnv() - { - - the_allocator = axis2_allocator_init (NULL); - if (the_allocator == NULL) return; - - the_env = axis2_env_create(the_allocator); - - if (the_env == 0) return; - - return; - } - - - AxiomHelper::AxiomHelper() - { - createEnv(); - } - - AxiomHelper::~AxiomHelper() - { - deleteEnv(); - } - - - axis2_env_t* AxiomHelper::getEnv() - { - return the_env; - } - - axiom_node_t* AxiomHelper::toAxiomNode(DataObjectPtr dob, - const char* targetNamespaceURI, const char* elementName) - { - - axiom_document_t* doc = toAxiomDoc(dob, - targetNamespaceURI, elementName); - - if (!doc) - { - return 0; - } - - axiom_node_t* root_node = - AXIOM_DOCUMENT_GET_ROOT_ELEMENT(doc, the_env); - if (!root_node) - { - cout << "No Root Element in the document" << endl; - return 0; - } - - - return root_node; - } - - axiom_document_t* AxiomHelper::toAxiomDoc(DataObjectPtr dob, - const char* targetNamespaceURI, const char* elementName) - { - - DataFactory* df = dob->getDataFactory(); - XSDHelperPtr xs = HelperProvider::getXSDHelper(df); - XMLHelperPtr xm = HelperProvider::getXMLHelper(df); - if (!the_env) - { - cout << "No Axis Environment" << endl; - return 0; - } - - XMLDocumentPtr doc = xm->createDocument( - dob, - targetNamespaceURI, - elementName); - - char * str = xm->save(doc); - - //if (str) { - // cout << "toAxiomDoc " << str << endl; - //} - - axiom_xml_reader_t * reader = - axiom_xml_reader_create_for_memory(the_env, - (void*)str, - strlen(str), - (const axis2_char_t *)"UTF-8", - AXIS2_XML_PARSER_TYPE_BUFFER); - - if (!reader) - { - cout << "No Axis Reader" << endl; - return 0; - } - - axiom_stax_builder_t* builder = - axiom_stax_builder_create(the_env, reader); - - if (!builder) - { - cout << "No Axis Builder" << endl; - AXIOM_XML_READER_FREE(reader, the_env); - return 0; - } - - axiom_document_t* document = - AXIOM_STAX_BUILDER_GET_DOCUMENT(builder, the_env); - - if (!document) - { - cout << "No Axis Document" << endl; - AXIOM_STAX_BUILDER_FREE(builder, the_env); - return 0; - } - - axiom_node_t* root_node = - AXIOM_DOCUMENT_GET_ROOT_ELEMENT(document, the_env); - if (!root_node) - { - cout << "No Root Element in the document" << endl; - AXIOM_STAX_BUILDER_FREE(builder, the_env); - return 0; - } - - - AXIOM_DOCUMENT_BUILD_ALL(document, the_env); - - return document; - } - - DataObjectPtr AxiomHelper::toSdo(axiom_document_t* document, - DataFactoryPtr factory, - const char* targetNamespaceURI) - { - - if (!the_env) - { - cout << "No Axis Environment" << endl; - return 0; - } - - axiom_node_t* root_node = - AXIOM_DOCUMENT_GET_ROOT_ELEMENT(document, the_env); - - return toSdo(root_node,factory, targetNamespaceURI); - } - - DataObjectPtr AxiomHelper::toSdo(axiom_node_t* root_node, - DataFactoryPtr factory, - const char* targetNamespaceURI) - { - - if (!the_env) - { - cout << "No Axis Environment" << endl; - return 0; - } - - XMLHelperPtr helper = HelperProvider::getXMLHelper(factory); - - axiom_xml_writer_t* writer = axiom_xml_writer_create_for_memory( - the_env, NULL, AXIS2_TRUE, 0, - AXIS2_XML_PARSER_TYPE_BUFFER); - - axiom_output_t* output = axiom_output_create(the_env, writer); - - - if (!root_node) - { - cout << "No Root Element in the document" << endl; - AXIOM_OUTPUT_FREE(output, the_env); - return 0; - } - - AXIOM_NODE_SERIALIZE(root_node, the_env, output); - - axis2_char_t* buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, the_env); - - XMLDocumentPtr theXMLDocument = helper->load(buffer, targetNamespaceURI); - - if (theXMLDocument != 0) - { - return theXMLDocument->getRootDataObject(); - } - cout << "The XML document returned from load was zero" << endl; - return 0; - } - - void AxiomHelper::output(axiom_document_t* document) - { - - if (!the_env) - { - cout << "No Axis Environment" << endl; - return; - } - - axiom_xml_writer_t* writer = axiom_xml_writer_create_for_memory( - the_env, NULL, AXIS2_TRUE, 0, - AXIS2_XML_PARSER_TYPE_BUFFER); - - axiom_output_t* output = axiom_output_create(the_env, writer); - - axiom_node_t* root_node = - AXIOM_DOCUMENT_GET_ROOT_ELEMENT(document, the_env); - - if (!root_node) - { - cout << "No Root Element in the document" << endl; - AXIOM_OUTPUT_FREE(output, the_env); - return; - } - - AXIOM_NODE_SERIALIZE(root_node, the_env, output); - - axis2_char_t* buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, the_env); - - printf("Output XML:n %s ", buffer); - - AXIOM_OUTPUT_FREE(output, the_env); - - return; - } - } -} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.h deleted file mode 100644 index fb1beac41c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDO_AXIOM_H_ -#define _SDO_AXIOM_H_ - -#include "sdo_axiom_export.h" - -#include "axiom.h" -//#include "axis2_om_document.h" -//#include "axis2_om_stax_builder.h" - - -#include "commonj/sdo/SDO.h" - - - -namespace commonj -{ - using namespace sdo; - namespace sdo_axiom - { - -/** - * AxiomHelper writes a data object tree to XML - */ - class AxiomHelper - { - - public: - - SDO_AXIOM_API AxiomHelper(); - - SDO_AXIOM_API virtual ~AxiomHelper(); - - SDO_AXIOM_API static AxiomHelper* getHelper(); - - SDO_AXIOM_API static void releaseHelper(AxiomHelper* ax); - - SDO_AXIOM_API axiom_document_t* toAxiomDoc(DataObjectPtr dob, - const char* targetNamespaceURI = "", const char* elementName = ""); - SDO_AXIOM_API axiom_node_t* toAxiomNode(DataObjectPtr dob, - const char* targetNamespaceURI = "", const char* elementName = ""); - - SDO_AXIOM_API DataObjectPtr toSdo(axiom_document_t* doc, DataFactoryPtr factory, const char* targetNamespaceURI=0); - SDO_AXIOM_API DataObjectPtr toSdo(axiom_node_t* root_node, DataFactoryPtr factory, const char* targetNamespaceURI=0); - - SDO_AXIOM_API axis2_env_t* getEnv(); - - SDO_AXIOM_API void output(axiom_document_t* document); - - - protected: - private: - - void deleteEnv(); - - void createEnv(); - - static int axiswritercount; - - axis2_env_t *the_env; - axis2_allocator_t *the_allocator; - - - - }; - } // End - namespace sdo_axiom -} // End - namespace commonj - - -#endif //_SDO_AXIOM_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom_export.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom_export.h deleted file mode 100644 index bc9c8f55ed..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom/sdo_axiom_export.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - - -#ifdef WIN32 - -#ifdef SDO_AXIOM_EXPORTS -# define SDO_AXIOM_API __declspec(dllexport) -# define SDO_AXIOM_EXPIMP -#else -# define SDO_AXIOM_API __declspec(dllimport) -# define SDO_AXIOM_EXPIMP extern -#endif - -#else - -# define SDO_AXIOM_API -# define SDO_AXIOM_EXPIMP - -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/Makefile.am deleted file mode 100644 index 96710534f7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -noinst_PROGRAMS = tuscany_sdo_axiom_test -SUBDIRS = -TESTS = tuscany_sdo_axiom_test -TESTS_ENVIRONMENT = LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBXML2_LIB}:$(AXIS2C_HOME)/lib -AM_CPPFLAGS = $(CPPFLAGS) -tuscany_sdo_axiom_test_SOURCES = sdo_axiom_test.cpp - -noinst_HEADERS=*.h - -tuscany_sdo_axiom_test_LDADD = \ - -L$(top_builddir)/runtime/core/src/commonj/sdo -ltuscany_sdo \ - -L$(top_builddir)/runtime/core/sdo_axiom -ltuscany_sdo_axiom \ - -L${LIBXML2_LIB} -lxml2 \ - -L$(AXIS2C_HOME)/lib \ - -laxis2_util \ - -laxis2_axiom \ - -laxis2_parser \ - -laxis2_minizip - -INCLUDES = -I$(top_builddir)/runtime/core/sdo_axiom_test \ - -I$(top_builddir)/runtime/core/src \ - -I$(top_builddir)/runtime/core/sdo_axiom \ - -I${AXIS2C_HOME}/include - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.cpp deleted file mode 100644 index 31124fc2ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#pragma warning(disable:4786) - -#include - -#include "sdo_axiom_test.h" - - -void axiomtest::axiom_test() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - - mdg->addType("myspace","Department"); - - mdg->addType("myspace","Employee"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","norbert", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - const Type& tcc = mdg->getType("myspace","Company"); - - DataObjectPtr company = mdg->create((Type&)tcc); - company->setCString("name","The VDB Company Inc"); - company->setCString("norbert","Spandex Courvette"); - - - DataObjectPtr dept1 = company->createDataObject("departments"); - dept1->setCString("name","Accounts"); - - DataObjectPtr dept2 = company->createDataObject("departments"); - dept2->setCString("name","Billing"); - - DataObjectPtr emp1 = dept1->createDataObject("employees"); - emp1->setCString("name","Albert"); - - DataObjectPtr emp2 = dept1->createDataObject("employees"); - emp2->setCString("name","Ben"); - - DataObjectPtr emp3 = dept2->createDataObject("employees"); - emp3->setCString("name","Cyril"); - - DataObjectPtr emp4 = dept2->createDataObject("employees"); - emp4->setCString("name","Dominic"); - - AxiomHelper* ax = AxiomHelper::getHelper(); - - if (ax) - { - axiom_document_t* doc = ax->toAxiomDoc(company); - - if (doc) - { - ax->output(doc); - - DataObjectPtr newdob = ax->toSdo(doc,mdg); - - if (newdob) - { - cout << "Printing first data object..." << endl; - SDOUtils::printDataObject(cout,newdob); - cout << "Finished" << endl; - } - - axiom_node_t* node = - AXIOM_DOCUMENT_GET_ROOT_ELEMENT(doc, ax->getEnv()); - - - DataObjectPtr newdob2 = ax->toSdo(node,mdg); - - if (newdob2) - { - cout << "Printing second data object..." << endl; - SDOUtils::printDataObject(cout,newdob2); - cout << "Finished" << endl; - } - - - } - - } - - return; - -} - -extern "C"{ - -int main (int argc, char** argv) -{ - axiomtest::axiom_test(); - return 0; -} - -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.h deleted file mode 100644 index 280a94ceec..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/sdo_axiom_test/sdo_axiom_test.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "sdo_axiom.h" -#include "commonj/sdo/SDO.h" - - -using namespace commonj::sdo; -using namespace commonj::sdo_axiom; -using namespace std; - - - -// test - -class axiomtest { - public: - - static void axiom_test(); -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtbuild b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtbuild deleted file mode 100644 index 7c9117ffae..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtbuild +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtproject b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.project b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.project deleted file mode 100644 index a24e25672e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sdo - - - - - - 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-1.0-incubating-M2-RC3/sdo/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 37a23c6dd7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Feb 15 15:54:27 GMT 2006 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.804736841=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1588435275=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.804736841=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1588435275=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.so.debug.804736841=\n\n\n\n -environment/project/cdt.managedbuild.config.gnu.so.release.1588435275=\n\n\n\n diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/Makefile.am deleted file mode 100644 index 9a47026580..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = commonj - -nobase_include_HEADERS = \ -commonj/sdo/*.h \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/Makefile.am deleted file mode 100644 index cc127b70dc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = sdo diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.cpp deleted file mode 100644 index 384956471c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Logger.h" - -#include "commonj/sdo/ChangeSummary.h" -namespace commonj{ -namespace sdo{ - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.h deleted file mode 100644 index 8e39904b65..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummary.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _CHANGESUMMARY_H_ -#define _CHANGESUMMARY_H_ -#include "commonj/sdo/export.h" - - -#include "commonj/sdo/SettingList.h" -#include "commonj/sdo/ChangedDataObjectList.h" - - -namespace commonj{ -namespace sdo { - - /** - * - * A change summary is used to record changes to the objects in a data graph. - * This allows applications to efficiently and incrementally update - * back-end storage when required. - */ - - class ChangeSummary - { - public: - - /** getChangedDataObjects() returns a list of changed objects. - * - * The new and modified objects in the list are references to objects that - * are associated with this change summary. - * The deleted objects in the list are references to copies of the objects - * as they appeared at the time that event logging was enabled; - * if the deleted objects have references to other objects, - * the references will also refer to copies of the target objects. - * Return a list of changed data objects. - */ - - virtual SDO_API ChangedDataObjectList& getChangedDataObjects() = 0; - - - /** getOldValues returns a list of old values as settings. - * - * Returns a list of Settings - * that represent the property values of the given dataObject - * at the point when logging began. - * In the case of a deleted object, - * the list will include Settings for all the properties. - * An old value Setting indicates the value at the - * point logging begins. A setting is only produced for - * modified objects if either the old value differs from the current value or - * if the isSet differs from the current value. - * No Settings are produced for created objects. - * Param dataObject the object in question. - * Return a list of settings. - */ - - virtual SDO_API SettingList& getOldValues(DataObjectPtr dataObject) = 0; - - /** getOldXpath returns the old path before the setting. - * - * Returns a path where the object was located before the setting took place. - */ - - - virtual SDO_API const char* getOldXpath(RefCountingPointer dol) = 0; - - /** beginLogging() sets the change summary in logging mode. - * - * The change summary is initially inactive. Setting it to logging mode - * starts the process of recording all the settings made. - */ - - virtual SDO_API void beginLogging() = 0; - - /** endLogging() stops logging. - * - * This method stops logging, but does not clear out the change summary. - * The changes are valid until the summary is next set to logging, at which time - * all old settings are lost. - */ - - virtual SDO_API void endLogging() = 0; - - - - /** isLogging() returns true if logging is enabled. - * - * Indicates whether change logging is on (true) or off (false). - */ - - virtual SDO_API bool isLogging() = 0; - - - - /** isCreated() returns true if the object was created during logging. - * - * Returns whether or not the specified data object was created while logging. - * Any object that was added to the data graph - * but was not in the data graph when logging began, - * will be considered created. - * Param dataObject the data object in question. - * Return true if the specified data object was created. - */ - - virtual SDO_API bool isCreated(DataObjectPtr dataObject) = 0; - - /** isDeleted() - true if the object was deleted during logging. - * - * Returns whether or not the specified data object was deleted while logging. - * Any object that is not contained by the data graph will be considered - * deleted. - * Param dataObject the data object in question. - * Return true if the specified data object was deleted. - */ - - virtual SDO_API bool isDeleted(DataObjectPtr dataObject) = 0; - - - /** isModified() - true if the object was changed during logging. - * - * Returns whether or not the specified data object was updated while logging. - * An object that was contained in the data graph when logging began, - * and remains in the graph when logging ends will be considered for changes. - * An object considered modified must have at least one old value Setting. - * Param dataObject the data object in question. - * Return true if the specified data object was modified. - */ - - virtual SDO_API bool isModified(DataObjectPtr dataObject) = 0; - - /** getOldValue() gets the setting showing the old value. - * - * Returns a setting for the specified property - * representing the property value of the given dataObject - * at the point when logging began. - * Returns null if the property has not changed and - * has not been deleted. - * Param dataObject the object in question. - * Param property the property of the object. - * Return the Setting for the specified property. - */ - - virtual SDO_API const Setting& getOldValue(DataObjectPtr dataObject, const Property& property) = 0; - - /** getOldContainer() gets the container before the setting. - * - * Returns the value of the container data object - * at the point when logging began. - * Param dataObject the object in question. - * Return the old container data object. - */ - - virtual SDO_API DataObjectPtr getOldContainer(DataObjectPtr dataObject) = 0; - - /** getOldContainmentProperty() - gives the property before setting. - * - * Returns the value of the containment property data object property - * at the point when logging began. - * Param dataObject the object in question. - * Return the old containment property. - */ - - virtual SDO_API const Property& getOldContainmentProperty(DataObjectPtr dataObject) = 0; - - /** undoChanges() - Not Implemented. - * - * NOT IMPLEMENTED - * - * Undoes all changes in the log to restore the tree of - * DataObjects to its original state when logging began. - * isLogging() is unchanged. The log is cleared. - */ - - virtual SDO_API void undoChanges() = 0; - - /** getOldSequence() - Not Implemented. - * - * NOT IMPLEMENTED - * - * This method gives back the sequence of a data object as it - * appeared when logging was switched on. The data object may be - * a deleted data object or a changed data object. If the - * data object was not sequenced, this returns null. - */ - - virtual SDO_API SequencePtr getOldSequence(DataObjectPtr dataObject) = 0; - -}; -}; -}; -#endif //_CHANGESUMMARY_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp deleted file mode 100644 index d780fe2beb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.cpp +++ /dev/null @@ -1,1148 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/ChangeSummaryBuilder.h" - -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/XMLQName.h" -#include "commonj/sdo/DASProperty.h" -#include "commonj/sdo/Logging.h" - -#include -#include -namespace commonj -{ - namespace sdo - { - -// ======================================================================== -// Constructor/Destructor -// ======================================================================== - - ChangeSummaryBuilder::ChangeSummaryBuilder( - DataFactoryPtr df, - DataObjectPtr& rootDO) - - : dataFactory(df), - rootDataObject(rootDO) - - - { - LOGINFO(INFO,"CSBuilder constructor"); - currentState = baseState; - } - - ChangeSummaryBuilder::~ChangeSummaryBuilder() - { - LOGINFO(INFO,"CSBuilder destructor"); - } - - -// ======================================================================== -// Deletion handling -// ======================================================================== - - void ChangeSummaryBuilder::populateDeletion(ChangeSummaryImpl* csi,DataObjectPtr dob, - int currentIndex) - { - LOGENTRY(INFO,"CSBuilder populateDeletion"); - try { - - std::list::iterator attributesiter; - std::list::iterator elementsiter; - - for (attributesiter= deletions[currentIndex].attributes.begin(); - attributesiter!= deletions[currentIndex].attributes.end(); - ++attributesiter) - { - - LOGINFO_1(INFO,"CSBuilder Populate deletion attribute:%s", - (const char*)((*attributesiter).name)); - - dob->setCString((const char*)((*attributesiter).name), - (const char*)((*attributesiter).value)); - } - for (elementsiter= deletions[currentIndex].elements.begin(); - elementsiter!= deletions[currentIndex].elements.end(); - ++elementsiter) - { - - LOGINFO_1(INFO,"CSBuilder:Populate deletion element:%s", - (const char*)((*elementsiter).name)); - - SDOXMLString value = (*elementsiter).value; - SDOXMLString prop = (*elementsiter).name; - - if ((*elementsiter).isDeletion) - { - for (int i = 0; i < deletions.size(); i++) - { - if (value.equals (deletions[i].reference)) - { - if (deletions[i].dob == 0) - { - handleDeletion(csi,i,dob,(*elementsiter).value, - (*elementsiter).name); - } - // dob may have been set by the line above. - if (deletions[i].dob != 0) - { - DataObjectList& dli = dob->getList((const char*)prop); - dli.insert(0,deletions[i].dob); - } - break; - } - } - } - else - { - DataObjectList& dli = dob->getList((const char*)prop); - dli.append((const char*)value); - } - } - } - catch (SDORuntimeException e) - { - LOGSDOEXCEPTION(ERROR,"Error populating a deletion record",e); - } - LOGEXIT(INFO,"CSBuilder populateDeletion"); - return; - } - - -// ======================================================================== -// Deletion handling -// ======================================================================== - - void ChangeSummaryBuilder::handleDeletion( - ChangeSummaryImpl* csi, - int currentIndex, - DataObjectPtr cont, - SDOXMLString path, - SDOXMLString prop) - { - LOGENTRY(INFO,"CSBuilder handleDeletion(2)"); - - if (deletions[currentIndex].completedprocessing) - { - LOGEXIT(INFO,"CSBuilder handleDeletion(2) - Exit1"); - return; - } - - const Property& p = cont->getProperty((const char*)prop); - DataObjectPtr dob = dataFactory->create( - p.getType()); - populateDeletion(csi,dob,currentIndex); - deletions[currentIndex].dob = dob; - deletions[currentIndex].completedprocessing=true; - csi->appendToDeletions(p,dob,cont,path); - - LOGEXIT(INFO,"CSBuilder handleDeletion(2) - Exit2"); - - return; - } - -// ======================================================================== -// Deletion handling -// ======================================================================== - - void ChangeSummaryBuilder::handleDeletion( - ChangeSummaryImpl* csi, - int currentIndex, - SDOXMLString path) - { - - // find the original container - and see if it - // still exists. - // supposing the container doesnt exist, we need - // to process the deletion of that one first, or - // locate it in the already deleted elements. - - LOGENTRY(INFO,"CSBuilder:handleDeletion"); - - if (deletions[currentIndex].completedprocessing) - { - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit1"); - return; - } - - int index = path.lastIndexOf('/'); - if (index < 0) - { - LOGERROR(WARNING,"CSBuilder logs deletion of the root object - not possible"); - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit2"); - return; - } - - SDOXMLString prop = - path.substring(index+1); - SDOXMLString contpath = - path.substring(0,index); - - index = prop.lastIndexOf('.'); - if (index >= 0) prop = prop.substring(0,index); - - index = prop.lastIndexOf('['); - if (index >= 0) prop = prop.substring(0,index); - - DataObjectPtr cont; - - if (contpath.isNull()) - { - cont = rootDataObject; - - LOGINFO_1(INFO,"Handling deletion from root of %s",(const char*)prop); - } - else - { - try { - cont = rootDataObject->getDataObject((const char*)contpath); - LOGINFO_2(INFO,"Handling deletion from %s of %s", - (const char*)contpath,(const char*)prop); - } - catch (SDORuntimeException e) - { - cont = 0; - LOGINFO(INFO,"Container was a deleted object"); - } - } - - if (cont != 0) - { - handleDeletion(csi,currentIndex,cont,path,prop); - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit3"); - return; - } - else - { - // this data object was also deleted - cont = csi->matchDeletedObject(contpath); - if (cont != 0) - { - // we found a previously deleted object for - // the container. - handleDeletion(csi,currentIndex,cont,path,prop); - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit4"); - return; - } - - } - - // it could be a deletion which has not been processed yet - for (int i = 0; i < deletions.size(); i++) - { - if (contpath.equals (deletions[i].reference)) - { - // matching deletion found - if (i == currentIndex) - { - LOGERROR(WARNING,"Loop detected in handling deletes"); - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit5"); - return; - } - // Handle the deletion first - handleDeletion(csi,i,contpath); - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit6"); - return; - } - } - LOGERROR(WARNING,"Failed to find a matching delete "); - LOGEXIT(INFO,"CSBuilder:handleDeletion - Exit7"); - return; - } - -// ======================================================================== -// Deletion handling -// ======================================================================== - - SDOXMLString ChangeSummaryBuilder::shiftedIndex(int index) - { - int pos = createDeletes[index].value.lastIndexOf('.'); - if (pos < 0) return createDeletes[index].value; - - int val = atoi((const char*)(createDeletes[index]. - value.substring(pos+1))); - - char buf[10]; - - sprintf(buf, ".%d", val + createDeletes[index].indexshift); - - return createDeletes[index].value.substring(0,pos) + buf; - } - -// ======================================================================== -// Deletion handling -// ======================================================================== - - void ChangeSummaryBuilder::shiftIndices(int index, int delta) - { - int pos = createDeletes[index].value.lastIndexOf('.'); - if (pos < 0) return; - - SDOXMLString refstring = createDeletes[index].value.substring(0,pos); - pos = atoi((const char*)(createDeletes[index].value.substring(pos+1))); - - for (int k=index+1;k= pos) - { - createDeletes[k].indexshift += delta; - } - } - } - -// ======================================================================== -// Rebuilding of a change summary from the lists -// ======================================================================== - - void ChangeSummaryBuilder::buildChangeSummary( - DataObjectPtr changeSummaryDO) - { - LOGENTRY(INFO,"CSBuilder:buildChangeSummary"); - - int i; - - try { - if (changeSummaryDO == 0) - { - // there is no summary data object to rebuild - LOGEXIT(INFO,"CSBuilder:buildChangeSummary Exit1"); - return; - } - ChangeSummary* cs = changeSummaryDO->getChangeSummary(); - if (cs == 0) - { - // there is no change summary - this shouldnt happen - LOGEXIT(INFO,"CSBuilder:buildChangeSummary Exit2"); - return; - } - - ChangeSummaryImpl* csi = (ChangeSummaryImpl*)cs; - - // add the creations and deletions in order - - for (i = 0; i < createDeletes.size(); i++) - { - - LOGINFO_1(INFO,"CSBuilder:create/delete:%s", - (const char*)(createDeletes[i].value)); - - SDOXMLString thispath; - - if (createDeletes[i].indexshift != 0) - { - thispath = shiftedIndex(i); - } - else - { - thispath = createDeletes[i].value; - } - - if (!createDeletes[i].type.equals("delete")) - { - DataObjectPtr dob; - if (thispath.isNull()) - { - dob = rootDataObject; - } - else - { - dob = rootDataObject->getDataObject((const char*)thispath); - } - if (dob != 0) { - - LOGINFO(INFO,"CSBuilder:add create to change summary"); - - csi->appendToCreations(dob->getContainmentProperty(), - dob, dob->getContainer()); - shiftIndices(i,-1); - } - else - { - LOGERROR_1(WARNING,"Failed to find object at %s", - (const char*)createDeletes[i].value); - } - } - else - { - // its a deletion - match it. - for (int j = 0; j < deletions.size(); j++) - { - if (deletions[j].completedprocessing)continue; - - if (thispath.equals (deletions[j].reference)) - { - // matching deletion found - LOGINFO_1(INFO,"CSBuilder:matched delete:%s", - (const char*)deletions[j].reference); - - handleDeletion(csi, j,createDeletes[i].value); - // update the path on any higher items in the current - // many-valued property. - shiftIndices(i,1); - - break; - } - } - } - } - - // add the changes - - std::list::iterator a; - std::list::iterator e; - - for (i = 0; i< changes.size(); i++) - { - DataObjectPtr dob; - if (changes[i].reference.isNull()) - { - dob = rootDataObject; - } - else - { - dob = rootDataObject->getDataObject((const char*)changes[i].reference); - } - if (dob != 0) - { - LOGINFO_1(INFO,"Located a change at %s", - (const char*)changes[i].reference); - - // Need to get the changelogitem, and append settings to - // it.Append attributes - - for (a=changes[i].attributes.begin(); - a != changes[i].attributes.end();++a) - { - const Property& p = dob->getProperty((const char*)((*a).name)); - if (p.getType().isDataType()) - { - csi->appendToChanges( - p,dob,(*a).value,0); - } - else - { - for (int j = 0; j < deletions.size(); j++) - { - if ((*a).value.equals (deletions[j].reference)) - { - csi->appendToChanges( - p,dob,deletions[j].dob,0); - break; - } - } - } - } - for (e=changes[i].elements.begin(); - e != changes[i].elements.end();++e) - { - const Property& p = dob->getProperty - ((const char*)((*e).name)); - if ((*e).isDeletion) - { - - LOGINFO_1(INFO,"CSBuilder Change was a deletion of:%s", - (const char*)((*e).path)); - - for (int j = 0; j < deletions.size(); j++) - { - if ((*e).path.equals (deletions[j].reference)) - { - // matching deletion found - if (deletions[j].dob != 0) - { - csi->appendToChanges( - p,dob,deletions[j].dob,(*e).index); - } - break; - } - } - } - else if ((*e).isReference) - { - LOGINFO_2(INFO,"CSBuilder:Change was a reference from:%s to %s" , - (const char*)((*e).path), - (const char*)((*e).value)); - - DataObjectPtr pdob = rootDataObject->getDataObject((const char*)(*e).value); - if (pdob != 0) - { - csi->appendToChanges(p,dob,pdob,(*e).index); - } - } - else - { - LOGINFO_1(INFO,"CSBuilder:Change was a many valued item:%s" , - (const char*)((*e).name)); - - csi->appendToChanges(p,dob,(*e).value,(*e).index); - } - - } - } - else - { - LOGERROR_1(WARNING,"CSBuilder:Failed to find object at %s", - (const char*)(changes[i].reference)); - } - } - } - catch (SDORuntimeException e) - { - LOGSDOEXCEPTION(ERROR,"CSBuilder:Error rebuilding change summary",e); - } - LOGEXIT(INFO,"CSBuilder:buildChangeSummary Exit3"); - } - -// ======================================================================== -// Parsing code -// ======================================================================== - - void ChangeSummaryBuilder::processStart( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - char cbuf[32]; - int i; - - LOGENTRY(INFO,"CSBuilder:processStart"); - - if (currentState == baseState) - { - if (localname.equalsIgnoreCase("create") || - localname.equalsIgnoreCase("delete")) - { - currentState = dealingWithCreateDelete; - // will be expecting a chars message to give the - // contents - - createDeletes.insert( - createDeletes.end(),createDelete(localname)); - - LOGINFO_1(INFO,"CSBuilder: Processing a %s",(const char*)localname); - LOGEXIT(INFO,"CSBuilder:processStart Exit1"); - return; - } - else - { - // we are starting a new change record here - currentState = dealingWithChange; - - // we expect the entry to have an sdo:ref, and possibly - // some attributes for the changed single-values - SDOXMLString ref = attributes.getValue("ref"); - - if (ref.isNull()) - { - LOGERROR(INFO,"CSBuilder:Problem with change reference"); - ref = SDOXMLString("Unknown"); - } - - currentChange = change(localname, ref); - - LOGINFO_2(INFO,"CSBuilder: Processing a change:%s:%s", - (const char*)localname, - (const char*)ref); - - currentLocation.clear(); - - if (ref.equals("#/")) - { - ref = SDOXMLString("#"); - } - - currentLocation.push_back(ref); - - // clear out the change state - if there was any. - - changeIndex = 0; - previousChange = SDOXMLString(""); - - // now insert any remaining attributes of this change - - for (i=0; i < attributes.size(); i++) - { - // push all the attributes into the change record. - SDOXMLString name = attributes[i].getName(); - if (!name.equalsIgnoreCase("ref")) - { - SDOXMLString value = attributes[i].getValue(); - currentChange.addAttribute( - changeAttribute(name,value)); - } - } - } - LOGEXIT(INFO,"CSBuilder:processStart Exit2"); - return; - } - - // We are not in the base state - we could be in a change or a deletion - // We are now dropping into an element, which could be either a many-valued - // primitive type, or a placeholder in list of deletions, or a deletion - // record. - - if (currentState == dealingWithChange) - { - - if (!previousChange.equals(localname)) - { - changeIndex = 0; - previousChange = localname; - } - else - { - changeIndex++; - } - - - sprintf(cbuf,"%d",changeIndex); - currentLocation.push_back(localname + "." + cbuf); - - // build the current location... - SDOXMLString curr_loc = ""; - - if (currentLocation.size() > 0) - { - for (int pi = 0; pi < currentLocation.size()-1; pi++) - { - curr_loc = curr_loc + currentLocation[pi]; - curr_loc = curr_loc + "/"; - } - curr_loc = curr_loc + currentLocation[currentLocation.size()-1]; - } - - LOGINFO_1(INFO,"CSBuilder: Dropping into an element of a change:%s", - (const char*)localname); - LOGINFO_1(INFO,"CSBuilder:currentLocation:%s", - (const char*)curr_loc); - - // First case - its a placeholder for an element in a list - // all we have to do is keep track of the list index. - - if (attributes.size() == 1) - { - SDOXMLString name = attributes[0].getName(); - if (name.equalsIgnoreCase("ref")) - { - currentState = dealingWithChangeElement; - currentChange.addElement( - changeElement(localname, curr_loc, - attributes[0].getValue(), true, false)); - - LOGEXIT(INFO,"CSBuilder:processStart Exit3"); - return; - } - } - - if (attributes.size() == 0) - { - // It could be a many-valued primitive, or - // a deletion with no attributes - // can we match the current path to a known deletion? - - bool isDelete = false; - - for (int i = 0; i < createDeletes.size(); i++) - { - if (createDeletes[i].type.equals("delete")) - { - if (curr_loc.equals(createDeletes[i].value)) - { - LOGINFO(INFO,"CSBuilder: An existing delete was found"); - - isDelete = true; - break; // out of the for loop - } - } - } - if (!isDelete) - { - LOGINFO(INFO,"CSBuilder: Change with no atts and not deletion- an element"); - - // and will get picked up by the 'characters' method. - currentState = dealingWithChangeElement; - currentLocalName = SDOXMLString(localname); - - LOGEXIT(INFO,"CSBuilder:processStart Exit4"); - return; - } - } - - currentChange.addElement(changeElement(localname, curr_loc, false, true)); - currentDeletion = deletion(localname, curr_loc); - - LOGINFO_2(INFO,"CSBuilder: Found a deletion:%s:%s", - (const char*)localname, - (const char*)curr_loc); - - - // clear out the change state - if there was any. - deletionLevel = 0; - deletionIndex = 0; - previousDeletion = SDOXMLString(""); - - currentState = dealingWithDeletion; - - // Now add the attributes if there are any. - - for (int i=0; i < attributes.size(); i++) - { - // push all the attributes into the deletion record. - SDOXMLString name = attributes[i].getName(); - if (!name.equalsIgnoreCase("ref")) - { - SDOXMLString value = attributes[i].getValue(); - currentDeletion.addAttribute( - deletionAttribute(name,value)); - } - } - - LOGEXIT(INFO,"CSBuilder:processStart Exit5"); - return; - } - if (currentState == dealingWithDeletion) - { - // we are already in a deletion, and entering an element - if (!previousDeletion.equals(localname)) - { - deletionIndex = 0; - previousDeletion = localname; - } - else - { - deletionIndex++; - } - - sprintf(cbuf,"%d",deletionIndex); - currentLocation.push_back(localname + "." + cbuf); - - // First case - its a placeholder for an element in a list - // all we have to do is keep track of the list index. - - if (attributes.size() == 1) - { - SDOXMLString name = attributes[0].getName(); - if (name.equalsIgnoreCase("ref")) - { - LOGINFO(INFO,"CSBuilder: The element is a reference to an existing entry in a list"); - - currentState = dealingWithDeletionElement; - - LOGEXIT(INFO,"CSBuilder:processStart Exit6"); - return; - } - } - - SDOXMLString curr_loc = ""; - if (currentLocation.size() > 0) - { - for (int pi = 0; pi < currentLocation.size()-1; pi++) - { - curr_loc = curr_loc + currentLocation[pi]; - curr_loc = curr_loc + "/"; - } - curr_loc = curr_loc + currentLocation[currentLocation.size()-1]; - } - - if (attributes.size() == 0) - { - // It could be a many-valued primitive, or - // a deletion with no attributes - // can we match the current path to a known deletion? - bool isDelete = false; - - for (int i = 0; i < createDeletes.size(); i++) - { - if (createDeletes[i].type.equals("delete")) - { - if (curr_loc.equals(createDeletes[i].value)) - { - LOGINFO(INFO,"CSBuilder: An existing delete was found - its a delete"); - - isDelete = true; - break; // out of the for loop - } - } - } - if (!isDelete) - { - LOGINFO(INFO,"CSBuilder: Found a change with no atts, and no deletion matches - its an element"); - - // and will get picked up by the 'characters' method. - currentState = dealingWithDeletionElement; - - LOGEXIT(INFO,"CSBuilder:processStart Exit7"); - return; - } - } - - - // We are starting a new deletion record - - LOGINFO_2(INFO,"CSBuilder: Found a deletion within a deletion:%s:%s", - (const char*)localname, (const char*)curr_loc); - - deletionList.push_back(deletionListElement(currentDeletion,deletionIndex, - previousDeletion)); - - currentDeletion = deletion(localname, curr_loc); - - // we are in a nested delete - so record the level such that we can pop state - // from the deletionList on coming back out of this. - - deletionLevel++; - //deletionIndex = 0; - previousDeletion = SDOXMLString(""); - - currentState = dealingWithDeletion; - - // Now add the attributes if there are any. - - for (int i=0; i < attributes.size(); i++) - { - // push all the attributes into the deletion record. - SDOXMLString name = attributes[i].getName(); - if (!name.equalsIgnoreCase("ref")) - { - SDOXMLString value = attributes[i].getValue(); - currentDeletion.addAttribute( - deletionAttribute(name,value)); - } - } - - LOGEXIT(INFO,"CSBuilder:processStart Exit8"); - return; - - } - } - -// ======================================================================== -// Parser ends an element -// ======================================================================== - - void ChangeSummaryBuilder::processEnd( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI) - { - - LOGENTRY(INFO,"CSBuilder:processEnd"); - - if (currentState == dealingWithCreateDelete) - { - // its already been completed by the characters message - currentState = baseState; - LOGEXIT(INFO,"CSBuilder:processEnd Exit1"); - return; - } - else if (currentState == dealingWithChangeElement) - { - // its already been completed by the characters message - currentState = dealingWithChange; - currentLocation.pop_back(); - LOGEXIT(INFO,"CSBuilder:processEnd Exit2"); - return; - } - else if (currentState == dealingWithDeletionElement) - { - // its already been completed by the characters message - currentState = dealingWithDeletion; - currentLocation.pop_back(); - LOGEXIT(INFO,"CSBuilder:processEnd Exit3"); - return; - } - else if (currentState == dealingWithChange) - { - // we should have finished, there are no nested changes - currentState = baseState; - changes.insert(changes.end(),currentChange); - currentLocation.clear(); - LOGEXIT(INFO,"CSBuilder:processEnd Exit4"); - return; - } - else if (currentState == dealingWithDeletion) - { - currentLocation.pop_back(); - deletions.insert(deletions.end(),currentDeletion); - if (deletionLevel > 0) - { - deletionLevel--; - if (deletionList.size() > 0) - { - int index = deletionIndex; - SDOXMLString path = currentDeletion.reference; - SDOXMLString name = currentDeletion.name; - - deletionListElement dl = deletionList[deletionList.size()-1]; - currentDeletion = dl.del; - deletionIndex = dl.index; - previousDeletion = dl.previous; - deletionList.pop_back(); - // and insert the inside deletion in the outside one. - currentDeletion.insertElement(deletionElement( - name, path,index)); - } - - LOGEXIT(INFO,"CSBuilder:processEnd Exit5"); - return; - } - else - { - currentState = dealingWithChange; - - LOGEXIT(INFO,"CSBuilder:processEnd Exit6"); - return; - } - } - } - -// ======================================================================== -// Parse characters -// ======================================================================== - - - void ChangeSummaryBuilder::processChars( - const SDOXMLString& chars) - { - LOGENTRY(INFO,"CSBuilder:processChars"); - - if (currentState == dealingWithCreateDelete) - { - // this is text within a create/delete indicating the - // value of the item deleted/created. - if (createDeletes.size() > 0) - { - createDeletes[createDeletes.size()-1].value = chars; - LOGINFO_1(INFO,"CSBuilder:characters create/delete:%s", - (const char*)chars); - } - LOGEXIT(INFO,"CSBuilder:processChars Exit1"); - return; - } - else if (currentState == dealingWithChangeElement) - { - changeElement ce = changeElement(currentLocalName, previousChange, false, false); - ce.value = chars; - ce.index = changeIndex; - currentChange.addElement(ce); - - LOGINFO_1(INFO,"CSBuilder: Characters in a change element:%s", - (const char *)chars); - - LOGEXIT(INFO,"CSBuilder:processChars Exit2"); - return; - } - else if (currentState == dealingWithDeletionElement) - { - deletionElement ce = deletionElement(previousDeletion); - ce.value = chars; - ce.index = deletionIndex; - currentDeletion.addElement(ce); - - LOGINFO_1(INFO,"CSBuilder: Characters in a deletion element:%s", - (const char *)chars); - - LOGEXIT(INFO,"CSBuilder:processChars Exit3"); - return; - } - - LOGINFO_1(INFO,"CSBuilder: Characters in nothing!!:%s", - (const char *)chars); - LOGEXIT(INFO,"CSBuilder:processChars Exit4"); - } - - -// ======================================================================== -// Classes holding temporary parsed information -// ======================================================================== - - - ///////////////////////////////////////////////// - // An element in the list of creates/deletes - ///////////////////////////////////////////////// - - createDelete::createDelete() - { - } - - createDelete::createDelete(SDOXMLString intype) : - type(intype) - { - indexshift = 0; - } - - createDelete::~createDelete() - { - } - - ///////////////////////////////////////////////// - // An element in the list of changes - ///////////////////////////////////////////////// - - changeAttribute::changeAttribute() - { - } - - changeAttribute::changeAttribute(SDOXMLString inname, - SDOXMLString invalue): name(inname), value(invalue) - { - } - - changeAttribute::~changeAttribute() - { - } - - changeElement::changeElement() - { - } - - changeElement::changeElement(SDOXMLString inname, - SDOXMLString inpath, bool isRef, bool isDel) - : name(inname) , path(inpath) - { - isReference=isRef; - isDeletion= isDel; - } - - changeElement::changeElement(SDOXMLString inname, - SDOXMLString inpath, - SDOXMLString invalue, bool isRef, bool isDel) - : name(inname), value(invalue), path(inpath) - { - isReference=isRef; - isDeletion= isDel; - } - - changeElement::~changeElement() - { - } - - change::change() - { - } - - change::change(SDOXMLString inname, SDOXMLString ref): - name(inname), reference(ref) - { - } - - void change::addAttribute(changeAttribute ca) - { - attributes.insert(attributes.end(),ca); - } - - void change::addElement(changeElement ce) - { - elements.insert(elements.end(),ce); - } - - ///////////////////////////////////////////////// - // An element in the list of deletions - ///////////////////////////////////////////////// - - deletionAttribute::deletionAttribute() - { - } - - deletionAttribute::deletionAttribute(SDOXMLString inname, - SDOXMLString invalue): name(inname), value(invalue) - { - } - - deletionAttribute::~deletionAttribute() - { - } - - deletionElement::deletionElement() - { - } - - deletionElement::deletionElement(SDOXMLString inname) - : name(inname) - { - isDeletion = false; - } - - deletionElement::deletionElement(SDOXMLString inname, - SDOXMLString inpath, int inindex) - : name(inname), value(inpath), index(inindex) - { - isDeletion = true; - } - - deletionElement::~deletionElement() - { - } - - deletion::deletion() - { - } - - deletion::deletion(SDOXMLString inname, SDOXMLString ref): - name(inname), reference(ref) - { - completedprocessing=false; - } - - void deletion::addAttribute(deletionAttribute ca) - { - attributes.insert(attributes.end(),ca); - } - - void deletion::addElement(deletionElement ce) - { - elements.insert(elements.end(),ce); - } - - void deletion::insertElement(deletionElement ce) - { - elements.insert(elements.begin(),ce); - } - - deletionListElement::deletionListElement() - { - } - - deletionListElement::deletionListElement( - deletion in_del, - int in_index, - SDOXMLString in_prev): - del(in_del), index(in_index), previous(in_prev) - { - } - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.h deleted file mode 100644 index 59e158aeed..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryBuilder.h +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _CHANGESUMMARYBUILDER_H_ -#define _CHANGESUMMARYBUILDER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SAX2Parser.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/PropertySetting.h" -#include "commonj/sdo/ChangeSummaryImpl.h" - - -#include - -namespace commonj -{ - namespace sdo - { - -/** - * createDelete is a class holding a creation or deletion in - * a change summary builder. - * When rebuilding a change summary from the serialized version - * creates and deletes are stored in these until they can be - * converted into a change summary. - */ - - - class createDelete - { - public: - createDelete(); - createDelete(SDOXMLString intype); - virtual ~createDelete(); - SDOXMLString type; - SDOXMLString value; - int indexshift; - }; - -/** - * changeAttribute is a class holding a changed attribute in a - * change summary builder. - * When rebuilding a change summary from the serialized version - * changes are stored in these until they can be - * converted into a change summary. - */ - - class changeAttribute - { - public: - changeAttribute(); - changeAttribute(SDOXMLString inname, - SDOXMLString invalue); - virtual ~changeAttribute(); - SDOXMLString name; - SDOXMLString value; - }; - -/** - * changeElement is a class holding a changed element in a change summary builder. - * When rebuilding a change summary from the serialized version - * changes are stored in these until they can be - * converted into a change summary. - */ - class changeElement - { - public: - changeElement(); - changeElement(SDOXMLString inname, - SDOXMLString inpath, bool isRef, bool isDel); - changeElement(SDOXMLString inname, - SDOXMLString inpath, - SDOXMLString invalue, bool isRef, bool isDel); - virtual ~changeElement(); - SDOXMLString name; - SDOXMLString value; - SDOXMLString path; - bool isReference; - bool isDeletion; - int index; - }; - -/** - * change is a class holding a change in a change summary builder. - * When rebuilding a change summary from the serialized version - * changes are stored in these until they can be - * converted into a change summary. - * Changes consist of changeAttributes and changeElements - */ - - - class change - { - public: - change(); - change(SDOXMLString inname, SDOXMLString ref); - void addAttribute(changeAttribute ca); - void addElement(changeElement ce); - std::list attributes; - std::list elements; - SDOXMLString name; - SDOXMLString reference; - }; - -/** - * deletionAttribute is a class holding a deletion attribute in a change summary builder. - * When rebuilding a change summary from the serialized version - * deletions are stored in these until they can be - * converted into a change summary. - * Changes consist of deletionAttributes and deletionElements - */ - class deletionAttribute - { - public: - deletionAttribute(); - deletionAttribute(SDOXMLString inname, - SDOXMLString invalue); - virtual ~deletionAttribute(); - SDOXMLString name; - SDOXMLString value; - }; - -/** - * deletionElement is a class holding a deletion element in a change summary builder. - * When rebuilding a change summary from the serialized version - * deletions are stored in these until they can be - * converted into a change summary. - * Changes consist of deletionAttributes and deletionElements - */ - class deletionElement - { - public: - deletionElement(); - deletionElement(SDOXMLString inname); - deletionElement(SDOXMLString inname, - SDOXMLString inpath, int inindex); - virtual ~deletionElement(); - SDOXMLString name; - SDOXMLString value; - bool isDeletion; - int index; - }; - - -/** - * deletions is a class holding a deletion in a change summary builder. - * When rebuilding a change summary from the serialized version - * deletions are stored in these until they can be - * converted into a change summary. - * Changes consist of deletionAttributes and deletionElements - */ - - class deletion - { - public: - deletion(); - deletion(SDOXMLString inname, SDOXMLString ref); - void addAttribute(deletionAttribute ca); - void addElement(deletionElement ce); - void insertElement(deletionElement ce); - SDOXMLString name; - SDOXMLString reference; - DataObjectPtr dob; /* the recreated one*/ - std::list attributes; - std::list elements; - bool completedprocessing; - }; - - /** deletionListElement is an item in a list of deletions in a change summary builder. - * - * All the deletions are stored whilst rebuilding a change - * summary, then applied. These list elements hold them. - */ - - class deletionListElement - { - public: - deletionListElement(); - deletionListElement(deletion in_del, int in_index, SDOXMLString in_prev); - SDOXMLString previous; - deletion del; - int index; - }; - -/** - * The ChangeSummaryBuilder recreates a change summary from the - * XML representations of the changes, creations and deletions. - * It does this by populating a list of changes as though they had - * been applied to the current data graph. - */ - - class ChangeSummaryBuilder - { - - - public: - - enum CsState - { - baseState, - dealingWithCreateDelete, - dealingWithChange, - dealingWithChangeElement, - dealingWithDeletion, - dealingWithDeletionElement - }; - - - ChangeSummaryBuilder( - DataFactoryPtr df, - DataObjectPtr& rootDO); - - virtual ~ChangeSummaryBuilder(); - - - virtual void processStart( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void processChars( - const SDOXMLString& chars); - - virtual void processEnd( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI); - - virtual void buildChangeSummary( - DataObjectPtr changeSummaryDO); - - virtual void populateDeletion(ChangeSummaryImpl* csi, DataObjectPtr dob, - int index); - - virtual void handleDeletion( - ChangeSummaryImpl* csi, - int currentIndex, - DataObjectPtr cont, - SDOXMLString path, - SDOXMLString prop); - - virtual void handleDeletion(ChangeSummaryImpl* csi, - int index, - SDOXMLString path); - - void shiftIndices(int index, int delta); - - SDOXMLString shiftedIndex(int index); - - - private: - DataFactoryPtr dataFactory; - DataObjectPtr& rootDataObject; - - CsState currentState; - - std::vector deletionList; - std::vector currentLocation; - std::vector createDeletes; - - std::vector changes; - change currentChange; - SDOXMLString previousChange; - SDOXMLString currentLocalName; - int changeIndex; - - std::vector deletions; - deletion currentDeletion; - SDOXMLString previousDeletion; - int deletionIndex; - int deletionLevel; - - - }; - } // End - namespace sdo -} // End - namespace commonj - -#endif //_CHANGESUMMARYBUILDER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp deleted file mode 100644 index ccb2f3176a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.cpp +++ /dev/null @@ -1,1592 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/ChangeSummaryImpl.h" - -#include "commonj/sdo/DataObjectImpl.h" - -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/DataObjectList.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/Logging.h" - -#include - -namespace commonj{ -namespace sdo{ - - - // Initializes an empty change summary, so we know one is required - ChangeSummaryImpl::ChangeSummaryImpl() - { - logging = false; - } - - ChangeSummaryImpl::~ChangeSummaryImpl() - { - //Force logging off or bad things will happen! - logging = false; - - /** - * These remove the logitems, so cause the - * refcounts of the data objects to drop, and - * delete the settings lists. - */ - deletedMap.clear(); - createdMap.clear(); - changedMap.clear(); - changedDataObjects.clear(); - } - - SequencePtr ChangeSummaryImpl::getOldSequence(DataObjectPtr dob) - { - DELETELOG_MAP::iterator deleteLogIter; - - DataObject* ob = dob; - deleteLogIter = deletedMap.find((DataObjectImpl*)ob); - - if (deleteLogIter != deletedMap.end()) - { - return (deleteLogIter->second).getSequence(); - } - - CHANGELOG_MAP::iterator changeLogIter; - - changeLogIter = changedMap.find((DataObjectImpl*)ob); - - if (changeLogIter != changedMap.end()) - { - return (changeLogIter->second).getSequence(); - } - return NULL; - - } - - void ChangeSummaryImpl::removeFromChanges(DataObjectImpl* ob) - { - int i = changedDataObjects.size(); - - /** - * this is used to remove only the most recent change. - * A deletion has occurred, and there was a creation, so - * we remove the creation. There cannot be a change after the - * creation, so the last entry in changes is the creation. - * there could be a previous deletion of the same object, so - * we should not clear the whole list. - */ - while (i > 0) - { - i--; - - - if (changedDataObjects.get(i) == ob) - { - changedDataObjects.remove(i); - return; - } - } - } - - DataObjectPtr ChangeSummaryImpl::matchDeletedObject(SDOXMLString path) - { - DELETELOG_MAP::iterator deleteLogIter; - - for (deleteLogIter = deletedMap.begin(); - deleteLogIter != deletedMap.end(); ++deleteLogIter) - { - if ( - path.equals( - SDOXMLString((deleteLogIter->second).getOldXpath()) - ) - ) - { - return deleteLogIter->first; - } - } - return DataObjectPtr(0); - } - - - - void ChangeSummaryImpl::logDeletion(DataObjectImpl* ob, - DataObjectImpl* container, const Property& prop, - const char* oldpath, bool loggingChildren) - { - LOGINFO_1(INFO,"ChangeSummary:LogDelete:%s", - ob->getType().getName()); - - /** - * The object is about to be deleted, so we need - * all its property Settings recorded in the list - * of changed data objects. We also need to know - * its old container, container property, and - * value. - */ - - // find any properties which are data objects, log their - // deletion first. - - int i; - - // Trace for change summaries - - LOGINFO_2(INFO,"ChangeSummary logs a deletion of property %s type %s", - prop.getName(), prop.getType().getName()); - - - CREATELOG_MAP::iterator createLogIter; - CHANGELOG_MAP::iterator changeLogIter; - - createLogIter = createdMap.find(ob); - if (createLogIter != createdMap.end()) - { - // would need to remove it from the created list. - LOGINFO(INFO,"ChangeSummary: The deletion was already created - just removing it"); - - removeFromChanges(ob); - createdMap.erase(ob); - // find the container in the change map. - - changeLogIter = changedMap.find(container); - if (changeLogIter != changedMap.end()) - { - // would hope there was an entry - int index; - if (prop.isMany()) - { - DataObjectList& dl = container->getList(prop); - for (index=0;indexsecond).getSettings(); - - for (int j=0 ; j < slist.size();j++) - { - if (!strcmp(slist.get(j)->getProperty().getName(), - prop.getName()) - - - && slist.get(j)->getIndex() == - index) - { - // these are settings of the same prop/index, we - // need to remove this entry - slist.remove(j); - // and if this was the only change, then we - // need to remoe the container from the changes - if (slist.size() == 0) - { - changedMap.erase(container); - removeFromChanges(container); - } - break; // must not continue - size is now wrong - } - } - } - return; - } - - DELETELOG_MAP::iterator deleteLogIter; - - deleteLogIter = deletedMap.find(ob); - - if (deleteLogIter != deletedMap.end()) - { - LOGINFO(INFO,"ChangeSummary - delete an already deleted object"); - return; - } - - PropertyList pl = ob->getInstanceProperties(); - DataObject* dob; - - if (loggingChildren) - { - for (i=0; i < pl.size(); i++) - { - if (pl[i].getType().isDataObjectType()) - { - if (pl[i].isMany()) { - DataObjectList& dl = ob->getList(pl[i]); - for (int j = dl.size() - 1; j>=0; j--) - { - dob = dl[j]; - if (dob)logDeletion((DataObjectImpl*)dob,ob,pl[i], - dob->objectToXPath(), true); - } - } - else { - dob = ob->getDataObject(pl[i]); - if (dob)logDeletion((DataObjectImpl*)(dob),ob,pl[i], - dob->objectToXPath(), true); - } - } - } - } - - - // build a Setting list for the set properties - - deletedMap.insert(std::make_pair(ob,deleteLogItem( - (DataObject*)ob, prop,ob->getSequence(), - oldpath, - container))); - deleteLogIter = deletedMap.find(ob); - SettingList& sl = (deleteLogIter->second).getSettings(); - - void* value; - unsigned int len; - - for (i=0; i < pl.size(); i++) - { - //if (!pl[i].getType().isDataType()) continue; - - if (!ob->isSet(pl[i])) - { - sl.append(new Setting(false,false, 0,0,pl[i],0)); - continue; - } - if (pl[i].isMany()) - { - - DataObjectList& dol = ob->getList(pl[i]); - for (int j=dol.size()-1;j >= 0; j--) - { - // needs to be the data object in cases where... - if (pl[i].getType().isDataType()) { - setPropValue(&value,&len,ob,pl[j]); - sl.append(new Setting(true,false,value,len,pl[i],j)); - } - else { - value = (void*)dol[j]; - sl.append(new Setting(true,false,value,0,pl[i],j)); - } - } - } - else - { - setPropValue(&value,&len,ob,pl[i]); - sl.append(new Setting(true,ob->isNull(pl[i]),value,len,pl[i],0)); - } - - } - - - changeLogIter = changedMap.find(ob); - if (changeLogIter != changedMap.end()) - { - // we have already changed this object, so we need the old values - // from the change, and to remove the changed map entry - LOGINFO(INFO,"ChangeSummary found a deleted item in then changes"); - - (deleteLogIter->second).setSequence((changeLogIter->second).getSequence()); - - SettingList& slist = (changeLogIter->second).getSettings(); - - for (int j=0 ; j < slist.size();j++) - { - for (int i=0;igetProperty().getName(), - sl.get(i)->getProperty().getName()) - - - && slist.get(j)->getIndex() == - sl.get(i)->getIndex()) - { - // these are settings of the same prop/index, we - // need the old value to get transferred. - sl.remove(i); - sl.insert(i,new Setting(*(slist.get(j)))); - - } - } - } - LOGINFO(INFO, "ChangeSummary: Erasing from changes"); - changedMap.erase(ob); - } - // We append deleted objects to the changed list - this list gives - // those data objects which have been affected - we then look at their - // current and old property values to find out whether they have been - // deleted or created. - else - { - changedDataObjects.append(ob, ChangedDataObjectList::Delete); - } - - LOGINFO(INFO,"ChangeSummary: Deletion being added to the list"); - - return; - } - - void ChangeSummaryImpl::logCreation(DataObjectImpl* ob, - DataObjectImpl* container, const Property& prop) - { - - LOGINFO_1(INFO,"ChangeSummary:LogCreate of type:%s",ob->getType().getName()); - - // These we just need to record the fact that they - // are present. We dont have an original value to - // store. - // log a change to the container of this object - // - - DELETELOG_MAP::iterator deleteLogIter; - - deleteLogIter = deletedMap.find(ob); - if (deleteLogIter != deletedMap.end()) - { - // can happen - a delete is really a removal from the tree. - // Adding back an object which you held a pointer to is just - // a re-creation. - LOGINFO(INFO,"ChangeSummary: Adding in a pre-deleted object"); - } - - // we should check if this object has sub-objects, they will - // need to be created too - - PropertyList pl = ob->getInstanceProperties(); - for (int p=0;pisSet(thisprop)) - { - DataObject* dp; - - if (thisprop.isMany()) - { - DataObjectList& dol = ob->getList(thisprop); - for (int ds = 0; ds < dol.size(); ds++) - { - dp = dol[ds]; - if (!dp) continue; - logCreation((DataObjectImpl*)dp,ob,thisprop); - } - } - else - { - dp = ob->getDataObject(thisprop); - if (dp) - { - logCreation((DataObjectImpl*)dp,ob,thisprop); - } - } - } - } - } - - CREATELOG_MAP::iterator createLogIter; - - createLogIter = createdMap.find(ob); - if (createLogIter != createdMap.end()) - { - // this could be a reference - we dont add it twice. - LOGINFO(INFO,"ChangeSummary: No need to log creation twice"); - return; - } - - // We append created objects to the changed list - this list gives - // those data objects which have been affected - we then look at their - // current and old property values to find out whether they have been - // deleted or created. - changedDataObjects.append(ob, ChangedDataObjectList::Create); - - createdMap.insert(std::make_pair(ob,createLogItem(ob->getType(),prop,container))); - return; - } - - - void ChangeSummaryImpl::setPropValue(void** value, unsigned int* len, DataObjectImpl* ob, const Property& prop) - { - - *len = 0; - switch (prop.getTypeEnum()) - { - case Type::BooleanType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = 0; - } - else - { - *(long*)*value = (long)ob->getBoolean(prop); - } - break; - case Type::ByteType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = 0; - } - else - { - *(long*)*value = (long)ob->getByte(prop); - } - break; - case Type::CharacterType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = 0; - } - else - { - *(long*)*value = (long)ob->getCharacter(prop); - } - break; - case Type::IntegerType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = 0; - } - else - { - *(long*)*value = (long)ob->getInteger(prop); - } - break; - case Type::ShortType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = 0; - } - else - { - *(long*)*value = (long)ob->getShort(prop); - } - break; - case Type::DoubleType: - *value = new long double; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long double*)value = (long double)0; - } - else - { - *(long double*)*value = (long double)ob->getDouble(prop); - } - break; - case Type::FloatType: - *value = new float; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(float*)value = (float)0; - } - else - { - *(float*)*value = (float)ob->getFloat(prop); - } - break; - case Type::LongType: - *value = new int64_t; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(int64_t*)value = (int64_t)0; - } - else - { - *(int64_t*)*value = (int64_t)ob->getLong(prop); - } - break; - case Type::DateType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)(ob->getDate(prop).getTime()); - } - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *value = 0; - *len = 0; - } - else - { - unsigned int siz = ob->getLength(prop); - if (siz > 0) { - *value = new wchar_t[siz]; - *len = ob->getString(prop,(wchar_t*)*value, siz); - } - else { - *value = 0; - *len = 0; - } - } - break; - case Type::BytesType: - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *value = 0; - *len = 0; - } - else - { - unsigned int siz = ob->getLength(prop); - if (siz > 0) { - *value = new char[siz]; - *len = ob->getBytes(prop,(char*)*value, siz); - } - else { - *value = 0; - *len = 0; - } - } - break; - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *value = 0; - } - else - { - *value = (void*)ob->getDataObject(prop); - } - break; - default: - SDO_THROW_EXCEPTION("(ChangeSummary)setPropValue" , - SDOUnsupportedOperationException, "Type is not recognised and cannot be saved"); - break; - } - } - - void ChangeSummaryImpl::setManyPropValue(void** value, unsigned int *len, DataObjectImpl* ob, - DataObjectImpl* listob, const Property& prop) - { - - *len = 0; - switch (prop.getTypeEnum()) - { - case Type::BooleanType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)listob->getBoolean(); - } - break; - case Type::ByteType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)listob->getByte(); - } - break; - case Type::CharacterType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)listob->getCharacter(); - } - break; - case Type::IntegerType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)listob->getInteger(); - } - break; - case Type::ShortType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)listob->getShort(); - } - break; - case Type::DoubleType: - *value = new long double; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long double*)value = (long double)0; - } - else - { - *(long double*)*value = (long double)listob->getDouble(); - } - break; - case Type::FloatType: - *value = new float; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(float*)value = (float)0; - } - else - { - *(float*)*value = (float)listob->getFloat(); - } - break; - case Type::LongType: - *value = new int64_t; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(int64_t*)value = (int64_t)0; - } - else - { - *(int64_t*)*value = (int64_t)listob->getLong(); - } - break; - case Type::DateType: - *value = new long; - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *(long*)value = (long)0; - } - else - { - *(long*)*value = (long)(listob->getDate().getTime()); - } - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *value = 0; - *len = 0; - } - else - { - unsigned int siz = listob->getLength(prop); - if (siz > 0) - { - *value = new wchar_t[siz]; - *len = listob->getString((wchar_t*)*value, siz); - } - } - break; - case Type::BytesType: - if (!ob->isSet(prop) && !prop.isDefaulted()) - { - *value = 0; - *len = 0; - } - else - { - unsigned int siz = listob->getLength(prop); - if (siz > 0) - { - *value = new char[siz]; - *len = listob->getBytes((char*)*value, siz); - } - } - break; - - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - SDO_THROW_EXCEPTION("(ChangeSummary)setManyPropValue" , - SDOUnsupportedOperationException, "A many prop data object value is being set"); - //*value = (void*)ob; - break; - default: - SDO_THROW_EXCEPTION("(ChangeSummary)setManyPropValue" , - SDOUnsupportedOperationException, "Type is not recognised and cannot be saved"); - break; - } - } - - void ChangeSummaryImpl::logChange(DataObjectImpl* ob, - const Property& prop) - { - // need to record the old value, unless the object - // is in the created list, in which case we store - // nothing. - - LOGINFO_1(INFO,"ChangeSummary:LogChange %s",prop.getName()); - - CREATELOG_MAP::iterator createLogIter; - - unsigned int len; - - createLogIter = createdMap.find(ob); - if (createLogIter != createdMap.end()) - { - LOGINFO(INFO,"ChangeSummary: no need to log change"); - return; - } - - DELETELOG_MAP::iterator deleteLogIter; - - deleteLogIter = deletedMap.find(ob); - if (deleteLogIter != deletedMap.end()) - { - LOGINFO(INFO,"ChangeSummary: no need to log change - already deleted"); - return; - } - - CHANGELOG_MAP::iterator changeLogIter; - - changeLogIter = changedMap.find(ob); - if (changeLogIter == changedMap.end()) - { - LOGINFO(INFO,"ChangeSummary: A change to an object which was not previously changed"); - changedMap.insert(std::make_pair(ob, changeLogItem(ob->getType(),prop, - ob->getSequence(), ob))); - changedDataObjects.append(ob, ChangedDataObjectList::Change); - } - else - { - LOGINFO(INFO,"ChangeSummary: A change to an object which has already been changed"); - } - - changeLogIter = changedMap.find(ob); - if (changeLogIter == changedMap.end()) - { - LOGINFO(INFO,"ChangeSummary: Problem - no changes to append to"); - return; - } - - SettingList& slist = (changeLogIter->second).getSettings(); - - void* value; - - for (int i=0;igetProperty().getName(),prop.getName())) - { - LOGINFO(INFO,"ChangeSummary: Change of a property which was already changed - ignore"); - return; - } - } - - // need to check if the property has already been set, - // There could be many Settings if the item was a list, - // but we dont care here about that. - - if (!ob->isSet(prop)) - { - slist.append(new Setting(false,false,0,0,prop,0)); - return; - } - - if (prop.isMany()) - { - // We are appending, not modifying - // we need to store the list as it was. - - LOGINFO(INFO,"ChangeSummary: logging a change to a many valued property"); - - DataObjectList& dol = ob->getList(prop); - if (dol.size() == 0) - { - slist.append(new Setting(false,false,0,0,prop,0)); - return; - } - for (int i=0;i< dol.size(); i++) - { - DataObject* dob = dol[i]; - if (prop.getType().isDataType()) { - setManyPropValue(&value, &len, (DataObjectImpl*)ob, - (DataObjectImpl*)dob, prop); - slist.append(new Setting(true,false,value,len,prop,i)); - } - else{ - value = (void*)dob; - slist.append(new Setting(true,false,value,0,prop,i)); - } - } - } - else - { - setPropValue(&value,&len,ob,prop); - slist.append(new Setting(true,ob->isNull(prop),value,len,prop,0)); - } - - return; - } - - - - void ChangeSummaryImpl::undoChanges() - { - // TODO - /* Plan for undoChanges: - - There are three lists of information. - The created list is a list of data objects which were created during logging. - These data objects will have current state, and will represent the value of a - property of their containing object. As they had no state before they were - created, the undoChanges needs to unSet the property values for these first. - - The deleted list contains a list of objects which were deleted. The objects - themselves are not valid, but can be used to obtain a list of settings - representing the values of the properties at the time the object was - deleted. Here are recursive create is needed to re-create an object - similar to the deleted one, and set its properties using the settings. - The deleted object may well contain other deleted objects as its - property values, so these too will have entries in the deleted list, and - need to be found and re-created. - - The changed list holds a list of settings for properties of data objects - which have been changed. These objects may also be in the deleted list, so# - may not be valid. They will not be in the created list. First check that - the object is not in the deleted list. If it is, then the changes need to - be applied to the data object which we created when undoing the deleted list, - otherwise we just apply the change to a data object which exists. - */ - - /* what about items in many-valued properties? I guess we need to check and - search the values returned for the list to find the object to delete*/ - LOGINFO(INFO,"ChangeSummary UndoChanges not implemented"); - return; - } - - - void ChangeSummaryImpl::beginLogging() - { - - // Clear down the lists and their contents, if there was already - // some activity. - - if (logging) endLogging(); - changedMap.clear(); - deletedMap.clear(); - createdMap.clear(); - changedDataObjects.clear(); - - LOGINFO(INFO,"ChangeSummary: logging switched on"); - - logging = true; - return; - } - - void ChangeSummaryImpl::endLogging() - { - logging = false; - - LOGINFO(INFO,"ChangeSummary: logging switched off"); - - return; - } - - bool ChangeSummaryImpl::isLogging() - { - return logging; - } - -/////////////////////////////////////////////////////////////////////////////////////// - void ChangeSummaryImpl::debugPrint(){} -// { -// ChangedDataObjectList& dol = getChangedDataObjects(); -// -// CREATELOG_MAP::iterator createLogIter; -// DELETELOG_MAP::iterator deleteLogIter; -// CHANGELOG_MAP::iterator changeLogIter; -// -// for (int i=0;igetLongValue(); -// break; -// case Type::DateType: -// cout << "Date:" << sl[j].getDateValue().getTime(); -// break; -// case Type::BigDecimalType: -// case Type::BigIntegerType: -// case Type::StringType: -// case Type::UriType: -// { -// unsigned int len = sl[j].getLength(); -// if (len > 0) { -// wchar_t* buf = new wchar_t[len]; -// len = sl[j].getStringValue(buf,len); -// cout <<"String type" ; -// for (int i=0;i 0) { -// char* buf = new char[len]; -// len = sl[j].getBytesValue(buf,len); -// cout <<"Bytes type" ; -// for (int i=0;isecond).getSettings()); - } - changeLogIter = changedMap.find((DataObjectImpl*)dob); - if (changeLogIter != changedMap.end()){ - return ((changeLogIter->second).getSettings()); - } - SDO_THROW_EXCEPTION("(ChangeSummary(getOldValues" , - SDOIndexOutOfRangeException, "Data object is not in the change summary"); - } - - - - const char* ChangeSummaryImpl::getOldXpath(RefCountingPointer dol) - { - DELETELOG_MAP::iterator deleteLogIter; - DataObject* dob = dol; - deleteLogIter = deletedMap.find((DataObjectImpl*)dob); - if (deleteLogIter != deletedMap.end()){ - return ((deleteLogIter->second).getOldXpath()); - } - return 0; - } - - - const Setting& ChangeSummaryImpl::getOldValue(DataObjectPtr dol, const Property& property) - { - DELETELOG_MAP::iterator deleteLogIter; - CHANGELOG_MAP::iterator changeLogIter; - DataObject* dob = dol; - - deleteLogIter = deletedMap.find((DataObjectImpl*)dob); - if (deleteLogIter != deletedMap.end()) - { - SettingList& sl = (deleteLogIter->second).getSettings(); - for (int i=0;i < sl.size(); i++) - { - if (!strcmp(property.getName(), - sl.get(i)->getProperty().getName())) - return (*sl.get(i)); - } - } - - changeLogIter = changedMap.find((DataObjectImpl*)dob); - if (changeLogIter != changedMap.end()) - { - SettingList& sl = (changeLogIter->second).getSettings(); - for (int i=0;i < sl.size(); i++) - { - if (!strcmp(property.getName(), - sl.get(i)->getProperty().getName())) - return (*sl.get(i)); - } - } - - SDO_THROW_EXCEPTION("(ChangeSummary(getOldValue)" , - SDOIndexOutOfRangeException, "Data object is not in the change summary"); - } - - DataObjectPtr ChangeSummaryImpl::getOldContainer(DataObjectPtr dol) - { - CHANGELOG_MAP::iterator changeLogIter; - DataObject* dob = dol; - changeLogIter = changedMap.find((DataObjectImpl*)dob); - - if (changeLogIter != changedMap.end()) - { - return (changeLogIter->second).getOldContainer(); - } - return 0; - } - - const Property& ChangeSummaryImpl::getOldContainmentProperty(DataObjectPtr dol) - { - CHANGELOG_MAP::iterator changeLogIter; - DataObject* dob = dol; - changeLogIter = changedMap.find((DataObjectImpl*)dob); - - if (changeLogIter == changedMap.end()) - { - SDO_THROW_EXCEPTION("(ChangeSummary(getOldContainmentProperty)" , - SDOIndexOutOfRangeException, "Data object is not in the change summary"); - } - return (changeLogIter->second).getOldContainmentProperty(); - } - - - // - // Creations and deletions can be just logged in the normal - // way. Changes have to be handled specially, because we - // need the old value, but the data object now contains the - // current value. - // - - void ChangeSummaryImpl::appendToCreations(const Property& p, - DataObjectPtr dob, DataObjectPtr cont) - { - LOGINFO(INFO,"ChangeSummary: Appending to creations list"); - DataObject* pdob = (DataObject*)dob; - DataObject* pcont = (DataObject*)cont; - logCreation((DataObjectImpl*)pdob,(DataObjectImpl*)pcont,p); - return; - } - - - void ChangeSummaryImpl::appendToDeletions(const Property& p, - DataObjectPtr dob, DataObjectPtr cont, const char* oldpath ) - { - DELETELOG_MAP::iterator deleteLogIter; - - LOGINFO_1(INFO,"ChangeSummary:Appending to deletions list %s",oldpath); - - DataObject* pdob = (DataObject*)dob; - DataObject* pcont = (DataObject*)cont; - logDeletion((DataObjectImpl*)pdob,(DataObjectImpl*)pcont,p, - oldpath, false); - return; - } - - - unsigned int ChangeSummaryImpl::stringConvert(char** value, const char* c, const Property& p) - { - // code duplicated from typeimpl - switch (p.getTypeEnum()) - { - case Type::BooleanType: - *value = new char[sizeof(long)]; - if ((c == 0) || strcmp(c,"true")) - { - *(long*)*value = 0; - } - else - { - *(long*)*value = 1; - } - return sizeof(long); - - case Type::ByteType: - case Type::CharacterType: - case Type::IntegerType: - case Type::ShortType: - *value = new char[sizeof(long)]; - *(long*)*value = atoi(c); - return sizeof(long); - - case Type::DoubleType: - *value = new char[sizeof(long double)]; - // TODO - atof not suitable here - *(long double*)*value = (long double)atof(c); - return sizeof(long double); - - case Type::FloatType: - *value = new char[sizeof(float)]; - *(float*)*value = (float)atof(c); - return sizeof(float); - - case Type::LongType: - *value = new char[sizeof(int64_t)]; -#if defined(WIN32) || defined (_WINDOWS) - *(int64_t*)*value = (int64_t)_atoi64(c); -#else - *(int64_t*)*value = (int64_t)strtoll(c, NULL, 0); -#endif - return sizeof(int64_t); - - case Type::DateType: - *value = new char[sizeof(time_t)]; - *(time_t*)*value = (time_t)atoi(c); - return sizeof(time_t); - - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - { - char* vw = new char[(strlen(c)+1)*sizeof(wchar_t)]; - wchar_t* pvw = (wchar_t*)vw; - for (int i=0;i< strlen(c);i++) - { - pvw[i] = (wchar_t)c[i]; - } - pvw[strlen(c)] = 0; - *value = vw; - return strlen(c); - } - break; - case Type::BytesType: - { - char* vc = new char[strlen(c)+1]; - for (int i=0;i< strlen(c);i++) - { - vc[i] = (char)c[i]; - } - vc[strlen(c)] = 0; - *value = vc; - return strlen(c); - } - break; - - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - default: - { - std::string msg("Cannot set CString on object of type:"); - msg += p.getType().getName(); - SDO_THROW_EXCEPTION("setString" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - return 0; - } - - void ChangeSummaryImpl::appendToChanges(const Property& p, - DataObjectPtr dob , SDOXMLString value, int index) - { - CHANGELOG_MAP::iterator changeLogIter; - - LOGINFO(INFO,"ChangeSummary Appending to changes list"); - - DataObject* pdob = (DataObject*)dob; - - - changeLogIter = changedMap.find((DataObjectImpl*)pdob); - if (changeLogIter == changedMap.end()) - { - - LOGINFO(INFO,"ChangeSummary: A change to an object which was not previously changed"); - - changedMap.insert(std::make_pair((DataObjectImpl*)pdob, - changeLogItem(dob->getType(),p, - dob->getSequence(), (DataObjectImpl*)pdob))); - changedDataObjects.append((DataObjectImpl*)pdob, - ChangedDataObjectList::Change); - } - - changeLogIter = changedMap.find((DataObjectImpl*)pdob); - if (changeLogIter == changedMap.end()) - { - - LOGINFO(INFO,"ChangeSummary: no changes to append to"); - - return; - } - - SettingList& slist = (changeLogIter->second).getSettings(); - - // simply need to insert a setting - no requirement to validate - // against existing settings - - char* datavalue = 0; - - unsigned int len = stringConvert(&datavalue, (const char*)value , p); - - slist.append(new Setting(true,false,datavalue,len,p,index)); - - // The datavalue will be freed by the deletion of the setting later - } - - - void ChangeSummaryImpl::appendToChanges(const Property& p, - DataObjectPtr dob , DataObjectPtr indob, int index) - { - CHANGELOG_MAP::iterator changeLogIter; - - LOGINFO(INFO,"ChangeSummary Appending to changes list (2)"); - - DataObject* pdob = (DataObject*)dob; - - changeLogIter = changedMap.find((DataObjectImpl*)pdob); - if (changeLogIter == changedMap.end()) - { - LOGINFO(INFO,"ChangeSummary: A change to an object which was not previously changed"); - - changedMap.insert(std::make_pair((DataObjectImpl*)pdob, - changeLogItem(dob->getType(),p, - dob->getSequence(), (DataObjectImpl*)pdob))); - changedDataObjects.append((DataObjectImpl*)pdob, - ChangedDataObjectList::Change); - } - - changeLogIter = changedMap.find((DataObjectImpl*)pdob); - if (changeLogIter == changedMap.end()) - { - LOGINFO(INFO,"ChangeSummary: Problem - no changes to append to"); - - return; - } - - SettingList& slist = (changeLogIter->second).getSettings(); - - // simply need to insert a setting - no requirement to validate - // against existing settings - - - slist.append(new Setting(true,false,(void*)indob,0,p,index)); - - } - - - - - ///////////////////////////////////////////////////////////// - // log items are for all lists, but contain different things - // depending on whether they are deletions, additions... - ///////////////////////////////////////////////////////////// - - createLogItem::createLogItem(const Type& tp, const Property& prop, - DataObjectImpl* cont) : - theOldContainmentProperty(prop), theOldContainer(cont), - theType(tp) - { - } - - DataObjectImpl* createLogItem::getOldContainer() - { - return theOldContainer; - } - - const Type& createLogItem::getOldType() - { - return theType; - } - - const Property& createLogItem::getOldContainmentProperty() - { - return theOldContainmentProperty; - } - - - - changeLogItem::changeLogItem(const Type& tp, - const Property& prop, - SequencePtr seq, - DataObjectImpl* cont) : - theOldContainmentProperty(prop), theOldContainer(cont), - theType(tp) - { - if (seq) - { - theSequence = new SequenceImpl((SequenceImpl*)seq); - } - else - { - theSequence = 0; - } - } - - changeLogItem::changeLogItem(const changeLogItem& cin) : - theOldContainmentProperty(cin.theOldContainmentProperty), - theType(cin.theType) - { - if (cin.theSequence) theSequence = new SequenceImpl((SequenceImpl*)cin.theSequence); - else theSequence = 0; - theOldContainer = cin.theOldContainer; - theSettings = cin.theSettings; - - } - - changeLogItem::~changeLogItem() - { - if (theSequence) delete theSequence; - } - - DataObjectImpl* changeLogItem::getOldContainer() - { - return theOldContainer; - } - - const Type& changeLogItem::getOldType() - { - return theType; - } - - const Property& changeLogItem::getOldContainmentProperty() - { - return theOldContainmentProperty; - } - - SettingList& changeLogItem::getSettings() - { - return theSettings; - } - - SequencePtr changeLogItem::getSequence() - { - return theSequence; - } - - - deleteLogItem::deleteLogItem(DataObject* dob, - const Property& prop, SequencePtr seq , - const char* oldpath, DataObjectImpl* cont - ) : - theOldContainmentProperty(prop), theOldContainer(cont), - theActualObject(dob), - theType(dob->getType()) - { - if (seq) - { - theSequence = new SequenceImpl((SequenceImpl*)seq); - } - else - { - theSequence = 0; - } - if (oldpath !=0 && strlen(oldpath) != 0) - { - theOldXpath = new char[strlen(oldpath)+1]; - strcpy(theOldXpath,oldpath); - } - else - { - theOldXpath = 0; - } - } - - const char* deleteLogItem::getOldXpath() - { - return theOldXpath; - } - - DataObjectImpl* deleteLogItem::getOldContainer() - { - return theOldContainer; - } - - deleteLogItem::deleteLogItem(const deleteLogItem& cin): - theOldContainmentProperty(cin.theOldContainmentProperty), - theType(cin.theType), theActualObject(cin.theActualObject) - { - if (cin.theSequence) theSequence = new SequenceImpl((SequenceImpl*)cin.theSequence); - else theSequence = 0; - theOldContainer = cin.theOldContainer; - theSettings = cin.theSettings; - if (cin.theOldXpath != 0) - { - theOldXpath = new char[strlen(cin.theOldXpath) + 1]; - strcpy(theOldXpath, cin.theOldXpath); - } - else - { - theOldXpath = 0; - } - } - - deleteLogItem::~deleteLogItem() - { - theActualObject = 0; - if (theSequence) delete theSequence; - if (theOldXpath != 0) - { - delete theOldXpath; - } - } - - const Type& deleteLogItem::getOldType() - { - return theType; - } - - const Property& deleteLogItem::getOldContainmentProperty() - { - return theOldContainmentProperty; - } - - SettingList& deleteLogItem::getSettings() - { - return theSettings; - } - - SequencePtr deleteLogItem::getSequence() - { - return theSequence; - } - - void deleteLogItem::setSequence(SequencePtr s) - { - if (theSequence) delete theSequence; - if (s) { - theSequence = new SequenceImpl((SequenceImpl*)s); - } - else { - theSequence = 0; - } - return; - } - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.h deleted file mode 100644 index 6137532315..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangeSummaryImpl.h +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _CHANGESUMMARYIMPL_H_ -#define _CHANGESUMMARYIMPL_H_ - -#include "commonj/sdo/disable_warn.h" - - -#include "commonj/sdo/ChangedDataObjectListImpl.h" -#include "commonj/sdo/SettingList.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/SDOXMLString.h" - -#include - -namespace commonj{ -namespace sdo { - - - /** - * ChangeLogItem is a part of a change summary. - * The change summary consisists of change items, - * deletion items and creation items. They are held in three - * lists as they have slightly different contents. - * The change log items hold old values for all the changes to - * properties of the data object concerned. - */ - - class changeLogItem { - - public: - - changeLogItem(const Type& tp, const Property& prop,SequencePtr seq, - DataObjectImpl* cont = 0 ); - changeLogItem(const changeLogItem& cin); - ~changeLogItem(); - DataObjectImpl* getOldContainer(); - const Property& getOldContainmentProperty(); - const Type& getOldType(); - SettingList& getSettings(); - SequencePtr getSequence(); - - private: - - const Property& theOldContainmentProperty; - DataObjectImpl* theOldContainer; - const Type& theType; - SettingList theSettings; - SequencePtr theSequence; - }; - - /** - * CreateLogItem is a part of a change summary. - * The change summary consisists of change items, - * deletion items and creation items. They are held in three - * lists as they have slightly different contents. - * The create log items hold the data object itself, - * and details of its container. - */ - - - class createLogItem { - - public: - - createLogItem(const Type& tp, const Property& prop, DataObjectImpl* cont = 0); - - - DataObjectImpl* getOldContainer(); - const Property& getOldContainmentProperty(); - const Type& getOldType(); - - private: - - const Property& theOldContainmentProperty; - DataObjectImpl* theOldContainer; - const Type& theType; - }; - - /** - * DeleteLogItem is a part of a change summary. - * The change summary consisists of change items, - * deletion items and creation items. They are held in three - * lists as they have slightly different contents. - * The delete log items hold the old data object , and - * details of the properties as they were before deletion - */ - - class deleteLogItem { - - public: - - - deleteLogItem(DataObject* dob, const Property& prop, - SequencePtr seq,const char *oldpath, - DataObjectImpl* cont = 0); - - - deleteLogItem(const deleteLogItem& cin); - ~deleteLogItem(); - DataObjectImpl* getOldContainer(); - const Property& getOldContainmentProperty(); - const Type& getOldType(); - const char* getOldXpath(); - SettingList& getSettings(); - SequencePtr getSequence(); - void setSequence(SequencePtr s); - - private: - - const Property& theOldContainmentProperty; - DataObjectImpl* theOldContainer; - - /** theActualObject - * A counting pointer to the object is held, such that the - * object is not freed, even if deleted. This rcp will not - * be used to refer to the object, but makes sure that the - * object does not reuse a memory address of a previously - * deleted object until the change summary is destroyed. - */ - - RefCountingPointer theActualObject; - const Type& theType; - SettingList theSettings; - SequencePtr theSequence; - char * theOldXpath; - }; - - - /** ChangeSummaryImpl implements the abstract class ChangeSummary. - * The change summary consisists of change items, - * deletion items and creation items. They are held in three - * lists as they have slightly different contents. - */ - - class ChangeSummaryImpl : public ChangeSummary - { - public: - ChangeSummaryImpl(); - - virtual ~ChangeSummaryImpl(); - - /** - * The new and modified objects in the list are references to objects that - * are associated with this change summary. - * The deleted objects in the list are references to copies of the objects - * as they appeared at the time that event logging was enabled; - * if the deleted objects have references to other objects, - * the references will also refer to copies of the target objects. - * Return a list of changed data objects. - */ - - virtual ChangedDataObjectList& getChangedDataObjects(); - - - /** getOldSettings returns a list of settings. - * Returns a list of Settings - * that represent the property values of the given dataObject - * at the point when logging began. - * In the case of a deleted object, - * the list will include Settings for all the properties. - * An old value Setting indicates the value at the - * point logging begins. A setting is only produced for - * modified objects if either the old value differs from the current value or - * if the isSet differs from the current value. - * No Settings are produced for created objects. - * Param dataObject the object in question. - * Return a list of settings. - */ - virtual SettingList& getOldValues(DataObjectPtr dataObject); - - /** getOldXpath returns the old path before the setting. - * - * Returns a path where the object was located before the setting took place. - */ - virtual const char* getOldXpath(RefCountingPointer dol); - - - /** beginLogging() sets the change summary in logging mode. - * - * The change summary is initially inactive. Setting it to logging mode - * starts the process of recording all the settings made. - */ - - virtual void beginLogging(); - - /** endLogging() stops logging. - * - * This method stops logging, but does not clear out the change summary. - * The changes are valid until the summary is next set to logging, at which time - * all old settings are lost. - */ - virtual void endLogging(); - - - - /** isLogging() returns true if logging is enabled. - * - * Indicates whether change logging is on (true) or off (false). - */ - - virtual bool isLogging(); - - - - /** isCreated() returns true if the object was created during logging. - * - * Returns whether or not the specified data object was created while logging. - * Any object that was added to the data graph - * but was not in the data graph when logging began, - * will be considered created. - * Param dataObject the data object in question. - * Return true if the specified data object was created. - */ - virtual bool isCreated(DataObjectPtr dataObject); - - /** isDeleted() - true if the object was deleted during logging. - * - * Returns whether or not the specified data object was deleted while logging. - * Any object that is not contained by the data graph will be considered - * deleted. - * Param dataObject the data object in question. - * Return true if the specified data object was deleted. - */ - virtual bool isDeleted(DataObjectPtr dataObject); - - - /** isModified() - true if the object was changed during logging. - * - * Returns whether or not the specified data object was updated while logging. - * An object that was contained in the data graph when logging began, - * and remains in the graph when logging ends will be considered for changes. - * An object considered modified must have at least one old value Setting. - * Param dataObject the data object in question. - * Return true if the specified data object was modified. - */ - virtual bool isModified(DataObjectPtr dataObject); - - /** getOldValue() gets the setting showing the old value. - * - * Returns a setting for the specified property - * representing the property value of the given dataObject - * at the point when logging began. - * Returns null if the property has not changed and - * has not been deleted. - * Param dataObject the object in question. - * Param property the property of the object. - * Return the Setting for the specified property. - */ - - virtual const Setting& getOldValue(DataObjectPtr dataObject, const Property& property); - - /** getOldContainer() gets the container before the setting. - * - * Returns the value of the container data object - * at the point when logging began. - * Param dataObject the object in question. - * Return the old container data object. - */ - virtual DataObjectPtr getOldContainer(DataObjectPtr dataObject); - - /** getOldContainmentProperty() - gives the property before setting. - * - * Returns the value of the containment property data object property - * at the point when logging began. - * Param dataObject the object in question. - * Return the old containment property. - */ - virtual const Property& getOldContainmentProperty(DataObjectPtr dataObject); - - /** undoChanges() - Not Implemented. - * - * NOT IMPLEMENTED - * - * Undoes all changes in the log to restore the tree of - * DataObjects to its original state when logging began. - * isLogging() is unchanged. The log is cleared. - */ - virtual void undoChanges(); - - /** getOldSequence() - Not Implemented. - * - * NOT IMPLEMENTED - * - * This method gives back the sequence of a data object as it - * appeared when logging was switched on. The data object may be - * a deleted data object or a changed data object. If the - * data object was not sequenced, this returns null. - */ - - virtual SDO_API SequencePtr getOldSequence(DataObjectPtr dataObject); - - bool isInCreatedMap(DataObjectImpl* ob); - - void logDeletion(DataObjectImpl* ob, - DataObjectImpl* cont, const Property& prop, - const char* oldpath, - bool loggingChildren = true - ); - - void logCreation(DataObjectImpl* ob, - DataObjectImpl* cont, const Property& prop - ); - - void logChange(DataObjectImpl* ob, const Property& prop - ); - - - SDO_API void debugPrint(); - - void removeFromChanges(DataObjectImpl* ob); - - - /** - * appendToCreations is used by deserialization - * This method helps to rebuild a change summary by populating the - * lists without the changes actually being logged. - */ - - void appendToCreations(const Property& p, - DataObjectPtr dob, - DataObjectPtr cont); - - - /** - * appendToDeletions is used by deserialization - * This method helps to rebuild a change summary by populating the - * lists without the changes actually being logged. - */ - void appendToDeletions(const Property& p, - DataObjectPtr dob, - DataObjectPtr cont, - const char* oldpath); - - - unsigned int stringConvert( - char** value, - const char* c, - const Property& p); - - /** - * appendToChangesis used by deserialization - * This method helps to rebuild a change summary by populating the - * lists without the changes actually being logged. - */ - - void appendToChanges(const Property& p, - DataObjectPtr dob, - SDOXMLString value, - int index); - - void appendToChanges(const Property& p, - DataObjectPtr dob, - DataObjectPtr pdob, - int index); - - DataObjectPtr matchDeletedObject(SDOXMLString path); - - - private: - - - void setPropValue(void** value, unsigned int *len, DataObjectImpl* ob, const Property& prop); - void setManyPropValue(void** value, unsigned int *len, DataObjectImpl* ob, - DataObjectImpl* listob, const Property& prop); - bool logging; - - typedef std::map CREATELOG_MAP; - typedef std::map DELETELOG_MAP; - typedef std::map CHANGELOG_MAP; - - CHANGELOG_MAP changedMap; - CREATELOG_MAP createdMap; - DELETELOG_MAP deletedMap; - - ChangedDataObjectListImpl changedDataObjects; - - - - - -}; -}; -}; -#endif //_CHANGESUMMARYIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h deleted file mode 100644 index 61d2f62954..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectList.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _CHANGEDDATAOBJECTLIST_H_ -#define _CHANGEDDATAOBJECTLIST_H_ - - -#include "commonj/sdo/RefCountingPointer.h" - -#include - -/** - * namespace commonj is the root namespace for SDO - */ - -namespace commonj{ - -/** - * sdo is the namespace holding the SDO core - */ - -namespace sdo{ - -class DataObject; - -/** - * - * A list for holding a record of changes which have happened - * during logging in a change summary. - */ - -class ChangedDataObjectList -{ - -public: - -/** \enum ChangeType - * - * An enum for create, change or delete types in a change record - */ - enum ChangeType - { - Undefined, - Create, - Change, - Delete - }; - -/** [] is the index operator. - * - * Gets the nth element of a list - */ - virtual SDO_API DataObjectPtr operator[] (int pos) = 0; - virtual SDO_API const DataObjectPtr operator[] (int pos) const = 0; - -/** size() returns the number of list elements. - * - * Returns the number of list elements - */ - - virtual SDO_API int size () const = 0; - -/** getType() returns the type of a list element. - * - * The type of change is one of the enum ChangeType, being a - * creation, a deletion or an update. - */ - - virtual SDO_API ChangeType getType(unsigned int index) = 0; - -}; -}; -}; -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp deleted file mode 100644 index d759eb5bf3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/ChangedDataObjectListImpl.h" - - -#include -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/Logger.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/DataObjectImpl.h" - - -namespace commonj{ -namespace sdo { - - /** CDOListElement - * - * constructor - */ - - CDOListElement::CDOListElement() - { - theObject = 0; - theType = ChangedDataObjectList::Undefined; - } - - /** CDOListElement - * - * constructor from a data object and a change - */ - - CDOListElement::CDOListElement(DataObject* in, ChangedDataObjectList::ChangeType type) - { - theObject = in; - theType = type; - } - - /** ~CDOListElement() - * - * destructor - */ - - CDOListElement::~CDOListElement() - { - } - - /** getObject() - * - * return the changed data object - */ - - DataObject* CDOListElement::getObject() const - { - return theObject; - } - - /** - * - * return the type of change getType() - */ - - ChangedDataObjectList::ChangeType CDOListElement::getType() const - { - return theType; - } - - /** ChangedDataObjectListImpl - * - * constructor - */ - - ChangedDataObjectListImpl::ChangedDataObjectListImpl(CHANGEDDATAOBJECT_VECTOR p) : plist (p) - { - } - - /** ChangedDataObjectListImpl - * - * copy constructor - */ - - ChangedDataObjectListImpl::ChangedDataObjectListImpl(const ChangedDataObjectListImpl &pin) - { - plist = std::vector< CDOListElement >(pin.getVec()); - } - - /** ChangedDataObjectListImpl - * - * default constructor - */ - - ChangedDataObjectListImpl::ChangedDataObjectListImpl() - { - } - - - /** ~ChangedDataObjectListImpl - * - * destructor - */ - - ChangedDataObjectListImpl::~ChangedDataObjectListImpl() - { - } - - /** [] index operator - * - * - */ - - RefCountingPointer ChangedDataObjectListImpl::operator[] (int pos) - { - validateIndex(pos); - return plist[pos].getObject(); - } - - /** [] index operator - * - * - */ - - const RefCountingPointer ChangedDataObjectListImpl::operator[] (int pos) const - { - validateIndex(pos); - return plist[pos].getObject(); - } - - /** get() gets an element at the index. - * - */ - - DataObject* ChangedDataObjectListImpl::get(unsigned int pos) - { - validateIndex(pos); - return plist[pos].getObject(); - } - - /** size() returns the length of the list. - * - * - */ - - int ChangedDataObjectListImpl::size () const - { - return plist.size(); - } - - /** getVec() - * gets the vector which actually stores the data objects. - */ - - CHANGEDDATAOBJECT_VECTOR ChangedDataObjectListImpl::getVec() const - { - return plist; - } - - /** getType() - * returns the type of the change. - */ - - ChangedDataObjectList::ChangeType ChangedDataObjectListImpl::getType(unsigned int pos) - { - validateIndex(pos); - return plist[pos].getType(); - } - - - /** insert() - * inserts an element into the list. - */ - - void ChangedDataObjectListImpl::insert (unsigned int index, - DataObject *d, ChangedDataObjectList::ChangeType type) - { - plist.insert(plist.begin()+index, CDOListElement((DataObject*)d,type)); - } - - /** append() - * appends to the end of the list. - */ - - void ChangedDataObjectListImpl::append (DataObject *d, ChangedDataObjectList::ChangeType type) - { - plist.insert(plist.end(),CDOListElement((DataObject*)d, type)); - } - - /** clear() - * empties the list. - */ - - void ChangedDataObjectListImpl::clear () - { - plist.clear(); - } - - - /** remove() - * removes an item from the list. - */ - - void ChangedDataObjectListImpl::remove(unsigned int index) - { - validateIndex(index); - plist.erase(plist.begin() +index); - return ; - } - - /** validateIndex() - * checks that the index is in range. - */ - - void ChangedDataObjectListImpl::validateIndex(int index) const - { - if ((index < 0) || (index >= size())) - { - std::string msg("Invalid index : "); - msg += index; - SDO_THROW_EXCEPTION("(ChangeSummary)validateIndex", SDOIndexOutOfRangeException, - msg.c_str()); - - } - - } - - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h deleted file mode 100644 index 773eebb901..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ChangedDataObjectListImpl.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _ChangedDataObjectListImplIMPL_H_ -#define _ChangedDataObjectListImplIMPL_H_ - -#include "commonj/sdo/disable_warn.h" - - -#include - -#include "commonj/sdo/ChangedDataObjectList.h" -namespace commonj{ -namespace sdo{ - -class DataObjectImpl; -class DataObject; - -/** - * CDOListElement is an element of the changed data object list - * in a change summary,it may be a delete, addition or change. - */ - -class CDOListElement -{ -public: - CDOListElement (); - CDOListElement (DataObject* in, ChangedDataObjectList::ChangeType type); - virtual ~CDOListElement(); - virtual ChangedDataObjectList::ChangeType getType() const; - virtual DataObject* getObject() const; -private: - DataObject* theObject; - ChangedDataObjectList::ChangeType theType; -}; - -typedef std::vector< CDOListElement > CHANGEDDATAOBJECT_VECTOR; - - -/** - * ChangedDataObjectListImpl implements ChangedDataObjectList, part of a - * change summary. - * This is the list of objects which have been altered during - * logging of a change summary. - */ - -class ChangedDataObjectListImpl : public ChangedDataObjectList -{ - -public: - ChangedDataObjectListImpl(CHANGEDDATAOBJECT_VECTOR p); - ChangedDataObjectListImpl(const ChangedDataObjectListImpl &pin); - ChangedDataObjectListImpl(); - - virtual ~ChangedDataObjectListImpl(); - virtual DataObjectPtr operator[] (int pos); - virtual const DataObjectPtr operator[] (int pos) const; - virtual DataObject* get(unsigned int pos); - virtual ChangedDataObjectList::ChangeType getType(unsigned int pos); - - - virtual int size () const; - - virtual void insert (unsigned int index, DataObject *d, ChangedDataObjectList::ChangeType type); - - virtual void append (DataObject* d, ChangedDataObjectList::ChangeType type); - - virtual void clear(); - - virtual void remove (unsigned int index); - - -private: - CHANGEDDATAOBJECT_VECTOR plist; - CHANGEDDATAOBJECT_VECTOR getVec() const; - - void validateIndex(int index) const; -}; -}; -}; -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp deleted file mode 100644 index 897ed9d0c8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/DataObjectImpl.h" - - -#include "commonj/sdo/CopyHelper.h" - -namespace commonj{ -namespace sdo{ - - /** CopyHelper provides static copying helper functions. - * - * CopyHelper provides shallow and deep copy of data objects. - * copyShallow() copies the DataType members of the data object. - * copy() copies all the members and recurses downwards though - * the data graph - */ - - void CopyHelper::transferitem(DataObjectPtr to, DataObjectPtr from, const Property& p) - { - switch (p.getTypeEnum()) - { - case Type::BooleanType: - to->setBoolean( p, from->getBoolean(p)); - break; - case Type::ByteType: - to->setByte( p, from->getByte(p)); - break; - case Type::CharacterType: - to->setCharacter( p, from->getCharacter(p)); - break; - case Type::IntegerType: - to->setInteger( p, from->getInteger(p)); - break; - case Type::ShortType: - to->setShort( p,from->getShort(p)); - break; - case Type::DoubleType: - to->setDouble( p, from->getDouble(p)); - break; - case Type::FloatType: - to->setFloat( p, from->getFloat(p)); - break; - case Type::LongType: - to->setLong( p, from->getLong(p)); - break; - case Type::DateType: - to->setDate( p, from->getDate(p)); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::UriType: - case Type::StringType: - { - unsigned int siz = from->getLength(p); - if (siz > 0) - { - wchar_t * buf = new wchar_t[siz]; - from->getString(p,buf, siz); - to->setString(p, buf, siz); - delete buf; - } - } - break; - case Type::BytesType: - { - unsigned int siz = from->getLength(p); - if (siz > 0) - { - char * buf = new char[siz]; - from->getBytes(p,buf, siz); - to->setBytes(p, buf, siz); - delete buf; - } - } - break; - default: - break; - } // switch - } - - void CopyHelper::transferlist(DataObjectList& to, DataObjectList& from, Type::Types t) - { - for (int i=0;i< from.size(); i++) - { - switch (t) - { - case Type::BooleanType: - to.append(from.getBoolean(i)); - break; - case Type::ByteType: - to.append(from.getByte(i)); - break; - case Type::CharacterType: - to.append(from.getCharacter(i)); - break; -#if __WORDSIZE ==64 - case Type::IntegerType: - to.append((int64_t)(from.getInteger(i))); - break; -#else - case Type::IntegerType: - to.append(from.getInteger(i)); - break; -#endif - case Type::ShortType: - to.append(from.getShort(i)); - break; - case Type::DoubleType: - to.append(from.getDouble(i)); - break; - case Type::FloatType: - to.append(from.getFloat(i)); - break; - case Type::LongType: - to.append(from.getLong(i)); - break; - case Type::DateType: - to.append(from.getDate(i)); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::UriType: - case Type::StringType: - { - unsigned int siz = from.getLength(i); - if (siz > 0) - { - wchar_t * buf = new wchar_t[siz]; - from.getString(i,buf,siz); - to.append(buf,siz); - delete buf; - } - } - break; - - case Type::BytesType: - { - unsigned int siz = from.getLength(i); - if (siz > 0) - { - char * buf = new char[siz]; - from.getBytes(i,buf,siz); - to.append(buf,siz); - delete buf; - } - } - break; - - default: - break; - } // case - } // for - } // method - - /** CopyHelper provides static copying helper functions. - * - * copyShallow() copies the DataType members of the data object. - * copy() copies all the members and recurses downwards though - * the data graph - */ - DataObjectPtr CopyHelper::copyShallow(DataObjectPtr dataObject) - { - return internalCopy(dataObject, false); - - } - - /** CopyHelper provides static copying helper functions. - * - * copyShallow() copies the DataType members of the data object. - * copy() copies all the members and recurses downwards though - * the data graph - */ - DataObjectPtr CopyHelper::copy(DataObjectPtr dataObject) - { - return internalCopy(dataObject, true); - } - - DataObjectPtr CopyHelper::internalCopy(DataObjectPtr dataObject, - bool fullCopy) - { - - DataObject* theob = dataObject; - DataFactoryPtr fac = ((DataObjectImpl*)theob)->getDataFactory(); - if (!fac) return 0; - - const Type& t = dataObject->getType(); - DataObjectPtr newob = fac->create(t); - if (!newob) return 0; - - PropertyList pl = dataObject->getInstanceProperties(); - for (int i=0;i < pl.size(); i++) - { - if (dataObject->isSet(pl[i])) - { - // data objects are only copied in the deep copy case - if (pl[i].getType().isDataObjectType()) - { - if (!fullCopy) - { - continue; - } - else - { - if (pl[i].isMany()) - { - DataObjectList& dolold = dataObject->getList(pl[i]); - DataObjectList& dolnew = newob->getList(pl[i]); - for (int i=0;i< dolold.size(); i++) - { - dolnew.append(internalCopy(dolold[i],true)); - } - } - else - { - DataObjectPtr dob = dataObject->getDataObject(pl[i]); - newob->setDataObject(pl[i],internalCopy(dob,true)); - } - } - } - else - { - if (pl[i].isMany()) - { - DataObjectList& dolold = dataObject->getList(pl[i]); - DataObjectList& dolnew = newob->getList(pl[i]); - transferlist(dolnew,dolold, pl[i].getTypeEnum()); - } - else - { - transferitem(newob,dataObject, pl[i]); - } - } // else - } - } - return newob; - } - - -} -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.h deleted file mode 100644 index 22319168fe..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/CopyHelper.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _COPYHELPER_H_ -#define _COPYHELPER_H_ - - -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/RefCountingPointer.h" - -namespace commonj{ -namespace sdo{ - - /** CopyHelper provides static copying helper functions. - * - * CopyHelper provides shallow and deep copy of data objects. - * copyShallow() copies the DataType members of the data object. - * copy() copies all the members and recurses downwards though - * the data graph - */ - -class CopyHelper -{ - public: - - /** CopyHelper provides static copying helper functions. - * - * CopyHelper provides shallow and deep copy of data objects. - * copyShallow() copies the DataType members of the data object. - * copy() copies all the members and recurses downwards though - * the data graph - */ - static SDO_API DataObjectPtr copyShallow(DataObjectPtr dataObject); - - /** CopyHelper provides static copying helper functions. - * - * CopyHelper provides shallow and deep copy of data objects. - * copyShallow() copies the DataType members of the data object. - * copy() copies all the members and recurses downwards though - * the data graph - */ - static SDO_API DataObjectPtr copy(DataObjectPtr dataObject); - - private: - static void transferlist(DataObjectList& to, DataObjectList& from, Type::Types t); - static void transferitem(DataObjectPtr to, DataObjectPtr from, const Property& p); - static DataObjectPtr internalCopy(DataObjectPtr dataObject, bool fullCopy); - -}; -}; -}; - -#endif //_COPYHELPER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.cpp deleted file mode 100644 index 15354d0d61..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DASProperty.h" - - -namespace commonj{ -namespace sdo{ - - - DASProperty::~DASProperty() - { - } -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.h deleted file mode 100644 index 6ebf241723..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASProperty.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DASPROPERTY_H_ -#define _DASPROPERTY_H_ -#include "commonj/sdo/Property.h" -#include "commonj/sdo/DASValues.h" - -#include "commonj/sdo/disable_warn.h" - -namespace commonj{ -namespace sdo{ - -/** - * DASProperty is a class to provide data access services - * with a more flexible Property - */ - - class DASProperty : public Property, public DASValues -{ - public: - - virtual ~DASProperty(); - - - -}; -}; -}; -#endif //_DMSDATAOBJECT_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.cpp deleted file mode 100644 index 2f44f220de..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DASType.h" - - -namespace commonj{ -namespace sdo{ - - - DASType::~DASType() - { - } -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.h deleted file mode 100644 index 62d924a4f1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASType.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DASTYPE_H_ -#define _DASTYPE_H_ - -#include "commonj/sdo/disable_warn.h" - - -#include "commonj/sdo/Type.h" -#include "commonj/sdo/DASValues.h" -namespace commonj{ -namespace sdo{ - -/** - * DASType is a class to provide data access services - * with a more flexible Type - */ - -class DASType : public Type, public DASValues -{ - public: - - virtual ~DASType(); - - - - virtual void setOpen(bool set) = 0; - virtual void setSequenced( bool set) = 0; - virtual void setBaseType( const Type* type, bool isRestriction=false) = 0; - - - -}; -}; -}; -#endif //_DASDATAOBJECT_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.cpp deleted file mode 100644 index 3275b6db7d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DASValue.h" - - -namespace commonj -{ - namespace sdo - { - - DASValue::DASValue() - { - } - - DASValue::DASValue(const char* val) - : value(val) - { - } - - DASValue::DASValue(const SDOString& val) - : value(val) - { - } - - DASValue::~DASValue() - { - - } - - const char* DASValue::getValue() const - { - return value.c_str(); - } - - - } -} -// end - namespace sdo - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.h deleted file mode 100644 index d102961180..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValue.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDO_DASValue_H_ -#define _SDO_DASValue_H_ - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDOString.h" -#include "string" - - -namespace commonj -{ - namespace sdo - { - -/** - * DASValue is a class to hold information required by data - * access services but not required by the data factory. - */ - class DASValue - { - public: - SDO_API DASValue(); - SDO_API DASValue(const char* value); - SDO_API DASValue(const SDOString& value); - SDO_API virtual ~DASValue(); - SDO_API const char* getValue() const; - - private: - SDOString value; - - }; - - } -} -#endif //_SDO_DASValue_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.cpp deleted file mode 100644 index f94397cc87..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DASValues.h" - -using namespace std; -namespace commonj -{ - namespace sdo - { - -/** - * DASValues is a class to hold list of information required by data - * access services but not required by the data factory. - */ - - DASValues::~DASValues() - { - DASValue_MAP::iterator propertyIter; - for (propertyIter = properties.begin() ; propertyIter != properties.end() ; ++propertyIter) - { - delete propertyIter->second; - } - } - - void DASValues::setDASValue(const char* name, DASValue* property) - { - DASValue* prop = getDASValue(name); - if (prop != 0 && prop != property) - { - delete prop; - } - properties[name] = property; - } - - DASValue* DASValues::getDASValue(const char* name) - { - DASValue_MAP::iterator propertyIter; - propertyIter = properties.find(name); - if(propertyIter != properties.end()) - { - return propertyIter->second; - } - return NULL; - - } - - } -} -// end - namespace sdo - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.h deleted file mode 100644 index f5dec7fa41..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DASValues.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDO_DASValues_H_ -#define _SDO_DASValues_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/export.h" -#include "commonj/sdo/DASValue.h" -#include "map" -#include "string" - - - -namespace commonj -{ - namespace sdo - { - -/** - * DASValues is a class to hold list of information required by data - * access services but not required by the data factory. - */ - - class DASValues - { - public: - SDO_API virtual ~DASValues(); - SDO_API virtual void setDASValue(const char* name, DASValue* value); - SDO_API virtual DASValue* getDASValue(const char* name); - private: - - typedef std::map DASValue_MAP; - DASValue_MAP properties; - - }; - - } -} -#endif //_SDO_DASValues_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.cpp deleted file mode 100644 index 0f1981f853..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataFactory.h" -#include "commonj/sdo/DataFactoryImpl.h" - -namespace commonj{ -namespace sdo{ - -/** - * DataFactory holds metadata and creates DataObjects. - * - * The DataFactory holds properties and types loaded from XSD, or - * created using the DataFactory API. - */ - - DataFactory::~DataFactory() - { - } - - RefCountingPointer DataFactory::getDataFactory() - { - DataFactory* dob = (DataFactory*)(new DataFactoryImpl()); - return RefCountingPointer (dob); - } - - RefCountingPointer DataFactory::clone() - { - const DataFactoryImpl* df = (const DataFactoryImpl*)this; - DataFactory* dob = (DataFactory*)(new DataFactoryImpl(*df)); - return RefCountingPointer (dob); - } - -}; -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.h deleted file mode 100644 index 32e0782ee0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactory.h +++ /dev/null @@ -1,806 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAFACTORY_H_ -#define _DATAFACTORY_H_ - -#include "commonj/sdo/export.h" - -#include "commonj/sdo/TypeList.h" - -#include "commonj/sdo/RefCountingObject.h" -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/SDODate.h" -#include "commonj/sdo/DASValue.h" -#include "commonj/sdo/SDOString.h" - - -namespace commonj{ -namespace sdo{ - -class DataObject; -class Type; - -/** - * DataFactory holds metadata and creates DataObjects. - * - * The DataFactory holds properties and types loaded from XSD, or - * created using the DataFactory API. - */ - -class DataFactory : public RefCountingObject -{ - public: - - - /** - * getDataFactory is static and gets a data factory - * - * Static method to get a new data factory, with a set of base Types defined. - * With the data factory returned, either load Type definitions - * from XSD, or use the DataFactory APIs to define the types. - */ - - static SDO_API DataFactoryPtr getDataFactory(); - - virtual SDO_API ~DataFactory(); - - - /** - * DataFactory::clone copies a data factory - * - * Copy the data factory, and return a new data factory which - * has the same properties and types, but is still able to have - * new types added to it. - */ - - SDO_API virtual DataFactoryPtr clone(); - - /** - * DataFactory::create creates a data object. - * - * Create a data object based on the type specified as a parameter - * Once a data object has been created by this factory, the metadata - * (types and properties) may no longer be altered. - */ - - SDO_API virtual DataObjectPtr create(const char* uri, const char* typeName) = 0; - - SDO_API virtual DataObjectPtr create(const SDOString& uri, const SDOString& typeName) = 0; - - SDO_API virtual DataObjectPtr create(const Type& type) = 0; - - /** - * DataFactory::getType gets a type back from the factory. - * - * Get a type as specified in the data factory. Useful for creating - * data objects or querying properties. - */ - - virtual const Type& getType(const char* uri, const char* inTypeName) const = 0; - - virtual const Type& getType(const SDOString& uri, const SDOString& inTypeName) const = 0; - - - /** - * DataFactory::getTypes gets a list of types back from the factory. - * - * Get all the types available within this data factory. Useful for - * validating whether a data object is of the correct type to be - * usable. - */ - - virtual TypeList getTypes() const = 0; - - /** - * DataFactory::addType adds a type definition. - * - * Add a type defintion to the factory. (Properties may be added later). - * The type is defined by its uri and name. - * -# The type may be sequenced - and therefore work with a sequence API. - * -# The type may be open, indicating that it may have extra properties - * added at runtime. - * -# The type may be abstract, so the data factory will not permit creation - * of instances. - * -# The type may be a data type, indicating that is will not have properties. - * The Type may inherit from another type, but that is specified later with a - * call to setBaseType(). - */ - - - virtual SDO_API void addType(const char* uri, const char* inTypeName, - bool isSequenced = false, - bool isOpen = false, - bool isAbstract = false, - bool isDataType = false) = 0; - - virtual SDO_API void addType(const SDOString& uri, const SDOString& inTypeName, - bool isSequenced = false, - bool isOpen = false, - bool isAbstract = false, - bool isDataType = false) = 0; - - - /** - * DataFactory::setBaseType allows inheritance - * - * The type specified second in the parameters becomes the basetype - * of the first parameter. - * The second type will have all the properties of its baser type, followed - * by any additional properties of its own. The property indices of the properties - * of the subclass will begin at one more than the total number of - * properties of the supertype - * This relationship is fixed when the first data object of any type is - * created by the factory. Up to that point the base type may be changed. - * - */ - - virtual SDO_API void setBaseType( - const Type& type, - const Type& base, - bool isRestriction = false) = 0; - - virtual SDO_API void setBaseType( - const char* typeuri, - const char* typenam, - const char* baseuri, - const char* basename, - bool isRestriction = false) = 0; - - virtual SDO_API void setBaseType( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& baseuri, - const SDOString& basename, - bool isRestriction = false) = 0; - - - /** - * Generate a typesafe interface for a given data factory - * test code. - */ - - virtual SDO_API bool generateInterface(const char* fileroot, - const char *factoryname) = 0; - - virtual SDO_API bool generateInterface(const SDOString& fileroot, - const SDOString& factoryname) = 0; - - - - /** - * DataFactory::setAlias sets an alternative name - * - * A Type may be known to the data factory by several different names. - * This method adds a new name for an existing property. - * - */ - - virtual SDO_API void setAlias(const char* typeuri, - const char* typenam, - const char* alias) = 0; - - virtual SDO_API void setAlias(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& alias) = 0; - - /** - * DataFactory::addPropertyToType adds properties - * - * The various addPropertyToType methods add a property to an - * existing type in the factory, specifying the name of the new property, - * and the type of the new property - which must also be an existing type - * in this factory. - * -# The new property may be many-valued - so it will be a list of values. - * -# The property may be read-only , and may not be altered by user code - - * However the value may be changed by data access service code. - * -# The property may be containment. - * The type of a property may be DataType, or DataObjectType (see Types). - * If the property is a DataType, then the actual value of the property is held - * within the data object containing the property. - * If the property is a DataObjectType, it may be containment, or reference. - * Containment indicates that the value of the property is contained in the - * data object, whilst reference indicates that the property is only a pointer to - * a value somewhere else in the data graph. - * - */ - - - virtual SDO_API void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany, - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const Type& propType, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const Type& propType, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const Type& type, - const char* propname, - const Type& propType, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const Type& type, - const SDOString& propname, - const Type& propType, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const Type& type, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const Type& type, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany , - bool isReadOnly , - bool isContainment ) = 0; - - virtual SDO_API void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const Type& propType, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const Type& propType, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const Type& type, - const char* propname, - const Type& propType, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const Type& type, - const SDOString& propname, - const Type& propType, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const Type& type, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany = false) =0; - - virtual SDO_API void addPropertyToType(const Type& type, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany = false) =0; - - /** - * DataFactory::setOpposite sets an opposite name - * - * NOT IMPLEMENTED. - * - */ - - virtual SDO_API void setOpposite( - const Type& type, - const char* propName, - const Type& oppositetype, - const char* oppositePropName) = 0; - - virtual SDO_API void setOpposite( - const Type& type, - const SDOString& propName, - const Type& oppositetype, - const SDOString& oppositePropName) = 0; - - /** - * DataFactory::setAlias sets a property alias name - * - * A property, like a type, may be known to the factory by several - * names. - */ - - virtual SDO_API void setAlias(const char* typeuri, - const char* typname, - const char* propname, - const char* alias) = 0; - - virtual SDO_API void setAlias(const SDOString& typeuri, - const SDOString& typname, - const SDOString& propname, - const SDOString& alias) = 0; - - /** - * DataFactory::setPropertySubstitute sets a substitute for a property - * - * A property is of a specified type. However this method specifies another type - * which will be accepted by the data factory at runtime as a substitute for this - * property, and will be inserted into the parent data object as though it was - * a value for this property. The substitute name is then used for this property - * as a sort of alias. - * names. - */ - - virtual SDO_API void setPropertySubstitute( - const char* uri, - const char* inTypeName, - const char* propname, - const char* subname, - const char* subTypeUri, - const char* subTypeName) = 0; - - virtual SDO_API void setPropertySubstitute( - const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& subname, - const SDOString& subTypeUri, - const SDOString& subTypeName) = 0; - - virtual SDO_API void setPropertySubstitute( - const Type& containertype, - const char* propname, - const char* subname, - const Type& subtype) = 0; - - virtual SDO_API void setPropertySubstitute( - const Type& containertype, - const SDOString& propname, - const SDOString& subname, - const Type& subtype) = 0; - - - /** - * DataFactory::setDefault sets a default value for a property - * - * When querying the value of a property of a data object, that property - * may be set - indicating that a value has been assigned, or unset - indicating that - * no value has yet been assigned. - * If there is no value assigned, then a default value may be returned for that - * property. - * This method allows the data factory to define that default value. - * There is no default value for a DataObjectType. There are overloads for - * each of the primitive DataTypes. - */ - - virtual SDO_API void setDefault( - const Type& t, - const char* propname, - bool b ) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname, - bool b ) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - char c) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - char c) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - wchar_t c) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - wchar_t c) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - char* c) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - SDOString& outstr) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - short s) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - short s) = 0; - - -#if __WORDSIZE !=64 - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - long l) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - long l) = 0; -#endif - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - int64_t i) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - int64_t i) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - float f) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - float f) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - long double d) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - long double d) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - const wchar_t* c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - const wchar_t* c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - const char* c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - const SDOString& c, - unsigned int len) = 0; - - - virtual SDO_API void setDefault( - const Type& t, - const char* propname , - const SDODate dat) = 0; - - virtual SDO_API void setDefault( - const Type& t, - const SDOString& propname , - const SDODate dat) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname, - bool b ) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname, - bool b ) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - char c) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - char c) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - wchar_t c) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - wchar_t c) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - char* c) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - SDOString& c) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - short s) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - short s) = 0; - - -#if __WORDSIZE !=64 - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - long l) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - long l) = 0; - -#endif - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - int64_t i) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - int64_t i) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - float f) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - float f) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - long double d) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - long double d) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - const wchar_t* c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - const wchar_t* c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - const char* c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - const SDOString& c, - unsigned int len) = 0; - - virtual SDO_API void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - const SDODate dat) = 0; - - virtual SDO_API void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - const SDODate dat) = 0; - - - /** - * DAS values are used by a DAS implementation - */ - - virtual SDO_API void setDASValue( - const Type& type, - const char* name, - DASValue* value) = 0; - - virtual SDO_API void setDASValue( - const Type& type, - const SDOString& name, - DASValue* value) = 0; - - virtual SDO_API void setDASValue( - const char* typeuri, - const char* typenam, - const char* name, - DASValue* value) = 0; - - virtual SDO_API void setDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& name, - DASValue* value) = 0; - - virtual SDO_API DASValue* getDASValue( - const Type& type, - const char* name) const = 0; - - virtual SDO_API DASValue* getDASValue( - const Type& type, - const SDOString& name) const = 0; - - virtual SDO_API DASValue* getDASValue( - const char* typeuri, - const char* typenam, - const char* name) const = 0; - - virtual SDO_API DASValue* getDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& name) const = 0; - - virtual SDO_API void setDASValue( - const Type& type, - const char* propertyName, - const char* name, - DASValue* value) = 0; - - virtual SDO_API void setDASValue( - const Type& type, - const SDOString& propertyName, - const SDOString& name, - DASValue* value) = 0; - - virtual SDO_API void setDASValue( - const char* typeuri, - const char* typenam, - const char* propertyName, - const char* name, - DASValue* value) = 0; - - virtual SDO_API void setDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propertyName, - const SDOString& name, - DASValue* value) = 0; - - virtual SDO_API DASValue* getDASValue( - const Type& type, - const char* propertyName, - const char* name) const = 0; - - virtual SDO_API DASValue* getDASValue( - const Type& type, - const SDOString& propertyName, - const SDOString& name) const = 0; - - virtual SDO_API DASValue* getDASValue( - const char* typeuri, - const char* typenam, - const char* propertyName, - const char* name) const = 0; - - virtual SDO_API DASValue* getDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propertyName, - const SDOString& name) const = 0; - - virtual void resolve() = 0; - - }; -}; -}; -#endif //_DATAFACTORY_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp deleted file mode 100644 index 3bdf86339a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataFactoryImpl.cpp +++ /dev/null @@ -1,2192 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -////////////////////////////////////////////////////////////////////// -// DataFactoryImpl.cpp: implementation of the DataFactory class. -// -////////////////////////////////////////////////////////////////////// -#include "commonj/sdo/SDORuntimeException.h" - -#include "commonj/sdo/DataFactoryImpl.h" -#include "commonj/sdo/DataObjectImpl.h" - -#include "commonj/sdo/Logger.h" - -#include "commonj/sdo/SDOUtils.h" - -#include "commonj/sdo/PropertyList.h" - -#include -#include - - -using namespace std; -using namespace commonj::sdo; - -namespace commonj{ -namespace sdo { - -// =================================================================== -// Constructor -// =================================================================== -DataFactoryImpl::DataFactoryImpl() -{ - - /* add the primitives to every mdg - */ - - isResolved = false; - addType(Type::SDOTypeNamespaceURI,"BigDecimal"); - addType(Type::SDOTypeNamespaceURI,"BigInteger"); - addType(Type::SDOTypeNamespaceURI,"Boolean"); - - addType(Type::SDOTypeNamespaceURI,"Byte"); - addType(Type::SDOTypeNamespaceURI,"Bytes"); - addType(Type::SDOTypeNamespaceURI,"Character"); - - addType(Type::SDOTypeNamespaceURI,"String"); - addType(Type::SDOTypeNamespaceURI,"DataObject"); - addType(Type::SDOTypeNamespaceURI,"OpenDataObject", true, true, false, false); - addType(Type::SDOTypeNamespaceURI,"Date"); - addType(Type::SDOTypeNamespaceURI,"Double"); - addType(Type::SDOTypeNamespaceURI,"Float"); - addType(Type::SDOTypeNamespaceURI,"Integer"); - addType(Type::SDOTypeNamespaceURI,"Long"); - addType(Type::SDOTypeNamespaceURI,"Short"); - addType(Type::SDOTypeNamespaceURI,"URI"); - - // abstract - addType(Type::SDOTypeNamespaceURI,"ChangeSummary"); - - rootElementName.erase(); - - - -} - -// =================================================================== -// Destructor -// =================================================================== -DataFactoryImpl::~DataFactoryImpl() -{ - - TYPES_MAP::iterator typeIter; - for (typeIter = types.begin() ; typeIter != types.end() ; ++typeIter) - { - if (strncmp((typeIter->first).c_str(),"ALIAS::", 7)) - { - delete typeIter->second; - } - } - - rootElementName.erase(); - -} - -// =================================================================== -// get the root element name -// =================================================================== -// const char* DataFactoryImpl::getRootElementName() const -const SDOString& DataFactoryImpl::getRootElementName() const -{ - return rootElementName; -} - - -void DataFactoryImpl::setRootElementName(const SDOString& ren) -{ - rootElementName = ren; -} - -// =================================================================== -// copy constructor -// =================================================================== -DataFactoryImpl::DataFactoryImpl(const DataFactoryImpl& inmdg) -{ - isResolved = false; - setRootElementName(inmdg.getRootElementName()); - copyTypes(inmdg); -} - -// =================================================================== -// Assignment operator -// =================================================================== -DataFactoryImpl& DataFactoryImpl::operator=(const DataFactoryImpl& inmdg) -{ - if (this != &inmdg) - { - copyTypes(inmdg); - setRootElementName(inmdg.getRootElementName()); - } - return *this; -} - -// =================================================================== -// copy Types to this DataFactory -// =================================================================== -void DataFactoryImpl::copyTypes(const DataFactoryImpl& inmdg) -{ - - if (isResolved) - { - SDO_THROW_EXCEPTION("copyTypes", - SDOUnsupportedOperationException, "Copying Type after data graph completed"); - } - - TYPES_MAP::const_iterator typeIter; - TYPES_MAP::iterator typeIter2; - SDOString fullTypeName; - - for (typeIter = inmdg.types.begin() ; typeIter != inmdg.types.end() ; ++typeIter) - { - // add this type to this metadata - addType((typeIter->second)->getURI(), (typeIter->second)->getName()); - - // re-find the type we just added. - fullTypeName = getFullTypeName( - (typeIter->second)->getURI(), - (typeIter->second)->getName()); - typeIter2 = types.find(fullTypeName); - - // copy the aliases , if there are any. - - if ((typeIter->second)->getAliasCount() > 0) - { - for (int j=0;j<(typeIter->second)->getAliasCount();j++) - { - (typeIter2->second)->setAlias( - (typeIter->second)->getAlias()); - } - } - - - // Now add all the properties - PropertyList props = typeIter->second->getProperties(); - for (int i=0; i < props.size(); i++) - { - // Ensure the properties type is added - const Type& propType = props[i].getType(); - addType(propType.getURI(), propType.getName()); - - // Now add the property - addPropertyToType((typeIter->second)->getURI(), - (typeIter->second)->getName(), - props[i].getName(), - propType.getURI(), - propType.getName(), - props[i].isMany(), - props[i].isReadOnly(), - props[i].isContainment()); - - // copy the aliases if there are any. - if (props[i].getAliasCount() > 0) - { - - PropertyImpl* p = (typeIter2->second)-> - getPropertyImpl(props[i].getName()); - if (p != 0) - { - for (int j=0;jgetAliasCount();j++) - { - p->setAlias(props[i].getAlias(j)); - } - } - - } - - } // end - iterate over Properties - } // end - iterate over Types -} - -// =================================================================== -// addType - adds a new Type if it does not already exist -// =================================================================== -void DataFactoryImpl::addType(const char* uri, const char* inTypeName, - bool isSeq, - bool isOp, - bool isAbs, - bool isData) -{ - addType(uri,inTypeName,isSeq,isOp,isAbs,isData,false); -} - -void DataFactoryImpl::addType(const SDOString& uri, const SDOString& inTypeName, - bool isSeq, - bool isOp, - bool isAbs, - bool isData) -{ - addType(uri.c_str(),inTypeName.c_str(),isSeq,isOp,isAbs,isData,false); -} - -void DataFactoryImpl::addType(const char* uri, const char* inTypeName, - bool isSeq, - bool isOp, - bool isAbs, - bool isData, - bool isFromList) -{ - - - if (isResolved) - { - SDO_THROW_EXCEPTION("DataFactory::addType", - SDOUnsupportedOperationException, "Adding Type after data graph completed"); - } - - if (inTypeName == 0 || strlen(inTypeName) == 0) - { - SDO_THROW_EXCEPTION("DataFactory::addType", - SDOIllegalArgumentException, " Type has empty name"); - } - - SDOString typeUri; - - if (uri) - typeUri = uri; - if (findType(typeUri, inTypeName) == 0) - { - SDOString fullTypeName = getFullTypeName(uri, inTypeName); - types[fullTypeName] = new TypeImpl(uri, inTypeName, isSeq, isOp, isAbs, isData, isFromList); - } -} - -void DataFactoryImpl::addType(const SDOString& uri, const SDOString& inTypeName, - bool isSeq, - bool isOp, - bool isAbs, - bool isData, - bool isFromList) -{ - addType(uri.c_str(), inTypeName.c_str(), isSeq, isOp, isAbs, isData, isFromList); -} - -// =================================================================== -// Check whether a change summary would clash. -// =================================================================== - -bool DataFactoryImpl::recursiveCheck(TypeImpl* cs, TypeImpl* t) -{ - if (cs->isDataType()) return false; - - if (! strcmp(cs->getName(), t->getName()) && - ! strcmp(cs->getURI() , t->getURI()) ) - { - return true; - } - - PropertyList pl = cs->getProperties(); - - for (int i=0 ; i < pl.size() ; i++ ) - { - if (recursiveCheck((TypeImpl*)&(pl[i].getType()), t)) return true; - } - return false; -} - -// =================================================================== -// Check whether a change summary would clash. -// =================================================================== -bool DataFactoryImpl::checkForValidChangeSummary(TypeImpl* t) -{ - // None of the containing types can have a cs already. - // None of the properties of this type can hold a type - // which has a change summary. - if (isResolved) - { - SDO_THROW_EXCEPTION("DataFactory::addChangeSummary", - SDOUnsupportedOperationException, "Adding Change Summary after data graph completed"); - } - - if (cstypes.size() > 0) { - for (int i = 0 ;i < cstypes.size(); i++) - { - if (recursiveCheck(cstypes[i], t)) - { - return false; - - } - } - } - cstypes.push_back(t); - return true; -} - -// =================================================================== -// addPropertyToType - adds a Property to an existing Type -// =================================================================== -void DataFactoryImpl::addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool many) -{ - SDOString fullPropTypeName = getFullTypeName(propTypeUri, propTypeName); - TYPES_MAP::iterator typeIter; - typeIter = types.find(fullPropTypeName); - if (typeIter != types.end()) - { - addPropertyToType(uri,inTypeName, - propname, - propTypeUri, - propTypeName, - many, - false, - !(typeIter->second)->isDataType()); - } -} - -void DataFactoryImpl::addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool many) -{ - addPropertyToType(uri.c_str(), inTypeName.c_str(), propname.c_str(), propTypeUri.c_str(), propTypeName.c_str(), many); -} - -void DataFactoryImpl::addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool many, - bool rdonly, - bool cont) -{ - if (isResolved) - { - SDO_THROW_EXCEPTION("DataFactory::addPropertyToType", - SDOUnsupportedOperationException, "Adding Properties after data graph completed"); - } - - - - TYPES_MAP::iterator typeIter, typeIter2; - - //cout << "Adding property " << propname << "(" << propTypeUri << "#" << propTypeName - // << ") to type " << uri << "#" << inTypeName << endl; - - - SDOString fullTypeName = getFullTypeName(uri, inTypeName); - typeIter = types.find(fullTypeName); - - if(typeIter == types.end()) - { - string msg("Type not found: "); - if (uri != 0)msg += uri; - msg += " "; - if (inTypeName != 0)msg += inTypeName; - SDO_THROW_EXCEPTION("addPropertyToType", - SDOTypeNotFoundException, msg.c_str()); - - } - - if ((typeIter->second)->isDataType()) - { - string msg("Cannot add property "); - msg += propname; - msg += " of type "; - msg += propTypeUri; - msg += "#"; - msg += propTypeName; - msg += " to this data type "; - msg += uri; - msg += "#"; - msg += inTypeName; - SDO_THROW_EXCEPTION("addPropertyToType", - SDOIllegalArgumentException, msg.c_str()); - } - - fullTypeName = getFullTypeName(propTypeUri, propTypeName); - typeIter2 = types.find(fullTypeName); - - if (typeIter2 == types.end()) - { - string msg("Type not found: "); - if (propTypeUri != 0)msg += propTypeUri; - msg += " "; - if (propTypeName != 0)msg += propTypeName; - SDO_THROW_EXCEPTION("addPropertyToType", - SDOTypeNotFoundException, msg.c_str()); - } - - // Check if its a ChangeSummary - if (propTypeUri != 0 && !strcmp(propTypeUri,Type::SDOTypeNamespaceURI.c_str()) && - !strcmp(propTypeName,"ChangeSummary") ) - { - if (checkForValidChangeSummary(typeIter->second)) - { - // The change summary is allowable if we got to here - force the right params. - // we will not use this property - its just for compatibility. - // we have to use getChangeSummary to get the change summary, - // and isChangeSummaryType to see if this is a type which may have - // a change summary. - (typeIter->second)->addChangeSummary(); - // dont even show the property - its not needed - //((typeIter->second)->addProperty(propname, *(typeIter2->second),false,true, false)); - - } - return; - } - - - if ((typeIter->second)->isDataType()) - { - string msg("Cannot add property to a data type : "); - msg += (typeIter->second)->getName(); - SDO_THROW_EXCEPTION("addPropertyToType", - SDOIllegalArgumentException, msg.c_str()); - // cannot add a property to a primitive - } - - // @PGR@ containment should be ignored for DataType -/* if ((typeIter2->second)->isDataType() && cont == true) - { - string msg("Data types may not be containment : "); - msg += (typeIter2->second)->getName(); - SDO_THROW_EXCEPTION("addPropertyToType", - SDOIllegalArgumentException, msg.c_str()); - // cannot try to make a property containment on a data type - } -*/ - ((typeIter->second)->addProperty(propname, *(typeIter2->second),many,rdonly, cont)); - return; -} - -void DataFactoryImpl::addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool many, - bool rdonly, - bool cont) -{ - addPropertyToType(uri.c_str(), - inTypeName.c_str(), - propname.c_str(), - propTypeUri.c_str(), - propTypeName.c_str(), - many, - rdonly, - cont); -} - -// =================================================================== -// addPropertyToType - adds a Property to an existing Type -// =================================================================== - -void DataFactoryImpl::addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const Type& tprop, - bool many) -{ - addPropertyToType(uri, - inTypeName, - propname, - tprop, - many, - false, - !tprop.isDataType()); -} - -void DataFactoryImpl::addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const Type& tprop, - bool many) -{ - addPropertyToType(uri.c_str(), - inTypeName.c_str(), - propname.c_str(), - tprop, - many, - false, - !tprop.isDataType()); -} - -void DataFactoryImpl::addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const Type& tprop, - bool many, - bool rdonly, - bool cont) -{ - addPropertyToType(uri, - inTypeName, - propname, - tprop.getURI(), - tprop.getName(), - many, - rdonly, cont); -} - -void DataFactoryImpl::addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const Type& tprop, - bool many, - bool rdonly, - bool cont) -{ - addPropertyToType(uri.c_str(), - inTypeName.c_str(), - propname.c_str(), - tprop.getURI(), - tprop.getName(), - many, - rdonly, - cont); -} - -// =================================================================== -// addPropertyToType - adds a Property to an existing Type -// =================================================================== -void DataFactoryImpl::addPropertyToType(const Type& cont, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool many) -{ - addPropertyToType(cont.getURI(), - cont.getName(), - propname, - propTypeUri, - propTypeName, - many); -} - -void DataFactoryImpl::addPropertyToType(const Type& cont, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool many) -{ - addPropertyToType(cont.getURI(), - cont.getName(), - propname.c_str(), - propTypeUri.c_str(), - propTypeName.c_str(), - many); -} - -void DataFactoryImpl::addPropertyToType(const Type& cont, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool many, - bool rdonly, - bool contain) -{ - addPropertyToType(cont.getURI(), - cont.getName(), - propname, - propTypeUri, - propTypeName, - many, - rdonly, - contain); -} - -void DataFactoryImpl::addPropertyToType(const Type& cont, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool many, - bool rdonly, - bool contain) -{ - addPropertyToType(cont.getURI(), - cont.getName(), - propname.c_str(), - propTypeUri.c_str(), - propTypeName.c_str(), - many, - rdonly, - contain); -} - -// =================================================================== -// addPropertyToType - adds a Property to an existing Type -// =================================================================== -void DataFactoryImpl::addPropertyToType(const Type& tp, - const char* propname, - const Type& tprop, - bool many) -{ - addPropertyToType(tp.getURI(), - tp.getName(), - propname, - tprop.getURI(), - tprop.getName(), - many); -} - -void DataFactoryImpl::addPropertyToType(const Type& tp, - const SDOString& propname, - const Type& tprop, - bool many) -{ - addPropertyToType(tp.getURI(), - tp.getName(), - propname.c_str(), - tprop.getURI(), - tprop.getName(), - many); -} - -void DataFactoryImpl::addPropertyToType(const Type& tp, - const char* propname, - const Type& tprop, - bool many, - bool rdonly, - bool cont) -{ - addPropertyToType(tp.getURI(), - tp.getName(), - propname, - tprop.getURI(), - tprop.getName(), - many, - rdonly, - cont); -} - -void DataFactoryImpl::addPropertyToType(const Type& tp, - const SDOString& propname, - const Type& tprop, - bool many, - bool rdonly, - bool cont) -{ - addPropertyToType(tp.getURI(), - tp.getName(), - propname.c_str(), - tprop.getURI(), - tprop.getName(), - many, - rdonly, - cont); -} - -// =================================================================== -// getFullTypeName - return the name used as a key in the types map -// =================================================================== -SDOString DataFactoryImpl::getFullTypeName(const SDOString& uri, const SDOString& inTypeName) const -{ - return uri + "#" + inTypeName; -} - -// =================================================================== -// getAliasTypeName - return the name used as a key in the types map -// =================================================================== -SDOString DataFactoryImpl::getAliasTypeName(const SDOString& uri, const SDOString& inTypeName) const -{ - return "ALIAS::" + getFullTypeName(uri, inTypeName); -} - -// =================================================================== -// getType - return a pointer to the required Type -// =================================================================== -const Type& DataFactoryImpl::getType(const char* uri, const char* inTypeName) const -{ - - const Type* type = findType(uri, inTypeName); - - if (type == 0) - { - string msg("Type not found :"); - if (uri != 0) msg += uri; - msg += " "; - if (inTypeName != 0) msg += inTypeName; - SDO_THROW_EXCEPTION("getType" , - SDOTypeNotFoundException, msg.c_str()); - } - - return *type; -} - -const Type& DataFactoryImpl::getType(const SDOString& uri, const SDOString& inTypeName) const -{ - return getType(uri.c_str(), inTypeName.c_str()); -} - -// =================================================================== -// setBaseType - sets the type from which this type inherits properties -// =================================================================== - -void DataFactoryImpl::setBaseType( const Type& type, - const Type& base, bool isRestriction) -{ - setBaseType(type.getURI(),type.getName(),base.getURI(), base.getName(), - isRestriction); -} - -// =================================================================== -// setBaseType - sets the type from which this type inherits properties -// =================================================================== - -void DataFactoryImpl::setBaseType( const char* typeuri, - const char* typenam, - const char* baseuri, - const char* basename, - bool isRestriction ) -{ - const TypeImpl* base = findTypeImpl(baseuri, basename); - if (base == 0) - { - string msg("Type not found :"); - if (baseuri != 0) msg += baseuri; - msg += " "; - if (basename != 0) msg += basename; - SDO_THROW_EXCEPTION("setBaseType" , - SDOTypeNotFoundException, msg.c_str()); - } - - TYPES_MAP::const_iterator typeIter; - - SDOString fullTypeName = getFullTypeName(typeuri, typenam); - typeIter = types.find(fullTypeName); - - if(typeIter == types.end()) - { - string msg("Type not found :"); - if (typeuri != 0) msg += typeuri; - msg += " "; - if (typenam != 0) msg += typenam; - SDO_THROW_EXCEPTION("setBaseType" , - SDOTypeNotFoundException, msg.c_str()); - } - - (typeIter->second)->setBaseType(base, isRestriction); -} - -void DataFactoryImpl::setBaseType(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& baseuri, - const SDOString& basename, - bool isRestriction) -{ - setBaseType(typeuri.c_str(), - typenam.c_str(), - baseuri.c_str(), - basename.c_str(), - isRestriction); -} - - -// =================================================================== -// setPropertySubstitute - additional type for a property -// =================================================================== - - void DataFactoryImpl::setPropertySubstitute( - const char* uri, - const char* inTypeName, - const char* propname, - const char* subname, - const char* subTypeUri, - const char* subTypeName) - { - const TypeImpl* cont = findTypeImpl(uri, inTypeName); - if (cont == 0) - { - string msg("Type not found :"); - if (uri != 0) msg += uri; - msg += " "; - if (inTypeName != 0) msg += inTypeName; - SDO_THROW_EXCEPTION("setPropertySubstitute" , - SDOTypeNotFoundException, msg.c_str()); - } - PropertyImpl* pi = cont->getPropertyImpl(propname); - const Type& tsub = getType(subTypeUri, - subTypeName); - if (pi != 0)pi->setSubstitution(this,subname,tsub); - } - - void DataFactoryImpl::setPropertySubstitute( - const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& subname, - const SDOString& subTypeUri, - const SDOString& subTypeName) - { - setPropertySubstitute(uri.c_str(), - inTypeName.c_str(), - propname.c_str(), - subname.c_str(), - subTypeUri.c_str(), - subTypeName.c_str()); - } - - void DataFactoryImpl::setPropertySubstitute( - const Type& containertype, - const char* propname, - const char* subname, - const Type& subtype) - { - setPropertySubstitute( - containertype.getURI(), - containertype.getName(), - propname,subname, - subtype.getURI(),subtype.getName()); - } - - void DataFactoryImpl::setPropertySubstitute( - const Type& containertype, - const SDOString& propname, - const SDOString& subname, - const Type& subtype) - { - setPropertySubstitute(containertype, propname.c_str(), subname.c_str(), subtype); - } -// =================================================================== -// setDefault - sets the default value for a property of a type -// =================================================================== - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname, bool b ) - { - setDefault(t.getURI(), t.getName(), propname, b); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname, bool b ) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), b); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , char c) - - { - setDefault(t.getURI(), t.getName(), propname, c); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , char c) - - { - setDefault(t.getURI(), t.getName(), propname.c_str(), c); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , wchar_t c) - { - setDefault(t.getURI(), t.getName(), propname, c); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , wchar_t c) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), c); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , char* c) - { - setDefault(t.getURI(), t.getName(), propname, c); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , SDOString& outstr) - { - setDefault(t.getURI(), t.getName(), propname, outstr); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , short s) - { - setDefault(t.getURI(), t.getName(), propname, s); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , short s) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), s); - } - -#if __WORDSIZE !=64 - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , long l) - { - setDefault(t.getURI(), t.getName(), propname, l); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , long l) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), l); - } - -#endif - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , int64_t i) - { - setDefault(t.getURI(), t.getName(), propname, i); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , int64_t i) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), i); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , float f) - { - setDefault(t.getURI(), t.getName(), propname, f); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , float f) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), f); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , long double d) - { - setDefault(t.getURI(), t.getName(), propname, d); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , long double d) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), d); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , const SDODate d) - { - setDefault(t.getURI(), t.getName(), propname, d); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , const SDODate d) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), d); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , const wchar_t* c, unsigned int len) - { - setDefault(t.getURI(), t.getName(), propname, c, len); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , const wchar_t* c, unsigned int len) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), c, len); - } - - void DataFactoryImpl::setDefault( - const Type& t, const char* propname , const char* c, unsigned int len) - { - setDefault(t.getURI(), t.getName(), propname, c, len); - } - - void DataFactoryImpl::setDefault( - const Type& t, const SDOString& propname , const SDOString& c, unsigned int len) - { - setDefault(t.getURI(), t.getName(), propname.c_str(), c.c_str(), len); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname, bool b ) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(b); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname, bool b ) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), b); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , char c) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(c); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , char c) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), c); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , wchar_t c) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(c); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , wchar_t c) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), c); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , char* c) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(c); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , SDOString& c) - { - const TypeImpl* ti = findTypeImpl(typuri, typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(c); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , short s) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(s); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , short s) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), s); - } - -#if __WORDSIZE !=64 - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , long l) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(l); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , long l) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), l); - } - -#endif - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , int64_t i) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(i); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , int64_t i) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), i); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , float f) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(f); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , float f) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), f); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , long double d) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(d); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , long double d) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), d); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , const SDODate d) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(d); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , const SDODate d) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), d); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , const wchar_t* c, unsigned int len) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(c,len); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , const wchar_t* c, unsigned int len) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), c, len); - } - - void DataFactoryImpl::setDefault( - const char* typuri, const char* typnam, - const char* propname , const char* c, unsigned int len) - { - const TypeImpl* ti = findTypeImpl(typuri,typnam); - PropertyImpl* pi = ti->getPropertyImpl(propname); - if (pi != 0)pi->setDefault(c,len); - } - - void DataFactoryImpl::setDefault( - const SDOString& typuri, const SDOString& typnam, - const SDOString& propname , const SDOString& c, unsigned int len) - { - setDefault(typuri.c_str(), typnam.c_str(), propname.c_str(), c.c_str(), len); - } - - void DataFactoryImpl::setOpposite( - const Type& typ, - const char* propnam, - const Type& opptyp, - const char* opppropnam) - { - SDO_THROW_EXCEPTION("setOpposite" , - SDOUnsupportedOperationException, " Not implemented"); - } - - void DataFactoryImpl::setOpposite( - const Type& typ, - const SDOString& propnam, - const Type& opptyp, - const SDOString& opppropnam) - { - setOpposite(typ, propnam.c_str(), opptyp, opppropnam.c_str()); - } - -// =================================================================== -// getTypeImpl - return a pointer to the required TypeImpl -// =================================================================== -const TypeImpl& DataFactoryImpl::getTypeImpl(const SDOString& uri, const SDOString& inTypeName) const -{ - const TypeImpl* type = findTypeImpl(uri, inTypeName); - - if (type == 0) - { - string msg("Type not found :"); - msg += uri + " " + inTypeName; - SDO_THROW_EXCEPTION("getTypeImpl" , - SDOTypeNotFoundException, msg.c_str()); - } - - return *type;; -} - -// =================================================================== -// findType -// =================================================================== -const Type* DataFactoryImpl::findType(const SDOString uri, const SDOString inTypeName) const -{ - return (Type*) findTypeImpl(uri, inTypeName); -} - -// =================================================================== -// findTypeImpl -// =================================================================== - -const TypeImpl* DataFactoryImpl::findTypeImpl(const SDOString& uri, const SDOString& inTypeName) const -{ - SDOString fullTypeName = getFullTypeName(uri, inTypeName); - TYPES_MAP::const_iterator typeIter; - typeIter = types.find(fullTypeName); - if(typeIter != types.end()) - { - return typeIter->second; - } - else - { - // try alias names - fullTypeName = getAliasTypeName(uri, inTypeName); - typeIter = types.find(fullTypeName); - if(typeIter != types.end()) - { - return typeIter->second; - } - } - return 0; -} - -// =================================================================== -// setAlias - sets a new alias for this type -// =================================================================== - -void DataFactoryImpl::setAlias(const char* typeuri, - const char* typenam, - const char* alias) -{ - - SDOString fullTypeName = getFullTypeName(typeuri, typenam); - TYPES_MAP::iterator typeIter; - typeIter = types.find(fullTypeName); - if(typeIter != types.end()) - { - (typeIter->second)->setAlias(alias); - fullTypeName = getAliasTypeName(typeuri, alias); - types[fullTypeName] = typeIter->second; - } - -} - -void DataFactoryImpl::setAlias(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& alias) -{ - setAlias(typeuri.c_str(), typenam.c_str(), alias.c_str()); -} - -// =================================================================== -// setAlias - sets a new alias for this type -// =================================================================== - -void DataFactoryImpl::setAlias(const char* typeuri, - const char* typenam, - const char* propname, - const char* alias) -{ - const TypeImpl& t = getTypeImpl(typeuri, typenam); - PropertyImpl* p = t.getPropertyImpl(propname); - if (p != 0)p->setAlias(alias); - -} - -void DataFactoryImpl::setAlias(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propname, - const SDOString& alias) -{ - setAlias(typeuri.c_str(), typenam.c_str(), propname.c_str(), alias.c_str()); -} - -// =================================================================== -// getTypes - gets the full list of types for this factory -// =================================================================== - -TypeList DataFactoryImpl::getTypes() const -{ - TYPES_MAP::const_iterator typeIter; - - - std::vector typeVector; - - for (typeIter = types.begin() ; typeIter != types.end(); - ++typeIter) { - if (strncmp((typeIter->first).c_str(),"ALIAS::", 7)) { - typeVector.insert(typeVector.end(),typeIter->second); - } - } - - - return typeVector; -} - - -// =================================================================== -// resolve - resolves the type and includes all the properties from -// the supertype. After this has been called, no further changes -// to the type hierarchy are allowed. -// =================================================================== - -void DataFactoryImpl::resolve() -{ - if (isResolved) return; - - TYPES_MAP::iterator typeIter; - for (typeIter = types.begin() ; typeIter != types.end(); - ++typeIter) - { - (typeIter->second)->initCompoundProperties(); - (typeIter->second)->validateChangeSummary(); - } - - isResolved = true; -} - -// =================================================================== -// create - creates a data object from the types available. -// This first resolves the type hierarchy, and thus no further changes -// to the type hierarchy are allowed. -// =================================================================== - - -RefCountingPointer DataFactoryImpl::create(const char* uri, const char* typeName) -{ - - if (!isResolved) - { - // Allow creation of types and properties before resolve. - if (uri != 0 && !strcmp(uri,Type::SDOTypeNamespaceURI.c_str())) { - if (!strcmp(typeName,"Type") || !strcmp(typeName,"Property")) - { - DataObject* dob = (DataObject*)(new DataObjectImpl(this, getTypeImpl(uri, typeName))); - return dob; - } - } - resolve(); - } - - const TypeImpl* ti = findTypeImpl(uri,typeName); - if (ti == 0) - { - string msg("Instantiation of unknown type :"); - if (uri != 0) msg += uri; - msg += " "; - if (typeName != 0)msg += typeName; - SDO_THROW_EXCEPTION("create" , - SDOTypeNotFoundException, msg.c_str()); - } - - if (ti->isAbstractType()) - { - string msg("Instantiation of abstract type :"); - if (uri != 0)msg += uri; - msg += " "; - if (typeName != 0)msg += typeName; - SDO_THROW_EXCEPTION("create" , - SDOUnsupportedOperationException, msg.c_str()); - } - - DataObject* dob = (DataObject*)(new DataObjectImpl(this, getTypeImpl(uri, typeName))); - return dob; -} - -// =================================================================== -// create - creates a data object from the types available. -// This first resolves the type hierarchy, and thus no further changes -// to the type hierarchy are allowed. -// =================================================================== - - -RefCountingPointer DataFactoryImpl::create(const SDOString& uri, const SDOString& typeName) -{ - return create(uri.c_str(), typeName.c_str()); -} - -// =================================================================== -// The openProperties map is a list of the curently present open -// properties as used by this factory. It will cause the -// open properties to be written out as attributes and elements -// of the root data object when a graph is serialized. -// =================================================================== - const propertyMap& DataFactoryImpl::getOpenProperties() - { - return openProperties; - } - - void DataFactoryImpl::addOpenProperty(const PropertyImpl& prop) - { - propertyMap::iterator i; - while ((i = openProperties.find(prop.getName())) != - openProperties.end()) - { - openProperties.erase(i); - } - openProperties.insert(make_pair(prop.getName(),prop)); - } - - void DataFactoryImpl::removeOpenProperty(const SDOString& name) - { - propertyMap::iterator i = - openProperties.find(name.c_str()); - if (i != openProperties.end()) - { - openProperties.erase(i); - } - } - - -// =================================================================== -// create - creates a data object from the types available. -// This first resolves the type hierarchy, and thus no further changes -// to the type hierarchy are allowed. -// =================================================================== - -RefCountingPointer DataFactoryImpl::create(const Type& type) -{ - return create( type.getURI(), type.getName()); -} - - -// =================================================================== -// setDASValue - Set a value on a Type -// =================================================================== -void DataFactoryImpl::setDASValue(const Type& type, - const char* name, - DASValue* value) -{ - setDASValue(type.getURI(), type.getName(), name, value); -} - -void DataFactoryImpl::setDASValue(const Type& type, - const SDOString& name, - DASValue* value) -{ - setDASValue(type.getURI(), type.getName(), name.c_str(), value); -} - -void DataFactoryImpl::setDASValue(const char* typeuri, - const char* typenam, - const char* name, - DASValue* value) -{ - TypeImpl* type = (TypeImpl*)findTypeImpl(typeuri, typenam); - if (type != NULL) - { - type->setDASValue(name, value); - } -} - -void DataFactoryImpl::setDASValue(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& name, - DASValue* value) -{ - setDASValue(typeuri.c_str(), typenam.c_str(), name.c_str(), value); -} - -// =================================================================== -// getDASValue - retrieve a value from a Type -// =================================================================== - -DASValue* DataFactoryImpl::getDASValue(const Type& type, - const char* name) const -{ - return getDASValue(type.getURI(), type.getName(), name); -} - -DASValue* DataFactoryImpl::getDASValue(const Type& type, - const SDOString& name) const -{ - return getDASValue(type.getURI(), type.getName(), name.c_str()); -} - -DASValue* DataFactoryImpl::getDASValue(const char* typeuri, - const char* typenam, - const char* name) const -{ - TypeImpl* type = (TypeImpl*)findTypeImpl(typeuri, typenam); - if (type != NULL) - { - return type->getDASValue(name); - } - - return NULL; -} - -DASValue* DataFactoryImpl::getDASValue(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& name) const -{ - return getDASValue(typeuri.c_str(), typenam.c_str(), name.c_str()); -} - -// =================================================================== -// setDASValue - Set a value on a Property -// =================================================================== -void DataFactoryImpl::setDASValue( - const Type& type, - const char* propertyName, - const char* name, - DASValue* value) -{ - setDASValue(type.getURI(), type.getName(), propertyName, name, value); -} - -void DataFactoryImpl::setDASValue( - const Type& type, - const SDOString& propertyName, - const SDOString& name, - DASValue* value) -{ - setDASValue(type.getURI(), type.getName(), propertyName.c_str(), name.c_str(), value); -} - -void DataFactoryImpl::setDASValue( - const char* typeuri, - const char* typenam, - const char* propertyName, - const char* name, - DASValue* value) -{ - const TypeImpl* type = findTypeImpl(typeuri, typenam); - if (type != NULL) - { - PropertyImpl* prop = type->getPropertyImplPure(propertyName); - if (prop != 0)prop->setDASValue(name, value); - } -} - -void DataFactoryImpl::setDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propertyName, - const SDOString& name, - DASValue* value) -{ - setDASValue(typeuri.c_str(), typenam.c_str(), propertyName.c_str(), name.c_str(), value); -} - -// =================================================================== -// getDASValue - retrieve a value from a Property -// =================================================================== -DASValue* DataFactoryImpl::getDASValue( - const Type& type, - const char* propertyName, - const char* name) const -{ - return getDASValue(type.getURI(), type.getName(), propertyName, name); -} - -DASValue* DataFactoryImpl::getDASValue( - const Type& type, - const SDOString& propertyName, - const SDOString& name) const -{ - return getDASValue(type.getURI(), type.getName(), propertyName.c_str(), name.c_str()); -} - -DASValue* DataFactoryImpl::getDASValue( - const char* typeuri, - const char* typenam, - const char* propertyName, - const char* name) const -{ - const TypeImpl* type = findTypeImpl(typeuri, typenam); - if (type != NULL) - { - try - { - PropertyImpl* prop = type->getPropertyImpl(propertyName); - if (prop != 0)return prop->getDASValue(name); - } - catch (const SDOPropertyNotFoundException&) - { - // Ignore - return null - } - } - - return NULL; -} - -DASValue* DataFactoryImpl::getDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propertyName, - const SDOString& name) const -{ - return getDASValue(typeuri.c_str(), typenam.c_str(), propertyName.c_str(), name.c_str()); -} - -bool DataFactoryImpl::compareTypes(const TypeImpl* t1, const Type& t2) -{ - PropertyList pl = t2.getProperties(); - for (int i=0;igetPropertyImpl(i); - if (p == 0) return false; - if (p->isMany() != pl[i].isMany()) return false; - if (p->isContainment() != pl[i].isContainment()) return false; - if (strcmp( p->getType().getURI(), - pl[i].getType().getURI())) return false; - if (strcmp( p->getType().getName(), - pl[i].getType().getName())) return false; - } - return true; - -} -bool DataFactoryImpl::checkType(const Type& t) -{ - const TypeImpl* t2 = findTypeImpl(t.getURI(), - t.getName()); - - if (t2 == 0) return false; - - if (!compareTypes(t2,t)) return false; - - PropertyList pl = t.getProperties(); - for (int i=0;igetTypes(); - for (int j=0;jgetType()); - } -} - -bool DataFactoryImpl::generateInterface(const char* fileroot, const char* factoryname) -{ - - FILE* header; - FILE* body; - - if ((fileroot == 0) || (strlen(fileroot) == 0)) return false; - - if (factoryname == 0 || (strlen(factoryname) == 0)) return false; - - - char *headername = new char[strlen(fileroot) + 5]; - char *bodyname = new char[strlen(fileroot) + 5]; - strcpy(headername,fileroot); - strcpy(bodyname,fileroot); - strcat(headername,".h"); - strcat(bodyname,".cpp"); - - // here we should check the files - and if they are present with - // contents we should read them, and merge the new generated code - // I think the way to do that is to allow sections in between comment - // pairs in three locations: - // a) outside any method in the CPP file. - // b) in the header file anywhere. - // c) inside method definitions in cpp, either before, or after the - // entire generated contents. - // - // - - header = fopen(headername,"w+"); - if (header == 0) return false; - - body = fopen(bodyname,"w+"); - if (body == 0) return false; - - - fprintf(header,"/*******************************************\n"); - fprintf(header," * Generated Typesafe Interface Header *\n"); - fprintf(header," *******************************************/\n\n\n"); - fprintf(header,"#include \"commonj/sdo/SDO.h\"\n"); - fprintf(header,"using namespace commonj::sdo;\n\n\n"); - - fprintf(body,"/*******************************************\n"); - fprintf(body," * Generated Typesafe Interface Body *\n"); - fprintf(body," *******************************************/\n\n\n"); - fprintf(body,"#include \"%s\"\n",headername); - fprintf(body,"using namespace commonj::sdo;\n\n\n"); - - delete headername; - delete bodyname; - - try { - - int nscount; - - TypeList tl = getTypes(); - - // forward declarations and smart pointers - - fprintf(header,"/*******************************************\n"); - fprintf(header," * Forward declarations and smart pointers *\n"); - fprintf(header," *******************************************/\n\n\n"); - - int i; - for (i=0;i %sPtr;\n", - name, name); - - for (int i=0;icreate(\"%s\",\"%s\");\n", - tl[i].getURI(),name); - fprintf(body," %s::%s* the_ob = new %s::%s(dob);\n",the_uri,name,the_uri,name); - fprintf(body," return the_ob;\n"); - fprintf(body,"}\n\n"); - - delete the_uri; - - } - - fprintf(header," DataFactory* getDataFactory()\n"); - fprintf(header," {\n"); - fprintf(header," return (DataFactory*)the_factory;\n"); - fprintf(header," }\n"); - fprintf(header," private:\n"); - fprintf(header," DataFactoryPtr the_factory;\n"); - fprintf(header,"};\n"); - - fprintf(header,"\n\n"); - - fprintf(body,"%sDataFactory* %sDataFactory::get%sDataFactory()\n", - factoryname,factoryname,factoryname); - fprintf(body,"{\n"); - fprintf(body," %sDataFactory* t = new %sDataFactory();\n", - factoryname, factoryname); - fprintf(body," t->the_factory = DataFactory::getDataFactory();\n"); - fprintf(body," return t;\n"); - fprintf(body,"}\n\n"); - - - fprintf(header,"/*******************************************\n"); - fprintf(header," * DataObject Type definitions *\n"); - fprintf(header," *******************************************/\n\n\n"); - - - for (i=0;isetUserData((void*)this);\n"); - fprintf(body,"}\n\n\n"); - - - - PropertyList pl = tl[i].getProperties(); - for (int j=0;jgetList(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - } - else - { - if (pl[j].getType().isDataType()) - { - switch (pl[j].getTypeEnum()) - { - case Type::BooleanType: - fprintf(header," bool get%s();\n",pname); - fprintf(body, "bool %s::get%s\n(){\n",name, pname); - fprintf(body, " return the_object->getBoolean(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(bool b);\n",pname); - fprintf(body, "void %s::set%s(bool b)\n{\n",name, pname); - fprintf(body, " the_object->setBoolean(\"%s\",b);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::ByteType: - - fprintf(header," char get%s();\n",pname); - fprintf(body, "char %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getByte(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(char c);\n",pname); - fprintf(body, "void %s::set%s(char c)\n{\n",name, pname); - fprintf(body, " the_object->setByte(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::BytesType: - - fprintf(header," unsigned int get%s(char *buf, unsigned int len);\n",pname); - fprintf(body, "unsigned int %s::get%s(char *buf, unsigned int len)\n{\n",name, - pname); - fprintf(body, " return the_object->getBytes(\"%s\", buf,len);\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(char *buf,unsigned int len);\n",pname); - fprintf(body, "void %s::set%s(char *buf, unsigned int len)\n{\n",name, - pname); - fprintf(body, " the_object->setBytes(\"%s\", buf,len);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::CharacterType: - - fprintf(header," wchar_t get%s();\n",pname); - fprintf(body, "wchar_t %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getCharacter(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(wchar_t c);\n",pname); - fprintf(body, "void %s::set%s(wchar_t c)\n{\n",name, pname); - fprintf(body, " the_object->setCharacter(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::DateType: - - fprintf(header," SDODate get%s();\n",pname); - fprintf(body, "SDODate %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getDate(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(const SDODate c);\n",pname); - fprintf(body, "void %s::set%s(const SDODate c)\n{\n",name, pname); - fprintf(body, " the_object->setDate(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::DoubleType: - - fprintf(header," long double get%s();\n",pname); - fprintf(body, "long double %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getDouble(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(long double c);\n",pname); - fprintf(body, "void %s::set%s(long double c)\n{\n",name, pname); - fprintf(body, " the_object->setDouble(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::FloatType: - - fprintf(header," float get%s();\n",pname); - fprintf(body, "float %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getFloat(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(float c);\n",pname); - fprintf(body, "void %s::set%s(float c)\n{\n",name, pname); - fprintf(body, " the_object->setFloat(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::IntegerType: - - fprintf(header," long get%s();\n",pname); - fprintf(body, "long %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getInteger(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(long c);\n",pname); - fprintf(body, "void %s::set%s(long c)\n{\n",name, pname); - fprintf(body, " the_object->setInteger(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::LongType: - - fprintf(header," int64_t get%s();\n",pname); - fprintf(body, "int64_t %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getLong(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(int64_t c);\n",pname); - fprintf(body, "void %s::set%s(int64_t c)\n{\n",name, pname); - fprintf(body, " the_object->setLong(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::ShortType: - - fprintf(header," short get%s();\n",pname); - fprintf(body, "short %s::get%s\n{\n",name, pname); - fprintf(body, " return the_object->getShort(\"%s\");\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(short c);\n",pname); - fprintf(body, "void %s::set%s(short c)\n{\n",name, pname); - fprintf(body, " the_object->setShort(\"%s\",c);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - case Type::StringType: - case Type::UriType: - - fprintf(header," unsigned int get%s(wchar_t *buf, unsigned int len);\n",pname); - fprintf(body, "unsigned int %s::get%s(wchar_t *buf, unsigned int len)\n{\n",name, - pname); - fprintf(body, " return the_object->getString(\"%s\", buf,len);\n",pname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(wchar_t *buf,unsigned int len);\n",pname); - fprintf(body, "void %s::set%s(wchar_t *buf, unsigned int len)\n{\n",name, - pname); - fprintf(body, " the_object->setString(\"%s\", buf,len);\nreturn;\n",pname); - fprintf(body, "}\n\n"); - - break; - - default: - fprintf(header,"/* unknown primitive:%s */\n",pname); - break; - } - } - else - - { - const char* ttname = pl[j].getType().getName(); - - fprintf(header," %sPtr get%s();\n",ttname, pname); - - fprintf(body, "%sPtr %s::get%s()\n{\n", - ttname, - name, - pname); - fprintf(body, "DataObjectPtr dob = the_object->getDataObject(\"%s\");\n",pname); - fprintf(body, "DataObject* d = (DataObject*)dob;\n"); - fprintf(body,"%s* value = (%s*)(d->getUserData());\n",ttname, ttname); - fprintf(body, " return (%s*)value;\n", ttname); - fprintf(body, "}\n\n"); - fprintf(header," void set%s(%sPtr dob);\n",pname, ttname); - fprintf(body, "void %s::set%s(%sPtr dob)\n{\n", - name,pname,ttname); - fprintf(body,"%s* ptr = dob;\n", ttname); - fprintf(body,"DataObject* the_obj = ptr->getDataObject();\n"); - fprintf(body,"the_object->setDataObject(\"%s\", the_obj);\nreturn;\n", - pname); - fprintf(body, "}\n\n"); - - } - } - } // for - - // now print the contained data object - - fprintf(header," DataObject* getDataObject()\n"); - fprintf(header," {\n"); - fprintf(header," return (DataObject*)the_object;\n"); - fprintf(header," }\n"); - fprintf(header," private:\n"); - fprintf(header," DataObjectPtr the_object;\n"); - - fprintf(header,"};\n"); - for (int i=0;i - - - -namespace commonj{ -namespace sdo{ - - typedef std::map propertyMap; - -/** - * DataFactoryImpl implements the abstract class DataFactory. - * DataFactoryImpl holds metadata and creates DataObjects. - * - * The DataFactory holds properties and types loaded from XSD, or - * created using the DataFactory API. - */ -class DataFactoryImpl : public DataFactory -{ -public: - DataFactoryImpl(); - virtual ~DataFactoryImpl(); - - DataFactoryImpl(const DataFactoryImpl& inmdg); - DataFactoryImpl& operator=(const DataFactoryImpl& inmdg); - - virtual void addType(const char* uri, const char* inTypeName, - bool isSeqenced = false, - bool isOpen = false, - bool isAbstract = false, - bool isDataType = false - ); - - virtual void addType(const SDOString& uri, const SDOString& inTypeName, - bool isSeqenced = false, - bool isOpen = false, - bool isAbstract = false, - bool isDataType = false - ); - - virtual void addType(const char* uri, const char* inTypeName, - bool isSeqenced , - bool isOpen , - bool isAbstract , - bool isDataType , - bool isFromList ); - - virtual void addType(const SDOString& uri, const SDOString& inTypeName, - bool isSeqenced , - bool isOpen , - bool isAbstract , - bool isDataType , - bool isFromList ); - - virtual void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany = false); - - virtual void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany = false); - - virtual void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const Type& propType, - bool isMany = false); - - virtual void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const Type& propType, - bool isMany = false); - - virtual void addPropertyToType(const Type& type, - const char* propname, - const Type& propType, - bool isMany = false); - - virtual void addPropertyToType(const Type& type, - const SDOString& propname, - const Type& propType, - bool isMany = false); - - virtual void addPropertyToType(const Type& type, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany = false); - - virtual void addPropertyToType(const Type& type, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany = false); - - virtual void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany , - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany , - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const char* uri, - const char* inTypeName, - const char* propname, - const Type& propType, - bool isMany, - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const Type& propType, - bool isMany, - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const Type& type, - const char* propname, - const Type& propType, - bool isMany, - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const Type& type, - const SDOString& propname, - const Type& propType, - bool isMany, - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const Type& type, - const char* propname, - const char* propTypeUri, - const char* propTypeName, - bool isMany, - bool isReadOnly, - bool isContainment); - - virtual void addPropertyToType(const Type& type, - const SDOString& propname, - const SDOString& propTypeUri, - const SDOString& propTypeName, - bool isMany, - bool isReadOnly, - bool isContainment); - - - virtual void setBaseType( const Type& type, - const Type& base, - bool isRestriction = false); - - virtual void setBaseType( const char* typeuri, - const char* typenam, - const char* baseuri, - const char* basename, - bool isRestriction = false); - - virtual void setBaseType( const SDOString& typeuri, - const SDOString& typenam, - const SDOString& baseuri, - const SDOString& basename, - bool isRestriction = false); - - virtual const Type& getType(const char* uri, const char* inTypeName) const; - - virtual const Type& getType(const SDOString& uri, const SDOString& inTypeName) const; - - virtual TypeList getTypes() const; - - virtual DataObjectPtr create(const char* uri, const char* typeName) ; - - virtual DataObjectPtr create(const SDOString& uri, const SDOString& typeName) ; - - virtual DataObjectPtr create(const Type& type) ; - - virtual void setAlias(const char* typeuri, - const char* typenam, - const char* alias) ; - - virtual void setAlias(const SDOString& typeuri, - const SDOString& typenam, - const SDOString& alias) ; - - virtual void setAlias(const char* typeuri, - const char* typname, - const char* propname, - const char* alias) ; - - virtual void setAlias(const SDOString& typeuri, - const SDOString& typname, - const SDOString& propname, - const SDOString& alias) ; - - virtual void setOpposite (const Type& type, - const char* propname, - const Type& opptype, - const char* opppropname) ; - - virtual void setOpposite (const Type& type, - const SDOString& propname, - const Type& opptype, - const SDOString& opppropname) ; - - - virtual void setPropertySubstitute( - const char* uri, - const char* inTypeName, - const char* propname, - const char* subname, - const char* subTypeUri, - const char* subTypeName); - - virtual void setPropertySubstitute( - const SDOString& uri, - const SDOString& inTypeName, - const SDOString& propname, - const SDOString& subname, - const SDOString& subTypeUri, - const SDOString& subTypeName); - - virtual void setPropertySubstitute( - const Type& containertype, - const char* propname, - const char* subname, - const Type& subtype); - - virtual void setPropertySubstitute( - const Type& containertype, - const SDOString& propname, - const SDOString& subname, - const Type& subtype); - - //////////////////////////////////////////////////////// - virtual void setDefault( - const Type& t, - const char* propname, - bool b ) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname, - bool b ) ; - - virtual void setDefault( - const Type& t, - const char* propname , - char c) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - char c) ; - - virtual void setDefault( - const Type& t, - const char* propname , - wchar_t c) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - wchar_t c) ; - - virtual void setDefault( - const Type& t, - const char* propname , - char* c) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - SDOString& outstr); - - virtual void setDefault( - const Type& t, - const char* propname , - short s) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - short s) ; - - - -#if __WORDSIZE !=64 - virtual void setDefault( - const Type& t, - const char* propname , - long l) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - long l) ; - -#endif - - virtual void setDefault( - const Type& t, - const char* propname , - int64_t i) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - int64_t i) ; - - virtual void setDefault( - const Type& t, - const char* propname , - float f) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - float f) ; - - virtual void setDefault( - const Type& t, - const char* propname , - long double d) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - long double d) ; - - virtual void setDefault( - const Type& t, - const char* propname , - const SDODate d) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - const SDODate d) ; - - virtual void setDefault( - const Type& t, - const char* propname , - const wchar_t* c, - unsigned int len) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - const wchar_t* c, - unsigned int len) ; - - virtual void setDefault( - const Type& t, - const char* propname , - const char* c, - unsigned int len) ; - - virtual void setDefault( - const Type& t, - const SDOString& propname , - const SDOString& c, - unsigned int len) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname, - bool b ) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname, - bool b ) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - char c) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - char c) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - wchar_t c) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - wchar_t c) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - char* c) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - SDOString& c) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - short s) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - short s) ; - -#if __WORDSIZE !=64 - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - long l) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - long l) ; - -#endif - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - int64_t i) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - int64_t i) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - float f) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - float f) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - long double d) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - long double d) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - const SDODate d) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - const SDODate d) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - const wchar_t* c, - unsigned int len) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - const wchar_t* c, - unsigned int len) ; - - virtual void setDefault( - const char* typuri, - const char* typnam, - const char* propname , - const char* c, - unsigned int len) ; - - virtual void setDefault( - const SDOString& typuri, - const SDOString& typnam, - const SDOString& propname , - const SDOString& c, - unsigned int len) ; - - virtual void setDASValue( - const Type& type, - const char* name, - DASValue* value); - - virtual void setDASValue( - const Type& type, - const SDOString& name, - DASValue* value); - - virtual void setDASValue( - const char* typeuri, - const char* typenam, - const char* name, - DASValue* value); - - virtual void setDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& name, - DASValue* value); - - virtual DASValue* getDASValue( - const Type& type, - const char* name) const; - - virtual DASValue* getDASValue( - const Type& type, - const SDOString& name) const; - - virtual DASValue* getDASValue( - const char* typeuri, - const char* typenam, - const char* name) const; - - virtual DASValue* getDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& name) const; - - virtual void setDASValue( - const Type& type, - const char* propertyName, - const char* name, - DASValue* value); - - virtual void setDASValue( - const Type& type, - const SDOString& propertyName, - const SDOString& name, - DASValue* value); - - virtual void setDASValue( - const char* typeuri, - const char* typenam, - const char* propertyName, - const char* name, - DASValue* value); - - virtual void setDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propertyName, - const SDOString& name, - DASValue* value); - - virtual DASValue* getDASValue( - const Type& type, - const char* propertyName, - const char* name) const; - - virtual DASValue* getDASValue( - const Type& type, - const SDOString& propertyName, - const SDOString& name) const; - - virtual DASValue* getDASValue( - const char* typeuri, - const char* typenam, - const char* propertyName, - const char* name) const; - - virtual DASValue* getDASValue( - const SDOString& typeuri, - const SDOString& typenam, - const SDOString& propertyName, - const SDOString& name) const; - - virtual void resolve(); - - const Type* findType(const SDOString uri, const SDOString inTypeName) const; - - const TypeImpl* findTypeImpl(const SDOString& uri, const SDOString& inTypeName) const; - - void addOpenProperty(const PropertyImpl& prop); - void removeOpenProperty(const SDOString& name); - const propertyMap& getOpenProperties(); - virtual const TypeImpl& getTypeImpl(const SDOString& uri, const SDOString& inTypeName) const; - virtual const SDOString& getRootElementName() const; - virtual void setRootElementName(const SDOString& ren); - virtual bool checkType(const Type& t); - virtual bool isCompatible(DataFactory* df, DataObject* d); - virtual bool compareTypes(const TypeImpl* t1, const Type& t2); - - virtual bool generateInterface(const char* fileroot, const char* factoryname); - virtual bool generateInterface(const SDOString& fileroot, const SDOString& factoryname); - - virtual std::ostream& printSelf(std::ostream &os); - -private: - typedef std::map TYPES_MAP; - TYPES_MAP types; - - std::vector compatibleFactories; - - SDOString rootElementName; - - propertyMap openProperties; - - // Need to validate and 'lock' the data model for base types to - // work properly. - - bool isResolved; - - bool recursiveCheck(TypeImpl* cs, TypeImpl* t); - bool checkForValidChangeSummary(TypeImpl* t); - - typedef std::vector TYPES_VECTOR; - TYPES_VECTOR cstypes; - - SDOString getFullTypeName(const SDOString& uri, const SDOString& inTypeName) const; - SDOString getAliasTypeName(const SDOString& uri, const SDOString& inTypeName) const; - - void copyTypes(const DataFactoryImpl& inmdg); -}; -}; -}; -#endif // _DataFactoryIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.cpp deleted file mode 100644 index 9f4fb02c6d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/disable_warn.h" -#include "commonj/sdo/DataGraph.h" -#include "commonj/sdo/SDORuntimeException.h" - -namespace commonj{ - namespace sdo { - - DataGraph::~DataGraph() - { - } - - - }; -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.h deleted file mode 100644 index eef42e393d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraph.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAGRAPH_H_ -#define _DATAGRAPH_H_ - -#include "commonj/sdo/RefCountingObject.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/export.h" -#include "commonj/sdo/DataObject.h" - - -namespace commonj{ -namespace sdo{ - -/** - * DataGraph holds a whole graph of data objects, starting from - * a single root. This class is not currently used in the C++ - * implementation, but will be required by DAS implementations. - */ - -class DataGraph : public RefCountingObject -{ - public: - virtual ~DataGraph(); - - /** - * - * Gets the root data object of this graph. - */ - - - virtual SDO_API DataObjectPtr getRootObject() = 0; - - /** - * - * gets the name of the element from which the root - * object was loaded (The XML definition). - */ - virtual SDO_API const char* getRootElementName() = 0; - - /** - * Sets the Root data object. - * - */ - virtual SDO_API void setRootObject(DataObjectPtr dob) = 0; - - /** - * Creates a root data object - used by DAS implementations. - * - */ - - virtual SDO_API DataObjectPtr createRootObject(const char* uri, - const char* name) = 0; - virtual SDO_API DataObjectPtr createRootObject(const SDOString& uri, - const SDOString& name) = 0; - - /** - * Creates a root data object - used by DAS implementations. - * - */ - - virtual SDO_API DataObjectPtr createRootObject(const Type& t) = 0; - - /** - * Gets the change summary if there is one. - * - */ - - virtual SDO_API ChangeSummaryPtr getChangeSummary() = 0; - - /** - * Gets a type from the data factory. - * - */ - - virtual SDO_API const Type& getType(const char* uri, - const char* name) = 0; - virtual SDO_API const Type& getType(const SDOString& uri, - const SDOString& name) = 0; - - -}; -}; -}; - -#endif //_DATAGRAPH_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.cpp deleted file mode 100644 index 3d4919767e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataGraphImpl.h" -#include "commonj/sdo/DataObjectImpl.h" -#include "commonj/sdo/SDORuntimeException.h" - - - -namespace commonj{ - namespace sdo { - -/** - * DataGraphImpl implements DataGraph. - * DataGraph holds a whole graph of data objects, starting from - * a single root. This class is not currently used in the C++ - * implementation, but will be required by DAS implementations. - */ - DataGraphImpl::~DataGraphImpl() - { - } - - DataGraphImpl::DataGraphImpl(DataFactoryPtr fac) - { - factory = fac; - root = 0; - } - - - DataObjectPtr DataGraphImpl::getRootObject() - { - return root; - } - - const char* DataGraphImpl::getRootElementName() - { - if (root == 0) return 0; - return root->getInstanceProperties()[0].getName(); - } - - void DataGraphImpl::setRootObject(DataObjectPtr dob) - { - if (root != 0) - { - SDO_THROW_EXCEPTION("setRootObject",SDOUnsupportedOperationException, - "Root data object already exists"); - } - root = dob; - } - - -// DataObjectPtr DataGraphImpl::createRootObject(const char* uri, -// const char* name) -// { -// if (root != 0) -// { -// SDO_THROW_EXCEPTION("createRootObject",SDOUnsupportedOperationException, -// "Root data object already exists"); -// } -// root = factory->create(uri,name); -// if (root->getInstanceProperties()[0].getType().isDataType()) -// { -// SDO_THROW_EXCEPTION("createRootObject",SDOUnsupportedOperationException, -// "Root data object cannot have a datatype property at element 0"); -// } -// return root; -// } - - DataObjectPtr DataGraphImpl::createRootObject(const char* uri, - const char* name) - { - return createRootObject(SDOString(uri), SDOString(name)); - } - - DataObjectPtr DataGraphImpl::createRootObject(const SDOString& uri, - const SDOString& name) - { - if (root != 0) - { - SDO_THROW_EXCEPTION("createRootObject",SDOUnsupportedOperationException, - "Root data object already exists"); - } - root = factory->create(uri,name); - if (root->getInstanceProperties()[0].getType().isDataType()) - { - SDO_THROW_EXCEPTION("createRootObject",SDOUnsupportedOperationException, - "Root data object cannot have a datatype property at element 0"); - } - return root; - } - - - DataObjectPtr DataGraphImpl::createRootObject(const Type& t) - { - if (root != 0) - { - SDO_THROW_EXCEPTION("createRootObject",SDOUnsupportedOperationException, - "Root data object already exists"); - } - root = factory->create(t); - if (root->getInstanceProperties()[0].getType().isDataType()) - { - SDO_THROW_EXCEPTION("createRootObject",SDOUnsupportedOperationException, - "Root data object cannot have a datatype property at element 0"); - } - return root; - } - - - ChangeSummaryPtr DataGraphImpl::getChangeSummary() - { - if (!root) return 0; - return root->getChangeSummary(); - } - - - const Type& DataGraphImpl::getType(const char* uri, - const char* name) - { - return factory->getType(uri,name); - } - const Type& DataGraphImpl::getType(const SDOString& uri, - const SDOString& name) - { - return factory->getType(uri,name); - } - - }; -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.h deleted file mode 100644 index 6affa1cc46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataGraphImpl.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAGRAPHIMPL_H_ -#define _DATAGRAPHIMPL_H_ -#include "commonj/sdo/export.h" -#include "commonj/sdo/DataGraph.h" -#include "commonj/sdo/disable_warn.h" - - -namespace commonj{ -namespace sdo{ - -/** - * DataGraphImpl implements the abstract class DataGraph. - * DataGraph holds a whole graph of data objects, starting from - * a single root. This class is not currently used in the C++ - * implementation, but will be required by DAS implementations. - */ - -class DataGraphImpl : public DataGraph -{ - public: - virtual ~DataGraphImpl(); - - SDO_API DataGraphImpl(DataFactoryPtr fac); - - /** - * Sets the root data object. - * - */ - - virtual SDO_API void setRootObject(DataObjectPtr dob); - - /** - * Gets the root data object. - * - */ - - virtual DataObjectPtr getRootObject(); - - /** - * Gets the name of the root data element (from the XML - * description). - * - */ - - virtual const char* getRootElementName(); - - /** - * Creates the root data object - for use by DAS implementations - * - */ - - virtual DataObjectPtr createRootObject(const char* uri, - const char* name); - virtual DataObjectPtr createRootObject(const SDOString& uri, - const SDOString& name); - - /** - * Creates the root data object - for use by DAS implementations - * - */ - - - virtual DataObjectPtr createRootObject(const Type& t); - - /** - * - * Gets the change summary if there is one. - */ - - virtual ChangeSummaryPtr getChangeSummary(); - - /** - * - * Gets a type from the data factory. - */ - - virtual const Type& getType(const char* uri, - const char* name); - virtual const Type& getType(const SDOString& uri, - const SDOString& name); - - private: - - DataFactoryPtr factory; - DataObjectPtr root; - -}; -}; -}; - -#endif //_DATAGRAPHIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.cpp deleted file mode 100644 index a9415bc5f1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataObject.h" - -namespace commonj{ -namespace sdo{ - - - DataObject::~DataObject() - { - } -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.h deleted file mode 100644 index 925fc9e10f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObject.h +++ /dev/null @@ -1,591 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAOBJECT_H_ -#define _DATAOBJECT_H_ -#include "commonj/sdo/export.h" - - -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/DataObjectList.h" -#include "commonj/sdo/PropertyList.h" - - -namespace commonj{ -namespace sdo{ - -class DataGraph; -class DataObjectList; -class DataFactory; -class ChangeSummary; - - - /** - * DataObjects are the non-primitive members of a Data graph. - *

      - * A data object is a representation of some structured data. - * it is the fundamental component in the SDO (Service Data Objects) package. - * Data objects support reflection, path-based accesss, convenience creation - * and deletion methods,and the ability to be part of a data graph. - * Each data object holds its data as a series of properties. - * Properties can be accessed by name, property index, or using the property - * meta object itself. - *

      - * A data object can also contain references to other data objects, through - * reference-type properties. - *

      - * A data object has a series of convenience accessors for its properties. - * These methods either use a path (String), a property index, - * or the property's meta object itself, to identify the property. - * Some examples of the path-based accessors are as follows: - *

      - * DataObjectPtr company = ...;
      - * company->getString("name");
      - * company->setString("name", "acme");
      - * company->getString("department.0/name")
      - * company->getString("department[1]/name")
      - * (Note .n indexes from 0, whilst [] indexes from 1.
      - * company->getDataObject("department[number=123]") returns the department where number=123
      - * company->getDataObject("..") returns the containing data object
      - * company->getDataObject("/") returns the root containing data object
      - * There are specific accessors for the primitive types and commonly used - * data types like String. - */ - -class DataObject : public RefCountingObject -{ - public: - virtual ~DataObject(); - - /** - * - * Introspection - properties and types - */ - - /** getPropertyIndex gets the unique index of a property - * - * A property of a data object has a unique index associated with it. - * This method gets a property index for this object from the property, - * or throw SDOPropertyNotFoundException if the property is not part - * of this data object. - */ - - virtual unsigned int SDO_API getPropertyIndex(const Property& p) = 0; - - - /** getInstanceProperties gets the props of the current object. - * - * Returns a read-only List of the Properties currently used in this DataObject. - * This list will contain all of the properties in getType().getProperties() - * and any properties where isSet(property) is true. - * For example, properties resulting from the use of - * open or mixed XML content are present if allowed by the Type. - * The list does not contain duplicates. - * The order of the properties in the list begins with getType().getProperties() - * and the order of the remaining properties is determined by the implementation. - * The same list will be returned unless the DataObject is updated so that - * the contents of the list change - * Returns the list of Properties currently used in this DataObject. - */ - - virtual SDO_API PropertyList getInstanceProperties() = 0; - - /** - * See if the property currently exists - */ - - virtual SDO_API bool hasProperty(const char* name) = 0; - virtual SDO_API bool hasProperty(const SDOString& name) = 0; - /** - * These are just like getType().getProperty(), but may return - * values other than the property list for open types. - */ - - virtual const Property& getProperty(unsigned int index) = 0; - - virtual const Property& getProperty(const char* prop) = 0; - virtual const Property& getProperty(const SDOString& prop) = 0; - - - /** - * return the data factory which created this object - */ - - virtual SDO_API DataFactory* getDataFactory() = 0; - - /** getContainer get the containing object - * - * Returns the containing data object - * or 0 if there is no container. - */ - - virtual SDO_API DataObjectPtr getContainer() = 0; - - /** getContainmentProperty returns the property containing this object - * - * Return the Property of the data object containing this data object - * or throw an SDOPropertyNotFoundException if there is no container. - */ - - virtual SDO_API const Property& getContainmentProperty() = 0; - - /** getType returns the data object's type. - * - * getType returns the data object's type. - * The type defines the properties available for reflective access. - */ - - virtual SDO_API const Type& getType() = 0; - - /* getTypeEnum returns an enumerator for the type - * - * Returns an enumerator for the type for easy switching on basic types. - * The enumerator is part of the Type class - */ - - virtual SDO_API const Type::Types getTypeEnum() = 0; - - - - - - /** getDataObject returns a data object by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API DataObjectPtr getDataObject(const SDOString& path) = 0; - virtual SDO_API DataObjectPtr getDataObject(const char* path) = 0; - virtual SDO_API DataObjectPtr getDataObject(unsigned int propertyIndex) = 0; - virtual SDO_API DataObjectPtr getDataObject(const Property& property) = 0; - - /** setDataObject sets a value by path, index or property - * - * Sets a property of either this object or an object reachable from it, - * as identified by the specified path, - * to the specified value. - */ - - - virtual SDO_API void setDataObject(const char* path, DataObjectPtr value) = 0; - virtual SDO_API void setDataObject(const SDOString& path, DataObjectPtr value) = 0; - virtual SDO_API void setDataObject(unsigned int propertyIndex, DataObjectPtr value) = 0; - virtual SDO_API void setDataObject(const Property& property, DataObjectPtr value) = 0; - - /** getBoolean returns a boolean by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API bool getBoolean(const char* path) = 0; - virtual SDO_API bool getBoolean(const SDOString& path) = 0; - virtual SDO_API bool getBoolean(unsigned int propindex) = 0; - virtual SDO_API bool getBoolean(const Property& p) = 0; - - virtual SDO_API void setBoolean(const char* path, bool b) = 0; - virtual SDO_API void setBoolean(const SDOString& path, bool b) = 0; - virtual SDO_API void setBoolean(unsigned int propindex, bool b) = 0; - virtual SDO_API void setBoolean(const Property& p, bool b) = 0; - - /** getByte returns a char by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API char getByte(const char* path) = 0; - virtual SDO_API char getByte(const SDOString& path) = 0; - virtual SDO_API char getByte(unsigned int propindex) = 0; - virtual SDO_API char getByte(const Property& p) = 0; - - virtual SDO_API void setByte(const char* path, char c) = 0; - virtual SDO_API void setByte(const SDOString& path, char c) = 0; - virtual SDO_API void setByte(unsigned int propindex, char c) = 0; - virtual SDO_API void setByte(const Property& p, char c) = 0; - - /** getCharacter returns a wchar_t by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API wchar_t getCharacter(const char* path) = 0; - virtual SDO_API wchar_t getCharacter(const SDOString& path) = 0; - virtual SDO_API wchar_t getCharacter(unsigned int propindex) = 0; - virtual SDO_API wchar_t getCharacter(const Property& p) = 0; - - virtual SDO_API void setCharacter(const char* path, wchar_t c) = 0; - virtual SDO_API void setCharacter(const SDOString& path, wchar_t c) = 0; - virtual SDO_API void setCharacter(unsigned int propindex, wchar_t c) = 0; - virtual SDO_API void setCharacter(const Property& p, wchar_t c) = 0; - - - /** getlength returns the length of a string - * - * Specific to Bytes and Characters data objects. This returns the - * length of the buffer required to hold the contents of the object. - * len = do->getLength("name"); - * buf = new char[len]; - * reallen = do->getBytes("name",buf,len); - */ - virtual SDO_API unsigned int getLength(const char* path) = 0; - virtual SDO_API unsigned int getLength(const SDOString& path) = 0; - virtual SDO_API unsigned int getLength(unsigned int propindex) = 0; - virtual SDO_API unsigned int getLength(const Property& p) = 0; - virtual SDO_API unsigned int getLength() = 0; - - - /** getBytes returns a byte buffer - * - * A DataObject of type Bytes holds an array of bytes as its value. These - * methods transfer the contents of that buffer into an array of chars allocated - * by the users program. The return value is the number of bytes actually - * copied. - * The byte array is not necessarily null terminated. If a null terminated - * C style string is required, then getCString is an alternative. - * The third paarameter is the length of the allocated buffer, which may be more - * than the length of the byte array. If the length specified is less than the - * length of the byte array, then only a portion of the - * byte array is returned. - */ - - - virtual SDO_API unsigned int getBytes(const char* path, char* buf, unsigned int max) = 0; - virtual SDO_API unsigned int getBytes(const SDOString& path, char* buf, unsigned int max) = 0; - virtual SDO_API unsigned int getBytes(unsigned int propindex, char* buf, unsigned int max) = 0; - virtual SDO_API unsigned int getBytes(const Property& p, char* buf, unsigned int max) = 0; - - virtual SDO_API void setBytes(const char* path, const char* c, unsigned int length) = 0; - virtual SDO_API void setBytes(const SDOString& path, const char* c, unsigned int length) = 0; - virtual SDO_API void setBytes(unsigned int propindex, const char* c, unsigned int length) = 0; - virtual SDO_API void setBytes(const Property& p, const char* c, unsigned int length) = 0; - - /** getString returns a wide char buffer - * - * A DataObject of type String holds an array of wide characters as its value. These - * methods transfer the contents of that buffer into an array of wchar_t allocated - * by the users program. The return value is the number of wchar_t actually - * copied. - * The array is not necessarily null terminated. - * The third paarameter is the length of the allocated buffer, which may be more - * than the length of the array. If the length specified is less than the - * length of the array, then only a portion of the array is returned. - */ - - virtual SDO_API unsigned int getString(const SDOString& path , wchar_t* c, unsigned int max) = 0; - virtual SDO_API unsigned int getString(const char* path , wchar_t* c, unsigned int max) = 0; - virtual SDO_API unsigned int getString(unsigned int propindex, wchar_t* c, unsigned int max) = 0; - virtual SDO_API unsigned int getString(const Property& p, wchar_t* c, unsigned int max) = 0; - - virtual SDO_API void setString(const char* path, const wchar_t* c, unsigned int length) = 0; - virtual SDO_API void setString(const SDOString& path, const wchar_t* c, unsigned int length) = 0; - virtual SDO_API void setString(unsigned int propindex, const wchar_t* c, unsigned int length) = 0; - virtual SDO_API void setString(const Property& p, const wchar_t* c, unsigned int length) = 0; - - /** getDate returns an SDODate by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - virtual SDO_API const SDODate getDate(const char* path) = 0; - virtual SDO_API const SDODate getDate(const SDOString& path) = 0; - virtual SDO_API const SDODate getDate(unsigned int propindex) = 0; - virtual SDO_API const SDODate getDate(const Property& p) = 0; - - virtual SDO_API void setDate(const char* path, const SDODate d) = 0; - virtual SDO_API void setDate(const SDOString& path, const SDODate d) = 0; - virtual SDO_API void setDate(unsigned int propindex, const SDODate d) = 0; - virtual SDO_API void setDate(const Property& p, const SDODate d) = 0; - - /** getDouble returns a long double by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API long double getDouble(const SDOString& path) = 0; - virtual SDO_API long double getDouble(const char* path) = 0; - virtual SDO_API long double getDouble(unsigned int propindex) = 0; - virtual SDO_API long double getDouble(const Property& p) = 0; - - virtual SDO_API void setDouble(const SDOString& path, long double d) = 0; - virtual SDO_API void setDouble(const char* path, long double d) = 0; - virtual SDO_API void setDouble(unsigned int propindex, long double d) = 0; - virtual SDO_API void setDouble(const Property& p, long double d) = 0; - - /** getFloat returns a float by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API float getFloat(const SDOString& path) = 0; - virtual SDO_API float getFloat(const char* path) = 0; - virtual SDO_API float getFloat(unsigned int propindex) = 0; - virtual SDO_API float getFloat(const Property& p) = 0; - - virtual SDO_API void setFloat(const SDOString& path, float f) = 0; - virtual SDO_API void setFloat(const char* path, float f) = 0; - virtual SDO_API void setFloat(unsigned int propindex, float f) = 0; - virtual SDO_API void setFloat(const Property& p, float f) = 0; - - /** getInteger returns a long by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API long getInteger(const SDOString& path) = 0; - virtual SDO_API long getInteger(const char* path) = 0; - virtual SDO_API long getInteger(unsigned int propindex) = 0; - virtual SDO_API long getInteger(const Property& p) = 0; - - virtual SDO_API void setInteger(const SDOString& path, long i) = 0; - virtual SDO_API void setInteger(const char* path, long i) = 0; - virtual SDO_API void setInteger(unsigned int propindex, long i) = 0; - virtual SDO_API void setInteger(const Property& p, long i) = 0; - - /** getLong returns a int64_t by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API int64_t getLong(const SDOString& path) = 0; - virtual SDO_API int64_t getLong(const char* path) = 0; - virtual SDO_API int64_t getLong(unsigned int propindex) = 0; - virtual SDO_API int64_t getLong(const Property& p) = 0; - - virtual SDO_API void setLong(const SDOString& path, int64_t l) = 0; - virtual SDO_API void setLong(const char* path, int64_t l) = 0; - virtual SDO_API void setLong(unsigned int propindex, int64_t l) = 0; - virtual SDO_API void setLong(const Property& p, int64_t l) = 0; - - /** getShort returns a short by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API short getShort(const SDOString& path) = 0; - virtual SDO_API short getShort(const char* path) = 0; - virtual SDO_API short getShort(unsigned int propindex) = 0; - virtual SDO_API short getShort(const Property& p) = 0; - - virtual SDO_API void setShort(const SDOString& path, short s) = 0; - virtual SDO_API void setShort(const char* path, short s) = 0; - virtual SDO_API void setShort(unsigned int propindex, short s) = 0; - virtual SDO_API void setShort(const Property& p, short s) = 0; - - - /** getCString returns a null terminated string by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual SDO_API const char* getCString(const char* path) = 0; - virtual SDO_API const char* getCString(const SDOString& path) = 0; - virtual SDO_API const char* getCString(unsigned int propertyIndex) = 0; - virtual SDO_API const char* getCString(const Property& prop) = 0; - - virtual SDO_API void setCString(const char* path, const char* value) = 0; - virtual SDO_API void setCString(unsigned int propertyIndex, const char* value) = 0; - virtual SDO_API void setCString (const Property& prop, const char* value) = 0; - - virtual SDO_API void setCString(const SDOString& path, const SDOString& value) = 0; - virtual SDO_API void setCString(unsigned int propertyIndex, const SDOString& value) = 0; - virtual SDO_API void setCString (const Property& prop, const SDOString& value) = 0; - - - /** setNull sets a data object value to null. - * - * A DataObjectType or DataType value may be set or unset. If it is set, then - * it may have a value, or it may be set to null. A distinction is drawn between - * being unset, having the default value, being set and being null. - * When the value of an integer (for example) is returned as zero, it could have - * been set to zero, or it could be null. Use isNull() to verify. - */ - - virtual SDO_API void setNull(const char* path) = 0; - virtual SDO_API void setNull(const SDOString& path) = 0; - virtual SDO_API void setNull(unsigned int propertyIndex) = 0; - virtual SDO_API void setNull(const Property& prop) = 0; - - virtual SDO_API bool isNull(const char* path) = 0; - virtual SDO_API bool isNull(const SDOString& path) = 0; - virtual SDO_API bool isNull(unsigned int propertyIndex) = 0; - virtual SDO_API bool isNull(const Property& prop) = 0; - - /** isSet test whether the value has been set - * - * Returns whether a property of either this object or an object reachable - * from it, as identified by the specified path, - * is considered to be set. - */ - - virtual SDO_API bool isSet(const char* path) = 0; - virtual SDO_API bool isSet(const SDOString& path) = 0; - virtual SDO_API bool isSet(unsigned int propertyIndex) = 0; - virtual SDO_API bool isSet(const Property& property) = 0; - - - /** isValid shows true if the value is set or defaulted. - * - * A property can be set, null, or have a default value - all - * of these are valid. It can also be unset, and have no default - * in which case this returns false. - */ - - virtual SDO_API bool isValid(const char* path) = 0; - virtual SDO_API bool isValid(const SDOString& path) = 0; - virtual SDO_API bool isValid(unsigned int propertyIndex) = 0; - virtual SDO_API bool isValid(const Property& property ) =0; - - /** unset unsets a value previously set. - * - * unsets a property of either this object or an object reachable - * from it, as identified by the specified path. - */ - - virtual SDO_API void unset(const char* path) = 0; - virtual SDO_API void unset(const SDOString& path) = 0; - virtual SDO_API void unset(unsigned int propertyIndex) = 0; - virtual SDO_API void unset(const Property& property) = 0; - - /** setUserData sets a reserved field in the data object. - * - * Each data object has precisely one 32 bit slot available to - * be used by applications. This is not part of the data, its - * just a place to store anything for later retrieval. - */ - - virtual SDO_API void setUserData(const char* path,void* value) = 0; - virtual SDO_API void setUserData(const SDOString& path, void* value) = 0; - virtual SDO_API void setUserData(unsigned int propertyIndex, void* value) = 0; - virtual SDO_API void setUserData(const Property& property, void* value) = 0; - virtual SDO_API void setUserData(void* value) = 0; - virtual SDO_API void* getUserData(const char* path) = 0; - virtual SDO_API void* getUserData(const SDOString& path) = 0; - virtual SDO_API void* getUserData(unsigned int propertyIndex) = 0; - virtual SDO_API void* getUserData(const Property& property) = 0; - virtual SDO_API void* getUserData() = 0; - - - /** getSequence returns the sequence for a data object - * - * Returns the value of a Sequence property identified by - * the specified path. See Sequence. - */ - - virtual SDO_API SequencePtr getSequence() = 0; - virtual SDO_API SequencePtr getSequence(const char* path) = 0; - virtual SDO_API SequencePtr getSequence(const SDOString& path) = 0; - virtual SDO_API SequencePtr getSequence(unsigned int propertyIndex) = 0; - virtual SDO_API SequencePtr getSequence(const Property& property) = 0; - - - - /** createDataObject creates a data object value - * - * Returns a new data object contained by this object using the - * specified property,which must be a containment property. - * The type of the created object is the declared type - * of the specified property. - * If the property is many valued, this method adds an element to the - * list, otherwise it sets the value, removing any old value. - */ - - - virtual SDO_API DataObjectPtr createDataObject(const char* propertyName) = 0; - virtual SDO_API DataObjectPtr createDataObject(const SDOString& propertyName) = 0; - virtual SDO_API DataObjectPtr createDataObject(unsigned int propertyIndex) = 0; - virtual SDO_API DataObjectPtr createDataObject(const Property& property) = 0; - - - - /** detach detaches an object from the graph - * - * This method removes the current data object from the graph, but does - * not destroy it. The DataObject can be re-attached to the graph later. - */ - - virtual SDO_API void detach() = 0; - - /** clear unsets all the properties - * - * This method unsets all the properties, and deletes all the data object - * propertiy values from this data object. - */ - - virtual SDO_API void clear() = 0; - - - /** getList gets the value of a many-valued property - * - * Many valued properties are returned as lists of DataObjects. - * These lists may contain primitives or data objects, but they behave - * like data objects. - * Getting a many valued integer consists of getting the list, then - * using the DataObjectList API to getInteger() for each list element. - */ - - virtual SDO_API DataObjectList& getList(const char* path) = 0; - virtual SDO_API DataObjectList& getList(const SDOString& path) = 0; - virtual SDO_API DataObjectList& getList(unsigned int propIndex) = 0; - virtual SDO_API DataObjectList& getList(const Property& p) = 0; - virtual DataObjectList& getList() = 0; - - - /** getChangeSummary get the applicable change summary - * - * This method gets the applicable change summary for a data object. - * The summary is not necessarily attached to the data object, it may be - * the summary for a parent data object. No object with a summary attached - * may be a child of another object with a summary attached. - * See the ChangeSummary API for details of using the change sumamry. - */ - - virtual SDO_SPI ChangeSummaryPtr getChangeSummary() = 0; - virtual SDO_SPI ChangeSummaryPtr getChangeSummary(const char* path) = 0; - virtual SDO_SPI ChangeSummaryPtr getChangeSummary(const SDOString& path) = 0; - virtual SDO_SPI ChangeSummaryPtr getChangeSummary(unsigned int propIndex) = 0; - virtual SDO_SPI ChangeSummaryPtr getChangeSummary(const Property& prop) = 0; - - /** objectToXPath - utility to find the xpath from the root. - * - * objectToXPath returns a string which could be used to locate this data - * object from the root data object of the graph. - */ - - virtual SDO_SPI const char* objectToXPath() = 0; - - -}; -}; -}; - -#endif //_DATAOBJECT_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp deleted file mode 100644 index 1fc2ec4f3b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp +++ /dev/null @@ -1,4014 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/disable_warn.h" -#include "commonj/sdo/DataObjectImpl.h" - - - -#include "commonj/sdo/SDORuntimeException.h" - -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/SequenceImpl.h" - -#include "commonj/sdo/PropertyList.h" - -#include "commonj/sdo/Logging.h" - -#include "commonj/sdo/TypeImpl.h" - -#include "commonj/sdo/ChangeSummaryImpl.h" -#include "commonj/sdo/DataFactoryImpl.h" -#include "commonj/sdo/SDOUtils.h" - -#include -#include -#include -using std::string; - - - - -namespace commonj{ -namespace sdo { - - /** - * RDO is an internal class holding a property value - */ - - rdo::rdo(unsigned int infirst, DataObjectImpl* insecond) - : first(infirst), second(insecond) - { - } - - rdo::rdo() - { - first = 0; - second = 0; - } - - rdo::rdo (const rdo& inrdo) - { - first = inrdo.first; - second = inrdo.second; - } - - rdo::~rdo() - { - } - - -/** @def getPrimitive - * - * A macro for the getting of primitive values from a data object - */ - -#define getPrimitive(primval,retval,defval)\ - retval DataObjectImpl::get ##primval (unsigned int propertyIndex)\ - {\ - validateIndex(propertyIndex);\ - PropertyImpl* p = getPropertyImpl(propertyIndex);\ - if (p != 0 ) \ - {\ - if (p->isMany() || p->getTypeImpl()->isFromList())\ - {\ - string msg("Get value not available on many valued property:");\ - msg += p->getName();\ - SDO_THROW_EXCEPTION("get value", SDOUnsupportedOperationException,\ - msg.c_str());\ - }\ - DataObjectImpl* d = getDataObjectImpl(propertyIndex);\ - if (d != 0) \ - {\ - if (d->isNull())return (retval)0;\ - return d->get ##primval ();\ - }\ - if (isSet(propertyIndex)) return (retval)0;\ - return p->get ##primval ##Default();\ - }\ - return (retval)0;\ - } - -/** @def getCharsBasic - * - * A macro for the getting of primitive characters from a data object - */ - -#define getCharsBasic(primval,retval,defval)\ - unsigned int DataObjectImpl::get ##primval (unsigned int propertyIndex, retval valptr , unsigned int max)\ - {\ - validateIndex(propertyIndex);\ - PropertyImpl* p = getPropertyImpl(propertyIndex);\ - if (p != 0) \ - {\ - if (p->isMany()|| p->getTypeImpl()->isFromList())\ - {\ - string msg("Get value not available on many valued property:");\ - msg += p->getName();\ - SDO_THROW_EXCEPTION("character getter", SDOUnsupportedOperationException,\ - msg.c_str());\ - }\ - DataObjectImpl* d = getDataObjectImpl(propertyIndex);\ - if (d != 0) \ - { \ - if (d->isNull()) return 0;\ - return d->get ##primval ( valptr , max);\ - }\ - if (isSet(propertyIndex))return 0;\ - return p->get ##primval ##Default( valptr , max);\ - }\ - return 0;\ - } - - -/** @def setPrimitive - * - * A macro for the setting of primitive values in a data object - */ - -#define setPrimitive(primval,primtype,primnam)\ - void DataObjectImpl::set ##primval (unsigned int propertyIndex, primtype value)\ - {\ - validateIndex(propertyIndex);\ - PropertyImpl* pl = getPropertyImpl(propertyIndex);\ - if (pl != 0) \ - {\ - if (pl->isMany()|| pl->getTypeImpl()->isFromList())\ - {\ - string msg("Set value not available on many valued property:");\ - msg += pl->getName();\ - SDO_THROW_EXCEPTION("set value",SDOUnsupportedOperationException,\ - msg.c_str());\ - }\ - PropertyValueMap::iterator i;\ - for (i = PropertyValues.begin(); i != PropertyValues.end();++i)\ - {\ - if ((*i).first == propertyIndex)\ - {\ - logChange(propertyIndex);\ - (*i).second->unsetNull();\ - (*i).second->set ##primval (value);\ - return;\ - }\ - }\ - DataFactory* df = getDataFactory();\ - DataObjectImpl* b = new DataObjectImpl(df, df->getType(Type::SDOTypeNamespaceURI, primnam));\ - b->setContainer(this);\ - b->setApplicableChangeSummary();\ - logChange(propertyIndex);\ - PropertyValues.insert(PropertyValues.end(), rdo(propertyIndex,b));\ - b->set ##primval (value);\ - }\ - return;\ - } - - -/** @def setCharsBasic - * - * A macro for the setting of primitive characters in a data object - */ - -#define setCharsBasic(primval,primtype,primnam)\ - void DataObjectImpl::set ##primval (unsigned int propertyIndex, primtype value, unsigned int len)\ - {\ - validateIndex(propertyIndex);\ - PropertyImpl* pl = getPropertyImpl(propertyIndex);\ - if (pl != 0) \ - {\ - if (pl->isMany()|| pl->getTypeImpl()->isFromList())\ - {\ - string msg("Set value not available on many valued property:");\ - msg += pl->getName();\ - SDO_THROW_EXCEPTION("setter",SDOUnsupportedOperationException,\ - msg.c_str());\ - }\ - PropertyValueMap::iterator i;\ - for (i = PropertyValues.begin(); i != PropertyValues.end();++i)\ - {\ - if ((*i).first == propertyIndex)\ - {\ - logChange(propertyIndex);\ - (*i).second->unsetNull();\ - (*i).second->set ##primval (value, len);\ - return;\ - }\ - }\ - DataFactory* df = getDataFactory();\ - DataObjectImpl* b = new DataObjectImpl(df, df->getType(Type::SDOTypeNamespaceURI, primnam));\ - b->setContainer(this);\ - b->setApplicableChangeSummary();\ - logChange(propertyIndex);\ - PropertyValues.insert(PropertyValues.end(),rdo(propertyIndex,b));\ - b->set ##primval (value, len);\ - }\ - return;\ - } - - -/** @def getPrimitiveFromPath - * - * A macro for the getting of primitive values from a data object by path - */ - -#define getPrimitiveFromPath(primval, retval, defval)\ - retval DataObjectImpl::get ##primval (const char* path)\ - {\ - return get ##primval(SDOString(path));\ - } - -#define setPrimitiveFromPathUsingSDOString(primval,setval,platval)\ - void DataObjectImpl::set ##primval (const SDOString& path, setval value)\ - {\ - DataObjectImpl *d;\ - SDOString spath;\ - SDOString prop;\ - try {\ - DataObjectImpl::stripPath(path, spath);\ - prop = findPropertyContainer(spath,&d);\ - if (d != 0)\ - {\ - if (prop.empty()) {\ - d->set ##primval (value);\ - }\ - else {\ - const PropertyImpl* p = d->getPropertyImpl(prop);\ - if (p == 0 && d->getType().isOpenType()) \ - {\ - p = d->define ##primval (prop);\ - }\ - if (p == 0)\ - {\ - string msg("Set value - path not found");\ - SDO_THROW_EXCEPTION("setter", SDOPathNotFoundException,\ - msg.c_str());\ - }\ - if (p->isMany()|| p->getTypeImpl()->isFromList())\ - {\ - long l;\ - DataObjectList& dol = d->getList((Property&)*p);\ - DataObjectImpl* doi = d->findDataObject(prop,&l);\ - if (doi != 0) {\ - doi->set ## primval (value);\ - }\ - else {\ - dol.append(( platval) value);\ - }\ - }\ - else {\ - d->set ##primval ((Property&)*p,value);\ - }\ - }\ - }\ - }\ - catch (SDORuntimeException e) {\ - SDO_RETHROW_EXCEPTION("setter",e);\ - }\ - } - -#define getPrimitiveFromPathUsingSDOString(primval, retval, defval)\ - retval DataObjectImpl::get ##primval (const SDOString& path)\ - {\ - DataObjectImpl* d;\ - SDOString spath;\ - SDOString prop;\ - try {\ - DataObjectImpl::stripPath(path, spath);\ - prop = findPropertyContainer(spath, &d);\ - if (d != 0) {\ - if (prop.empty()) {\ - return d->get ##primval ();\ - }\ - else {\ - PropertyImpl* p = d->getPropertyImpl(prop);\ - if (p != 0) \ - {\ - if (p->isMany()|| p->getTypeImpl()->isFromList())\ - {\ - long l;\ - DataObjectImpl* doi = d->findDataObject(prop,&l);\ - if (doi != 0) {\ - return doi->get ## primval();\ - }\ - string msg("Get value - index out of range:");\ - msg += path;\ - SDO_THROW_EXCEPTION("getter", SDOIndexOutOfRangeException,\ - msg.c_str());\ - }\ - else\ - {\ - if (!d->isSet(*p)) {\ - return p->get ##primval ##Default();\ - }\ - return d->get ##primval (*p);\ - }\ - }\ - }\ - }\ - string msg("Get value - path not found");\ - SDO_THROW_EXCEPTION("getter", SDOPathNotFoundException,\ - msg.c_str());\ - }\ - catch (SDORuntimeException e) {\ - SDO_RETHROW_EXCEPTION("getter", e);\ - }\ - } - -/** @def getCharsFromPath - * - * A macro for the getting of primitive characters from a data object by path - */ - -#define getCharsFromPath(primval, retval, defval)\ - unsigned int DataObjectImpl::get ##primval (const char* path, retval valptr , unsigned int max)\ - {\ - return get ##primval(SDOString(path), valptr, max);\ - } - -#define getCharsFromPathUsingSDOString(primval, retval, defval)\ - unsigned int DataObjectImpl::get ##primval (const SDOString& path, retval valptr , unsigned int max)\ - {\ - DataObjectImpl* d;\ - SDOString spath;\ - SDOString prop;\ - try {\ - DataObjectImpl::stripPath(path, spath);\ - prop = findPropertyContainer(spath, &d);\ - if (d != 0) {\ - if (prop.length() == 0) {\ - return d->get ##primval ( valptr , max);\ - }\ - else {\ - PropertyImpl* p = d->getPropertyImpl(prop);\ - if (p != 0)\ - {\ - if (p->isMany() || p->getTypeImpl()->isFromList())\ - {\ - long l;\ - DataObjectImpl* doi = d->findDataObject(prop,&l);\ - if (doi != 0) {\ - return doi->get ## primval (valptr, max);\ - }\ - string msg("Get value - index out of range");\ - msg += path;\ - SDO_THROW_EXCEPTION("getChars", SDOIndexOutOfRangeException,\ - msg.c_str());\ - }\ - else { \ - if (!d->isSet(*p)) {\ - return p->get ##primval ##Default( valptr , max );\ - }\ - return d->get ##primval (*p, valptr , max);\ - }\ - }\ - }\ - }\ - string msg("Get value - path not found");\ - SDO_THROW_EXCEPTION("getCString", SDOPathNotFoundException,\ - msg.c_str());\ - }\ - catch (SDORuntimeException e) {\ - SDO_RETHROW_EXCEPTION("character getter", e);\ - }\ - } - -/** @def setPrimitiveFromPath - * - * A macro for the setting of primitive values in a data object by path - */ - -#define setPrimitiveFromPath(primval,setval,platval)\ - void DataObjectImpl::set ##primval (const char* path, setval value)\ - {\ - set ##primval(SDOString(path), value);\ - } - -/** @def setCharsFromPath - * - * A macro for the setting of primitive characters in a data object by path - */ - -#define setCharsFromPath(primval,setval)\ - void DataObjectImpl::set ##primval (const char* path, setval value, unsigned int len)\ - {\ - set ##primval(SDOString(path), value, len);\ - } - -#define setCharsFromPathUsingSDOString(primval,setval)\ - void DataObjectImpl::set ##primval (const SDOString& path, setval value, unsigned int len)\ - {\ - DataObjectImpl *d;\ - SDOString spath;\ - SDOString prop;\ - try {\ - DataObjectImpl::stripPath(path, spath);\ - prop = findPropertyContainer(spath, &d);\ - if (d != 0)\ - {\ - if (prop.length() == 0) {\ - d->set ##primval (value, len);\ - }\ - else {\ - const PropertyImpl* p = d->getPropertyImpl(prop);\ - if (p == 0 && d->getType().isOpenType())\ - {\ - p = d->define ##primval (prop);\ - }\ - if (p == 0)\ - {\ - string msg("Set value - path not found");\ - SDO_THROW_EXCEPTION("setter", SDOPathNotFoundException,\ - msg.c_str());\ - }\ - if (p->isMany()|| p->getTypeImpl()->isFromList())\ - {\ - long l;\ - DataObjectList& dol = d->getList((Property&)*p);\ - DataObjectImpl* doi = d->findDataObject(prop,&l);\ - if (doi != 0) {\ - doi->set ## primval (value, len);\ - }\ - else {\ - dol.append(value,len);\ - }\ - }\ - else { \ - d->set ##primval ((Property&)*p,value, len);\ - }\ - }\ - }\ - }\ - catch (SDORuntimeException e) {\ - SDO_RETHROW_EXCEPTION("setter",e);\ - }\ - } - -/** @def getPrimitiveFromProperty - * - * A macro for the getting of primitive values in a data object by property - */ - -#define getPrimitiveFromProperty(primval,retval)\ - retval DataObjectImpl::get ##primval (const Property& property)\ - {\ - return get ##primval (getPropertyIndex(property));\ - } - - -/** @def getCharsFromProperty - * - * A macro for the getting of primitive characters in a data object by property - */ - -#define getCharsFromProperty(primval,retval)\ - unsigned int DataObjectImpl::get ##primval (const Property& property, retval val, unsigned int max)\ - {\ - return get ##primval (getPropertyIndex(property), val, max);\ - } - - -/** @def setPrimitiveFromProperty - * - * A macro for the setting of primitive values in a data object by property - */ - -#define setPrimitiveFromProperty(primval,primtype)\ - void DataObjectImpl::set ##primval (const Property& property, primtype value)\ - {\ - set ##primval (getPropertyIndex(property),value);\ - } - -/** @def setCharsFromProperty - * - * A macro for the setting of primitive characters in a data object by property - */ - -#define setCharsFromProperty(primval,primtype)\ - void DataObjectImpl::set ##primval (const Property& property, primtype value, unsigned int len)\ - {\ - set ##primval (getPropertyIndex(property),value, len);\ - } - - - - /** DataObject - * DataObjects are the non-primitive members of a Data graph. - * - * A data object is a representation of some structured data. - * it is the fundamental component in the SDO (Service Data Objects) package. - * Data objects support reflection, path-based accesss, convenience creation - * and deletion methods,and the ability to be part of a data graph. - * Each data object holds its data as a series of properties. - * Properties can be accessed by name, property index, or using the property - * meta object itself. - * A data object can also contain references to other data objects, through - * reference-type properties. - * A data object has a series of convenience accessors for its properties. - * These methods either use a path (String), a property index, - * or the property's meta object itself, to identify the property. - * Some examples of the path-based accessors are as follows: - * DataObjectPtr company = ...; - * company->getString("name"); - * company->setString("name", "acme"); - * company->getString("department.0/name") - * .n indexes from 0. - * company->getString("department[1]/name") [] indexes from 1. - * company->getDataObject("department[number=123]") returns the department where number=123 - * company->getDataObject("..") returns the containing data object - * company->getDataObject("/") returns the root containing data object - * There are specific accessors for the primitive types and commonly used - * data types like String. - */ - - -void DataObjectImpl::handlePropertyNotSet(const char* name) -{ - // change of behaviour - no longer throw for this. - -// string msg("Get value on unset and undefaulted property:"); -// msg += name; -// SDO_THROW_EXCEPTION("get value", SDOPropertyNotSetException, -// msg.c_str()); -} - - - - // setters and getters from a path specification - - getCharsFromPathUsingSDOString(String, wchar_t* , 0); - getCharsFromPathUsingSDOString(Bytes, char* , 0); - setCharsFromPath(String, const wchar_t*); - setCharsFromPathUsingSDOString(String, const wchar_t*); - setCharsFromPath(Bytes, const char*); - setCharsFromPathUsingSDOString(Bytes, const char*); - getCharsFromProperty(String,wchar_t*); - getCharsFromProperty(Bytes,char*); - setCharsFromProperty(String,const wchar_t*); - setCharsFromProperty(Bytes,const char*); - getCharsBasic(String,wchar_t*,0); - getCharsBasic(Bytes,char*,0); - setCharsBasic(String,const wchar_t*,"String"); - setCharsBasic(Bytes,const char*,"Bytes"); - - unsigned int DataObjectImpl::getBytes(const char* path, char* valptr , unsigned int max) - { - const SDOString pathObject(path); - unsigned int result = getBytes(pathObject, valptr, max); - return result; - } - - unsigned int DataObjectImpl::getString(const char* path, wchar_t* buf, unsigned int max) - { - return getString(SDOString(path), buf, max); - } - - - - - // Convenience methods for string/bytes length - - unsigned int DataObjectImpl::getLength(const Property& p) - { - switch (p.getType().getTypeEnum()) { - case Type::BooleanType: - return BOOL_SIZE; - case Type::CharacterType: - case Type::ByteType: - return BYTE_SIZE; - case Type::ShortType: - case Type::IntegerType: - case Type::LongType: - return MAX_LONG_SIZE; - case Type::FloatType: - return MAX_FLOAT_SIZE; - case Type::DoubleType: - return MAX_DOUBLE_SIZE; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::UriType: - case Type::StringType: - return getString(p,0,0); - case Type::BytesType: - return getBytes(p,0,0); - default: - return 0; - } - } - - unsigned int DataObjectImpl::getLength() - { - switch (getType().getTypeEnum()) { - case Type::BooleanType: - return BOOL_SIZE; - case Type::CharacterType: - case Type::ByteType: - return BYTE_SIZE; - case Type::ShortType: - case Type::IntegerType: - case Type::LongType: - return MAX_LONG_SIZE; - case Type::FloatType: - return MAX_FLOAT_SIZE; - case Type::DoubleType: - return MAX_DOUBLE_SIZE; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::UriType: - case Type::StringType: - return getString(0,0); - case Type::BytesType: - return getBytes(0,0); - default: - return 0; - } - } - - unsigned int DataObjectImpl::getLength(const char* path) - { - return getLength(SDOString(path)); - } - - unsigned int DataObjectImpl::getLength(const SDOString& path) - { - DataObjectImpl* d; - SDOString spath; - DataObjectImpl::stripPath(path, spath); - SDOString prop = findPropertyContainer(spath, &d); - if (d != 0) { - if (prop.length() == 0) { - return 0; - } - else - { - const Property& p = d->getProperty(prop); - return getLength(p); - } - } - else - { - if (prop.length()) - { - const Property& p = getProperty(prop); - return getLength(p); - } - else - { - return 0; - } - } - } - - unsigned int DataObjectImpl::getLength(unsigned int index) - { - return getLength(getProperty(index)); - } - - // +++ - // Provide implementations for the getXXX(const char* path) methods. - // These are implemented by delegating the call - // to the corresponding getXXX(const SDOString& path) method. - - // getPrimitiveFromPath(Boolean,bool,false); - bool DataObjectImpl::getBoolean(const char* path) - { - return getBoolean(SDOString(path)); - } - - // getPrimitiveFromPath(Short,short,0); - short DataObjectImpl::getShort(const char* path) - { - return getShort(SDOString(path)); - } - - // getPrimitiveFromPath(Byte,char,0); - char DataObjectImpl::getByte(const char* path) - { - return getByte(SDOString(path)); - } - - // getPrimitiveFromPath(Character,wchar_t,0); - wchar_t DataObjectImpl::getCharacter(const char* path) - { - return getCharacter(SDOString(path)); - } - - // getPrimitiveFromPath(Date,const SDODate,0); - const SDODate DataObjectImpl::getDate(const char* path) - { - return getDate(SDOString(path)); - } - - // getPrimitiveFromPath(Double,long double,0.0); - long double DataObjectImpl::getDouble(const char* path) - { - return getDouble(SDOString(path)); - } - - // getPrimitiveFromPath(Float,float,0.0); - float DataObjectImpl::getFloat(const char* path) - { - return getFloat(SDOString(path)); - } - - // getPrimitiveFromPath(Integer,long,0); - long DataObjectImpl::getInteger(const char* path) - { - return getInteger(SDOString(path)); - } - - // getPrimitiveFromPath(Long,int64_t,0L); - int64_t DataObjectImpl::getLong(const char* path) - { - return getLong(SDOString(path)); - } - - // End of implementations for the getXXX(const char* path) methods. - // --- - - - // +++ - // Provide implementations for the getXXX(const SDOString& path) methods. - // These are implemented by macro expansion. The comment before each one - // shows the signature of the method being defined. - - // DataObjectImpl::getBoolean(const SDOString&) - getPrimitiveFromPathUsingSDOString(Boolean, bool, false); - - // DataObjectImpl::getByte(const SDOString&) - getPrimitiveFromPathUsingSDOString(Byte, char, 0); - - // DataObjectImpl::getCharacter(const SDOString&) - getPrimitiveFromPathUsingSDOString(Character, wchar_t, 0); - - // DataObjectImpl::getShort(const SDOString&) - getPrimitiveFromPathUsingSDOString(Short,short,0); - - getPrimitiveFromPathUsingSDOString(Integer,long,0); - - getPrimitiveFromPathUsingSDOString(Long,int64_t,0L); - - getPrimitiveFromPathUsingSDOString(Double,long double,0.0); - - getPrimitiveFromPathUsingSDOString(Float,float,0.0); - - getPrimitiveFromPathUsingSDOString(Date,const SDODate,0); - - // End of implementations for the getXXX(const SDOString& path) methods. - // --- - - - // +++ - // Provide implementations for the setXXX(const char* path, XXX) methods. - // These are implemented by delegating the call - // to the corresponding setXXX(const SDOString& path, XXX) method. - - // setPrimitiveFromPath(Boolean,bool, bool); - void DataObjectImpl::setBoolean(const char* path, bool b) - { - setBoolean(SDOString(path), b); - } - - // setPrimitiveFromPath(Short,short, short); - void DataObjectImpl::setShort(const char* path, short s) - { - setShort(SDOString(path), s); - } - - // setPrimitiveFromPath(Byte,char, char); - void DataObjectImpl::setByte(const char* path, char c) - { - setByte(SDOString(path), c); - } - - // setPrimitiveFromPath(Character,wchar_t, wchar_t); - void DataObjectImpl::setCharacter(const char* path, wchar_t c) - { - setCharacter(SDOString(path), c); - } - - // setPrimitiveFromPath(Date,const SDODate, const SDODate); - void DataObjectImpl::setDate(const char* path, const SDODate d) - { - setDate(SDOString(path), d); - } - - // setPrimitiveFromPath(Double,long double, long double); - void DataObjectImpl::setDouble(const char* path, long double d) - { - setDouble(SDOString(path), d); - } - - // setPrimitiveFromPath(Float,float, float); - void DataObjectImpl::setFloat(const char* path, float f) - { - setFloat(SDOString(path), f); - } - - // setPrimitiveFromPath(Integer,long, int64_t); - void DataObjectImpl::setInteger(const char* path, long i) - { - setInteger(SDOString(path), i); - } - - // setPrimitiveFromPath(Long,int64_t, int64_t); - // setPrimitiveFromPath(Integer,long, long); - // Depends on wordsize, see SDOString& variant below. - void DataObjectImpl::setLong(const char* path, /*long long*/ int64_t l) - { - setLong(SDOString(path), l); - } - - // End of implementations for the setXXX(const char* path, XXX) methods. - // --- - - - // +++ - // Provide implementations for the setXXX(const SDOString& path, XXX) methods. - // These are implemented by macro expansion. The comment before each one - // shows the signature of the method being defined. - - // void DataObjectImpl::setBoolean(const SDOString& path, bool b); - setPrimitiveFromPathUsingSDOString(Boolean, bool, bool); - - // void DataObjectImpl::setByte(const SDOString& path, char c); - setPrimitiveFromPathUsingSDOString(Byte, char, char); - - // void DataObjectImpl::setCharacter(const SDOString& path, wchar_t c); - setPrimitiveFromPathUsingSDOString(Character, wchar_t, wchar_t); - - // void DataObjectImpl::setShort(const SDOString& path, short s); - setPrimitiveFromPathUsingSDOString(Short,short, short); - -#if __WORDSIZE ==64 - setPrimitiveFromPathUsingSDOString(Integer,long, int64_t); -#else - setPrimitiveFromPathUsingSDOString(Integer,long, long); -#endif - - setPrimitiveFromPathUsingSDOString(Long,int64_t, int64_t); - - setPrimitiveFromPathUsingSDOString(Float,float, float); - - setPrimitiveFromPathUsingSDOString(Double,long double, long double); - - setPrimitiveFromPathUsingSDOString(Date,const SDODate, const SDODate); - - // --- - // End of implementations for the setXXX(const SDOString& path, XXX) methods. - - - getPrimitiveFromProperty(Boolean,bool); - getPrimitiveFromProperty(Byte,char); - getPrimitiveFromProperty(Character,wchar_t); - getPrimitiveFromProperty(Short,short); - getPrimitiveFromProperty(Integer,long); - getPrimitiveFromProperty(Long,int64_t); - getPrimitiveFromProperty(Double,long double); - getPrimitiveFromProperty(Float,float); - getPrimitiveFromProperty(Date,const SDODate); - - setPrimitiveFromProperty(Boolean,bool); - setPrimitiveFromProperty(Byte,char); - setPrimitiveFromProperty(Character,wchar_t); - setPrimitiveFromProperty(Short,short); - setPrimitiveFromProperty(Integer,long); - setPrimitiveFromProperty(Long,int64_t); - setPrimitiveFromProperty(Float,float); - setPrimitiveFromProperty(Double,long double); - setPrimitiveFromProperty(Date,const SDODate); - - getPrimitive(Boolean,bool,false); - getPrimitive(Byte,char,0); - getPrimitive(Character,wchar_t,0); - getPrimitive(Short,short,0); - getPrimitive(Integer,long,0); - getPrimitive(Long,int64_t,0L); - getPrimitive(Double,long double,0.0); - getPrimitive(Float,float,0.0); - getPrimitive(Date,const SDODate,0); - - setPrimitive(Boolean,bool,"Boolean"); - setPrimitive(Byte,char, "Byte"); - setPrimitive(Character,wchar_t,"Character"); - setPrimitive(Short,short,"Short"); - setPrimitive(Integer,long,"Integer"); - setPrimitive(Long,int64_t,"Long"); - setPrimitive(Float,float,"Float"); - setPrimitive(Double,long double,"Double"); - setPrimitive(Date,const SDODate,"Date"); - - - - // open type support - - const PropertyImpl* DataObjectImpl::defineProperty(const SDOString& propname, - const Type& t) - { - openProperties.insert(openProperties.end(), - PropertyImpl(getType(), - propname, - (TypeImpl&)t, - false, - false, - true)); - DataFactory* df = factory; - ((DataFactoryImpl*)df)->addOpenProperty(PropertyImpl(getType(), - propname, - (TypeImpl&)t, - false, - false, - true)); - - return getPropertyImpl(propname); - } - - void DataObjectImpl::undefineProperty(unsigned int index) - { - int point = index - openBase; - if (point < 0 || point >= openProperties.size()) return; - - // downgrade all the property settings above this one - - PropertyValueMap::iterator pit; - for (pit = PropertyValues.begin(); pit != PropertyValues.end();++pit) - { - if ((*pit).first > index) - { - if (getPropertyImpl((*pit).first)->isMany()) - { - DataObjectListImpl* dl = (*pit).second->getListImpl(); - if (dl != 0) dl->decrementPindex(); - } - (*pit).first-=1; - } - } - - // then remove this property from the list - - std::list::iterator it = - openProperties.begin(); - for (int i=0;iremoveOpenProperty((*it).getName()); - - openProperties.erase(it); - - return; - } - - const PropertyImpl* DataObjectImpl::defineList(const char* propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "OpenDataObject"); - openProperties.insert( - openProperties.end(), PropertyImpl(getType(),propname, - (TypeImpl&)t, true, false, true)); - - DataFactory* df = factory; - ((DataFactoryImpl*)df)->addOpenProperty(PropertyImpl(getType(),propname, - (TypeImpl&)t, true, false, true)); - - return getPropertyImpl(propname); - } - - const PropertyImpl* DataObjectImpl::defineBoolean(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Boolean"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineByte(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Byte"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineCharacter(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Character"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineString(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "String"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineBytes(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Bytes"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineShort(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Short"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineInteger(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Integer"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineLong(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Long"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineFloat(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Float"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineDouble(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Double"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineDate(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Date"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineCString(const SDOString& propname) - { - const Type& t = factory->getType(Type::SDOTypeNamespaceURI, "Bytes"); - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineDataObject(const SDOString& propname, - const Type& t) - { - return defineProperty(propname,t); - } - - const PropertyImpl* DataObjectImpl::defineDataObject(const char* propname, - const char* typeURI, const char* typeName) - { - const Type& t = factory->getType(typeURI, typeName); - return defineProperty(propname,t); - } - - // Used to return empty values - remove when defaults are there. - const char* DataObjectImpl::emptyString = ""; - - // Useful for debug, so not included in the macros above - but - // could be. - // getters and setters for strings - - const char* DataObjectImpl::getCString(unsigned int propertyIndex) - { - validateIndex(propertyIndex); - if ((getProperty(propertyIndex).isMany()) - || getPropertyImpl(propertyIndex)->getTypeImpl()->isFromList()) - { - - string msg("Get value not available on many valued property:"); - msg += getProperty(propertyIndex).getName(); - SDO_THROW_EXCEPTION("getCString", SDOUnsupportedOperationException, - msg.c_str()); - } - DataObjectImpl* d = getDataObjectImpl(propertyIndex); - if (d != 0) { - if (!d->isNull()) return d->getCString (); - return 0; - } - PropertyImpl* p = (PropertyImpl*)getPropertyImpl(propertyIndex); - if (p != 0) - { - if (isSet(propertyIndex)) return 0; - //if (p->isDefaulted()) - //{ - return p->getCStringDefault(); - //} - //else - //{ - // handlePropertyNotSet(p->getName()); - //} - } - return 0; - } - - - void DataObjectImpl::setCString (unsigned int propertyIndex, const char* value) - { - setCString(propertyIndex, SDOString(value)); - } - - void DataObjectImpl::setCString (unsigned int propertyIndex, const SDOString& value) - { - validateIndex(propertyIndex); - PropertyValueMap::iterator i; - if ((getProperty(propertyIndex).isMany()) - || getPropertyImpl(propertyIndex)->getTypeImpl()->isFromList()) - { - string msg("Set value not available on many valued property:"); - msg += getProperty(propertyIndex).getName(); - SDO_THROW_EXCEPTION("setString", SDOUnsupportedOperationException, - msg.c_str()); - } - for (i = PropertyValues.begin(); i != PropertyValues.end(); ++i) - { - if ((*i).first == propertyIndex) - { - logChange(propertyIndex); - (*i).second->unsetNull(); - (*i).second->setCString(value); - return; - } - } - DataFactory* df = getDataFactory(); - DataObjectImpl* b = new DataObjectImpl(df, df->getType(Type::SDOTypeNamespaceURI,"String")); - b->setContainer(this); - b->setApplicableChangeSummary(); - logChange(propertyIndex); - PropertyValues.insert(PropertyValues.end(),rdo(propertyIndex,b)); - b->setCString(value); - return; - } - - - const char* DataObjectImpl::getCString (const char* path) - { - return getCString(SDOString(path)); - } - - const char* DataObjectImpl::getCString (const SDOString& path) - { - DataObjectImpl* d = 0; - SDOString spath; - SDOString prop; - try { - DataObjectImpl::stripPath(path, spath); - // It is possible for findPropertyContainer to return a 0 which caues an accvio. - prop = findPropertyContainer(spath, &d); - if (d != 0) { - if (prop.length() == 0) { - return d->getCString(); - } - else { - PropertyImpl* p = d->getPropertyImpl(prop); - if (p != 0) - { - if (p->isMany()|| p->getTypeImpl()->isFromList()) - { - long l; - DataObjectImpl* doi = d->findDataObject(prop,&l); - if (doi != 0) { - return doi->getCString(); - } - string msg("Get CString - index out of range"); - msg += path; - SDO_THROW_EXCEPTION("getter", SDOIndexOutOfRangeException, - msg.c_str()); - } - else { - if (!d->isSet(*p)) { - //if (p->isDefaulted()) - //{ - return p->getCStringDefault(); - //} - //else - //{ - // handlePropertyNotSet(p->getName()); - //} - } - return d->getCString(*p); - } - } - } - } - string msg("Get CString - object not found"); - SDO_THROW_EXCEPTION("getCString", SDOPathNotFoundException, - msg.c_str()); - } - catch (SDORuntimeException e) { - SDO_RETHROW_EXCEPTION("getCString",e); - } - } - - - - void DataObjectImpl::setCString(const char* path, const char* value) - { - setCString(SDOString(path), SDOString(value)); - } - - - void DataObjectImpl::setCString(const SDOString& path, const SDOString& value) - { - DataObjectImpl *d = 0; - - SDOString spath; - SDOString prop; - try { - DataObjectImpl::stripPath(path, spath); - prop = findPropertyContainer(spath, &d); - - if (d != 0) { - if (prop.length() == 0) { - d->setCString(value); - } - else { - const PropertyImpl* p = d->getPropertyImpl(prop); - if (p == 0 && d->getType().isOpenType()) - { - p = d->defineBytes(prop); - } - if (p != 0) - { - if (p->isMany()|| p->getTypeImpl()->isFromList()) { - long l; - DataObjectList& dol = d->getList((Property&)*p); - DataObjectImpl* doi = d->findDataObject(prop,&l); - if (doi != 0) - { - doi->setCString(value); - } - else - { - dol.append(value); - } - } - else { - d->setCString((Property&)*p,value); - } - } - } - } - } - catch (SDORuntimeException e) { - SDO_RETHROW_EXCEPTION("setCString",e); - } - } - - - const char* DataObjectImpl::getCString (const Property& property) - { - return getCString(getPropertyIndex(property)); - } - - - void DataObjectImpl::setCString(const Property& property, const char* value) - { - setCString(property, SDOString(value)); - } - - void DataObjectImpl::setCString(const Property& property, const SDOString& value) - { - setCString(getPropertyIndex(property), value); - } - - // null support - - bool DataObjectImpl::isNull(const unsigned int propertyIndex) - { - validateIndex(propertyIndex); - if ((getProperty(propertyIndex).isMany())) - { - return false; - } - - PropertyValueMap::iterator i; - for (i = PropertyValues.begin(); i != PropertyValues.end();++i) - { - if ((*i).first == propertyIndex) - { - return (*i).second->isNull(); - } - } - return false; - } - - bool DataObjectImpl::isNull(const Property& property) - { - return isNull(getPropertyIndex(property)); - } - - bool DataObjectImpl::isNull(const char* path) - { - return isNull(SDOString(path)); - } - - bool DataObjectImpl::isNull(const SDOString& path) - { - DataObjectImpl *d = 0; - SDOString spath; - SDOString prop; - // char* spath = 0; - // char* prop = 0; - try { - DataObjectImpl::stripPath(path, spath); - prop = findPropertyContainer(spath, &d); - if (d != 0) { - if (prop.length() == 0) { - return d->isNull(); - } - else { - const Property& p = d->getProperty(prop); - return d->isNull(p); - } - } - return false; - } - catch (SDORuntimeException e) { - SDO_RETHROW_EXCEPTION("isNull",e); - } - } - - void DataObjectImpl::setNull(const unsigned int propertyIndex) - { - validateIndex(propertyIndex); - if ((getProperty(propertyIndex).isMany())) - { - string msg("Setting a list to null is not supported:"); - msg += getProperty(propertyIndex).getName(); - SDO_THROW_EXCEPTION("setNull", SDOUnsupportedOperationException, - msg.c_str()); - } - - PropertyValueMap::iterator i; - for (i = PropertyValues.begin(); i != PropertyValues.end();++i) - { - if ((*i).first == propertyIndex) - { - logChange(propertyIndex); - (*i).second->setNull(); - return; - } - } - // The property was not set yet... - logChange(propertyIndex); - DataFactory* df = getDataFactory(); - DataObjectImpl* b = new DataObjectImpl(df, - getProperty(propertyIndex).getType()); - b->setContainer(this); - b->setApplicableChangeSummary(); - PropertyValues.insert(PropertyValues.end(),rdo(propertyIndex,b)); - b->setNull(); - - - } - void DataObjectImpl::setNull(const Property& property) - { - setNull(getPropertyIndex(property)); - } - - void DataObjectImpl::setNull(const char* path) - { - setNull(SDOString(path)); - } - - void DataObjectImpl::setNull(const SDOString& path) - { - DataObjectImpl *d = 0; - SDOString spath; - SDOString prop; - size_t pc; - - try { - DataObjectImpl::stripPath(path, spath); - prop = findPropertyContainer(spath, &d); - if (d != 0) { - if (prop.length() == 0) { - try { - DataObjectImpl* cont = d->getContainerImpl(); - if (cont != 0) - { - pc = path.rfind('/'); // Find the last '/' in the path - if (pc != string::npos) - pc++; // pc is the index of the first character following the / - } - const Property& pcont = cont->getProperty(path.substr(pc)); - cont->logChange(pcont); - } - catch (SDORuntimeException&) - { - } - d->setNull(); - } - else { - const PropertyImpl* p = d->getPropertyImpl(prop); - if (p == 0) - { - if(d->getType().isOpenType()) - { - string msg("Cannot set unassigned open property to null:"); - msg += prop; - SDO_THROW_EXCEPTION("setNull", SDOUnsupportedOperationException, - msg.c_str()); - } - else - { - string msg("Property Not Found:"); - msg += prop; - SDO_THROW_EXCEPTION("setNull", SDOPropertyNotFoundException, - msg.c_str()); - } - } - d->setNull((Property&)*p); - return; - } - } - return; - } - catch (SDORuntimeException e) { - SDO_RETHROW_EXCEPTION("setNull",e); - } - - } - - // getters and setters for a List data object - - DataObjectList& DataObjectImpl::getList(const char* path) - { - // Can path really be a null pointer? - if (path == 0) - { - return(getList(SDOString())); - } - else - { - return(getList(SDOString(path))); - } - } - - DataObjectList& DataObjectImpl::getList(const SDOString& path) - { - DataObjectImpl *d; - SDOString spath; - - DataObjectImpl::stripPath(path, spath); - SDOString prop = findPropertyContainer(spath, &d); - - if (d != 0) { - if (prop.length() == 0) { - return d->getList(); - } - else { - const PropertyImpl* p = d->getPropertyImpl(prop); - if (p == 0 && d->getType().isOpenType()) - { - p = d->defineList(prop.c_str()); - } - if (p != 0) - { - return d->getList((Property&)*p); - } - } - } - - string msg("Invalid path:"); - msg += path; - SDO_THROW_EXCEPTION("getList",SDOPathNotFoundException, msg.c_str()); - } - - - DataObjectList& DataObjectImpl::getList(unsigned int propIndex) - { - if (!(getProperty(propIndex).isMany())) - { - if (!getPropertyImpl(propIndex)->getTypeImpl()->isFromList()) - { - string msg("Get list not available on single valued property:"); - msg += getProperty(propIndex).getName(); - SDO_THROW_EXCEPTION("getList", SDOUnsupportedOperationException, - msg.c_str()); - } - } - DataObjectImpl* d = getDataObjectImpl(propIndex); - if (d == 0) - { - string msg("Property Not Found:"); - msg += getType().getProperty(propIndex).getName(); - SDO_THROW_EXCEPTION("getList", SDOPropertyNotFoundException, - msg.c_str()); - } - return d->getList(); - } - - DataObjectList& DataObjectImpl::getList(const Property& p) - { - if (!p.isMany()) - { - PropertyImpl* pi = (PropertyImpl*)&p; - if (!pi->getTypeImpl()->isFromList()) - { - string msg("Get list not available on single valued property:"); - msg += p.getName(); - SDO_THROW_EXCEPTION("getList", SDOUnsupportedOperationException, - msg.c_str()); - } - } - - int propIndex = getPropertyIndex(p); - DataObjectImpl* d = getDataObjectImpl(propIndex); - if (d == 0) { - // There is no list yet, so we need to create an - // empty data object to hold the list - DataFactory* df = getDataFactory(); - d = new DataObjectImpl(df, df->getType(Type::SDOTypeNamespaceURI,"DataObject")); - PropertyValues.insert(PropertyValues.end(),rdo(propIndex,d)); - d->setContainer(this); - d->setApplicableChangeSummary(); - - DataObjectListImpl* list = new DataObjectListImpl(df,this, - propIndex,p.getType().getURI(),p.getType().getName()); - d->setList(list); - - } - return d->getList(); - } - - - - DataObjectList& DataObjectImpl::getList() - { - if (getTypeImpl().isFromList()) - { - return getList("values"); - } - return *listValue; - } - - DataObjectListImpl* DataObjectImpl::getListImpl() - { - if (getTypeImpl().isFromList()) - { - DataObjectList& dl = getList("values"); - return (DataObjectListImpl*)&dl; - } - return listValue; - } - - - - ///////////////////////////////////////////////////////////////////////////// - // Utilities - ///////////////////////////////////////////////////////////////////////////// - - - // get an index, or throw if the prop is not part of this DO - - unsigned int DataObjectImpl::getPropertyIndex(const Property& p) - { - PropertyList props = getType().getProperties(); - - for (int i = 0; i < props.size() ; ++i) - { - if (!strcmp(props[i].getName(),p.getName()) ) - { - return i; - } - } - if (getType().isOpenType()) - { - std::list::iterator j; - int count = 0; - for (j = openProperties.begin() ; - j != openProperties.end() ; ++j) - { - if (!strcmp((*j).getName(),p.getName())) - { - return count+openBase; - } - count++; - } - } - string msg("Cannot find property:"); - msg += p.getName(); - SDO_THROW_EXCEPTION("getPropertyIndex", SDOPropertyNotFoundException, - msg.c_str()); - } - - const Property& DataObjectImpl::getProperty(unsigned int index) - { - PropertyImpl* pi = getPropertyImpl(index); - if (pi == 0) - { - string msg("Index out of range"); - SDO_THROW_EXCEPTION("getProperty", SDOIndexOutOfRangeException, - msg.c_str()); - } - return (Property&)*pi; - } - - /** - * See if the property currently exists - */ - - bool DataObjectImpl::hasProperty(const char* name) - { - return hasProperty(SDOString(name)); - } - - bool DataObjectImpl::hasProperty(const SDOString& name) - { - PropertyImpl* pi = getPropertyImpl(name); - if (pi == 0) return false; - return true; - } - - - PropertyImpl* DataObjectImpl::getPropertyImpl(unsigned int index) - { - PropertyList props = getType().getProperties(); - if (index < props.size()) - { - return (PropertyImpl*)&props[index]; - } - - if (getType().isOpenType()) - { - if (index >= openBase && index - openBase < openProperties.size()) - { - std::list::iterator j; - int val = 0; - j = openProperties.begin(); - while (val < index-openBase && j != openProperties.end()) - { - val++; - j++; - } - if (j != openProperties.end()) return &(*j); - } - } - return 0; - } - - - ////////////////////////////////////////////////////////////////////// - // TODO - this is rubbish, but gets us by until XPATH is done - // trip the path down to characters which I am going to - // recognise later (a-z, A-Z _ [ ] .) - ////////////////////////////////////////////////////////////////////// - - const char* DataObjectImpl::templateString = - " /abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890=[]._#"; - - char* DataObjectImpl::stripPath(const char* path) - { - int pos = 0; - char* s = 0; - if (path == 0) return s; - - s = new char[strlen(path)+1]; - - for (int i=0;i < strlen(path); i++) - { - if (strchr(templateString,path[i]) != 0) { - s[pos++] = path[i]; - } - } - s[pos++] = 0; - return s; - } - - void DataObjectImpl::stripPath(const SDOString& path, SDOString& result) - { - result.erase(); - result.reserve(path.length()); - - size_t start = 0; - size_t position = path.find_first_not_of(templateString); - - while (position != string::npos) - { - result.append(path, start, (position - start)); - start = ++position; - position = path.find_first_not_of(templateString, position); - } - - result.append(path, start, string::npos); - - return; - } - - ////////////////////////////////////////////////////////////////////// - // Find a data object or return 0 if not found - ////////////////////////////////////////////////////////////////////// - DataObjectImpl* DataObjectImpl::findDataObject(const SDOString& token, long* index) - { - // name , name[int], name[x=y] name.int - size_t beginbrace = token.find('['); - size_t dot = token.find('.'); - size_t breaker = 0; - - if (dot != string::npos) - { - if (beginbrace != string::npos) - { - breaker = (beginbrace < dot) ? beginbrace : dot; - } - else - { - breaker = dot; - } - } - else - { - breaker = beginbrace; - } - - if (breaker == string::npos) - { - // its this object, and a property thereof - *index = -1; - const Property& p = getProperty(token); - return getDataObjectImpl(p); - } - - // We did find a breaker character. - const Property& p = getProperty(SDOString(token, 0, breaker)); - - breaker++; - - size_t endbrace = token.find(']'); - SDOString breakerStr = token.substr(breaker, (endbrace - breaker)); - // Search for the first occurence of an = sign starting at the previously - // identified "breaker" character and ending at the endbrace just found. We - // need to make a new SDOString to contain that substring. - - size_t eq = breakerStr.find('='); - - if (eq == string::npos) - { - // There is no "=" sign - int val = atoi(breakerStr.c_str()); - DataObjectList& list = getList(p); - - // The spec says that depts[1] is the first element, as is depts.0 - if (beginbrace != string::npos) val--; - - if (val >=0 && val < list.size()) - { - DataObject* dob = list[val]; - *index = val; - return (DataObjectImpl*)dob; - } - *index = -1; - return 0; - } - - // We did find an "=" sign. - SDOString PropertyName = breakerStr.substr(0, eq); - // breaker is now propname - eq++; - SDOString PropertyValue = breakerStr.substr(eq); - // eq is now propval - - DataObjectList& list = getList(p); - for (int li = 0 ; li < list.size() ; ++li) - { - // TODO comparison for double not ok - - const Type & t = list[li]->getType(); - const Property& p = list[li]->getProperty(PropertyName); - int ok = 0; - - switch (p.getTypeEnum()) - { - case Type::BooleanType: - { - // getCString will return "true" or "false" - if (!strcmp(PropertyValue.c_str(), list[li]->getCString(p))) ok = 1; - } - break; - - case Type::ByteType: - { - char cc = PropertyValue[0]; - // getByte return a char - if (cc == list[li]->getByte(p)) ok = 1; - } - break; - - case Type::CharacterType: - { - wchar_t wc = *((wchar_t*) PropertyValue.c_str()); - // wchar_t wc = (wchar_t)((wchar_t*)eq)[0]; - // TODO - this is not a very accesible way of storing a wchar - if (wc == list[li]->getCharacter(p)) ok = 1; - } - break; - - case Type::IntegerType: - { - long ic = atol(PropertyValue.c_str()); - if (ic == list[li]->getInteger(p)) ok = 1; - } - break; - - case Type::DateType: - { - long dc = atol(PropertyValue.c_str()); - if (dc == (long)(list[li]->getDate(p).getTime())) ok = 1; - } - break; - - case Type::DoubleType: - { - // TODO - double needs a bigger size than float - long double ldc = (long double)atof(PropertyValue.c_str()); - if (ldc == list[li]->getDouble(p)) ok = 1; - } - break; - - case Type::FloatType: - { - float fc = atof(PropertyValue.c_str()); - if (fc == list[li]->getFloat(p)) ok = 1; - } - break; - - case Type::LongType: - { -#if defined(WIN32) || defined (_WINDOWS) - int64_t lic = (int64_t)_atoi64(PropertyValue.c_str()); -#else - int64_t lic = (int64_t)strtoll(PropertyValue.c_str(), NULL, 0); -#endif - - if (lic == list[li]->getLong(p)) ok = 1; - } - break; - - case Type::ShortType: - { - short sic = atoi(PropertyValue.c_str()); - if (sic == list[li]->getShort(p)) ok = 1; - } - break; - - case Type::BytesType: - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - { - - if (!strcmp(PropertyValue.c_str(), list[li]->getCString(p))) ok = 1; - // try with quotes too - size_t firstquote = PropertyValue.find('"'); - size_t firstsingle = PropertyValue.find('\''); - - char searchchar = 0; - - if (firstsingle == string::npos) - { - if (firstquote != string::npos) - { - searchchar = '"'; - } - } - else - { - if (firstquote != string::npos && firstquote < firstsingle) - { - searchchar = '"'; - } - else - { - searchchar = '\''; - firstquote = firstsingle; - } - } - - if (searchchar != 0) - { - size_t ender = PropertyValue.find(searchchar, firstquote + 1); - if (ender != string::npos) - { - if (!strcmp(PropertyValue.substr(firstquote + 1, ender - (firstquote+1)).c_str(), list[li]->getCString(p))) - ok = 1; - } - } - } - break; - - case Type::DataObjectType: - break; - - default: - break; - } - - if (ok == 1) - { - DataObject* dob = list[li]; - *index = li; - return (DataObjectImpl*)dob; - } - - } - return 0; - } - - - ////////////////////////////////////////////////////////////////////// - // Find a data object and a property name within it. - ////////////////////////////////////////////////////////////////////// - SDOString DataObjectImpl::findPropertyContainer(const SDOString& path, DataObjectImpl** din) - { - // initially check for "#/" which indicates that we need to find the root object first - - if (path.length() <= 2) - { - if (path[0] == '#') - { - DataObjectImpl* root = this; - while (root->getContainerImpl() != 0) - { - root = root->getContainerImpl(); - } - *din = root; - return SDOString(); - } - } - - if (path[0] == '#' && path[1] == '/') - { - DataObjectImpl* root = this; - while (root->getContainerImpl() != 0) - { - root = root->getContainerImpl(); - } - return root->findPropertyContainer(SDOString(path, 2, string::npos), din); - } - - DataObjectImpl* d; - size_t slashPos = path.find('/'); // i is the subscript of the found character - SDOString remaining; - SDOString token; - - if (slashPos != string::npos) // If we found a slash character - { - if (slashPos > 0) // If there is something before the slash - { - token.assign(path, 0, slashPos); - } - if ((path.length() - slashPos) > 1) // If there is something after the slash - { - remaining.assign(path, slashPos + 1, string::npos); - } - } - else - { - remaining = path; - } - - if (token.empty()) - { - if (remaining == "..") - { - /* Its the container itself */ - *din = getContainerImpl(); - return SDOString(); - } - - /* Its this data object - property could be empty or - valid or invalid - user must check */ - *din = this; - return remaining; - } - - if (token == "..") { - /* Its derived from the container */ - d = getContainerImpl(); - /* carry on trying to find a property */ - if (d != 0) { - return d->findPropertyContainer(remaining, din); - } - /* Give up - no container */ - *din = 0; - return SDOString(); - } - - /* Try to find a property ....*/ - long l; - d = findDataObject(token, &l); - if (d != 0) { - return d->findPropertyContainer(remaining, din); - } - - /* Give up its not in the tree */ - *din = 0; - return SDOString(); - } - - - - - // Returns a read-only List of the Properties currently used in thIs DataObject. - // ThIs list will contain all of the properties in getType().getProperties() - // and any properties where isSet(property) is true. - // For example, properties resulting from the use of - // open or mixed XML content are present if allowed by the Type. - // The list does not contain duplicates. - // The order of the properties in the list begins with getType().getProperties() - // and the order of the remaining properties is determined by the implementation. - // The same list will be returned unless the DataObject is updated so that - // the contents of the list change - // @return the list of Properties currently used in thIs DataObject. - - PropertyList /* Property */ DataObjectImpl::getInstanceProperties() - { - std::vector theVec; - PropertyList propList = getType().getProperties(); - for (int i = 0 ; i < propList.size() ; ++i) - { - Property& p = propList[i]; - theVec.insert(theVec.end(),(PropertyImpl*)&p); - } - std::list::iterator j; - for (j = openProperties.begin() ; - j != openProperties.end() ; ++j) - { - theVec.insert(theVec.end(),&(*j)); - } - return PropertyList(theVec); - } - - void DataObjectImpl::setInstancePropertyType(unsigned int index, - const Type* t) - { - if (index >= openBase && index - openBase < openProperties.size()) - { - std::list::iterator j; - unsigned int count = openBase; - for (j = openProperties.begin() ; - j != openProperties.end() ; ++j) - { - if (count == index) - { - openProperties.insert(j, - PropertyImpl(getType(), - (*j).getName(), - (TypeImpl&)*t, - (*j).isMany(), - (*j).isReadOnly(), - (*j).isContainment())); - - DataFactory* df = factory; - ((DataFactoryImpl*)df)->addOpenProperty( - PropertyImpl(getType(), - (*j).getName(), - (TypeImpl&)*t, - (*j).isMany(), - (*j).isReadOnly(), - (*j).isContainment())); - - openProperties.erase(j); - - return; - } - count++; - } - } - return; - } - - // Returns the Sequence for thIs DataObject. - // When Type.isSequencedType() == true, - // the Sequence of a DataObject corresponds to the - // XML elements representing the values of its properties. - // Updates through DataObject and the Lists or Sequences returned - // from DataObject operate on the same data. - // When Type.isSequencedType() == false, null is returned. - // @return the Sequence or null. - - SequenceImpl* DataObjectImpl::getSequenceImpl() - { - - return sequence; - } - - SequencePtr DataObjectImpl::getSequence() - { - return (SequencePtr)sequence; - } - - SequencePtr DataObjectImpl::getSequence(const char* path) - { - return getSequence(SDOString(path)); - } - - SequencePtr DataObjectImpl::getSequence(const SDOString& path) - { - DataObject* d = (DataObject*)getDataObject(path); - if (d) return d->getSequence(); - return 0; - } - - SequencePtr DataObjectImpl::getSequence(unsigned int propertyIndex) - { - DataObject* d = (DataObject*)getDataObject(propertyIndex); - if (d) return d->getSequence(); - return 0; - } - - SequencePtr DataObjectImpl::getSequence(const Property& property) - { - DataObject* d = (DataObject*)getDataObject(property); - if (d) return d->getSequence(); - return 0; - } - - - - ChangeSummaryPtr DataObjectImpl::getChangeSummary(const char* path) - { - // Can path really be a null pointer? - if (path == 0) - { - return(getChangeSummary(SDOString())); - } - else - { - return(getChangeSummary(SDOString(path))); - } - } - - ChangeSummaryPtr DataObjectImpl::getChangeSummary(const SDOString& path) - { - DataObjectImpl* d = getDataObjectImpl(path); - return d->getChangeSummary(); - } - - ChangeSummaryPtr DataObjectImpl::getChangeSummary(unsigned int propIndex) - { - DataObjectImpl* d = getDataObjectImpl(propIndex); - return d->getChangeSummary(); - } - - ChangeSummaryPtr DataObjectImpl::getChangeSummary(const Property& prop) - { - DataObjectImpl* d = getDataObjectImpl(prop); - return d->getChangeSummary(); - - } - - ChangeSummaryPtr DataObjectImpl::getChangeSummary() - { - if (getType().isChangeSummaryType()) - { - return (ChangeSummaryPtr)localCS; - } - // The changesummaryobject MUST be a change summary type - // but as an additional check against looping, I will use - // a redundent getSummary() method. - // TODO - remove this. - if (changesummaryobject != 0) return - (ChangeSummaryPtr)(changesummaryobject->getSummary()); - return 0; - } - - - ChangeSummaryImpl* DataObjectImpl::getChangeSummaryImpl() - { - if (getType().isChangeSummaryType()) - { - return localCS; - } - // The changesummaryobject MUST be a change summary type - // but as an additional check against looping, I will use - // a redundent getSummary() method. - // TODO - remove this. - if (changesummaryobject != 0) return changesummaryobject->getSummary(); - return 0; - } - - ChangeSummaryImpl* DataObjectImpl::getSummary() - { - return localCS; - } - - // sets a property of either this object or an object reachable from it, - // as identified by the specified path, - // to the specified value. - // @param path the path to a valid object and property. - // @param value the new value for the property. - - void DataObjectImpl::setDataObject(const char* path, DataObjectPtr value) - { - setDataObject(SDOString(path), value); - } - - void DataObjectImpl::setDataObject(const SDOString& path, DataObjectPtr value) - { - DataObjectImpl* d; - SDOString prop = findPropertyContainer(path, &d); - if (d != 0) - { - if (!prop.empty()) { - const PropertyImpl* p = d->getPropertyImpl(prop); - if (p == 0 && d->getType().isOpenType()) - { - if (value != 0) - { - p = d->defineDataObject(prop, value->getType()); - } - } - if (p != 0) - { - if (p->isMany()) - { - DataObjectList& dol = d->getList((Property&)*p); - long index; - DataObjectImpl* dx = d->findDataObject(prop,&index); - if (index >= 0) - { - if(index < dol.size()) - { - dol.setDataObject((unsigned int)index,value); - } - else - { - dol.append(value); - } - return; - } - string msg("Set of data object on many valued item"); - msg += path; - SDO_THROW_EXCEPTION("setDataObject", SDOUnsupportedOperationException, - msg.c_str()); - } - else - { - d->setDataObject((Property&)*p,value); - return; - } - } - } - } - - string msg("Path not valid:"); - msg += path; - SDO_THROW_EXCEPTION("setDataObject", SDOPathNotFoundException, - msg.c_str()); - } - - void DataObjectImpl::validateIndex(unsigned int index) - { - PropertyList pl = getType().getProperties(); - - if (index >= pl.size()) { - - // open type support - if (getType().isOpenType()) - { - if (index < openBase + openProperties.size()) - { - return; - } - } - - string msg("Index of property out of range:"); - msg += index; - SDO_THROW_EXCEPTION("Index Validation", SDOIndexOutOfRangeException, - msg.c_str()); - } - } - - void DataObjectImpl::transferChildren(DataObject* d, DataFactory* f) - { - bool isData = false; - PropertyList pl = d->getInstanceProperties(); - for (int i=0;iisSet(pl[i]) || d->isNull(pl[i])) - { - continue; - } - if (pl[i].isMany()) - { - DataObjectList& dl = d->getList(pl[i]); - for (int j=0;jsetDataFactory(f); - if (!isData)transferChildren(d2,f); - } - } - } - else - { - DataObject* d3 = d->getDataObject(pl[i]); - if (d3) - { - ((DataObjectImpl*)d3)->setDataFactory(f); - if (!isData)transferChildren(d3,f); - } - } - } - } - - - - void DataObjectImpl::checkFactory(DataObjectPtr dob, - unsigned int propertyIndex) - { - - DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dob; - - if (d->getDataFactory() == getDataFactory()) return; - - // Temporary alteration to test the feasibility and - // problems associated with allowing data object 'migration' - // lets move this one and all its children to the factory of the - // new parent if the factories are compatible. - - DataFactoryImpl* f = (DataFactoryImpl*)getDataFactory(); - - if (d->getContainer() != 0) - { - string msg("Insertion of object from another factory is only allowed if the parent is null: "); - const Type& t = d->getType(); - msg += t.getURI(); - msg += "#"; - msg += t.getName(); - msg += " into property "; - msg += getProperty(propertyIndex).getName(); - msg += " of "; - msg += getType().getURI(); - msg += "#"; - msg += getType().getName(); - SDO_THROW_EXCEPTION("checkFactory", SDOInvalidConversionException, - msg.c_str()); - } - - if (f->isCompatible(d->getDataFactory(),d)) - { - d->setDataFactory(getDataFactory()); - transferChildren(d,getDataFactory()); - return; - } - - - // This is the default position.... - - string msg("Insertion from incompatible factory "); - const Type& t = d->getType(); - msg += t.getURI(); - msg += "#"; - msg += t.getName(); - msg += " into property "; - msg += getProperty(propertyIndex).getName(); - msg += " of "; - msg += getType().getURI(); - msg += "#"; - msg += getType().getName(); - SDO_THROW_EXCEPTION("checkFactory", SDOInvalidConversionException, - msg.c_str()); - } - - - void DataObjectImpl::checkType( const Property& prop, - const Type& objectType) - { - const Type& propType = prop.getType(); - if (propType.equals(objectType)) return; - - DataFactory* df = (DataFactory*)factory; - - const TypeImpl* ti = ((DataFactoryImpl*)df)->findTypeImpl - (objectType.getURI(),objectType.getName()); - if (ti != 0) - { - do - { - ti = (const TypeImpl*)ti->getBaseType(); - if (ti == 0) break; - if (propType.equals(*ti)) return; - } while (ti != 0); - - // allow types of any substitutes - const PropertyImpl* pi = - getPropertyImpl(getPropertyIndex(prop)); - if (pi != 0) - { - unsigned int subcount = pi->getSubstitutionCount(); - for (int i=0;igetSubstitutionType(i); - if (tsub != 0 && tsub->equals(objectType)) return; - } - } - } - - // no match.. - string msg("Insertion of object of incompatible type "); - msg += objectType.getURI(); - msg += "#"; - msg += objectType.getName(); - msg += " into property of type "; - msg += propType.getURI(); - msg += "#"; - msg += propType.getName(); - SDO_THROW_EXCEPTION("TypeCheck", SDOInvalidConversionException, - msg.c_str()); - } - - void DataObjectImpl::setDataObject(unsigned int propertyIndex, DataObjectPtr value) - { - setDataObject(getProperty(propertyIndex), value); - } - - void DataObjectImpl::setDataObject(const Property& prop, DataObjectPtr value) - { - unsigned int propertyIndex = getPropertyIndex(prop); - - - if (value != 0) - { - checkFactory(value, propertyIndex); - checkType(prop,value->getType()); - } - - validateIndex(propertyIndex); - - if (prop.isReference() && value != 0) - { - // just need to make sure that the object is already part of our - // tree. - DataObjectImpl* r1 = this; - while (r1->getContainerImpl() != 0) - { - r1 = r1->getContainerImpl(); - } - DataObjectImpl* r2 = (DataObjectImpl*)(DataObject*)value; - while (r2->getContainerImpl() != 0) - { - r2 = r2->getContainerImpl(); - } - if (r1 != r2) - { - string msg("Set of a reference to an object outside the graph"); - SDO_THROW_EXCEPTION("setDataObject", SDOUnsupportedOperationException, - msg.c_str()); - } - } - - if ((prop.isMany())) - { - string msg("Set operation on a many valued property:"); - msg += prop.getName(); - SDO_THROW_EXCEPTION("setDataObject", SDOUnsupportedOperationException, - msg.c_str()); - } - - - if (value == 0) - { - PropertyValueMap::iterator j; - for (j = PropertyValues.begin(); j != PropertyValues.end(); ++j) - { - if ((*j).first == propertyIndex) { - if (prop.isReference()) - { - ((*j).second)->unsetReference(this, prop); - } - else - { - // log both deletion and change - change is not - // automatically recorded by deletion. - ((*j).second)->logDeletion(); - } - logChange(prop); - (*j).second = RefCountingPointer(0); - - return; - } - } - logChange(prop); - PropertyValues.insert(PropertyValues.end(),rdo(propertyIndex,(DataObjectImpl*)0)); - return; - } - - DataObject* dob = value; - PropertyValueMap::iterator i; - for (i = PropertyValues.begin(); i != PropertyValues.end(); ++i) - { - if ((*i).first == propertyIndex) { - - if (prop.isReference()) - { - ((*i).second)->unsetReference(this, prop); - } - else - { - // log both deletion and change - change is not - // automatically recorded by deletion. - ((*i).second)->logDeletion(); - } - logChange(prop); - - (*i).second = RefCountingPointer((DataObjectImpl*)dob); - - - if (prop.isReference()) - { - ((DataObjectImpl*)dob)->setReference(this, prop); - } - else - { - logCreation((*i).second, this, prop); - } - return; - } - } - if (prop.isReference()) - { - ((DataObjectImpl*)dob)->setReference(this, prop); - } - else - { - ((DataObjectImpl*)dob)->setContainer(this); - ((DataObjectImpl*)dob)->setApplicableChangeSummary(); - // log creation before putting into property values. - // also log change - not done by logCreation - logCreation((DataObjectImpl*)dob, this, prop); - } - - logChange(prop); - - PropertyValues.insert(PropertyValues.end(),rdo(propertyIndex,(DataObjectImpl*)dob)); - return; - } - - bool DataObjectImpl::isValid(const char* path) - { - // Can path really be a null pointer? - if (path == 0) - { - return(isValid(SDOString())); - } - else - { - return(isValid(SDOString(path))); - } - - } - - bool DataObjectImpl::isValid(const SDOString& path) - { - DataObjectImpl* d; - SDOString prop = findPropertyContainer(path, &d); - if (d != 0) { - if (!prop.empty()) { - const Property& p = d->getProperty(prop); - return d->isValid(p); - } - } - string msg("Invalid path:"); - msg += path; - SDO_THROW_EXCEPTION("isSet" ,SDOPathNotFoundException, - msg.c_str()); - } - - // Returns whether a property of either this object or an object reachable - // from it, as identified by the specified path, - // is considered to be set. - // @param path the path to a valid Object* and property. - - bool DataObjectImpl::isSet(const char* path) - { - // Can path really be a null pointer? - if (path == 0) - { - return(isSet(SDOString())); - } - else - { - return(isSet(SDOString(path))); - } - } - - bool DataObjectImpl::isSet(const SDOString& path) - { - DataObjectImpl* d; - SDOString prop = findPropertyContainer(path, &d); - if (d != 0) { - if (!prop.empty()) { - const Property& p = d->getProperty(prop); - return d->isSet(p); - } - } - string msg("Invalid path:"); - msg += path; - SDO_THROW_EXCEPTION("isSet" ,SDOPathNotFoundException, - msg.c_str()); - } - - bool DataObjectImpl::isValid(unsigned int propertyIndex) - { - return isValid(getProperty(propertyIndex)); - } - - bool DataObjectImpl::isValid(const Property& p) - { - if (p.isDefaulted()) return true; - if (isSet(p))return true; - return false; - } - - bool DataObjectImpl::isSet(unsigned int propertyIndex) - { - return isSet(getProperty(propertyIndex), propertyIndex); - } - - bool DataObjectImpl::isSet(const Property& property) - { - return isSet(property, getPropertyIndex(property)); - } - - bool DataObjectImpl::isSet(const Property& prop, unsigned int propertyIndex) - { - PropertyValueMap::iterator i; - for (i = PropertyValues.begin(); i != PropertyValues.end(); ++i) - { - if ((*i).first == propertyIndex) { - if (prop.isMany()) - { - DataObjectImpl* dol = (*i).second; - if (dol != 0 && dol->getList().size() == 0) - { - return false; - } - } - return true; - } - } - return false; - } - - - // unSets a property of either this Object or an Object reachable from it, - // as identified by the specified path. - // @param path the path to a valid Object and property. - // @see #unSet(Property) - - void DataObjectImpl::unset(const char* path) - { - // Can path really be a null pointer? - if (path == 0) - { - unset(SDOString()); - } - else - { - unset(SDOString(path)); - } - } - - void DataObjectImpl::unset(const SDOString& path) - { - DataObjectImpl* d; - SDOString prop = findPropertyContainer(path, &d); - if (d != 0) - { - if (!prop.empty()) - { - const Property& p = d->getProperty(prop); - if (p.isMany()) - { - SDOString subscript; - size_t beginbrace = prop.find('['); - if (beginbrace != string::npos) - { - size_t endbrace = prop.find(']', ++beginbrace); - if (endbrace != string::npos) { - subscript = - prop.substr(beginbrace, (endbrace - beginbrace)); - } - unsigned int i = atoi(subscript.c_str()); - if (i > 0) { - i--; - DataObjectList& li = d->getList(p); - li.remove(i); - } - return; - } - size_t firstdot = prop.find('.'); - if (firstdot != string::npos) { - subscript = prop.substr(++firstdot); - unsigned int i = atoi(subscript.c_str()); - DataObjectList& li = d->getList(p); - li.remove(i); - return; - } - } - d->unset(p); - return; - } - } - - string msg("Invalid path:"); - msg += path; - SDO_THROW_EXCEPTION("unset", SDOPathNotFoundException, - msg.c_str()); - } - - void DataObjectImpl::unset(unsigned int propertyIndex) - { - unset(getProperty(propertyIndex)); - } - - void DataObjectImpl::unset(const Property& p) - { - PropertyValueMap::iterator i; - unsigned int index = getPropertyIndex(p); - - if (getType().isSequencedType()) - { - Sequence* sq = getSequence(); - sq->removeAll(p); - } - - for (i = PropertyValues.begin(); i != PropertyValues.end(); ++i) - { - if ((*i).first == index) { - DataObjectImplPtr dol = (*i).second; - if (p.getType().isDataType()) - { - dol->clearReferences(); - logChange(index); - if (p.isMany()) { - DataObjectList& dl = dol->getList(); - while (dl.size() > 0) - { - RefCountingPointer dli = dl.remove(0); - } - } - else - { - PropertyValues.erase(i); - } - } - else { - // if its a reference, we dont want to delete anything - if (!p.isReference()) - { - if (dol) { - dol->clearReferences(); - if (p.isMany()) { - DataObjectList& dl = dol->getList(); - while (dl.size() > 0) - { - if (p.getType().isDataObjectType()) - { - DataObject* dob = dl[0]; - ((DataObjectImpl*)dob)->logDeletion(); - } - // the remove will record a change - // remove will also clear the container. - RefCountingPointer dli = dl.remove(0); - } - } - else - { - PropertyValues.erase(i); - dol->logDeletion(); - logChange(index); - } - } - else - { - logChange(index); - PropertyValues.erase(i); - } - } - else { - logChange(index); - PropertyValues.erase(i); - } - } - if (getType().isOpenType() && index >= openBase) - { - if (p.isMany()) - { - PropertyValues.erase(i); - } - undefineProperty(index); - } - return; - } - } - return; - } - - - - // Returns the value of a DataObject property identified by - // the specified path. - // @param path the path to a valid object and property. - // @return the DataObject value of the specified property. - - RefCountingPointer DataObjectImpl::getDataObject(const char* path) - { - return getDataObject(SDOString(path)); - } - - RefCountingPointer DataObjectImpl::getDataObject(const SDOString& path) - { - DataObjectImpl* ptr = getDataObjectImpl(path); - return RefCountingPointer ((DataObject*)ptr); - } - - DataObjectImpl* DataObjectImpl::getDataObjectImpl(const SDOString& path) - { - - DataObjectImpl* d = 0; - SDOString prop = findPropertyContainer(path,&d); - // char* prop = findPropertyContainer(path,&d); - if (d != 0) { - if (!prop.empty()) { - if (prop.find_first_of("[.") != string::npos) { - /* Its a multlvalued property */ - long l; - DataObjectImpl* theob = d->findDataObject(prop,&l); - if (theob == 0) { - string msg("Get DataObject - index out of range:"); - msg += path; - SDO_THROW_EXCEPTION("getDataObject" ,SDOIndexOutOfRangeException, - msg.c_str()); - } - return theob; - } - else - { - if (prop.length() == 0) - { - return d; - } - const Property& p = d->getProperty(prop); - return d->getDataObjectImpl(p); - } - } - else { - return d; - } - } - - string msg("Invalid path:"); - msg += path; - SDO_THROW_EXCEPTION("getDataObject" ,SDOPathNotFoundException, - msg.c_str()); - } - - - RefCountingPointer DataObjectImpl::getDataObject(unsigned int propertyIndex) - { - if ((getProperty(propertyIndex).isMany())) - { - string msg("get operation on a many valued property:"); - msg += getProperty(propertyIndex).getName(); - SDO_THROW_EXCEPTION("getDataObject", SDOUnsupportedOperationException, - msg.c_str()); - } - DataObjectImpl* ptr = getDataObjectImpl(propertyIndex);; - return RefCountingPointer((DataObject*)ptr); - } - - DataObjectImpl* DataObjectImpl::getDataObjectImpl(unsigned int propertyIndex) - { - PropertyValueMap::iterator i; - for (i = PropertyValues.begin(); i != PropertyValues.end(); ++i) - { - if ((*i).first == propertyIndex) - { - DataObject* dob = (*i).second; - if (dob == 0 || ((DataObjectImpl*)dob)->isNull())return 0; - return (DataObjectImpl*)dob; - } - } - return 0; - } - - - RefCountingPointer DataObjectImpl::getDataObject(const Property& property) - { - DataObjectImpl* ptr = getDataObjectImpl(property); - return RefCountingPointer((DataObject*)ptr); - } - - DataObjectImpl* DataObjectImpl::getDataObjectImpl(const Property& property) - { - return getDataObjectImpl(getPropertyIndex(property)); - } - - - - - // Returns a new DataObject contained by this Object using the specified property, - // which must be a containment property. - // The type of the created Object is the declared type of the specified property. - - RefCountingPointer DataObjectImpl::createDataObject(const SDOString& propertyName) - { - // Throws runtime exception for type or property not found - - const Property& p = getProperty(propertyName); - return createDataObject(p); - } - - // Returns a new DataObject contained by this Object using the specified property, - // which must be a containment property. - // The type of the created Object is the declared type of the specified property. - - RefCountingPointer DataObjectImpl::createDataObject(const char* propertyName) - { - // Can propertyName really be a null pointer? - if (propertyName == 0) - { - return(createDataObject(SDOString())); - } - else - { - return(createDataObject(SDOString(propertyName))); - } - } - - // Returns a new DataObject contained by this Object using the specified property, - // which must be a containment property. - // The type of the created Object is the declared type of the specified property. - - RefCountingPointer DataObjectImpl::createDataObject(unsigned int propertyIndex) - { - const Property& p = getProperty(propertyIndex); - return createDataObject(p); - } - - // Returns a new DataObject contained by this Object using the specified property, - // which must be a containment property. - // The type of the created Object is the declared type of the specified property. - - RefCountingPointer DataObjectImpl::createDataObject(const Property& property) - { - const Type& tp = property.getType(); - return createDataObject(property,tp.getURI(), tp.getName()); - } - - - // Returns a new DataObject contained by this Object using the specified property, - // which must be a containment property. - // The type of the created Object is the declared type of the specified property. - - RefCountingPointer DataObjectImpl::createDataObject(const Property& property, const char* namespaceURI, - const char* typeName) - { - if (!property.isContainment()) - { - string msg("Create data object on non-containment property:"); - msg += property.getName(); - SDO_THROW_EXCEPTION("createDataObject", SDOUnsupportedOperationException, - msg.c_str()); - } - - DataFactory* df = getDataFactory(); - if (property.isMany()) { - /* add to the list */ - RefCountingPointer ptr = df->create(namespaceURI, typeName); - DataObject* dob = ptr; - ((DataObjectImpl*)dob)->setContainer(this); - ((DataObjectImpl*)dob)->setApplicableChangeSummary(); - - // log creation before adding to list - the change must record the old state - // of the list - logCreation(((DataObjectImpl*)dob), this, property); - //logChange(property); - - DataObjectImpl* theDO = getDataObjectImpl(property); - if ( theDO == 0) { /* No value set yet */ - unsigned int ind = getPropertyIndex(property); - RefCountingPointer listptr = - df->create(Type::SDOTypeNamespaceURI,"DataObject"); - - DataObject* doptr = listptr; - PropertyValues.insert(PropertyValues.end(),rdo(ind,(DataObjectImpl*)doptr)); - ((DataObjectImpl*)doptr)->setContainer(this); - ((DataObjectImpl*)doptr)->setApplicableChangeSummary(); - - DataObjectListImpl* list = new DataObjectListImpl(df, - this, ind, namespaceURI,typeName); - - ((DataObjectImpl*)doptr)->setList(list); - // the append will log a change to the property. - list->append(ptr); - - // now done by list append - //if (getType().isSequencedType()) - //{ - // SequenceImpl* sq = getSequenceImpl(); - // sq->push(property,0); - //} - } - else - { - DataObjectList& list = theDO->getList(); - // the append will log a change to the property, and update the - // sequence - list.append(ptr); - //if (getType().isSequencedType()) - //{ - // SequenceImpl* sq = getSequenceImpl(); - // sq->push(property,list.size()-1); - //} - - } - return ptr; - - } - else { - unset(property); - DataObjectImpl* ditem = - new DataObjectImpl(df, df->getType(namespaceURI, typeName)); - ditem->setContainer(this); - ditem->setApplicableChangeSummary(); - - // log both creation and change - creations no longer log - // changes automatically. - - logCreation(ditem, this, property); - logChange(property); - - PropertyValues.insert(PropertyValues.end(), - rdo(getPropertyIndex(property),ditem)); - if (getType().isSequencedType()) - { - SequenceImpl* sq = getSequenceImpl(); - sq->push(property,0); - } - return RefCountingPointer((DataObject*)ditem); - } - return 0; - } - - void DataObjectImpl::setList( DataObjectList* theList) - { - listValue = (DataObjectListImpl*)theList; - } - - - bool DataObjectImpl::remove(DataObjectImpl* indol) - { - PropertyValueMap::iterator i; - for (i = PropertyValues.begin(); i != PropertyValues.end(); ++i) - { - const Property& prop = getProperty((*i).first); - if (prop.isMany()) - { - DataObjectList& dol = ((*i).second)->getList(); - for (int j=0;j< dol.size(); j++) - { - if (dol[j] == indol) - { - indol->logDeletion(); - logChange(prop); - indol->setContainer(0); - dol.remove(j); - return true; - } - } - } - DataObjectImpl* tmp = (*i).second; - if (tmp == indol) { - indol->logDeletion(); - logChange(prop); - indol->setContainer(0); - PropertyValues.erase(i); - return true; - } - } - return false; - } - - // remove this Object from its container and dont unSet all its properties. - - void DataObjectImpl::detach() - { - // remove this data object from its tree - clearReferences(); - if (container == 0) return; - container->remove(this); - return ; - } - - void DataObjectImpl::clear() - { - // clear this objects state - PropertyValueMap::iterator i = PropertyValues.begin(); - - while (i != PropertyValues.end()) - { - unset((*i).first); - i = PropertyValues.begin(); - } - return ; - } - - // Returns the containing Object - // of 0 if there is no container. - - RefCountingPointer DataObjectImpl::getContainer() - { - DataObject* dob = (DataObject*)container; - return RefCountingPointer (dob); - } - - DataObjectImpl* DataObjectImpl::getContainerImpl() - { - return container; - } - - void DataObjectImpl::setContainer(DataObjectImpl* d) - { - container = d; - } - - const Property* DataObjectImpl::findInProperties(DataObject* ob) - { - PropertyValueMap::iterator i; - for (i = PropertyValues.begin() ;i != PropertyValues.end() ; ++i) - { - if (getProperty((*i).first).isReference()) continue; - if (getProperty((*i).first).isMany()) - { - DataObjectList& dl = ((*i).second)->getList(); - for (int j = 0 ; j < dl.size(); j++) - { - if (dl[j] == ob) - { - return &(getProperty((*i).first)); - } - } - } - else - { - if ((*i).second == ob) - { - return &(getProperty((*i).first)); - } - } - } - return 0; // this can happen if the object has been detached - - //string msg("Object cannot find its containing property"); - //SDO_THROW_EXCEPTION("FindInProperties" ,SDOPropertyNotFoundException, - // msg.c_str()); - } - - // Return the Property of the data Object containing this data Object - // or 0 if there is no container. - - const Property& DataObjectImpl::getContainmentProperty() - { - if (container != 0) { - const Property* p = container->findInProperties(this); - if (p != 0)return *p; - } - SDO_THROW_EXCEPTION("getContainmentProperty" ,SDOPropertyNotFoundException, - "Object cannot find its containment property"); - } - - - // Returns the data Object's type. - // The type defines the properties available for reflective access. - - const Type& DataObjectImpl::getType() - { - return (const Type&)(*ObjectType); - } - - const Type::Types DataObjectImpl::getTypeEnum() - { - return ObjectType->getTypeEnum(); - } - - const TypeImpl& DataObjectImpl::getTypeImpl() - { - return (const TypeImpl&)*ObjectType; - } - - - // open type support - - const Property& DataObjectImpl::getProperty(const char* prop) - { - return getProperty(SDOString(prop)); - } - - const Property& DataObjectImpl::getProperty(const SDOString& prop) - { - PropertyImpl* pi = getPropertyImpl(prop); - if (pi == 0) - { - string msg("Cannot find property:"); - msg += prop; - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException, - msg.c_str()); - - } - return (Property&)*pi; - } - - PropertyImpl* DataObjectImpl::getPropertyImpl(const SDOString& prop) - { - PropertyImpl* pi = getTypeImpl().getPropertyImpl(prop); - if (pi != 0) return pi; - - if (getType().isOpenType()) - { - std::list::iterator j; - for (j=openProperties.begin(); - j != openProperties.end(); ++j) - { - if (!strcmp((*j).getName(), prop.c_str())) - { - return (PropertyImpl*)&(*j); - } - } - } - return 0; - } - - DataFactory* DataObjectImpl::getDataFactory() - { - return factory; - } - - void DataObjectImpl::setDataFactory(DataFactory* df) - { - ObjectType = (TypeImpl*)&(df->getType(ObjectType->getURI(), - ObjectType->getName())); - factory = df; - } - - /////////////////////////////////////////////////////////////////////////// - // These finally are the setters/getters for primitives given - // that the data object is a primitive type. - /////////////////////////////////////////////////////////////////////////// - - - bool DataObjectImpl::getBoolean() - { - return getTypeImpl().convertToBoolean(value, valuelength); - } - - - char DataObjectImpl::getByte() - { - return getTypeImpl().convertToByte(value,valuelength); - - } - - - wchar_t DataObjectImpl::getCharacter() - { - return getTypeImpl().convertToCharacter(value,valuelength); - - } - - long DataObjectImpl::getInteger() - { - return getTypeImpl().convertToInteger(value,valuelength); - - } - - - long double DataObjectImpl::getDouble() - { - return getTypeImpl().convertToDouble(value,valuelength); - } - - - float DataObjectImpl::getFloat() - { - return getTypeImpl().convertToFloat(value,valuelength); - - } - - - - int64_t DataObjectImpl::getLong() - { - return getTypeImpl().convertToLong(value,valuelength); - - } - - - short DataObjectImpl::getShort() - { - return getTypeImpl().convertToShort(value,valuelength); - - } - - unsigned int DataObjectImpl::getString( wchar_t* outptr, unsigned int max) - { - if (outptr == 0 || max == 0) return valuelength; - return getTypeImpl().convertToString(value, outptr, valuelength, max); - - } - unsigned int DataObjectImpl::getBytes( char* outptr, unsigned int max) - { - if (outptr == 0 || max == 0) return valuelength; - return getTypeImpl().convertToBytes(value, outptr, valuelength, max); - - } - - const char* DataObjectImpl::getCString() - { - return getTypeImpl().convertToCString(value, &asStringBuffer, valuelength); - - } - - const SDODate DataObjectImpl::getDate() - { - return getTypeImpl().convertToDate(value, valuelength); /* time_t == long*/ - - } - - DataObjectImpl* DataObjectImpl::getDataObject() - { - return (DataObjectImpl*)getTypeImpl().convertToDataObject(value, valuelength); - - } - - - void DataObjectImpl::setBoolean(bool invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - } - - - void DataObjectImpl::setByte(char invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - - } - - - void DataObjectImpl::setCharacter(wchar_t invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - } - - void DataObjectImpl::setString(const wchar_t* invalue, unsigned int len) - { - valuelength = getTypeImpl().convert(&value,invalue, len); - return; - } - - void DataObjectImpl::setBytes(const char* invalue, unsigned int len) - { - valuelength = getTypeImpl().convert(&value,invalue, len); - return; - } - - void DataObjectImpl::setInteger(long invalue) - { -#if __WORDSIZE ==64 - valuelength = getTypeImpl().convert(&value,(int64_t)invalue); -#else - valuelength = getTypeImpl().convert(&value,invalue); -#endif - return; - } - - - void DataObjectImpl::setDouble(long double invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - } - - void DataObjectImpl::setFloat(float invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - - } - - - void DataObjectImpl::setLong(int64_t invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - } - - - void DataObjectImpl::setShort(short invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - - } - - void DataObjectImpl::setCString(const char* invalue) - { - setCString(SDOString(invalue)); - } - - void DataObjectImpl::setCString(const SDOString& invalue) - { - valuelength = getTypeImpl().convert(&value, invalue); - return; - } - - void DataObjectImpl::setDate(const SDODate invalue) - { - valuelength = getTypeImpl().convertDate(&value,invalue); /* time_t == long*/ - return; - } - - void DataObjectImpl::setDataObject(DataObject* invalue) - { - valuelength = getTypeImpl().convert(&value,invalue); - return; - } - - void DataObjectImpl::setNull() - { - isnull = true; - } - - bool DataObjectImpl::isNull() - { - return isnull; - } - - void DataObjectImpl::unsetNull() - { - isnull = false; - } - - - DataObjectImpl::DataObjectImpl(const TypeImpl& t) - { - ObjectType = (TypeImpl*)&t; - container = 0; - value = 0; /* Will be initialized when used */ - valuelength = 0; - asStringBuffer = 0; -// asXPathBuffer = 0; - isnull = false; - - // open type support - openBase = t.getPropertiesSize() ; - - userdata = (void*)0xFFFFFFFF; - - if (t.isChangeSummaryType()) - { - changesummaryobject = 0; - localCS = new ChangeSummaryImpl(); - } - else - { - changesummaryobject = 0; - localCS = 0; - } - - if (getType().isSequencedType()) sequence = new SequenceImpl(this); - else sequence = 0; - } - - - - DataObjectImpl::DataObjectImpl(DataFactory* df, const Type& t) : ObjectType((TypeImpl*)&t), - factory(df) - { - container = 0; - value = 0; - valuelength = 0; - asStringBuffer = 0; -// asXPathBuffer = 0; - isnull = false; - - // open type support - openBase = ObjectType->getPropertiesSize() ; - - userdata = (void*)0xFFFFFFFF; - - if (ObjectType->isChangeSummaryType()) - { - changesummaryobject = 0; - localCS = new ChangeSummaryImpl(); - } - else - { - changesummaryobject = 0; - localCS = 0; - } - - if (getType().isSequencedType()) - { - sequence = new SequenceImpl(this); - } - else - { - sequence = 0; - } - } - - void DataObjectImpl::deleteValue() - { - switch (getTypeEnum()) - { - case Type::BooleanType: - case Type::ByteType: - case Type::CharacterType: - case Type::IntegerType: - case Type::DateType: - case Type::DoubleType: - case Type::FloatType: - case Type::LongType: - case Type::ShortType: - case Type::BytesType: - delete (char*)value; - return; - - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - delete (wchar_t*)value; - return; - - case Type::DataObjectType: - return; - - default: - return; - } - } - - DataObjectImpl::~DataObjectImpl() - { - // We do not want to log changes to our own deletion - // if this DO owns the ChangeSummary. Do not delete - // it here as contained DOs still have a reference to it. - - if (getTypeImpl().isChangeSummaryType()) - { - ChangeSummaryPtr c = getChangeSummary(); - if (c) { - if (c->isLogging()) - { - c->endLogging(); - } - } - } - - - clearReferences(); - PropertyValueMap::iterator i = PropertyValues.begin(); - while (i != PropertyValues.end()) - { - unsigned int pindx = (*i).first; - unset(pindx); - i = PropertyValues.begin(); - if (i != PropertyValues.end() && (*i).first == pindx) - { - // unset has not removed the item from the list - do it - // here instead - PropertyValues.erase(i); - i = PropertyValues.begin(); - } - } - - // Theory: A DO cant get here if its still attached to anything, - //so we dont need to detach.... - //detach(); - - - if (asStringBuffer != 0) delete asStringBuffer; -// if (asXPathBuffer != 0) delete asXPathBuffer; - - if (value != 0) - { - if (getType().isDataType())deleteValue(); - } - - - - if (getType().isSequencedType()) - { - if (sequence != 0) delete sequence; - } - - - if (getTypeImpl().isChangeSummaryType() ) - { - if (getChangeSummary() != 0) - { - delete localCS; - localCS = 0; - } - } - } - - void DataObjectImpl::setApplicableChangeSummary() - { - changesummaryobject = 0; - if (getType().isChangeSummaryType()) - { - changesummaryobject = 0; - return; - } - else { - DataObjectImpl* dob = getContainerImpl(); - while (dob != 0) { - if (dob->getType().isChangeSummaryType()) - { - changesummaryobject = dob; - return; - } - dob = dob->getContainerImpl(); - } - } - - } - - void DataObjectImpl::logCreation(DataObjectImpl* dol, DataObjectImpl* cont, - const Property& theprop) - { - if (getChangeSummaryImpl() != 0 && getChangeSummaryImpl()->isLogging()) - { - getChangeSummaryImpl()->logCreation(dol,cont,theprop); - } - } - - void DataObjectImpl::logDeletion() - { - // Only log if ChangeSummary is inherited from container - - if (getChangeSummaryImpl() != 0 && getChangeSummaryImpl()->isLogging() && !getType().isChangeSummaryType()) - { - DataObjectImpl* cont = getContainerImpl(); - if (cont != 0) // log if there is a container. If there is not, then - // this can only be the object with the CS, so logging - // would not make sense. - { - const Property* p = cont->findInProperties(this); - if ( p != 0) // if the object is not in the properties, then its been - // detached, and has already been logged as deleted - { - getChangeSummaryImpl()->logDeletion(this,cont,*p, - objectToXPath(), true); - } - } - } - } - - void DataObjectImpl::logChange(const Property& prop) - { - if (getChangeSummaryImpl() != 0 && getChangeSummaryImpl()->isLogging()) - { - getChangeSummaryImpl()->logChange(this,prop); - } - } - - void DataObjectImpl::logChange(unsigned int propIndex) - { - if (getChangeSummaryImpl() != 0 && getChangeSummaryImpl()->isLogging()) - { - getChangeSummaryImpl()->logChange(this,getProperty(propIndex)); - } - } - // reference support - - void DataObjectImpl::setReference(DataObject* dol, const Property& prop) - { - LOGINFO_1(INFO,"ChangeSummary:Setting a reference to %s",prop.getName()); - - refs.push_back(new Reference(dol,prop)); - } - void DataObjectImpl::unsetReference(DataObject* dol, const Property& prop) - { - LOGINFO_1(INFO,"ChangeSummary:Unsetting a reference to %s",prop.getName()); - - for (int i=0;i< refs.size();i++) - { - if (refs[i]->getDataObject() == dol) - { - if (!strcmp(refs[i]->getProperty().getName(), - prop.getName())) - { - delete refs[i]; - refs.erase(refs.begin() + i); - } - } - } - } - - - void DataObjectImpl::clearReferences() - { - for (int i=0;igetDataObject()->unset(refs[i]->getProperty()); - delete refs[i]; - } - refs.clear(); - } - - const char* DataObjectImpl::objectToXPath() - { - asXPathBuffer = ""; - - DataObjectImpl* dob = getContainerImpl(); - DataObject*thisob = this; - while (dob != 0){ - const Property& p = thisob->getContainmentProperty(); - if (asXPathBuffer != "") - { - asXPathBuffer = "/" + asXPathBuffer; - } - - if (p.isMany()) { - DataObjectList& dol = dob->getList(p); - for (int i=0;igetContainerImpl(); - } - - asXPathBuffer = "#/" + asXPathBuffer; - - return asXPathBuffer.c_str(); -/* - char* temp1; - char* temp2; - - if (asXPathBuffer == 0) - { - asXPathBuffer = new char[2]; - sprintf(asXPathBuffer,"#"); - } - - DataObjectImpl* dob = getContainerImpl(); - DataObject*thisob = this; - while (dob != 0){ - const Property& p = thisob->getContainmentProperty(); - const char* name = p.getName(); - temp1 = new char[strlen(name) + 34]; - temp1[0] = 0; - - - if (p.isMany()) { - DataObjectList& dol = dob->getList(p); - for (int i=0;igetContainerImpl(); - } - return asXPathBuffer; */ - } - - // user data support... - void* DataObjectImpl::getUserData(const char* path) - { - // Can path really be a null pointer? - if (path == 0) - { - return(getUserData(SDOString())); - } - else - { - return(getUserData(SDOString(path))); - } - } - - void* DataObjectImpl::getUserData(const SDOString& path) - { - DataObjectImpl *d; - void* v = 0; - SDOString spath; - SDOString prop; - try { - DataObjectImpl::stripPath(path, spath); - prop = findPropertyContainer(spath, &d); - if (d != 0) - { - if (!prop.empty()) - { - const Property& p = d->getProperty(prop); - if (p.getType().isDataType()) return 0; - if (p.isMany()) - { - DataObjectImpl* d2 = d->getDataObjectImpl(prop); - if (d2) v = d2->getUserData(); - return v; - } - v = d->getUserData(p); - return v; - } - return d->getUserData(); - } - return 0; - } - catch (SDORuntimeException e) - { - return 0; - } - } - - void* DataObjectImpl::getUserData(unsigned int propertyIndex) - { - if ((getProperty(propertyIndex).isMany())) - { - return 0; - } - if ((getProperty(propertyIndex).getType().isDataType())) - { - return 0; - } - DataObjectImpl* ptr = getDataObjectImpl(propertyIndex); - if (ptr) return ptr->getUserData(); - return 0; - } - - void* DataObjectImpl::getUserData(const Property& property) - { - if (property.isMany()) - { - return 0; - } - if (property.getType().isDataType()) - { - return 0; - } - DataObjectImpl* ptr = getDataObjectImpl(property); - if (ptr) return ptr->getUserData(); - return 0; - } - - void* DataObjectImpl::getUserData() - { - return userdata; - } - - void DataObjectImpl::setUserData(const char* path, void* value) - { - // Can path really be a null pointer? - if (path == 0) - { - setUserData(SDOString(), value); - } - else - { - setUserData(SDOString(path), value); - } - } - - void DataObjectImpl::setUserData(const SDOString& path, void* value) - { - SDOString spath; - SDOString prop; - DataObjectImpl *d; - try { - DataObjectImpl::stripPath(path, spath); - prop = findPropertyContainer(spath, &d); - if (d != 0) - { - if (!prop.empty()) - { - const Property& p = d->getProperty(prop); - if (p.getType().isDataType()) - return; - if (p.isMany()) - { - DataObjectImpl* d2 = d->getDataObjectImpl(prop); - if (d2) d2->setUserData(value); - return; - } - d->setUserData(p, value); - return; - } - d->setUserData(value); - return; - } - } - catch (SDORuntimeException e) - { - return; - } - - } - - void DataObjectImpl::setUserData(unsigned int propertyIndex, void* value) - { - if ((getProperty(propertyIndex).isMany())) - { - return; - } - if ((getProperty(propertyIndex).getType().isDataType())) - { - return; - } - DataObjectImpl* ptr = getDataObjectImpl(propertyIndex); - if (ptr) ptr->setUserData(value); - return; - } - - void DataObjectImpl::setUserData(const Property& property, void* value) - { - if (property.isMany()) - { - return; - } - if (property.getType().isDataType()) - { - return; - } - DataObjectImpl* ptr = getDataObjectImpl(property); - if (ptr) ptr->setUserData(value); - return; - } - - void DataObjectImpl::setUserData(void* value) - { - userdata = value; - } - - std::ostream& DataObjectImpl::printSelf(std::ostream &os) - { - SDOUtils::printDataObject(os, this); - return os; - } - -}; -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h deleted file mode 100644 index 5d02b91395..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.h +++ /dev/null @@ -1,719 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAOBJECTIMPL_H_ -#define _DATAOBJECTIMPL_H_ -#include "commonj/sdo/DataObject.h" - -#include "commonj/sdo/disable_warn.h" - -#include -#include -#include - -#include - - -#include "commonj/sdo/Property.h" -#include "commonj/sdo/TypeImpl.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/SequenceImpl.h" -#include "commonj/sdo/DataObjectListImpl.h" -#include "commonj/sdo/PropertyList.h" - -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/ChangeSummaryImpl.h" -#include "commonj/sdo/SDODate.h" - -namespace commonj{ -namespace sdo{ - -class DataGraph; -class DataObjectImpl; -class DataObjectListImpl; -class DataFactory; - - -#define DataObjectImplPtr RefCountingPointer -#define ChangeSummaryImplPtr RefCountingPointer - -/** - * rdo is an internal class holding a property value in a data object. - */ - -class rdo { -public: - unsigned int first; - DataObjectImplPtr second; - rdo(unsigned int infirst, DataObjectImpl* insecond); - rdo(); - rdo (const rdo& inrdo); - virtual ~rdo(); -}; - -typedef std::list< rdo > PropertyValueMap; - - - /** - * DataObjectImpl implements the abstract class DataObject. - * - * A data object is a representation of some structured data. - * it is the fundamental component in the SDO (Service Data Objects) package. - * Data objects support reflection, path-based accesss, convenience creation - * and deletion methods,and the ability to be part of a data graph. - * Each data object holds its data as a series of properties. - * Properties can be accessed by name, property index, or using the property - * meta object itself. - * A data object can also contain references to other data objects, through - * reference-type properties. - * A data object has a series of convenience accessors for its properties. - * These methods either use a path (String), a property index, - * or the property's meta object itself, to identify the property. - * Some examples of the path-based accessors are as follows: - * DataObjectPtr company = ...; - * company->getString("name"); - * company->setString("name", "acme"); - * company->getString("department.0/name") - * .n indexes from 0. - * company->getString("department[1]/name") [] indexes from 1. - * company->getDataObject("department[number=123]") returns the department where number=123 - * company->getDataObject("..") returns the containing data object - * company->getDataObject("/") returns the root containing data object - * There are specific accessors for the primitive types and commonly used - * data types like String. - */ - -class DataObjectImpl : public DataObject -{ - public: - - DataObjectImpl(); - DataObjectImpl(const TypeImpl& t); - DataObjectImpl(DataFactory* dataFactory, const Type& t); - - // This one only needs the values, and the type/prop info. The rest - // is not copied and would be unsafe to do so. This is used to - // store the cloned info in a change summary. - - DataObjectImpl(DataObjectImplPtr indo); - - virtual ~DataObjectImpl(); - - ///////////////////////////////////////////////////////////////////////// - // Introspection - ///////////////////////////////////////////////////////////////////////// - - - void handlePropertyNotSet(const char* name); - - /** getPropertyIndex gets the unique index of a property - * - * A property of a data object has a unique index associated with it. - * This method gets a property index for this object from the property, - * or throw SDOPropertyNotFoundException if the property is not part - * of this data object. - */ - - virtual unsigned int getPropertyIndex(const Property& p); - - /** - * These are just like getType().getProperty(), but may return - * values other than the property list for open types. - */ - - virtual const Property& getProperty(unsigned int index); - - virtual const Property& getProperty(const char* prop); - virtual const Property& getProperty(const SDOString& prop); - - virtual PropertyImpl* getPropertyImpl(const SDOString& prop); - - virtual PropertyImpl* getPropertyImpl(unsigned int index); - - /** getInstanceProperties gets the props of the current object. - * - * Returns a read-only List of the Properties currently used in this DataObject. - * This list will contain all of the properties in getType().getProperties() - * and any properties where isSet(property) is true. - * For example, properties resulting from the use of - * open or mixed XML content are present if allowed by the Type. - * The list does not contain duplicates. - * The order of the properties in the list begins with getType().getProperties() - * and the order of the remaining properties is determined by the implementation. - * The same list will be returned unless the DataObject is updated so that - * the contents of the list change - * Returns the list of Properties currently used in this DataObject. - */ - - virtual PropertyList getInstanceProperties(); - - /** getContainer get the containing object - * - * Returns the containing data object - * or 0 if there is no container. - */ - - virtual DataObjectPtr getContainer(); - - /** getContainmentProperty returns the property containing this object - * - * Return the Property of the data object containing this data object - * or throw an SDOPropertyNotFoundException if there is no container. - */ - - virtual const Property& getContainmentProperty(); - - /** getType returns the data object's type. - * - * getType returns the data object's type. - * The type defines the properties available for reflective access. - */ - - virtual const Type& getType(); - - virtual const Type::Types getTypeEnum(); - - - - /////////////////////////////////////////////////////////////////////////// - // get/set - /////////////////////////////////////////////////////////////////////////// - - - /** getDataObject returns a data object by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual DataObjectPtr getDataObject(const SDOString& path); - virtual DataObjectPtr getDataObject(const char* path); - virtual DataObjectPtr getDataObject(unsigned int propertyIndex); - virtual DataObjectPtr getDataObject(const Property& property); - - /** setDataObject sets a value by path, index or property - * - * Sets a property of either this object or an object reachable from it, - * as identified by the specified path, - * to the specified value. - */ - - virtual void setDataObject(const char* path, DataObjectPtr value); - virtual void setDataObject(const SDOString& path, DataObjectPtr value); - virtual void setDataObject(unsigned int propertyIndex, DataObjectPtr value); - virtual void setDataObject(const Property& property, DataObjectPtr value); - - /** getBoolean returns a boolean by path, index or property - * - * Returns the value of a property of either this object or an object - * reachable from it, as identified by the specified path. - */ - - virtual bool getBoolean(const char* path); - virtual bool getBoolean(const SDOString& path); - virtual bool getBoolean(unsigned int propindex); - virtual bool getBoolean(const Property& p); - - virtual void setBoolean(const char* path, bool b); - virtual void setBoolean(const SDOString& path, bool b); - virtual void setBoolean(unsigned int propindex, bool b); - virtual void setBoolean(const Property& p, bool b); - - virtual char getByte(const char* path); - virtual char getByte(const SDOString& path); - virtual char getByte(unsigned int propindex); - virtual char getByte(const Property& p); - - virtual void setByte(const char* path, char c); - virtual void setByte(const SDOString& path, char c); - virtual void setByte(unsigned int propindex, char c); - virtual void setByte(const Property& p, char c); - - virtual wchar_t getCharacter(const char* path); - virtual wchar_t getCharacter(const SDOString& path); - virtual wchar_t getCharacter(unsigned int propindex); - virtual wchar_t getCharacter(const Property& p); - - virtual void setCharacter(const char* path, wchar_t c); - virtual void setCharacter(const SDOString& path, wchar_t c); - virtual void setCharacter(unsigned int propindex, wchar_t c); - virtual void setCharacter(const Property& p, wchar_t c); - - virtual unsigned int getLength(const SDOString& path) ; - virtual unsigned int getLength(const char* path) ; - virtual unsigned int getLength(unsigned int propindex) ; - virtual unsigned int getLength(const Property& p) ; - virtual unsigned int getLength() ; - - virtual unsigned int getBytes(const char* path, char* buf, unsigned int max) ; - virtual unsigned int getBytes(const SDOString& path, char* buf, unsigned int max) ; - virtual unsigned int getBytes(unsigned int propindex, char* buf, unsigned int max) ; - virtual unsigned int getBytes(const Property& p, char* buf, unsigned int max) ; - - virtual void setBytes(const char* path, const char* c, unsigned int len) ; - virtual void setBytes(const SDOString& path, const char* c, unsigned int len) ; - virtual void setBytes(unsigned int propindex, const char* c,unsigned int len) ; - virtual void setBytes(const Property& p, const char* c,unsigned int len) ; - - virtual unsigned int getString(const SDOString& path, wchar_t* buf, unsigned int max); - virtual unsigned int getString(const char* path, wchar_t* buf, unsigned int max) ; - virtual unsigned int getString(unsigned int propindex,wchar_t* buf, unsigned int max) ; - virtual unsigned int getString(const Property& p,wchar_t* buf, unsigned int max) ; - - virtual void setString(const SDOString& path, const wchar_t* c,unsigned int len); - virtual void setString(const char* path, const wchar_t* c,unsigned int len) ; - virtual void setString(unsigned int propindex, const wchar_t* c,unsigned int len) ; - virtual void setString(const Property& p, const wchar_t* c,unsigned int len) ; - - virtual const SDODate getDate(const SDOString& path); - virtual const SDODate getDate(const char* path); - virtual const SDODate getDate(unsigned int propindex); - virtual const SDODate getDate(const Property& p); - - virtual void setDate(const SDOString& path, const SDODate d); - virtual void setDate(const char* path, const SDODate d); - virtual void setDate(unsigned int propindex, const SDODate d); - virtual void setDate(const Property& p, const SDODate d); - - virtual long double getDouble(const SDOString& path); - virtual long double getDouble(const char* path); - virtual long double getDouble(unsigned int propindex); - virtual long double getDouble(const Property& p); - - virtual void setDouble(const SDOString& path, long double d); - virtual void setDouble(const char* path, long double d); - virtual void setDouble(unsigned int propindex, long double d); - virtual void setDouble(const Property& p, long double d); - - virtual float getFloat(const SDOString& path); - virtual float getFloat(const char* path); - virtual float getFloat(unsigned int propindex); - virtual float getFloat(const Property& p); - - virtual void setFloat(const SDOString& path, float f); - virtual void setFloat(const char* path, float f); - virtual void setFloat(unsigned int propindex, float f); - virtual void setFloat(const Property& p, float f); - - virtual long getInteger(const SDOString& path); - virtual long getInteger(const char* path); - virtual long getInteger(unsigned int propindex); - virtual long getInteger(const Property& p); - - virtual void setInteger(const SDOString& path, long i); - virtual void setInteger(const char* path, long i); - virtual void setInteger(unsigned int propindex, long i); - virtual void setInteger(const Property& p, long i); - - virtual /*long long*/ int64_t getLong(const SDOString& path); - virtual /*long long*/ int64_t getLong(const char* path); - virtual /*long long*/ int64_t getLong(unsigned int propindex); - virtual /*long long*/ int64_t getLong(const Property& p); - - virtual void setLong(const SDOString& path, /*long long*/ int64_t l); - virtual void setLong(const char* path, /*long long*/ int64_t l); - virtual void setLong(unsigned int propindex, /*long long*/ int64_t l); - virtual void setLong(const Property& p, /*long long*/ int64_t l); - - virtual short getShort(const SDOString& path); - virtual short getShort(const char* path); - virtual short getShort(unsigned int propindex); - virtual short getShort(const Property& p); - - virtual void setShort(const SDOString& path, short s); - virtual void setShort(const char* path, short s); - virtual void setShort(unsigned int propindex, short s); - virtual void setShort(const Property& p, short s); - - virtual const char* getCString(const char* path); - virtual const char* getCString(const SDOString& path); - virtual const char* getCString(unsigned int propertyIndex); - virtual const char* getCString(const Property& prop); - - virtual void setCString(const char* path, const char* value); - virtual void setCString(unsigned int propertyIndex, const char* value); - virtual void setCString (const Property& prop, const char* value); - - virtual void setCString(const SDOString& path, const SDOString& value); - virtual void setCString(unsigned int propertyIndex, const SDOString& value); - virtual void setCString (const Property& prop, const SDOString& value); - - /** setNull sets a data object value to null. - * - * A DataObjectType or DataType value may be set or unset. If it is set, then - * it may have a value, or it may be set to null. A distinction is drawn between - * being unset, having the default value, being set and being null. - * When the value of an integer (for example) is returned as zero, it could have - * been set to zero, or it could be null. Use isNull() to verify. - */ - - virtual void setNull(const SDOString& path); - virtual void setNull(const char* path); - virtual void setNull(unsigned int propertyIndex); - virtual void setNull(const Property& prop); - - virtual bool isNull(const SDOString& path); - virtual bool isNull(const char* path); - virtual bool isNull(unsigned int propertyIndex); - virtual bool isNull(const Property& prop); - - virtual bool isSet(const char* path); - virtual bool isSet(const SDOString& path); - virtual bool isSet(unsigned int propertyIndex); - virtual bool isSet(const Property& property); - - virtual bool isValid(const SDOString& path); - virtual bool isValid(const char* path); - virtual bool isValid(unsigned int propertyIndex); - virtual bool isValid(const Property& property); - - virtual void unset(const char* path); - virtual void unset(const SDOString& path); - virtual void unset(unsigned int propertyIndex); - virtual void unset(const Property& property); - - - /////////////////////////////////////////////////////////////////////////// - // Sequences - /////////////////////////////////////////////////////////////////////////// - - /** getSequence returns the sequence for a data object - * - * Returns the value of a Sequence property identified by - * the specified path. See Sequence. - */ - - virtual SequenceImpl* getSequenceImpl(); - virtual SequencePtr getSequence(); - virtual SequencePtr getSequence(const char* path); - virtual SequencePtr getSequence(const SDOString& path); - virtual SequencePtr getSequence(unsigned int propertyIndex); - virtual SequencePtr getSequence(const Property& property); - - - /////////////////////////////////////////////////////////////////////////// - // Creation of dataobjects - /////////////////////////////////////////////////////////////////////////// - - /** createDataObject creates a data object value - * - * Returns a new data object contained by this object using the - * specified property,which must be a containment property. - * The type of the created object is the declared type - * of the specified property. - * If the property is many valued, this method adds an element to the - * list, otherwise it sets the value, removing any old value. - */ - - virtual DataObjectPtr createDataObject(const char* propertyName); - virtual DataObjectPtr createDataObject(const SDOString& propertyName); - virtual DataObjectPtr createDataObject(unsigned int propertyIndex); - virtual DataObjectPtr createDataObject(const Property& property); - - - /** - * See if the property currently exists - */ - - virtual bool hasProperty(const char* name); - virtual bool hasProperty(const SDOString& name); - - - virtual void detach(); - - virtual void clear(); - - - /////////////////////////////////////////////////////////////////////////// - // Lists - /////////////////////////////////////////////////////////////////////////// - - /** getList gets the value of a many-valued property - * - * Many valued properties are returned as lists of DataObjects. - * These lists may contain primitives or data objects, but they behave - * like data objects. - * Getting a many valued integer consists of getting the list, then - * using the DataObjectList API to getInteger() for each list element. - */ - - virtual DataObjectList& getList(const char* path); - virtual DataObjectList& getList(const SDOString& path); - virtual DataObjectList& getList(unsigned int propIndex); - virtual DataObjectList& getList(const Property& p); - virtual DataObjectList& getList(); - virtual DataObjectListImpl* getListImpl(); - - void setList( DataObjectList* theList); - - /////////////////////////////////////////////////////////////////////////// - // Change Summary - /////////////////////////////////////////////////////////////////////////// - - /** getChangeSummary get the applicable change summary - * - * This method gets the applicable change summary for a data object. - * The summary is not necessarily attached to the data object, it may be - * the summary for a parent data object. No object with a summary attached - * may be a child of another object with a summary attached. - * See the ChangeSummary API for details of using the change sumamry. - */ - - virtual SDO_API ChangeSummaryPtr getChangeSummary(const char* path); - virtual SDO_API ChangeSummaryPtr getChangeSummary(const SDOString& path); - virtual SDO_API ChangeSummaryPtr getChangeSummary(unsigned int propIndex); - virtual SDO_API ChangeSummaryPtr getChangeSummary(const Property& prop); - virtual SDO_API ChangeSummaryPtr getChangeSummary(); - - - virtual bool getBoolean(); - virtual void setBoolean(bool b); - virtual char getByte(); - virtual void setByte(char c); - virtual wchar_t getCharacter(); - virtual void setCharacter(wchar_t c); - virtual unsigned int getString(wchar_t* buf, unsigned int max); - virtual unsigned int getBytes(char* buf, unsigned int max); - virtual void setString(const wchar_t* buf, unsigned int len); - virtual void setBytes(const char* c, unsigned int len); - virtual short getShort(); - virtual void setShort(short s); - virtual long getInteger(); - virtual void setInteger(long s); - virtual /* long long*/ int64_t getLong(); - virtual void setLong(/* long long */ int64_t i); - virtual float getFloat(); - virtual void setFloat(float b); - virtual long double getDouble(); - virtual void setDouble(long double d); - virtual const SDODate getDate(); - virtual void setDate(const SDODate d); - virtual const char* getCString(); - virtual void setCString(const char* s); - virtual void setCString(const SDOString& s); - virtual DataObjectImpl* getDataObject(); - virtual void setDataObject(DataObject* d); - - // null support - virtual bool isNull(); - virtual void setNull(); - virtual void unsetNull(); - - // change logging is used by the dataobjectlistimpl - virtual void logChange(const Property& prop); - virtual void logChange(unsigned int propIndex); - virtual void logDeletion(); - virtual void logCreation(DataObjectImpl* dol, - DataObjectImpl* cont, const Property& prop); - - // reference support - virtual void setReference(DataObject* dob, const Property& prop); - virtual void unsetReference(DataObject* dob, const Property& prop); - virtual void clearReferences(); - - // user data support - virtual void setUserData(const char* path,void* value); - virtual void setUserData(const SDOString& path, void* value); - virtual void setUserData(unsigned int propertyIndex, void* value); - virtual void setUserData(const Property& property, void* value); - virtual void setUserData(void* value); - virtual void* getUserData(const char* path); - virtual void* getUserData(const SDOString& path); - virtual void* getUserData(unsigned int propertyIndex); - virtual void* getUserData(const Property& property); - virtual void* getUserData(); - - virtual void setContainer(DataObjectImpl* d); - DataObjectImpl* getContainerImpl(); - - // builds a temporary XPath for this object. - const char* objectToXPath(); - - // The data factory can be used to create new data objects within - // the Type system of this data object - // - - SDO_API DataFactory* getDataFactory(); - - - // cache a copy of the change summary in this data object, if there - // is one in the tree. - - virtual void setApplicableChangeSummary(); - - - // open type support - virtual void setInstancePropertyType(unsigned int index, - const Type* t); - - /** - * defineProperty is used by open type support. - * This method and its siblings define a new property on an - * open type when a setting is requested. - */ - virtual const PropertyImpl* defineProperty(const SDOString& propname, - const Type& t); - - virtual const PropertyImpl* defineBoolean(const SDOString& propname); - virtual const PropertyImpl* defineByte(const SDOString& propname); - virtual const PropertyImpl* defineCharacter(const SDOString& propname); - virtual const PropertyImpl* defineString(const SDOString& propname); - virtual const PropertyImpl* defineBytes(const SDOString& propname); - virtual const PropertyImpl* defineShort(const SDOString& propname); - virtual const PropertyImpl* defineInteger(const SDOString& propname); - virtual const PropertyImpl* defineLong(const SDOString& propname); - virtual const PropertyImpl* defineFloat(const SDOString& propname); - virtual const PropertyImpl* defineDouble(const SDOString& propname); - virtual const PropertyImpl* defineDate(const SDOString& propname); - virtual const PropertyImpl* defineCString(const SDOString& propname); - virtual const PropertyImpl* defineDataObject(const SDOString& propname, - const Type&t ); - virtual const PropertyImpl* defineDataObject(const char* propname, - const char* typeURI, const char* typeName ); - virtual const PropertyImpl* defineList(const char* propname); - virtual void undefineProperty(unsigned int index); - virtual const TypeImpl& getTypeImpl(); - virtual void transferChildren(DataObject* d, DataFactory* f); - virtual void setDataFactory(DataFactory *df); - - virtual std::ostream& printSelf(std::ostream &os); - -private: - - virtual void validateIndex(unsigned int index); - virtual void checkFactory(DataObjectPtr dob, unsigned int propertyIndex); - virtual void checkType( const Property& prop, - const Type& objectType); - - virtual bool remove(DataObjectImpl* indol); - virtual bool isSet(const Property& prop, unsigned int propertyIndex); - - - virtual DataObjectImpl* getDataObjectImpl(const SDOString& path); - virtual DataObjectImpl* getDataObjectImpl(unsigned int propertyIndex); - virtual DataObjectImpl* getDataObjectImpl(const Property& property); - - virtual DataObjectPtr - createDataObject(const Property& property, - const char* namespaceURI, - const char* typeName); - - DataObjectImpl* findDataObject(const SDOString& token, long* index); - const Property* findInProperties(DataObject* ob); - - SDOString findPropertyContainer(const SDOString& path, DataObjectImpl** din); - - char* stripPath(const char* path); - void stripPath(const SDOString& path, SDOString& result); - - - // Does not keep a reference counted pointer to the container. - DataObjectImpl* container; - - // remove the value from the data object. - void deleteValue(); - - - PropertyValueMap PropertyValues; - - TypeImpl* ObjectType; - - DataObjectListImpl* listValue; - - // Holds the value , reallocated as necessary for strings - void* value; - - // In the case of a bytes/string - this holds the length; - unsigned int valuelength; - - // holds the value as a string - if requested. - char* asStringBuffer; - - // holds the Xpath to this object if requested. - std::string asXPathBuffer; - - // The data object holds a counted reference to the data factory. - DataFactoryPtr factory; - - - // Support for open types - int openBase; - std::list openProperties; - - static const char* emptyString; - static const char* templateString; - - // Data may be set to null in any data object - bool isnull; - - // user supplied 32 bit value. - void* userdata; - - // - // The sequence, if this is a sequenced type - not - // reference counted by the data object - // - SequenceImpl* sequence; - - // - // The change summary if this is a summarised type - // not reference counted by the data object - only by - // clients - // - - ChangeSummaryImpl* getChangeSummaryImpl(); - ChangeSummaryImpl* getSummary(); - ChangeSummaryImpl* localCS; - DataObjectImpl* changesummaryobject; - - - // reference type support - - class Reference - { - public: - DataObject* getDataObject() - { - return referer; - } - const Property& getProperty() - { - return refprop; - } - Reference(DataObject* d, const Property& p) : refprop(p), referer(d) - { - } - private: - DataObject* referer; - const Property& refprop; - }; - - typedef std::vector REFERENCE_LIST; - - REFERENCE_LIST refs; - - - -}; -}; -}; - -#endif //_DATAOBJECTIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.cpp deleted file mode 100644 index c3a461b100..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataObjectInstance.h" -using commonj::sdo::CopyHelper; - - - -namespace commonj -{ - namespace sdo - { - // ============ - // Constructors - // ============ - DataObjectInstance::DataObjectInstance() - { - } - - DataObjectInstance::DataObjectInstance(const DataObjectPtr& theDO) - { - dataObject = CopyHelper::copy(theDO); - } - - // ========== - // Destructor - // ========== - DataObjectInstance::~DataObjectInstance() - { - } - - // =================================== - // Copy constructor: deep copy the DO - // =================================== - DataObjectInstance::DataObjectInstance(const DataObjectInstance& doi) - { - dataObject = CopyHelper::copy(doi.dataObject); - } - - // ============================= - // operator= : deep copy the DO - // ============================= - DataObjectInstance& DataObjectInstance::operator=(const DataObjectInstance& doi) - { - if (this != &doi) - { - dataObject = CopyHelper::copy(doi.dataObject); - } - return *this; - } - - } // End namespace sca -} // End namespace osoa diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.h deleted file mode 100644 index 963761e281..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectInstance.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 commonj_sdo_DataObjectInstance_h -#define commonj_sdo_DataObjectInstance_h - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDO.h" -using commonj::sdo::DataObjectPtr; -using commonj::sdo::DataObject; - - -namespace commonj -{ - namespace sdo - { -/** - * DataObjectInstance is a class which allows DataObjects to be considered - * as instances rather than data object pointers. - */ - class DataObjectInstance - { - - public: - SDO_API DataObjectInstance(); - SDO_API virtual ~DataObjectInstance(); - - SDO_API DataObjectInstance(const DataObjectPtr& theDO); - SDO_API DataObjectInstance(const DataObjectInstance&); - - SDO_API DataObjectInstance& operator=(const DataObjectInstance&); - SDO_API bool operator!() {return (!dataObject);} - SDO_API operator bool() {return !!dataObject;} - - SDO_API DataObject* operator->() {return dataObject;} - - SDO_API DataObjectPtr getDataObject() {return dataObject;} - SDO_API operator DataObjectPtr() {return dataObject;} - private: - DataObjectPtr dataObject; - }; - } // End namespace sdo -} // End namespace commonj - -#endif // commonj_sdo_DataObjectInstance_h diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.cpp deleted file mode 100644 index 0e60693c55..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataObjectList.h" - -namespace commonj{ -namespace sdo { - -/** - * - * List for retrieving many valued property values. - * - * DataObjectList provides an API for getting and setting values in - * many valued properties. The list deals with both DataType and - * DataObjectType properties. - */ - -DataObjectList::~DataObjectList() -{ - -} - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.h deleted file mode 100644 index 1e9da37141..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectList.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAOBJECTLIST_H_ -#define _DATAOBJECTLIST_H_ - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SDODate.h" -#include - - -namespace commonj{ -namespace sdo{ - -/** - * - * List for retrieving many valued property values, DataType or DataObjectType. - * - * DataObjectList provides an API for getting and setting values in - * many valued properties. The list deals with both DataType and - * DataObjectType properties. - */ - -class DataObjectList -{ -public: - virtual ~DataObjectList(); - - /** [] is a index operator, and returns a dataobject. - * - * The index operator returns a data object, even if the - * list is of a DataType. The data object can yield its true value using - * getInteger() etc. Alternatively, list elements can be accessed - * with their correct type using the list getInteger(index) api. - */ - - virtual SDO_API DataObjectPtr operator[] (int pos) = 0; - virtual SDO_API const DataObjectPtr operator[] (int pos) const = 0; - - /** size returns the number of elements. - * - * The size method returns the number of elements in the list - */ - - virtual SDO_API int size () const = 0; - - /** getBoolean returns a boolean at an index - * - * Each of the DataTypes has a corresponding getter and setter - * overload. getBoolean returns a bool, getByte returns a char - * etc - */ - - virtual SDO_API bool getBoolean(unsigned int index) const = 0; - virtual SDO_API char getByte(unsigned int index) const = 0; - virtual SDO_API wchar_t getCharacter(unsigned int index) const = 0; - virtual SDO_API unsigned int getString(unsigned int index, wchar_t* value, - unsigned int max) const = 0; - virtual SDO_API unsigned int getBytes(unsigned int index, char* value, - unsigned int max) const = 0; - virtual SDO_API short getShort(unsigned int index) const = 0; - virtual SDO_API long getInteger(unsigned int index) const = 0; - virtual SDO_API int64_t getLong(unsigned int index) const = 0; - virtual SDO_API float getFloat(unsigned int index) const = 0; - virtual SDO_API long double getDouble(unsigned int index) const = 0; - virtual SDO_API const SDODate getDate(unsigned int index) const = 0; - virtual SDO_API const char* getCString(unsigned int index) const = 0; - virtual SDO_API DataObjectPtr getDataObject(unsigned int index) const = 0; - - virtual SDO_API void setBoolean(unsigned int index, bool d) = 0; - virtual SDO_API void setByte(unsigned int index, char d) = 0; - virtual SDO_API void setCharacter(unsigned int index, wchar_t d) = 0; - virtual SDO_API void setString(unsigned int index, const wchar_t* d, unsigned int len) = 0; - virtual SDO_API void setBytes(unsigned int index, const char* d, unsigned int len) = 0; - virtual SDO_API void setShort(unsigned int index, short d) = 0; - virtual SDO_API void setInteger(unsigned int index, long d) = 0; - virtual SDO_API void setLong(unsigned int index, int64_t d) = 0; - virtual SDO_API void setFloat(unsigned int index, float d) = 0; - virtual SDO_API void setDouble(unsigned int index, long double d) = 0; - virtual SDO_API void setDate(unsigned int index, const SDODate d) = 0; - virtual SDO_API void setCString(unsigned int index, char* d) = 0; - virtual SDO_API void setCString(unsigned int index, const SDOString& d) = 0; - virtual SDO_API void setDataObject(unsigned int index, DataObjectPtr dob) = 0; - - /** getLength returns the length of a string element - * - * getLength behaves like DataObject::getlength. It returns the length - * of a bytes or string buffer such that space can be allocated for the - * values from getBytes() and getString() - */ - - virtual SDO_API unsigned int getLength(unsigned int index) const = 0; - - /** insert and append put items into the list - * - * insert and append have overrides for each of the DataTypes, and - * for DataObject. Insert inserts before the element number given. If the insertion - * point is off the end of the list, then an append is performed. - * Append puts the element on the end of the list. - */ - - - virtual SDO_API void insert (unsigned int index, DataObjectPtr d) = 0; - virtual SDO_API void append (DataObjectPtr d) = 0; - - virtual SDO_API void insert (unsigned int index, bool d) = 0; - virtual SDO_API void append (bool d) = 0; - - virtual SDO_API void insert (unsigned int index, char d) = 0; - virtual SDO_API void append (char d) = 0; - - virtual SDO_API void insert (unsigned int index, wchar_t d) = 0; - virtual SDO_API void append (wchar_t d) = 0; - - virtual SDO_API void insert (unsigned int index, const wchar_t* d, unsigned int len) = 0; - virtual SDO_API void append (const wchar_t* d, unsigned int len) = 0; - - virtual SDO_API void insert (unsigned int index, const char* d, unsigned int len) = 0; - virtual SDO_API void append (const char* d, unsigned int len) = 0; - - virtual SDO_API void insert (unsigned int index, const char* d) = 0; - virtual SDO_API void insert (unsigned int index, const SDOString& d) = 0; - virtual SDO_API void append (const char* d) = 0; - virtual SDO_API void append (const SDOString& d) = 0; - - virtual SDO_API void insert (unsigned int index, short d) = 0; - virtual SDO_API void append (short d) = 0; - - virtual SDO_API void insert (unsigned int index, const SDODate d) = 0; - virtual SDO_API void append (const SDODate d) = 0; - -#if __WORDSIZE !=64 - virtual SDO_API void insert (unsigned int index, long d) = 0; - virtual SDO_API void append (long d) = 0; -#endif - - virtual SDO_API void insert (unsigned int index, int64_t d) = 0; - virtual SDO_API void append (int64_t d) = 0; - - virtual SDO_API void insert (unsigned int index, float d) = 0; - virtual SDO_API void append (float d) = 0; - - - virtual SDO_API void insert (unsigned int index, long double d) = 0; - virtual SDO_API void append (long double d) = 0; - - /** remove removes an element from the list. - * - * Remove removes the element from the list, and passes out a - * DataObjectPtr to the old value. This can be attached to the list - * somewhere else, or discarded. - */ - - virtual SDO_API DataObjectPtr remove (unsigned int index) = 0; - - /* getType returns type - * - * Returns the type. - * May throw SDOTYpeNotFoundException for unset open types - */ - - - virtual SDO_API const Type& getType() = 0; - - /* getTypeEnum returns an enumerator for the type - * - * Returns an enumerator for the type for easy switching on basic types. - * The enumerator is part of the Type class - * May throw SDOTypeNotFoundException for open types - */ - - virtual SDO_API const Type::Types getTypeEnum() = 0; - -}; -}; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp deleted file mode 100644 index c25a3e8b66..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp +++ /dev/null @@ -1,1138 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataObjectListImpl.h" - - -#include -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/Logger.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/DataObjectImpl.h" -#include "commonj/sdo/DataFactoryImpl.h" - -#include - -namespace commonj{ -namespace sdo { - -/** - * DataObjectListImpl implements DataObjectList. - * List for retrieving many valued property values. - * - * DataObjectList provides an API for getting and setting values in - * many valued properties. The list deals with both DataType and - * DataObjectType properties. - */ -DataObjectListImpl::DataObjectListImpl(DATAOBJECT_VECTOR p) : plist (p) -{ - theFactory = 0; - container = 0; - pindex = 0; - isReference = false; -} - -DataObjectListImpl::DataObjectListImpl(const DataObjectListImpl &pin) -{ - plist = std::vector >(pin.getVec()); - theFactory = pin.theFactory; - container = pin.container; - pindex = pin.pindex; - typeUnset = pin.typeUnset; - isReference = pin.isReference; - if (pin.typeURI != 0) { - typeURI = new char[strlen(pin.typeURI) +1]; - strcpy(typeURI, pin.typeURI); - } - if (pin.typeName != 0) { - typeName = new char[strlen(pin.typeName) +1]; - strcpy(typeName, pin.typeName); - } -} - -DataObjectListImpl::DataObjectListImpl() -{ - theFactory = 0; - typeURI = 0; - typeName = 0; - theFactory = 0; - container = 0; - pindex = 0; - typeUnset = false; - isReference = false; -} - -DataObjectListImpl::DataObjectListImpl(DataFactory* df, - DataObjectImpl* cont, - unsigned int inpindex, - const char* intypeURI, - const char* intypeName) -{ - container = cont; - pindex = inpindex; - theFactory = df; - - - isReference = false; - if (container->getProperty(pindex).isReference()) - { - isReference = true; - } - typeUnset = false; - - if (container->getType().isOpenType()) - { - if (!strcmp(intypeURI,Type::SDOTypeNamespaceURI.c_str()) && - !strcmp(intypeName,"OpenDataObject")) - { - typeUnset = true; - } - } - - - if (intypeURI != 0) { - typeURI = new char[strlen(intypeURI) +1]; - strcpy(typeURI, intypeURI); - } - else { - typeURI = 0; - } - if (intypeName != 0) { - typeName = new char[strlen(intypeName) +1]; - strcpy(typeName, intypeName); - } - else { - typeName = 0; - theFactory = 0; - } -} - -DataObjectListImpl::~DataObjectListImpl() -{ - if (typeURI != 0) { - delete typeURI; - typeURI = 0; - } - if (typeName != 0) { - delete typeName; - typeName = 0; - } -} - -RefCountingPointer DataObjectListImpl::operator[] (int pos) -{ - validateIndex(pos); - return plist[pos]; -} - -const RefCountingPointer DataObjectListImpl::operator[] (int pos) const -{ - validateIndex(pos); - RefCountingPointer d = plist[pos]; - DataObjectImpl* dob = d; - return RefCountingPointer((DataObject*)dob); -} - - -int DataObjectListImpl::size () const -{ - return plist.size(); -} - -DATAOBJECT_VECTOR DataObjectListImpl::getVec() const -{ - return plist; -} - - - -const Type& DataObjectListImpl::getType() -{ - if (typeUnset) - { - std::string msg("The list property is open, and the type of the contents has not bee determined yet."); - SDO_THROW_EXCEPTION("Get Type", SDOTypeNotFoundException, - msg.c_str()); - } - return theFactory->getType(typeURI, typeName); -} - - -const Type::Types DataObjectListImpl::getTypeEnum() -{ - if (typeUnset) - { - return Type::OpenDataObjectType; - - } - return theFactory->getType(typeURI, typeName).getTypeEnum(); -} - - -void DataObjectListImpl::insert (unsigned int index, DataObjectPtr d) -{ - if (typeUnset)setType(d->getType().getURI(),d->getType().getName()); - - checkFactory(d); - - checkType(theFactory->getType(typeURI,typeName), - d->getType()); - - if (container != 0) - { - container->logChange(pindex); - } - for (int i=0;i < plist.size(); i++) - { - if (plist[i] == d) - { - std::string msg("Insertion of object which already exists in the list:"); - msg += typeURI; - msg += " "; - msg += typeName; - SDO_THROW_EXCEPTION("List insert", SDOUnsupportedOperationException, - msg.c_str()); - } - } - if (strcmp(typeURI,d->getType().getURI()) - || - strcmp(typeName,d->getType().getName())) - { - std::string msg("Insertion of object of the wrong type to a list:"); - msg += typeURI; - msg += " "; - msg += typeName; - msg += " not compatible with "; - msg += d->getType().getURI(); - msg += " "; - msg += d->getType().getName(); - SDO_THROW_EXCEPTION("List append", SDOInvalidConversionException, - msg.c_str()); - } - - DataObject* dob = d; // unwrap the data object ready for a downcasting hack. - DataObjectImpl* con = ((DataObjectImpl*)dob)->getContainerImpl(); - if (!isReference) - { - if (con != 0) - { - if (con != container) - { - /* this data object is already contained somewhere else */ - std::string msg("Insertion of object to list, object is already contained:"); - msg += d->getType().getURI(); - msg += " "; - msg += d->getType().getName(); - SDO_THROW_EXCEPTION("List append", SDOInvalidConversionException, - msg.c_str()); - } - } - else - { - ((DataObjectImpl*)dob)->setContainer(container); - ((DataObjectImpl*)dob)->setApplicableChangeSummary(); - ((DataObjectImpl*)dob)->logCreation((DataObjectImpl*)dob, - (DataObjectImpl*)container, - container->getProperty(pindex)); - } - } - - plist.insert(plist.begin()+index, RefCountingPointer((DataObjectImpl*)dob)); - - if (container != 0) - { - if (container->getType().isSequencedType()) - { - SequenceImpl* sq = container->getSequenceImpl(); - if (sq)sq->push(container->getProperty(pindex),index); - } - } - -} - - - - void DataObjectListImpl::checkFactory(DataObjectPtr dob) - { - - DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dob; - - if (d->getDataFactory() == theFactory) return; - - // temporary experiment with allowing data objects - // to move from factory to factory if the type is - // nominally present, and the type systems match - - DataFactoryImpl* f = (DataFactoryImpl*)theFactory; - - - if (d->getContainer() != 0) - { - std::string msg("Insertion of object into list from another factory is only allowed if the parent is null: "); - - const Type& t = d->getType(); - msg += t.getURI(); - msg += "#"; - msg += t.getName(); - msg += " into property "; - msg += container->getProperty(pindex).getName(); - msg += " of type "; - msg += typeURI; - msg += "#"; - msg += typeName; - SDO_THROW_EXCEPTION("checkFactory", SDOInvalidConversionException, - msg.c_str()); - } - - if (f->isCompatible(d->getDataFactory(),d)) - { - d->setDataFactory(theFactory); - // we will also need to transfer any children - assuming they - // are ok in the new factory!! - d->transferChildren(d,theFactory); - return; - } - - std::string msg("Insertion into list from incompatible factory:"); - - const Type& t = d->getType(); - msg += t.getURI(); - msg += "#"; - msg += t.getName(); - msg += " into property "; - msg += container->getProperty(pindex).getName(); - msg += " of type "; - msg += typeURI; - msg += "#"; - msg += typeName; - SDO_THROW_EXCEPTION("checkFactory", SDOInvalidConversionException, - msg.c_str()); - - } - - -void DataObjectListImpl::checkType(const Type& listType, const Type& objectType) - { - if (listType.equals(objectType)) return; - - const TypeImpl* ti = ((DataFactoryImpl*)theFactory)->findTypeImpl - (objectType.getURI(),objectType.getName()); - if (ti != 0) - { - do - { - ti = (const TypeImpl*)ti->getBaseType(); - if (ti == 0) break; - if (listType.equals(*ti)) return; - } while (ti != 0); - - // allow types of any substitutes - if (container != 0) - { - PropertyImpl* pi = - container->getPropertyImpl(pindex); - if (pi != 0) - { - unsigned int subcount = pi->getSubstitutionCount(); - for (int i=0;igetSubstitutionType(i); - if (tsub != 0 && tsub->equals(objectType)) return; - } - } - } - } - - // no match.. - std::string msg("Insertion of object of incompatible type "); - msg += objectType.getURI(); - msg += "#"; - msg += objectType.getName(); - msg += " into list of type "; - msg += listType.getURI(); - msg += "#"; - msg += listType.getName(); - SDO_THROW_EXCEPTION("TypeCheck", SDOInvalidConversionException, - msg.c_str()); - } - -//TODO Modify parameters to SDOString -void DataObjectListImpl::setType(const char* uri, const char* name) -{ - // need to check for an opentype list which has not been set up yet - if (name == 0) return; - - const TypeImpl* t = ((DataFactoryImpl*)theFactory)->findTypeImpl(uri,name); - if (t == 0) return; // cannot set to a type which is not avilable - - // need to modify the instance property of the container - container->setInstancePropertyType(pindex,t); - - delete typeName; - typeName = new char[strlen(name)+1]; - strcpy(typeName, name); - delete typeURI; - if (uri == 0) - { - typeURI = new char[1]; - typeURI[0] = 0; - } - else - { - typeURI = new char[strlen(uri)+1]; - strcpy(typeURI, uri); - } - typeUnset = false; -} - -void DataObjectListImpl::setType(const SDOString& uri, const SDOString& name) -{ - // need to check for an opentype list which has not been set up yet - // if (name == 0) return; - - const TypeImpl* t = ((DataFactoryImpl*)theFactory)->findTypeImpl(uri.c_str(), name.c_str()); - if (t == 0) return; // cannot set to a type which is not avilable - - // need to modify the instance property of the container - container->setInstancePropertyType(pindex,t); - - delete typeName; - typeName = new char[name.length() + 1]; - strcpy(typeName, name.c_str()); - - delete typeURI; - typeURI = new char[uri.length() + 1]; - strcpy(typeURI, uri.c_str()); - - typeUnset = false; -} - -void DataObjectListImpl::append (DataObjectPtr d) -{ - - if (typeUnset)setType(d->getType().getURI(),d->getType().getName()); - - if (container != 0) - { - container->logChange(pindex); - } - - for (int i=0;i < plist.size(); i++) - { - if (plist[i] == d) - { - std::string msg("Append of object which already exists in the list:"); - msg += typeURI; - msg += " "; - msg += typeName; - SDO_THROW_EXCEPTION("List append", SDOUnsupportedOperationException, - msg.c_str()); - } - } - - checkFactory(d); - - checkType(theFactory->getType(typeURI,typeName), - d->getType()); - - DataObject* dob = d; // unwrap the data object ready for a downcasting hack. - DataObjectImpl* con = ((DataObjectImpl*)dob)->getContainerImpl(); - - if (!isReference) - { - if (con != 0) - { - if (con != container) - { - /* this data object is already contained somewhere else */ - std::string msg("Append of object to list, object is already contained:"); - msg += d->getType().getURI(); - msg += " "; - msg += d->getType().getName(); - SDO_THROW_EXCEPTION("List append", SDOInvalidConversionException, - msg.c_str()); - } - } - else - { - ((DataObjectImpl*)dob)->setContainer(container); - ((DataObjectImpl*)dob)->setApplicableChangeSummary(); - if (!container->getProperty(pindex).getType().isDataType()) - { - ((DataObjectImpl*)dob)->logCreation((DataObjectImpl*)dob, - container,container->getProperty(pindex)); - } - - } - } - plist.insert(plist.end(),RefCountingPointer((DataObjectImpl*)dob)); - - if (container != 0) { - if (container->getType().isSequencedType()) - { - SequenceImpl* sq = container->getSequenceImpl(); - if (sq)sq->push(container->getProperty(pindex),plist.size()-1); - } - } -} - -void DataObjectListImpl::insert (unsigned int index, bool d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BooleanLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setBoolean(d); - insert(index, dol); -} - -void DataObjectListImpl::append (bool d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BooleanLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setBoolean(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, char d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, ByteLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setByte(d); - insert(index, dol); -} - -void DataObjectListImpl::append (char d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, ByteLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setByte(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, wchar_t d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, CharacterLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setCharacter(d); - insert(index, dol); -} - -void DataObjectListImpl::append (wchar_t d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, CharacterLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setCharacter(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, const wchar_t* d, unsigned int length) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, StringLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setString(d, length); - insert(index, dol); -} - -void DataObjectListImpl::append (const wchar_t* d, unsigned int length) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, StringLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setString(d, length); - append( dol); -} -void DataObjectListImpl::insert (unsigned int index, const char* d, unsigned int length) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BytesLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setBytes(d, length); - insert(index, dol); -} - -void DataObjectListImpl::append (const char* d, unsigned int length) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BytesLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setBytes(d, length); - append( dol); -} -void DataObjectListImpl::insert (unsigned int index, const char* d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BytesLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setCString(d); - insert(index, dol); -} -void DataObjectListImpl::insert (unsigned int index, const SDOString& d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BytesLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setCString(d); - insert(index, dol); -} - -void DataObjectListImpl::append (const char* d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BytesLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setCString(d); - append( dol); -} - -void DataObjectListImpl::append (const SDOString& d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, BytesLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setCString(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, short d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, ShortLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setShort(d); - insert(index, dol); -} - -void DataObjectListImpl::append (short d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, ShortLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setShort(d); - append( dol); -} - - -#if __WORDSIZE !=64 -void DataObjectListImpl::insert (unsigned int index, long d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, IntegerLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setInteger(d); - insert(index, dol); -} - -void DataObjectListImpl::append (long d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, IntegerLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setInteger(d); - append( dol); -} -#endif - -void DataObjectListImpl::insert (unsigned int index, const SDODate d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, DateLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setDate(d); - insert(index, dol); -} - -void DataObjectListImpl::append (const SDODate d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, DateLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setDate(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, int64_t d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, LongLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setLong(d); - insert(index, dol); -} - -void DataObjectListImpl::append (int64_t d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, LongLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setLong(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, float d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, FloatLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setFloat(d); - insert(index, dol); -} - -void DataObjectListImpl::append (float d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, FloatLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setFloat(d); - append( dol); -} - -void DataObjectListImpl::insert (unsigned int index, long double d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, DoubleLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setDouble(d); - insert(index, dol); -} - -void DataObjectListImpl::append (long double d) -{ - if (theFactory == 0) return; - - if (typeUnset)setType(Type::SDOTypeNamespaceURI, DoubleLiteral); - - RefCountingPointer dol = theFactory->create(typeURI, typeName); - DataObject* dob = dol; - ((DataObjectImpl*)dob)->setDouble(d); - append( dol); -} - - -void DataObjectListImpl::decrementPindex() -{ - pindex--; -} - - -RefCountingPointer DataObjectListImpl::remove(unsigned int index) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer d = (*this)[index]; - - // log deletion only if the list is of data objects. - if (theFactory != 0) - { - const Type& t = theFactory->getType(typeURI,typeName); - const Property& p = container->getProperty(pindex); - if (!t.isDataType() && !p.isReference()) - { - (getVec()[index])->logDeletion(); - } - } - plist.erase(plist.begin()+index); - DataObject* dob = d; - ((DataObjectImpl*)dob)->setContainer(0); - return d; -} - -void DataObjectListImpl::validateIndex(int index) const -{ - if ((index < 0) || (index >= size())) - { - char val[32]; - std::string msg("Index out of range:"); - sprintf(val,"%d",index); - msg += val; - SDO_THROW_EXCEPTION("validateIndex", SDOIndexOutOfRangeException, - msg.c_str()); - - } - -} - -bool DataObjectListImpl::getBoolean(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getBoolean(); -} -char DataObjectListImpl::getByte(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getByte(); -} -wchar_t DataObjectListImpl::getCharacter(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getCharacter(); -} -unsigned int DataObjectListImpl::getBytes(unsigned int index, char* value, unsigned int max) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getBytes(value, max); -} -unsigned int DataObjectListImpl::getString(unsigned int index, wchar_t* value, unsigned int max) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getString(value, max); -} -short DataObjectListImpl::getShort(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getShort(); -} -long DataObjectListImpl::getInteger(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getInteger(); -} -int64_t DataObjectListImpl::getLong(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getLong(); -} -float DataObjectListImpl::getFloat(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getFloat(); -} -long double DataObjectListImpl::getDouble(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getDouble(); -} -const SDODate DataObjectListImpl::getDate(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getDate(); -} -const char* DataObjectListImpl::getCString(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer d = ((*this)[index]); - DataObject* dob = d; - return ((DataObjectImpl*)dob)->getCString(); -} - -DataObjectPtr DataObjectListImpl::getDataObject(unsigned int index) const -{ - validateIndex(index); - return (*this)[index]; -} - -void DataObjectListImpl::setBoolean(unsigned int index, bool d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setBoolean(d); -} -void DataObjectListImpl::setByte(unsigned int index, char d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setByte(d); -} -void DataObjectListImpl::setCharacter(unsigned int index, wchar_t d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setCharacter(d); -} - -void DataObjectListImpl::setString(unsigned int index, const wchar_t* d, unsigned int len) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setString(d, len); -} -void DataObjectListImpl::setBytes(unsigned int index, const char* d, unsigned int len) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setBytes(d, len); -} - -void DataObjectListImpl::setShort(unsigned int index, short d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setShort(d); -} -void DataObjectListImpl::setInteger(unsigned int index, long d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setInteger(d); -} -void DataObjectListImpl::setLong(unsigned int index, int64_t d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setLong(d); -} -void DataObjectListImpl::setFloat(unsigned int index, float d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setFloat(d); -} -void DataObjectListImpl::setDouble(unsigned int index, long double d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setDouble(d); -} -void DataObjectListImpl::setDate(unsigned int index, const SDODate d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setDate(d); -} -void DataObjectListImpl::setCString(unsigned int index, char* d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setCString(d); -} -void DataObjectListImpl::setCString(unsigned int index, const SDOString& d) -{ - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - ((DataObjectImpl*)dob)->setCString(d); -} - -void DataObjectListImpl::setDataObject(unsigned int index, DataObjectPtr dob) -{ - - if (dob != 0) - { - checkFactory(dob); - - checkType(theFactory->getType(typeURI,typeName), - dob->getType()); - } - - validateIndex(index); - if (container != 0) - { - container->logChange(pindex); - } - - remove(index); - insert(index,dob); -} - -unsigned int DataObjectListImpl::getLength(unsigned int index) const -{ - validateIndex(index); - RefCountingPointer dd = ((*this)[index]); - DataObject* dob = dd; - return dob->getLength(); -} - - const SDOString DataObjectListImpl::BooleanLiteral = "Boolean"; - const SDOString DataObjectListImpl::ByteLiteral = "Byte"; - const SDOString DataObjectListImpl::CharacterLiteral = "Character"; - const SDOString DataObjectListImpl::BytesLiteral = "Bytes"; - const SDOString DataObjectListImpl::StringLiteral = "String"; - const SDOString DataObjectListImpl::IntegerLiteral = "Integer"; - const SDOString DataObjectListImpl::ShortLiteral = "Short"; - const SDOString DataObjectListImpl::DateLiteral = "Date"; - const SDOString DataObjectListImpl::LongLiteral = "Long"; - const SDOString DataObjectListImpl::FloatLiteral = "Float"; - const SDOString DataObjectListImpl::DoubleLiteral = "Double"; - -}; -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h deleted file mode 100644 index ce2cc5488f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DATAOBJECTLISTIMPL_H_ -#define _DATAOBJECTLISTIMPL_H_ - -#include "commonj/sdo/DataObjectList.h" -#include "commonj/sdo/SDODate.h" - -#include "commonj/sdo/disable_warn.h" - -#include - - -namespace commonj{ -namespace sdo{ - -class DataObjectImpl; -class DataFactory; - -typedef std::vector< RefCountingPointer > DATAOBJECT_VECTOR; - -/** - * DataObjectListImpl implements the abstract class DataObjectList. - * List for retrieving many valued property values. - * - * DataObjectList provides an API for getting and setting values in - * many valued properties. The list deals with both DataType and - * DataObjectType properties. - */ - -class DataObjectListImpl : public DataObjectList -{ - -public: - DataObjectListImpl(DATAOBJECT_VECTOR p); - DataObjectListImpl(const DataObjectListImpl &pin); - DataObjectListImpl(); - DataObjectListImpl(DataFactory* df, DataObjectImpl* cont, unsigned int inpindex, - const char* tURI, const char* tName); - - virtual ~DataObjectListImpl(); - - // open type support - virtual void decrementPindex(); - - virtual DataObjectPtr operator[] (int pos); - virtual const DataObjectPtr operator[] (int pos) const; - - // set/get primitive values - virtual bool getBoolean(unsigned int index) const; - virtual char getByte(unsigned int index) const; - virtual wchar_t getCharacter(unsigned int index) const; - virtual unsigned int getString(unsigned int index, wchar_t* buf, - unsigned int max) const; - virtual unsigned int getBytes(unsigned int index, char* buf, - unsigned int max) const; - virtual short getShort(unsigned int index) const; - virtual long getInteger(unsigned int index) const; - virtual int64_t getLong(unsigned int index) const; - virtual float getFloat(unsigned int index) const; - virtual long double getDouble(unsigned int index) const; - virtual const SDODate getDate(unsigned int index) const; - virtual const char* getCString(unsigned int index) const; - virtual DataObjectPtr getDataObject(unsigned int index) const; - - virtual void setBoolean(unsigned int index, bool d); - virtual void setByte(unsigned int index, char d); - virtual void setCharacter(unsigned int index, wchar_t d); - virtual void setString(unsigned int index, const wchar_t* d, unsigned int len); - virtual void setBytes(unsigned int index, const char* d, unsigned int len); - virtual void setShort(unsigned int index, short d); - virtual void setInteger(unsigned int index, long d); - virtual void setLong(unsigned int index, int64_t d); - virtual void setFloat(unsigned int index, float d); - virtual void setDouble(unsigned int index, long double d); - virtual void setDate(unsigned int index, const SDODate d); - virtual void setCString(unsigned int index, char* d); - virtual void setCString(unsigned int index, const SDOString& d); - virtual void setDataObject(unsigned int index, DataObjectPtr dob); - - virtual unsigned int getLength(unsigned int index) const; - - virtual int size () const; - - virtual void insert (unsigned int index, DataObjectPtr d); - virtual void append (DataObjectPtr d); - - virtual void insert (unsigned int index, bool d) ; - virtual void append (bool d) ; - - virtual void insert (unsigned int index, char d) ; - virtual void append (char d) ; - - virtual void insert (unsigned int index, wchar_t d) ; - virtual void append (wchar_t d) ; - - virtual void insert (unsigned int index, const wchar_t* d, unsigned int len) ; - virtual void append (const wchar_t* d, unsigned int len) ; - - virtual void insert (unsigned int index, const char* d, unsigned int len) ; - virtual void append (const char* d, unsigned int len) ; - - virtual void insert (unsigned int index, const char* d) ; - virtual void insert (unsigned int index, const SDOString& d) ; - virtual void append (const char* d) ; - virtual void append (const SDOString& d) ; - - virtual void insert (unsigned int index, short d) ; - virtual void append (short d) ; - - virtual void insert (unsigned int index, const SDODate d) ; - virtual void append (const SDODate d) ; - -#if __WORDSIZE !=64 - virtual void insert (unsigned int index, long d) ; - virtual void append (long d) ; -#endif - - virtual void insert (unsigned int index, int64_t d) ; - virtual void append (int64_t d) ; - - virtual void insert (unsigned int index, float d) ; - virtual void append (float d) ; - - virtual void insert (unsigned int index, long double d) ; - virtual void append (long double d) ; - - - virtual DataObjectPtr remove (unsigned int index); - - virtual void checkFactory(DataObjectPtr dob); - virtual void checkType(const Type& listType, const Type& objectType); - virtual void setType(const char* uri, const char* name); - virtual void setType(const SDOString& uri, const SDOString& name); - - /* getType returns type - * - * Returns the type. - * May throw SDOTYpeNotFoundException for unset open types - */ - - - virtual const Type& getType(); - - /* getTypeEnum returns an enumerator for the type - * - * Returns an enumerator for the type for easy switching on basic types. - * The enumerator is part of the Type class - * May throw SDOTypeNotFoundException for open types - */ - - virtual const Type::Types getTypeEnum(); - - -private: - DATAOBJECT_VECTOR plist; - DATAOBJECT_VECTOR getVec() const; - - // For creation of items via the insert/append api. - char* typeURI; - char* typeName; - - // for open types, the list may not have a type until the - // first item is entered - - bool typeUnset; - - // No reference count held on the factory - DataFactory* theFactory; - - // For logging a change in the change summary when appending - DataObjectImpl* container; - unsigned int pindex; - bool isReference; - - void validateIndex(int index) const; - - static const SDOString BooleanLiteral; - static const SDOString ByteLiteral; - static const SDOString CharacterLiteral; - static const SDOString BytesLiteral; - static const SDOString StringLiteral; - static const SDOString IntegerLiteral; - static const SDOString ShortLiteral; - static const SDOString DateLiteral; - static const SDOString LongLiteral; - static const SDOString FloatLiteral; - static const SDOString DoubleLiteral; - -}; -}; -}; -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.cpp deleted file mode 100644 index cf9029afa9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/disable_warn.h" -#include "commonj/sdo/DefaultLogWriter.h" - -#include -using namespace std; - -namespace commonj -{ - namespace sdo - { - - DefaultLogWriter::DefaultLogWriter() - { - formatindent = 0; - } - - DefaultLogWriter::~DefaultLogWriter() - { - } - - void DefaultLogWriter::log(int indent, int level, const char* msg) - { - if (indent < 0) formatindent += indent; - for (int i=0; i < formatindent; i++) - { - cout << " "; - } - cout << msg < 0) formatindent += indent; - } - - } // End namespace sca -} // End namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.h deleted file mode 100644 index deab314ef7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/DefaultLogWriter.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SDO_DefaultLOGWriter_H -#define SDO_DefaultLOGWriter_H - -#include "commonj/sdo/LogWriter.h" - - - -namespace commonj -{ - namespace sdo - { - -/** - * DefaultLogWriter is a basic log writer, part of the logger. - * The logging API holds a log writer , and uses it to send - * output whereever it is needed. The application writer would - * hook their own LogWriter in place of this simple one. - */ - class DefaultLogWriter : public LogWriter - { - public: - - DefaultLogWriter(); - virtual ~DefaultLogWriter(); - - virtual void log(int indent, int level, const char* msg); - private: - int formatindent; - }; - - } // End namespace sca -} // End namespace commonj -#endif // SDO_DefaultLOGWriter_H diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp deleted file mode 100644 index 0024efa1fe..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.cpp +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" -#include "commonj/sdo/Sequence.h" - -#include "commonj/sdo/DataObject.h" - - - -#include "commonj/sdo/EqualityHelper.h" - -namespace commonj{ -namespace sdo{ - - bool EqualityHelper::compareitem(DataObjectPtr to, DataObjectPtr from, const Property& p) - { - switch (p.getTypeEnum()) - { - case Type::BooleanType: - return (to->getBoolean(p) == from->getBoolean(p)); - case Type::ByteType: - return (to->getByte(p) == from->getByte(p)); - case Type::CharacterType: - return (to->getCharacter(p) == from->getCharacter(p)); - case Type::IntegerType: - return (to->getInteger(p) == from->getInteger(p)); - case Type::ShortType: - return (to->getShort(p) == from->getShort(p)); - case Type::DoubleType: - return (to->getDouble(p) == from->getDouble(p)); - case Type::FloatType: - return (to->getFloat(p) == from->getFloat(p)); - case Type::LongType: - return (to->getLong(p) == from->getLong(p)); - case Type::DateType: - return (to->getDate(p).getTime() == from->getDate(p).getTime()); - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::UriType: - case Type::StringType: - { - unsigned int siz = from->getLength(p); - if (siz != to->getLength(p)) return false; - - if (siz > 0) - { - wchar_t * buff = new wchar_t[siz]; - wchar_t * buft = new wchar_t[siz]; - from->getString(p, buff, siz); - to->getString(p, buft, siz); - for (int i=0;i< siz; i++) - { - if (buff[i] != buft[i]) - { - delete buff; - delete buft; - return false; - } - } - delete buff; - delete buft; - } - return true; - } - case Type::BytesType: - { - unsigned int siz = from->getLength(p); - if (siz != to->getLength(p)) return false; - - if (siz > 0) - { - char * buff = new char[siz]; - char * buft = new char[siz]; - from->getBytes(p, buff, siz); - to->getBytes(p, buft, siz); - for (int i=0;i< siz; i++) - { - if (buff[i] != buft[i]) - { - delete buff; - delete buft; - return false; - } - } - delete buff; - delete buft; - } - return true; - } - default: - return true; - } // switch - } - - bool EqualityHelper::comparelist(DataObjectList& to, DataObjectList& from, Type::Types t) - { - switch (t) - { - case Type::BooleanType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getBoolean(i) != from.getBoolean(i)) - { - return false; - } - } - return true; - } - - case Type::ByteType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getByte(i) != from.getByte(i)) - { - return false; - } - } - return true; - } - - case Type::CharacterType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getCharacter(i) != from.getCharacter(i)) - { - return false; - } - } - return true; - } - - case Type::IntegerType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getInteger(i) != from.getInteger(i)) - { - return false; - } - } - return true; - } - - case Type::ShortType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getShort(i) != from.getShort(i)) - { - return false; - } - } - return true; - } - case Type::DoubleType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getDouble(i) != from.getDouble(i)) - { - return false; - } - } - return true; - } - - case Type::FloatType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getFloat(i) != from.getFloat(i)) - { - return false; - } - } - return true; - } - - case Type::LongType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getLong(i) != from.getLong(i)) - { - return false; - } - } - return true; - } - - case Type::DateType: - { - for (int i=0;i< from.size(); i++) - { - if (to.getDate(i).getTime() != from.getDate(i).getTime()) - { - return false; - } - } - return true; - } - - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::UriType: - case Type::StringType: - { - for (int i=0;i< from.size(); i++) - { - unsigned int siz = from.getLength(i); - if (siz != to.getLength(i)) return false; - - if (siz > 0) - { - wchar_t * buff = new wchar_t[siz]; - wchar_t * buft = new wchar_t[siz]; - from.getString(i,buff,siz); - to.getString(i,buft,siz); - for (int j=0;j 0) - { - char * buff = new char[siz]; - char * buft = new char[siz]; - from.getBytes(i,buff,siz); - to.getBytes(i,buft,siz); - for (int j=0;jgetInstanceProperties(); - for (int i=0;i < pl.size(); i++) - { - // data objects are only compared the deep equality case - if (pl[i].getType().isDataObjectType()) - { - if (!fullEqual) - { - continue; - } - else - { - if (pl[i].isMany()) - { - DataObjectList& dolold = dataObject1->getList(pl[i]); - DataObjectList& dolnew = dataObject2->getList(pl[i]); - if (dolnew.size() != dolold.size()) return false; - - for (int i=0;i< dolold.size(); i++) - { - if (!internalEqual(dolold[i], dolnew[i], true)) - { - return false; - } - } - } - else - { - if (!internalEqual( - dataObject1->getDataObject(pl[i]), - dataObject2->getDataObject(pl[i]), true)) - { - return false; - } - } - } - } - else - { - if (pl[i].isMany()) - { - DataObjectList& dolold = dataObject1->getList(pl[i]); - DataObjectList& dolnew = dataObject2->getList(pl[i]); - if (dolold.size() != dolnew.size()) return false; - if (!comparelist(dolold, dolnew, pl[i].getTypeEnum())) return false; - } - else - { - if (!compareitem(dataObject1,dataObject2, pl[i])) - { - return false; - } - } // else - } - } - return true; - } - -} -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.h deleted file mode 100644 index 3058bd8f72..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/EqualityHelper.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _EQUALITYHELPER_H_ -#define _EQUALITYHELPER_H_ - -#include "commonj/sdo/RefCountingPointer.h" - - - -namespace commonj{ -namespace sdo{ - -/** - * EqualityHelper provides static helper methods for equals. - * equalsShallow compares the DataType properties of the - * two data objects. - * equals performs a check on all the memebers and verifies that - * the same data objects are children. - */ - - class EqualityHelper -{ - public: - - /** - * Shallow compare of DataObjects - * - * Compares two DataObjects for each property where - * property.getType().isDataObjectType() is false. - * Compares dataObject1.get(property).equals(dataObject2.get(property)) - * Properties where property.getType().isDataObjectType() is true - * are not compared. - * DataObjects must have the same type - * dataObject1.getType() == dataObject2.getType() - * Returns true if all values of all compared properties are equal. - * @param dataObject1 DataObject to be compared - * @param dataObject2 DataObject to be compared - * @return true if equal - */ - static SDO_API bool equalShallow(DataObjectPtr dataObject1, DataObjectPtr dataObject2); - - /** - * Deep compare of DataObjects - * Compares dataObject1 and dataObject2 and all their contained - * DataObjects (property.isContainment() is true) recursively. - * Values of properties are comapred as in isEqualShallow, - * and values of properties where - * property.getType().isDataObjectType() is true - * are compared where each value copied must be a corresponding - * DataObject contained by the source dataObject. - * The dataObject trees must be closed. - * If any DataObject referenced in either tree is not part of the - * containment trees an IllegalArgumentException is thrown. - * If a ChangeSummary is part of the tree they must contain an - * identical summary for their respective trees. - * - * @param dataObject1 DataObject to be compared - * @param dataObject2 DataObject to be compared - * @return true if all compared aspects of all compared objects are equal - * @throws IllegalArgumentException if any referenced DataObject - * is not part of the containment trees. - */ - static SDO_API bool equal(DataObjectPtr dataObject1, DataObjectPtr dataObject2); - - private: - - static bool internalEqual(DataObjectPtr dataObject1, - DataObjectPtr dataObject2, - bool fullEqual); - - static bool comparelist(DataObjectList& to, DataObjectList& from, Type::Types t); - - static bool compareitem(DataObjectPtr to, DataObjectPtr from, const Property& p); - - - -}; -}; -}; -#endif //_EQUALITYHELPER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.cpp deleted file mode 100644 index e0c275ede1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/GroupDefinition.h" -namespace commonj -{ - namespace sdo - { - GroupDefinition::GroupDefinition() - { - } - - GroupDefinition::~GroupDefinition() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.h deleted file mode 100644 index de5e3bbb5d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupDefinition.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _GROUPDEFINITION_H_ -#define _GROUPDEFINITION_H_ - -#include "commonj/sdo/disable_warn.h" -#include "commonj/sdo/GroupEvent.h" - -#include "list" - - -namespace commonj -{ - namespace sdo - { - - -/** - * TypeDefinition holds information gathered from parsing the - * XSD and used for creating Types - */ - class GroupDefinition - { - - public: - GroupDefinition(); - virtual ~GroupDefinition(); - - - SDOXMLString name; - SDOXMLString uri; - bool isAttributeGroup; - std::vector events; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_TYPEDEFINITION_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.cpp deleted file mode 100644 index 58c229ac0a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/GroupEvent.h" -namespace commonj -{ - namespace sdo - { - GroupEvent::GroupEvent() - { - } - - GroupEvent::GroupEvent( - const SDOXMLString& inlocalname, - const SDOXMLString& inprefix, - const SDOXMLString& inURI, - const SAX2Namespaces& innamespaces, - const SAX2Attributes& inattributes - ) - { - localname = inlocalname; - prefix = inprefix; - URI = inURI; - namespaces = innamespaces; - attributes = inattributes; - isStartEvent = true; - } - - GroupEvent::GroupEvent( - const SDOXMLString& inlocalname, - const SDOXMLString& inprefix, - const SDOXMLString& inURI - ) - { - localname = inlocalname; - prefix = inprefix; - URI = inURI; - isStartEvent = false; - } - - GroupEvent::~GroupEvent() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.h deleted file mode 100644 index f6495687ba..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/GroupEvent.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _GROUPEVENT_H_ -#define _GROUPEVENT_H_ - -#include "commonj/sdo/disable_warn.h" - - -#include "commonj/sdo/SAX2Parser.h" - -namespace commonj -{ - namespace sdo - { - - - class GroupEvent - { - - public: - GroupEvent(); - GroupEvent( - const SDOXMLString& inlocalname, - const SDOXMLString& inprefix, - const SDOXMLString& inURI, - const SAX2Namespaces& innamespaces, - const SAX2Attributes& inattributes - ); - - GroupEvent( - const SDOXMLString& inlocalname, - const SDOXMLString& inprefix, - const SDOXMLString& inURI - ); - - virtual ~GroupEvent(); - - bool isStartEvent; - SDOXMLString localname; - SDOXMLString prefix; - SDOXMLString URI; - SAX2Namespaces namespaces; - SAX2Attributes attributes; - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_TYPEDEFINITION_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.cpp deleted file mode 100644 index ec17d97b02..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/HelperProvider.h" -#include "commonj/sdo/XSDHelperImpl.h" -#include "commonj/sdo/XMLHelperImpl.h" -#include "commonj/sdo/export.h" -#include "commonj/sdo/DataFactory.h" - -namespace commonj -{ - namespace sdo - { - - ////////////////////////////////////////////////////////////////////// - // Create an XSDHelper - ////////////////////////////////////////////////////////////////////// - XSDHelperPtr HelperProvider::getXSDHelper(DataFactoryPtr dataFactory) - { - return new XSDHelperImpl(dataFactory); - } - ////////////////////////////////////////////////////////////////////// - // Create an XMLHelper - ////////////////////////////////////////////////////////////////////// - XMLHelperPtr HelperProvider::getXMLHelper(DataFactoryPtr dataFactory) - { - return new XMLHelperImpl(dataFactory); - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.h deleted file mode 100644 index 426b069b56..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/HelperProvider.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _HELPERPROVIDER_H_ -#define _HELPERPROVIDER_H_ - - -#include "commonj/sdo/XSDHelper.h" -#include "commonj/sdo/XMLHelper.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/export.h" - - -namespace commonj -{ - namespace sdo - { - - -/** - * HelperProvider gives access to helpers (static methods). - * - * The helper provider gives back an XSD or XML helper associated - * with the given data factory - */ - class HelperProvider - { - public: - -/** - * - * The helper provider gives back an XSD helper associated - * with the given data factory - */ - SDO_API static XSDHelperPtr getXSDHelper(DataFactoryPtr dataFactory=0); - -/** - * - * The helper provider gives back an XML helper associated - * with the given data factory - */ - SDO_API static XMLHelperPtr getXMLHelper(DataFactoryPtr dataFactory=0); - - }; - - } // End - namespace sdo -} // End - namespace commonj - -#endif // _HELPERPROVIDER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.cpp deleted file mode 100644 index d43b918a77..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/LogWriter.h" - -namespace commonj -{ - namespace sdo - { - LogWriter::~LogWriter() - { - } - - } // End namespace sdo -} // End namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.h deleted file mode 100644 index 40954d9b25..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/LogWriter.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SDO_LOGWriter_H -#define SDO_LOGWriter_H - -#include "commonj/sdo/export.h" - -namespace commonj -{ - namespace sdo - { - -/** - * LogWriter is an abstract class for implementers to inherit from. - * see DefaultLogWriter. - */ - class LogWriter - { - public: - virtual ~LogWriter(); - - SDO_API virtual void log(int indent, int level, const char* msg) = 0; - }; - - } // End namespace sdo -} // End namespace commonj -#endif // SDO_LOGWriter_H diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.cpp deleted file mode 100644 index 47f7072c38..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Logger.h" -#include -#include -#include "commonj/sdo/DefaultLogWriter.h" -#include -#include -using namespace std; - -namespace commonj -{ - namespace sdo - { - LogWriter* Logger::logWriter = getLogWriter(); - - LogWriter* Logger::getLogWriter() - { - if (logWriter == 0) - { - setLogWriter(0); - } - return logWriter; - } - - void Logger::setLogWriter(LogWriter* writer) - { - if (logWriter != writer) - { - delete logWriter; - } - - if (writer == 0) - { - logWriter = new DefaultLogWriter; - } - else - { - logWriter = writer; - } - } - - int Logger::loggingLevel = setLogging(); - - int Logger::setLogging() - { - char* loggingVar = 0; - loggingVar = getenv("TUSCANY_SDOCPP_LOGGING"); - if (loggingVar == 0) - return 0; - else - return atoi(loggingVar); - } - - void Logger::setLogging(int level) - { - loggingLevel = level; - } - - void Logger::log(int indent, int level, const char* msg) - { - if (level <= loggingLevel) - { - logWriter->log(indent, level, msg); - } - } - - void Logger::logArgs(int indent, int level, const char* msg, ...) - { - if (level <= loggingLevel) - { - va_list variableArguments; - va_start(variableArguments, msg); - char messageBuffer[1024]; - vsprintf(messageBuffer, msg, variableArguments); - logWriter->log(indent, level, messageBuffer); - va_end(variableArguments); - } - } - - } // End namespace sdo -} // End namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.h deleted file mode 100644 index 556d503154..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logger.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SDO_LOGGER_H -#define SDO_LOGGER_H - - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/LogWriter.h" -namespace commonj -{ - namespace sdo - { - -/** - * Logger is used for debug style logging such as method trace. - * The logger can log at different levels, and can log entry, exit - * and events. The log entries can take arguments or be just - * strings. - */ - class Logger { - - public: -/** - * attach a log writer. - */ - SDO_API static void setLogWriter(LogWriter* writer); -/** - * switch logging to a level. - */ - SDO_API static void setLogging(int level); - -/** - * log a message. - */ - SDO_API static void log(int indent, int level, const char* msg); -/** - * log a message with parameters. - */ - SDO_API static void logArgs(int indent, int level, const char* msg, ...); - - static int loggingLevel; - - private: - static LogWriter* logWriter; - static LogWriter* getLogWriter(); - static int setLogging(); - }; - - } // End namespace sdo -} // End namespace commonj -#endif // SDO_LOGGER_H diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logging.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logging.h deleted file mode 100644 index 2d72d6f42d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Logging.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Logger.h" -#include "commonj/sdo/SDORuntimeException.h" - -#ifndef SDO_LOGGING_H -#define SDO_LOGGING_H - -/** - * logging level for stuff you rarely want to see, like - * memory allocations. - */ - -#define HIGHVOLUME 40 -/** - * logging level for normal path information - */ -#define INFO 30 - - /** - * logging level for something which is unusual. - */ - -#define WARNING 20 -/** - * logging level for a major problem - */ - -#define ERROR 10 - -#define INDENT 1 -#define OUTDENT -1 -#define NODENT 0 - - -/** - * Macro for simplifying addition of trace points - */ - -#ifdef _DEBUG -#define LOGENTRY(level, methodName) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(INDENT, level, "Entering: %s", methodName); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGEXIT(level, methodName) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(OUTDENT, level, "Exiting: %s" ,methodName); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGINFO(level, message) \ -if (Logger::loggingLevel >= level) \ -Logger::log(NODENT, level, message); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGINFO_1(level, message, arg1) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(NODENT,level, message, arg1); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGINFO_2(level, message, arg1, arg2) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(NODENT,level, message, arg1, arg2); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGERROR(level, message) \ -if (Logger::loggingLevel >= level) \ -Logger::log(NODENT,level, message); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGERROR_1(level, message, arg1) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(NODENT,level, message, arg1); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGERROR_2(level, message, arg1, arg2) \ -if (Logger::loggingLevel >= level) \ -Logger::logArgs(NODENT,level, message, arg1, arg2); - -/** - * Macro for simplifying addition of trace points - */ -#define LOGSDOEXCEPTION(level, message, arg1) \ -if (Logger::loggingLevel >= level) \ -Logger::log(NODENT,level, message);\ -Logger::logArgs(NODENT,level, "%s:%s\nIn %s\nAt %s line %ld\n",\ - ((SDORuntimeException)arg1).getEClassName(),\ - ((SDORuntimeException)arg1).getMessageText(),\ - ((SDORuntimeException)arg1).getFunctionName(),\ - ((SDORuntimeException)arg1).getFileName(),\ - ((SDORuntimeException)arg1).getLineNumber()); - -#else // Not DEBUG - -/** - * Macro for simplifying addition of trace points - */ -#define LOGSDOEXCEPTION(level, message, arg1) - -/** - * Macro for simplifying addition of trace points - */ -#define LOGENTRY(level, methodName) - -/** - * Macro for simplifying addition of trace points - */ -#define LOGEXIT(level, methodName) - -/** - * Macro for simplifying addition of trace points - */ -#define LOGINFO(level, message) - -/** - * Macro for simplifying addition of trace points - */ -#define LOGINFO_1(level, message, arg1) - -/** - * Macro for simplifying addition of trace points - */ -#define LOGINFO_2(level, message, arg1, arg2) -/** - * Macro for simplifying addition of trace points - */ -#define LOGERROR(level, message) -/** - * Macro for simplifying addition of trace points - */ -#define LOGERROR_1(level, message, arg1) -/** - * Macro for simplifying addition of trace points - */ -#define LOGERROR_2(level, message, arg1, arg2) - -#endif -#endif // SDO_LOGGING_H diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Makefile.am deleted file mode 100644 index 6cced63259..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Makefile.am +++ /dev/null @@ -1,103 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -lib_LTLIBRARIES = libtuscany_sdo.la -AM_CPPFLAGS = $(CPPFLAGS) - -libtuscany_sdo_la_SOURCES = \ - ChangedDataObjectListImpl.cpp \ - ChangeSummaryBuilder.cpp \ - ChangeSummary.cpp \ - ChangeSummaryImpl.cpp \ - CopyHelper.cpp \ - DASProperty.cpp \ - DASType.cpp \ - DASValue.cpp \ - DASValues.cpp \ - DataFactory.cpp \ - DataFactoryImpl.cpp \ - DataGraph.cpp \ - DataGraphImpl.cpp \ - DataObject.cpp \ - DataObjectImpl.cpp \ - DataObjectInstance.cpp \ - DataObjectList.cpp \ - DataObjectListImpl.cpp \ - DefaultLogWriter.cpp \ - EqualityHelper.cpp \ - GroupDefinition.cpp \ - GroupEvent.cpp \ - HelperProvider.cpp \ - Logger.cpp \ - LogWriter.cpp \ - ParserErrorSetter.cpp \ - Property.cpp \ - PropertyDefinition.cpp \ - PropertyDefinitionImpl.cpp \ - PropertyImpl.cpp \ - PropertyList.cpp \ - PropertySetting.cpp \ - RefCountingObject.cpp \ - RefCountingPointer.cpp \ - SAX2Attribute.cpp \ - SAX2Attributes.cpp \ - SAX2Namespaces.cpp \ - SAX2Parser.cpp \ - SchemaInfo.cpp \ - SdoCheck.cpp \ - SDODate.cpp \ - SdoRuntime.cpp \ - SDORuntimeException.cpp \ - SDOSAX2Parser.cpp \ - SDOSchemaSAX2Parser.cpp \ - SDOUtils.cpp \ - SDOXMLBufferWriter.cpp \ - SDOXMLFileWriter.cpp \ - SDOXMLStreamWriter.cpp \ - SDOXMLString.cpp \ - SDOXMLWriter.cpp \ - SDOXSDBufferWriter.cpp \ - SDOXSDFileWriter.cpp \ - SDOXSDStreamWriter.cpp \ - SDOXSDWriter.cpp \ - Sequence.cpp \ - SequenceImpl.cpp \ - Setting.cpp \ - SettingList.cpp \ - Type.cpp \ - TypeDefinition.cpp \ - TypeDefinitions.cpp \ - TypeDefinitionImpl.cpp \ - TypeDefinitionsImpl.cpp \ - TypeImpl.cpp \ - TypeList.cpp \ - XMLDocument.cpp \ - XMLDocumentImpl.cpp \ - XMLHelper.cpp \ - XMLHelperImpl.cpp \ - XMLQName.cpp \ - XpathHelper.cpp \ - XSDHelper.cpp \ - XSDHelperImpl.cpp \ - XSDPropertyInfo.cpp \ - XSDTypeInfo.cpp - -libtuscany_sdo_la_LIBADD = -L${LIBXML2_LIB} -lxml2 - -INCLUDES = -I$(top_builddir)/runtime/core/src \ - -I${LIBXML2_INCLUDE} - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.cpp deleted file mode 100644 index 14d5d7aa1b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -// ParserErrorSetter.cpp: class allowing parser to push errors back. -// -////////////////////////////////////////////////////////////////////// -#include "commonj/sdo/ParserErrorSetter.h" -namespace commonj -{ - namespace sdo - { - ////////////////////////////////////////////////////////////////////// - // Construction/Destruction - ////////////////////////////////////////////////////////////////////// - ParserErrorSetter::~ParserErrorSetter() - { - } - - } // End - namespace sdo -} // End - namespace commonj - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.h deleted file mode 100644 index 3304e8c384..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/ParserErrorSetter.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PARSER_ERROR_SETTER_H_ -#define _PARSER_ERROR_SETTER_H_ - -#include "commonj/sdo/export.h" - -#include "commonj/sdo/disable_warn.h" - -#include - -namespace commonj{ -namespace sdo{ - -/** - * The ParserErrorSetter builds a list of all the errors which - * occurred during a parse, so they can be displayed for the - * user of an XSDHelper or XMLHelper - */ - -class ParserErrorSetter -{ -public: - virtual ~ParserErrorSetter(); - virtual void setError(const char* message) = 0; - virtual void clearErrors() = 0; -}; -}; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.cpp deleted file mode 100644 index 8e4a13ad9b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 -using namespace std; - - -#ifndef SDO_EXPORTS -#define SDO_EXPORTS -#endif -#include "commonj/sdo/export.h" - -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/TypeList.h" - -#include "commonj/sdo/Type.h" -#include "commonj/sdo/Property.h" -namespace commonj{ -namespace sdo{ - - // All delegated to the impl. - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.h deleted file mode 100644 index 74892ca832..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Property.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PROPERTY_H_ -#define _PROPERTY_H_ - - -#include "commonj/sdo/export.h" - -#include "commonj/sdo/Type.h" -#include "commonj/sdo/SDODate.h" - -namespace commonj{ -namespace sdo{ - -class Type; -class TypeImpl; -class DataObject; - -/** - * - * A representation of a property in the type of a data object. - */ - -class Property -{ - public: - - /** getName gets the name of the property - * - * Returns the name of the property. - */ - - // TODO: We would like the returned value to be an SDOString but not until the internals are ready - virtual const SDO_API char* getName() const = 0; - // virtual const SDO_API SDOString& getName() const = 0; - - /** getAlias returns the n'th alias - * - * This method returns a const char* corresponding to the - * alias at index n of the list of aliases. Use getAliasCount to - * discover the size of the list. - */ - - // TODO: We would lke to convert the returned value to an SDOString but that means a rename for the method. - virtual SDO_API const char* getAlias(unsigned int index = 0) const = 0; - - // virtual SDO_API const SDOString& getAlias(unsigned int index = 0) const = 0; - - /** getAliasCount returns the number of aliases - * - * This method returns the number of aliases for this type - */ - - virtual SDO_API unsigned int getAliasCount() const = 0; - - /** getType returns the type of this property - * - * This method returns the type, which may be a DataType or a - * DataObjectType - */ - - virtual SDO_API const Type& getType() const = 0; - - /** getTypeEnum gets the enum for this type. - * - * Each DataType has a defined value in the list of Types. - */ - - virtual SDO_API const Type::Types getTypeEnum() const = 0; - - /** isMany is true if the property is a list - * - * IsMany returns true if this property represents a list of - * values, and should be accessed via the getList DataObjectAPI. - */ - - virtual bool SDO_API isMany() const = 0; - - /** isContainment is true if the property value is contained - * - * IsContainment returns true if this property represents a DataObjectType, - * and that DataObjectType is contained. I.E the property value is not a pointer - * to a DataObject somewhere else in the graph, it is an actual value. - */ - - virtual bool SDO_API isContainment() const = 0; - - /** isReference is true if the property value is not contained - * - * IsReference returns true if this property represents a DataObjectType, - * and that DataObjectType is not contained. I.E the property value is a pointer - * to a DataObject somewhere else in the graph not an actual value. - */ - - virtual bool SDO_API isReference() const = 0; - - /** getContainingType give the type which holds this property. - * - * Although many types may have a property of the same name, any given - * instance of a property belongs to only one type. - * This method returns the type which holds this proeprty. - */ - - virtual SDO_API const Type& getContainingType() const = 0; - - - - /** isReadOnly returns true if the property is unmodifiable. - * - * NOT IMPLEMENTED - * Returns true if values for this Property cannot be modified using the SDO APIs. - * When true, DataObject.set(Property property, Object value) throws an exception. - * Values may change due to other factors, such as services operating on DataObjects. - */ - - virtual bool SDO_API isReadOnly() const = 0; - - /** getOpposite returns the opposite property or zero. - * - * NOT IMPLEMENTED - */ - - virtual SDO_API const Property* getOpposite() const = 0; - - /** isDefaulted is true if a default has been set. - * - * A property value may be set or unset. If unset, requests to the - * data object for the value will return a default if there is one. - * If the property is not defaulted, an un specified value will be - * returned. (Thism value will probably be zero). - */ - - virtual SDO_API bool isDefaulted() const = 0 ; - - /** setDefault sets the right sort of default. - * - * The many overrides of this method allow the setting - * of a default value for any DataType property. - */ - - virtual SDO_API void setDefault(bool b ) = 0; - virtual SDO_API void setDefault(char c) = 0; - virtual SDO_API void setDefault(wchar_t c) = 0; - virtual SDO_API void setDefault(char* c) = 0; - virtual SDO_API void setDefault(const SDOString& c) = 0; - virtual SDO_API void setDefault(short s) = 0; -#if __WORDSIZE !=64 - virtual SDO_API void setDefault(long l) = 0; -#endif - virtual SDO_API void setDefault(int64_t i) = 0; - virtual SDO_API void setDefault(float f) = 0; - virtual SDO_API void setDefault(long double d) = 0; - virtual SDO_API void setDefault(const SDODate d) = 0; - virtual SDO_API void setDefault(const wchar_t* c, unsigned int len) = 0; - virtual SDO_API void setDefault(const char* c, unsigned int len) = 0; - virtual SDO_API void setDefault(const SDOString& c, unsigned int len) = 0; - - /** getDefault gets the right sort of default. - * - * The many overrides of this method allow the getting - * of a default value for any DataType property. - */ - - virtual SDO_API unsigned int getStringDefault(wchar_t* val, unsigned int max) const = 0; - virtual SDO_API unsigned int getBytesDefault(char* val, unsigned int max) const = 0; - virtual SDO_API unsigned int getBytesDefault(SDOString& val, unsigned int max) const = 0; - virtual SDO_API bool getBooleanDefault() const = 0; - virtual SDO_API char getByteDefault() const = 0; - virtual SDO_API wchar_t getCharacterDefault() const = 0; - virtual SDO_API short getShortDefault() const = 0; - virtual SDO_API long getIntegerDefault() const = 0; - virtual SDO_API int64_t getLongDefault() const = 0; - virtual SDO_API float getFloatDefault() const = 0; - virtual SDO_API long double getDoubleDefault() const = 0; - virtual SDO_API const SDODate getDateDefault() const = 0; - virtual SDO_API const char* getCStringDefault() const = 0; - // TODO: Can't overload return types. - // virtual SDO_API const SDOString& getSDOStringDefault() const = 0; - virtual SDO_API unsigned int getDefaultLength() const = 0; - - -}; - - -}; -}; - -#endif //_PROPERTY_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp deleted file mode 100644 index a528fff820..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/PropertyDefinition.h" -#include "commonj/sdo/PropertyDefinitionImpl.h" - -namespace commonj -{ - namespace sdo - { - - PropertyDefinition::PropertyDefinition() - { - propertydefinition = new PropertyDefinitionImpl(); - } - - PropertyDefinition::~PropertyDefinition() - { - if (propertydefinition) delete propertydefinition; - } - - void PropertyDefinition::copy (const PropertyDefinition& pd) - { - if (propertydefinition != 0) delete propertydefinition; - propertydefinition = new PropertyDefinitionImpl(*(pd.propertydefinition)); - } - - PropertyDefinition::PropertyDefinition(const PropertyDefinition& pd) - { - copy(pd); - } - - PropertyDefinition& PropertyDefinition::operator=(const PropertyDefinition& pd) - { - if (this != &pd) - { - copy(pd); - } - return *this; - } - - PropertyDefinitionImpl* PropertyDefinition::getPropertyDefinition() - { - return propertydefinition; - } - - // where this property is to be substituted for another - void PropertyDefinition::setSubstituteName(const char * name) - { - propertydefinition->substituteName = name; - } - void PropertyDefinition::setSubstituteName(const SDOString& name) - { - propertydefinition->substituteName = name.c_str(); - } - - const char* PropertyDefinition::getSubstituteName() const - { - return (const char *)propertydefinition->substituteName; - } - - - void PropertyDefinition::setSubstituteUri(const char* name) - { - propertydefinition->substituteUri = name; - } - void PropertyDefinition::setSubstituteUri(const SDOString& name) - { - propertydefinition->substituteUri = name.c_str(); - } - - const char* PropertyDefinition::getSubstituteUri() const - { - return (const char*)propertydefinition->substituteUri; - } - - // where there are substitute names for this property. - void PropertyDefinition::addSubstitute(const SDOString& name, - const SDOString& localname) - { - propertydefinition->substituteNames.push_back(name.c_str()); - propertydefinition->substituteLocalNames.push_back(localname.c_str()); - } - - int PropertyDefinition::getSubstituteCount() const - { - return propertydefinition->substituteNames.size(); - } - - const char* PropertyDefinition::getSubstituteNames(int index) const - { - if (index >= 0 && index < propertydefinition->substituteNames.size()) - { - return propertydefinition->substituteNames[index];; - } - return 0; - } - - const char* PropertyDefinition::getSubstituteLocalNames(int index) const - { - if (index >= 0 && index < propertydefinition->substituteLocalNames.size()) - { - return propertydefinition->substituteLocalNames[index];; - } - return 0; - } - - - void PropertyDefinition::setAliases(const char* aliases) - { - propertydefinition->aliases = aliases; - } - void PropertyDefinition::setAliases(const SDOString& aliases) - { - propertydefinition->aliases = aliases.c_str(); - } - - const char* PropertyDefinition::getAliases() const - { - return (const char *)propertydefinition->aliases; - } - - void PropertyDefinition::setName(const char* name) - { - propertydefinition->name = name; - } - void PropertyDefinition::setName(const SDOString& name) - { - propertydefinition->name = name.c_str(); - } - - const char* PropertyDefinition::getName() const - { - return (const char *)propertydefinition->name; - } - - void PropertyDefinition::setLocalName(const char* name) - { - propertydefinition->localname = name; - } - void PropertyDefinition::setLocalName(const SDOString& name) - { - propertydefinition->localname = name.c_str(); - } - - const char* PropertyDefinition::getLocalName() const - { - return (const char*)propertydefinition->localname; - } - - void PropertyDefinition::setType(const char* uri, const char* name) - { - propertydefinition->typeUri = uri; - propertydefinition->typeName = name; - propertydefinition->fullTypeName = uri; - propertydefinition->fullTypeName += "#"; - propertydefinition->fullTypeName += name; - } - void PropertyDefinition::setType(const SDOString& uri, const SDOString& name) - { - propertydefinition->typeUri = uri.c_str(); - propertydefinition->typeName = name.c_str(); - propertydefinition->fullTypeName = uri.c_str(); - propertydefinition->fullTypeName += "#"; - propertydefinition->fullTypeName += name.c_str(); - } - - const char * PropertyDefinition::getTypeName() const - { - return propertydefinition->typeName; - } - - const char * PropertyDefinition::getTypeUri() const - { - return propertydefinition->typeUri; - } - - const char * PropertyDefinition::getTypeFullName() const - { - return propertydefinition->fullTypeName; - } - - const char * PropertyDefinition::getTypeFullLocalName() const - { - return propertydefinition->fullLocalTypeName; - } - - void PropertyDefinition::setTypeFullLocalName(const char* name) - { - propertydefinition->fullLocalTypeName = name; - } - void PropertyDefinition::setTypeFullLocalName(const SDOString& name) - { - propertydefinition->fullLocalTypeName = name.c_str(); - } - - - void PropertyDefinition::setDefaultValue(const char* value) - { - propertydefinition->defaultValue = value; - } - void PropertyDefinition::setDefaultValue(const SDOString& value) - { - propertydefinition->defaultValue = value.c_str(); - } - - const char* PropertyDefinition::getDefaultValue() const - { - return propertydefinition->defaultValue; - } - - bool PropertyDefinition::getIsMany() const - { - return propertydefinition->isMany; - } - - bool PropertyDefinition::getIsContainment() const - { - return propertydefinition->isContainment; - } - - bool PropertyDefinition::getIsReadOnly() const - { - return propertydefinition->isReadOnly; - } - - bool PropertyDefinition::getIsID() const - { - return propertydefinition->isID; - } - - bool PropertyDefinition::getIsIDREF() const - { - return propertydefinition->isIDREF; - } - - bool PropertyDefinition::getIsReference() const - { - return propertydefinition->isReference; - } - - bool PropertyDefinition::getIsElement() const - { - return propertydefinition->isElement; - } - - bool PropertyDefinition::getIsQName() const - { - return propertydefinition->isQName; - } - - bool PropertyDefinition::getIsSubstitute() const - { - return propertydefinition->isSubstitute; - } - - - void PropertyDefinition::setIsMany(bool value) - { - propertydefinition->isMany = value; - } - - void PropertyDefinition::setIsContainment(bool value) - { - propertydefinition->isContainment = value; - } - - void PropertyDefinition::setIsReadOnly(bool value) - { - propertydefinition->isReadOnly = value; - } - - void PropertyDefinition::setIsID(bool value) - { - propertydefinition->isID = value; - } - - void PropertyDefinition::setIsIDREF(bool value) - { - propertydefinition->isIDREF = value; - } - - void PropertyDefinition::setIsReference(bool value) - { - propertydefinition->isReference = value; - } - - void PropertyDefinition::setIsElement(bool value) - { - propertydefinition->isElement = value; - } - - void PropertyDefinition::setIsQName(bool value) - { - propertydefinition->isQName = value; - } - - void PropertyDefinition::setIsSubstitute(bool value) - { - propertydefinition->isSubstitute = value; - } - - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h deleted file mode 100644 index 0775c02af8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinition.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PROPERTYDefinition_H_ -#define _PROPERTYDefinition_H_ - -#include "export.h" - -#include -#include "commonj/sdo/SDOString.h" - - - -namespace commonj -{ - namespace sdo - { - - class PropertyDefinitionImpl; - -/** - * PropertyDefinitionImpl holds a property as defined by an XSD. - * The XSD holds more information than does the SDO Property. - * This class holds the extra information found as the XSD is - * parsed. - */ - class SDO_API PropertyDefinition - { - - public: - - - /*SDO_API*/ PropertyDefinition(); - PropertyDefinition(const PropertyDefinition& pd); - PropertyDefinition& operator=(const PropertyDefinition& pd); - - /*SDO_API*/ virtual ~PropertyDefinition(); - - PropertyDefinitionImpl* getPropertyDefinition(); - - - - // where this property is to be substituted for another - /*SDO_API*/ void setSubstituteName(const char * name); - /*SDO_API*/ void setSubstituteName(const SDOString& name); - /*SDO_API*/ const char* getSubstituteName() const; - - /*SDO_API*/ void setSubstituteUri(const char* name); - /*SDO_API*/ void setSubstituteUri(const SDOString& name); - /*SDO_API*/ const char* getSubstituteUri() const; - - // where there are substitute names for this property. - /*SDO_API*/ void addSubstitute(const char* name, - const char* localname); - /*SDO_API*/ void addSubstitute(const SDOString& name, - const SDOString& localname); - /*SDO_API*/ int getSubstituteCount() const; - /*SDO_API*/ const char* getSubstituteNames(int index) const; - /*SDO_API*/ const char* getSubstituteLocalNames(int index) const; - - - /*SDO_API*/ void setAliases(const char* aliases); - /*SDO_API*/ void setAliases(const SDOString& aliases); - /*SDO_API*/ const char* getAliases() const; - - /*SDO_API*/ void setName(const char* name); - /*SDO_API*/ void setName(const SDOString& name); - /*SDO_API*/ const char* getName() const; - - /*SDO_API*/ void setLocalName(const char* name); - /*SDO_API*/ void setLocalName(const SDOString& name); - /*SDO_API*/ const char* getLocalName() const; - - /*SDO_API*/ void setType(const char* uri, const char* name); - /*SDO_API*/ void setType(const SDOString& uri, const SDOString& name); - /*SDO_API*/ const char * getTypeName() const; - /*SDO_API*/ const char * getTypeUri() const; - /*SDO_API*/ const char * getTypeFullName() const; - /*SDO_API*/ const char * getTypeFullLocalName() const ; - - /*SDO_API*/ void setTypeFullLocalName(const char* name); - /*SDO_API*/ void setTypeFullLocalName(const SDOString& name); - - /*SDO_API*/ void setDefaultValue(const char* value); - /*SDO_API*/ void setDefaultValue(const SDOString& value); - /*SDO_API*/ const char* getDefaultValue() const; - - /*SDO_API*/ bool getIsMany() const; - /*SDO_API*/ bool getIsContainment() const; - /*SDO_API*/ bool getIsReadOnly() const; - /*SDO_API*/ bool getIsID() const; - /*SDO_API*/ bool getIsIDREF() const; - /*SDO_API*/ bool getIsReference() const; - /*SDO_API*/ bool getIsElement() const; - /*SDO_API*/ bool getIsQName() const; - /*SDO_API*/ bool getIsSubstitute() const; - - /*SDO_API*/ void setIsMany(bool value); - /*SDO_API*/ void setIsContainment(bool value); - /*SDO_API*/ void setIsReadOnly(bool value); - /*SDO_API*/ void setIsID(bool value); - /*SDO_API*/ void setIsIDREF(bool value); - /*SDO_API*/ void setIsReference(bool value); - /*SDO_API*/ void setIsElement(bool value); - /*SDO_API*/ void setIsQName(bool value); - /*SDO_API*/ void setIsSubstitute(bool value); - - - private: - PropertyDefinitionImpl* propertydefinition; - void copy(const PropertyDefinition& pd); - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_PROPERTYDefinitionImpl_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.cpp deleted file mode 100644 index c9ac38a90c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/PropertyDefinitionImpl.h" -namespace commonj -{ - namespace sdo - { - PropertyDefinitionImpl::PropertyDefinitionImpl() - : isMany(false), - isContainment(true), - isReadOnly(false), - isElement(false), - isReference(false), - isQName(false), - isID(false), - isIDREF(false), - isSubstitute(false) - - { - } - - PropertyDefinitionImpl::~PropertyDefinitionImpl() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.h deleted file mode 100644 index 08e61c2591..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyDefinitionImpl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PROPERTYDefinitionImpl_H_ -#define _PROPERTYDefinitionImpl_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLString.h" -#include - - - -namespace commonj -{ - namespace sdo - { - - -/** - * PropertyDefinitionImpl holds a property as defined by an XSD. - * The XSD holds more information than does the SDO Property. - * This class holds the extra information found as the XSD is - * parsed. - */ - class PropertyDefinitionImpl - { - - public: - PropertyDefinitionImpl(); - virtual ~PropertyDefinitionImpl(); - - // where this property is to be substituted for another - SDOXMLString substituteName; - SDOXMLString substituteUri; - - // where there are substitute names for this property. - std::vector substituteNames; - std::vector substituteLocalNames; - - SDOXMLString aliases; - - SDOXMLString name; - SDOXMLString localname; - - SDOXMLString typeUri; - SDOXMLString typeName; - SDOXMLString fullTypeName; - - SDOXMLString fullLocalTypeName; - - SDOXMLString defaultValue; - - bool isMany; - bool isContainment; - bool isReadOnly; - - bool isID; - bool isIDREF; - bool isReference; - bool isElement; - - bool isQName; - - bool isSubstitute; - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_PROPERTYDefinitionImpl_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp deleted file mode 100644 index 3ba5e8fd64..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 -using namespace std; - -#ifndef SDO_EXPORTS -#define SDO_EXPORTS -#endif -#include "commonj/sdo/export.h" - - -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/TypeList.h" - -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeImpl.h" -#include "commonj/sdo/Property.h" -#include "commonj/sdo/PropertyImpl.h" -#include "commonj/sdo/DataFactoryImpl.h" -#include "commonj/sdo/SDORuntimeException.h" - -namespace commonj{ - namespace sdo{ - - - Substitution::Substitution() : name(), type(0) - { - } - - // Standard Constructor - Substitution::Substitution(DataFactoryPtr mdg, - const SDOString& inname, - const Type& intype) : name(inname) - { - DataFactory* f = (DataFactory*)mdg; - - type = ((DataFactoryImpl*)f)->findType(intype.getURI(),intype.getName()); - } - - // Copy constructor - Substitution::Substitution(const Substitution& s) : name(s.name), type(s.type) - { - } - - Substitution::~Substitution() - { - } - - - /////////////////////////////////////////////////////////////////////////// - // construction by DAS - /////////////////////////////////////////////////////////////////////////// - - PropertyImpl::PropertyImpl(const Type& cont, - const char* inname, - const TypeImpl& intype, - bool many , - bool ro , - bool contain) : containertype(cont), type (intype) - { - // name = new char[strlen(inname)+1]; - // strcpy(name,inname); - if (inname != 0) - { - name = inname; - } - else - { - name.erase(); - } - defvalue = 0; - defvaluelength = 0; - opposite = 0; - stringdef = 0; - bisMany = many; - bisReadOnly = ro; - bisContainer = contain; - bDefaulted=false; - if (contain == false && intype.isDataObjectType()) - { - bisReference = true; - } - else - { - bisReference = false; - } - } - - PropertyImpl::PropertyImpl(const Type& cont, - const SDOString& inname, - const TypeImpl& intype, - bool many, - bool ro, - bool contain) : - containertype(cont), - name(inname), - type(intype), - bisMany(many), - bisReadOnly(ro), - bisContainer(contain), - bDefaulted(false), - opposite(0), - stringdef(0), - defvalue(0), - defvaluelength(0) - { - if (contain == false && intype.isDataObjectType()) - { - bisReference = true; - } - else - { - bisReference = false; - } - } - - PropertyImpl::PropertyImpl(const PropertyImpl& p) : - type((*(p.getTypeImpl()))), - containertype(p.getContainingType()), - name(p.name), - bisMany(p.bisMany), - bisReadOnly(p.bisReadOnly), - bisContainer(p.bisContainer), - bDefaulted(false), - opposite(0), - defvalue(0), - defvaluelength(0), - stringdef(0) - { - if (bisContainer == false && type.isDataObjectType()) - { - bisReference = true; - } - else - { - bisReference = false; - } - } - - PropertyImpl::~PropertyImpl() - { - if (defvalue != 0) delete (char*)defvalue; - if (stringdef != 0) delete stringdef; - } - - /////////////////////////////////////////////////////////////////////////// - // Setting of attributes by DAS - /////////////////////////////////////////////////////////////////////////// - - void PropertyImpl::setMany(bool many) - { - bisMany = many; - } - - void PropertyImpl::setReadOnly(bool readonly) - { - bisReadOnly = readonly; - } - - void PropertyImpl::setContainment(bool contains) - { - if (contains == true && type.isDataType()) - { - return; - } - bisContainer = contains; - if (bisContainer == false && type.isDataObjectType()) - { - bisReference = true; - } - else - { - bisReference = false; - } - } - - - /////////////////////////////////////////////////////////////////////////// - // Setting of defaults by DAS - /////////////////////////////////////////////////////////////////////////// - - void PropertyImpl::setDefault(bool b ) - { - setDefaultBoolean(b); - } - - void PropertyImpl::setDefault(char c ) - { - setDefaultByte(c); - } - - void PropertyImpl::setDefault(wchar_t c ) - { - setDefaultCharacter(c); - } - void PropertyImpl::setDefault(char* c ) - { - setDefaultCString(c); - } - void PropertyImpl::setDefault(const SDOString& c) - { - setDefaultCString(c); - } - void PropertyImpl::setDefault(short s ) - { - setDefaultShort(s); - } -#if __WORDSIZE !=64 - void PropertyImpl::setDefault(long i ) - { - setDefaultInteger(i); - } -#endif - void PropertyImpl::setDefault(int64_t i ) - { - setDefaultLong(i); - } - void PropertyImpl::setDefault(float f ) - { - setDefaultFloat(f); - } - void PropertyImpl::setDefault(long double d ) - { - setDefaultDouble(d); - } - void PropertyImpl::setDefault(const SDODate d ) - { - setDefaultDate(d); - } - void PropertyImpl::setDefault(const char* c , unsigned int len) - { - setDefaultBytes(c, len); - } - void PropertyImpl::setDefault(const SDOString& c , unsigned int len) - { - setDefaultBytes(c, len); - } - - void PropertyImpl::setDefault(const wchar_t* c, unsigned int len ) - { - setDefaultString(c, len); - } - - /////////////////////////////////////////////////////////////////////////// - // Substitution groups. - /////////////////////////////////////////////////////////////////////////// - const Type* PropertyImpl::getSubstitutionType(const char* inname) const - { - for (int i=0;iisFromList())return true; - return bisMany; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns whether the property is containment. - /////////////////////////////////////////////////////////////////////////// - bool PropertyImpl::isContainment() const - { - return bisContainer; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns whether the property is containment. - /////////////////////////////////////////////////////////////////////////// - bool PropertyImpl::isReference() const - { - return bisReference; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the containing type of this property. - /////////////////////////////////////////////////////////////////////////// - const Type& PropertyImpl::getContainingType() const - { - return containertype; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the opposite. - /////////////////////////////////////////////////////////////////////////// - const Property* PropertyImpl::getOpposite() const - { - return opposite; - } - - void PropertyImpl::setOpposite(const Property* opp) - { - opposite = opp; - } - /////////////////////////////////////////////////////////////////////////// - // Returns the default value this property will have in a - // data object where the property hasn't been set. - /////////////////////////////////////////////////////////////////////////// - - // check whether the property has a default first - bool PropertyImpl::isDefaulted() const - { - return bDefaulted; - } - - const char* PropertyImpl::getCStringDefault() const - { - PropertyImpl* p = (PropertyImpl*)this; - return getTypeImpl()->convertToCString(defvalue, &(p->stringdef), defvaluelength); - } - bool PropertyImpl::getBooleanDefault() const - { - return getTypeImpl()->convertToBoolean(defvalue,defvaluelength); - } - char PropertyImpl::getByteDefault() const - { - return getTypeImpl()->convertToByte(defvalue,defvaluelength); - } - wchar_t PropertyImpl::getCharacterDefault() const - { - return getTypeImpl()->convertToCharacter(defvalue,defvaluelength); - } - short PropertyImpl::getShortDefault() const - { - return getTypeImpl()->convertToShort(defvalue,defvaluelength); - } - long PropertyImpl::getIntegerDefault() const - { - return getTypeImpl()->convertToInteger(defvalue,defvaluelength); - } - int64_t PropertyImpl::getLongDefault() const - { - return getTypeImpl()->convertToLong(defvalue,defvaluelength); - } - float PropertyImpl::getFloatDefault() const - { - return getTypeImpl()->convertToFloat(defvalue,defvaluelength); - } - long double PropertyImpl::getDoubleDefault() const - { - return getTypeImpl()->convertToDouble(defvalue,defvaluelength); - } - const SDODate PropertyImpl::getDateDefault() const - { - return getTypeImpl()->convertToDate(defvalue,defvaluelength); - } - unsigned int PropertyImpl::getStringDefault(wchar_t* val, unsigned int max) const - { - if (val == 0 || max == 0) return defvaluelength; - return getTypeImpl()->convertToString(defvalue, val, defvaluelength, max); - - } - unsigned int PropertyImpl::getBytesDefault(char* val, unsigned int max) const - { - if (val == 0 || max == 0) return defvaluelength; - return getTypeImpl()->convertToBytes(defvalue, val, defvaluelength, max); - } - - unsigned int PropertyImpl::getBytesDefault(SDOString& val, unsigned int max) const - { - if (max == 0) return defvaluelength; - return getTypeImpl()->convertToBytes(defvalue, val, defvaluelength, max); - } - - unsigned int PropertyImpl::getDefaultLength() const - { - return defvaluelength; - } - - /////////////////////////////////////////////////////////////////////////// - // sets the default value by type - /////////////////////////////////////////////////////////////////////////// - - void PropertyImpl::setDefaultCString(const char* s) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,s); - } - void PropertyImpl::setDefaultCString(const SDOString& s) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue, s); - } - void PropertyImpl::setDefaultString( const wchar_t* c , unsigned int len ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,c, len); - } - void PropertyImpl::setDefaultBytes( const char* c , unsigned int len ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,c, len); - } - void PropertyImpl::setDefaultBytes(const SDOString& c , unsigned int len) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,c, len); - } - void PropertyImpl::setDefaultBoolean( const bool b ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,b); - } - void PropertyImpl::setDefaultByte( const char c ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,c); - } - void PropertyImpl::setDefaultCharacter( const wchar_t c) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,c); - } - void PropertyImpl::setDefaultShort( const short s ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,s); - } - void PropertyImpl::setDefaultInteger( const long i ) - { - bDefaulted=true; -#if __WORDSIZE ==64 - defvaluelength = getTypeImpl()->convert(&defvalue,(int64_t)i); -#else - defvaluelength = getTypeImpl()->convert(&defvalue,i); -#endif - } - void PropertyImpl::setDefaultLong(const int64_t l) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,l); - } - void PropertyImpl::setDefaultFloat( const float f ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,f); - } - void PropertyImpl::setDefaultDouble( const long double d ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convert(&defvalue,d); - } - void PropertyImpl::setDefaultDate( const SDODate d ) - { - bDefaulted=true; - defvaluelength = getTypeImpl()->convertDate(&defvalue,d); - } - - /////////////////////////////////////////////////////////////////////////// - // Returns true if values for this Property cannot be modified using the SDO APIs. - // When true, DataObject.set(Property property, Object value) throws an exception. - // Values may change due to other factors, such as services operating on DataObjects. - /////////////////////////////////////////////////////////////////////////// - bool PropertyImpl::isReadOnly() const - { - return bisReadOnly; - } - -}; -}; - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.h deleted file mode 100644 index 700636d49f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyImpl.h +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PROPERTYIMPL_H_ -#define _PROPERTYIMPL_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/DASProperty.h" -#include "commonj/sdo/SDODate.h" -#include "commonj/sdo/DataFactory.h" - -namespace commonj{ -namespace sdo{ - -class Type; -class TypeImpl; -class DataObject; - -/** - * A substitution is a class which permits a property to be a substitute for - * another one. - * A substitution is a definition of a type which is allowed to be placed in the - * data object in place of a property of another type. - */ - -class Substitution -{ -public: - Substitution(); - Substitution(DataFactoryPtr mdg, const SDOString& inname, - const Type& intype); - Substitution(const Substitution& s); - virtual ~Substitution(); - const Type* type; - SDOString name; -}; - - - -/** PropertyImpl implements the abstract class Property. - * - * A representation of a property in the type of a data object. - */ - -class PropertyImpl :public DASProperty -{ - public: - - - /////////////////////////////////////////////////////////////////////////// - // Construction for the DAS - /////////////////////////////////////////////////////////////////////////// - - SDO_API PropertyImpl( - const Type& cont, - const char* name, - const TypeImpl& type, - bool many = false, - bool ro = false, - bool contain = false); - - SDO_API PropertyImpl(const Type& cont, - const SDOString& name, - const TypeImpl& type, - bool many = false, - bool ro = false, - bool contain = false); - - - - virtual SDO_API ~PropertyImpl(); - - /** - * A Data access service may set the features of this property instead of - * passing them as construction parameters. - */ - - virtual SDO_API void setMany(bool many ); - - /** - * A Data access service may set the features of this property instead of - * passing them as construction parameters. - */ - virtual SDO_API void setReadOnly(bool rdonly); - - /** - * A Data access service may set the features of this property instead of - * passing them as construction parameters. - */ - virtual SDO_API void setContainment(bool contains); - - /** - * A Data access service may set the features of this property instead of - * passing them as construction parameters. - */ - - virtual SDO_API bool isDefaulted() const; - - /** - * A Data access service sets the default value. - */ - - virtual SDO_API void setDefault(bool b ); - virtual SDO_API void setDefault(char c); - virtual SDO_API void setDefault(wchar_t c); - virtual SDO_API void setDefault(char* c); - virtual SDO_API void setDefault(const SDOString& c); - virtual SDO_API void setDefault(short s); -#if __WORDSIZE !=64 - virtual SDO_API void setDefault(long l); -#endif - virtual SDO_API void setDefault(int64_t i); - virtual SDO_API void setDefault(float f); - virtual SDO_API void setDefault(long double d); - virtual SDO_API void setDefault(const SDODate d); - virtual SDO_API void setDefault(const wchar_t* c, unsigned int len); - virtual SDO_API void setDefault(const char* c, unsigned int len); - virtual SDO_API void setDefault(const SDOString& c, unsigned int len); - - - - - - /** - * Returns the name of the property. - */ - - virtual const SDO_API char* getName() const; - - /** getAlias returns the n'th alias - * - * This method returns a const char* corresponding to the - * alias at index n of the list of aliases. Use getAliasCount to - * discover the size of the list. - */ - - virtual const char* getAlias(unsigned int index = 0) const ; - virtual unsigned int getAliasCount() const ; - virtual void setAlias(const char* alias) ; - virtual void setAlias(const SDOString& alias) ; - - /** - * - * SubstitutionGroup support. - */ - - virtual const Type* getSubstitutionType(const char* name) const ; - virtual unsigned int getSubstitutionCount(void) const ; - virtual const Type* getSubstitutionType(unsigned int index) const ; - virtual const char* getSubstitutionName(unsigned int index) const ; - virtual void setSubstitution(DataFactoryPtr mdg, const char* alias, - const Type& substype) ; - - - /** getType returns the type of this property - * - * This method returns the type, which may be a DataType or a - * DataObjectType - */ - - virtual SDO_API const Type& getType() const; - - virtual SDO_API const Type::Types getTypeEnum() const; - - virtual SDO_API const TypeImpl* getTypeImpl() const; - - /** - * Returns whether the property is many-valued. - */ - virtual bool SDO_API isMany() const; - - /** - * Returns whether the property is containment. - */ - virtual bool SDO_API isContainment() const; - - /** - * Returns whether the property is a reference. - */ - virtual bool SDO_API isReference() const; - - /** - * Returns the containing type of this property. - */ - virtual SDO_API const Type& getContainingType() const; - - /** - * returns the opposite property, or zero if there is none - */ - virtual SDO_API const Property* getOpposite() const; - - virtual void setOpposite(const Property* opp); - - - /** - * setters for type primitive types and 'an object' - */ - - SDO_API void setDefaultCString( const char* s); - SDO_API void setDefaultCString(const SDOString& s); - SDO_API void setDefaultString( const wchar_t* c , unsigned int len ); - SDO_API void setDefaultBytes( const char* c , unsigned int len ); - SDO_API void setDefaultBytes(const SDOString& c , unsigned int len); - SDO_API void setDefaultBoolean( const bool b ); - SDO_API void setDefaultByte( const char c ); - SDO_API void setDefaultCharacter( const wchar_t c); - SDO_API void setDefaultShort( const short s ); - SDO_API void setDefaultInteger( const long i ); - SDO_API void setDefaultLong(const int64_t l); - SDO_API void setDefaultFloat( const float f ); - SDO_API void setDefaultDouble( const long double d ); - SDO_API void setDefaultDate( const SDODate d ); - - SDO_API const char* getCStringDefault() const; - SDO_API unsigned int getStringDefault(wchar_t* val, unsigned int max) const; - SDO_API unsigned int getBytesDefault(char* val, unsigned int max) const; - SDO_API unsigned int getBytesDefault(SDOString& val, unsigned int max) const; - SDO_API bool getBooleanDefault() const; - SDO_API char getByteDefault() const; - SDO_API wchar_t getCharacterDefault() const; - SDO_API short getShortDefault() const; - SDO_API long getIntegerDefault() const; - SDO_API int64_t getLongDefault() const; - SDO_API float getFloatDefault() const; - SDO_API long double getDoubleDefault() const; - SDO_API const SDODate getDateDefault() const; - SDO_API unsigned int getDefaultLength() const; - - /** - * Returns true if values for this Property cannot be modified using the SDO APIs. - * When true, DataObject.set(Property property, Object value) throws an exception. - * Values may change due to other factors, such as services operating on DataObjects. - */ - virtual bool SDO_API isReadOnly() const; - - SDO_API PropertyImpl(const PropertyImpl& p); - - private: - - // clear the default value - void deleteValue(); - - bool bisReadOnly; - bool bisContainer; - bool bisReference; - bool bisMany; - - bool bDefaulted; - - const TypeImpl& type; - const Type& containertype; - const Property* opposite; - SDOString name; - char* stringdef; - - void* defvalue; - // in the event of a bytes and string, this holds the length - unsigned int defvaluelength; - - // alias support - // std::vector aliases; - std::vector aliases; - - std::vector substitutions; - - typedef std::list REFEREE_LIST; - REFEREE_LIST references; - - -}; -}; -}; - -#endif //_PROPERTYIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp deleted file mode 100644 index 76de4fb772..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SDO_EXPORTS - #define SDO_EXPORTS -#endif - -#include "commonj/sdo/export.h" -#include -#include "commonj/sdo/Property.h" -#include "commonj/sdo/PropertyImpl.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/PropertyList.h" - -#include "commonj/sdo/Logger.h" - -namespace commonj{ -namespace sdo { - -class Property; - -SDO_API PropertyList::PropertyList(PROPERTY_LIST p) -{ - PROPERTY_LIST::iterator i; - for (i = p.begin(); i != p.end(); ++i) - { - plist.insert(plist.end(),(PropertyImpl*)(*i)); - } -} - -SDO_API PropertyList::PropertyList(PROPERTY_VECTOR p) -{ - plist = PROPERTY_VECTOR(p); -} - -SDO_API PropertyList::PropertyList(const PropertyList &pin) -{ - plist = PROPERTY_VECTOR(pin.getVec()); -} - -SDO_API PropertyList::PropertyList() -{ -} - -SDO_API PropertyList::~PropertyList() -{ -} - -SDO_API Property& PropertyList::operator[] (int pos) -{ - return *(plist[pos]); -} - -SDO_API const Property& PropertyList::operator[] (int pos) const -{ - return *(plist[pos]); -} - -SDO_API int PropertyList::size () -{ - return plist.size(); -} - -SDO_API void PropertyList::insert(const Property& p) -{ - PropertyImpl* pi = (PropertyImpl*)&p; - plist.insert(plist.end(),new PropertyImpl(*pi)); -} - -PROPERTY_VECTOR PropertyList::getVec() const -{ - return plist; -} - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.h deleted file mode 100644 index cb13e15f28..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertyList.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PROPERTYLIST_H_ -#define _PROPERTYLIST_H_ - - -#include "commonj/sdo/export.h" - -#include -#include - - - - -namespace commonj{ -namespace sdo{ - - class PropertyImpl; - class Property; - typedef std::vector PROPERTY_VECTOR; -#ifndef PROPERTY_LIST - typedef std::list PROPERTY_LIST; -#endif - -/** - * This class provides for iteration over a collection of Properties - */ - -class PropertyList -{ -private: - PROPERTY_VECTOR plist; - PROPERTY_VECTOR getVec() const; -public: - SDO_API PropertyList(PROPERTY_VECTOR p); - SDO_API PropertyList(PROPERTY_LIST p); - SDO_API PropertyList(const PropertyList &pin); - SDO_API PropertyList(); - virtual SDO_API ~PropertyList(); - - /** [] - * - * Operator to allow reference to an element of the list. - * There are separate versions for const and variable lists - */ - - SDO_API Property& operator[] (int pos); - SDO_API const Property& operator[] (int pos) const; - - /** size gives the number of elements. - * - * size() returns the number of elements in the list. - */ - - SDO_API int size (); - - /** insert adds an element to the list - * - * insert appends an item to the list. This is not - * of any use to a client application, as these lists - * are always supplied by the library, and are const. - */ - - SDO_API void insert (const Property& p); -}; -}; -}; - - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.cpp deleted file mode 100644 index 9cfc813a03..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/PropertySetting.h" -namespace commonj -{ - namespace sdo - { - PropertySetting::PropertySetting() - : dataObject(NULL), isNULL(false), isIDREF(false), pendingUnknownType(false) - - { - } - - PropertySetting::PropertySetting(DataObjectPtr dataObj, const SDOXMLString& propertyName, - bool isNull, bool IDREF) - : dataObject(dataObj), name(propertyName), isNULL(isNull),isIDREF(IDREF),pendingUnknownType(false) - { - } - - PropertySetting::~PropertySetting() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.h deleted file mode 100644 index 5301ef18bf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/PropertySetting.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _PROPERTYSETTING_H_ -#define _PROPERTYSETTING_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/DataObject.h" - - -namespace commonj -{ - namespace sdo - { - -/** - * PropertySetting holds some information about properties as - * they are read by the parser, for subsequent creation - */ - class PropertySetting - { - - public: - PropertySetting(); - PropertySetting(DataObjectPtr dataObj, - const SDOXMLString& propertyName, - bool isNull=false, - bool isIDREF=false); - virtual ~PropertySetting(); - - SDOXMLString name; - SDOXMLString value; - DataObjectPtr dataObject; - bool isIDREF; - bool isNULL; - bool pendingUnknownType; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_PROPERTYSETTING_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingObject.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingObject.cpp deleted file mode 100644 index e125f58a85..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingObject.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/RefCountingObject.h" -#include "commonj/sdo/Logging.h" - -#include -using namespace std; - -namespace commonj{ -namespace sdo{ - -long RefCountingObject::allObs = 0; - -RefCountingObject::RefCountingObject() -: refCount(0) -{ - LOGINFO_2(HIGHVOLUME,"RCO:CREATE:%p Count:%ld",this, ++allObs); -} - -RefCountingObject::RefCountingObject(const RefCountingObject& rc) -: refCount(0) -{ - LOGINFO_2(HIGHVOLUME,"RCO:COPCON:%p Count:%ld",this,++allObs); -} - -RefCountingObject& RefCountingObject::operator=(const RefCountingObject& rc) -{ - return *this; -} - -RefCountingObject::~RefCountingObject() -{ - LOGINFO_2(HIGHVOLUME,"RCO:DELETE:%p Count:%ld",this, --allObs); - // - //if (allObs < 0) - // LOGINFO(HIGHVOLUME,"RCO:More objects deleted than created"); - //if (allObs == 0) - // LOGINFO(HIGHVOLUME,"RCO: All data objects deleted");; -} - -void RefCountingObject::addRef() - -{ - - ++refCount; - LOGINFO_2(HIGHVOLUME,"RCO:ADDREF:%p:%ld",this,refCount); -} - -void RefCountingObject::releaseRef() -{ - LOGINFO_2(HIGHVOLUME,"RCO:DECREF:%p:%ld",this,refCount-1); - if (--refCount == 0) delete this; -} - - -SDO_API std::ostream& RefCountingObject::printSelf(std::ostream &os) -{ - os << "RefCountingObject: reference count = " << refCount < - -namespace commonj { - namespace sdo { - -/** - * RefcountingObject is the base class for all objects in SDO - * These objects keep a count of references to themselves, then - * free themselves when they are unused. - */ - class RefCountingObject - { - public: - SDO_API RefCountingObject(); - SDO_API RefCountingObject(const RefCountingObject& rc); - SDO_API RefCountingObject& operator=(const RefCountingObject& rc); - SDO_API virtual ~RefCountingObject() = 0; -/** - * Add to the reference count - a new pointer has been created. - */ - SDO_API void addRef(); -/** - * Subtract from the the reference count - a reference has dropped. - */ - SDO_API void releaseRef(); - -/** - * Print contents to stream - */ - SDO_API virtual std::ostream& printSelf(std::ostream &os); - - - private: - unsigned int refCount; - static long allObs; - }; - - }; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.cpp deleted file mode 100644 index 07d4834574..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/DataGraph.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/XMLDocument.h" -#include "commonj/sdo/XSDHelper.h" -#include "commonj/sdo/XMLHelper.h" - -namespace commonj{ - namespace sdo{ - - // officially, there is nothing here- but if I dont use the overrides in - // the templates, then they dont get generated. - void Test () - { - -#if defined(WIN32) || defined (_WINDOWS) - /* 1) construct */ - DataFactoryPtr fptr = DataFactory::getDataFactory(); - - /* 2) use the & operator= */ - fptr = DataFactory::getDataFactory(); - - /* 3) copy */ - DataFactoryPtr fptr2 = fptr; - - /* 4) use the == and ! */ - if (fptr2 == fptr || !fptr){} - - /* 5) Use the T* and * */ - DataFactory* dmsf = fptr; - DataFactory& dmsr = *fptr; - - /* 1) construct */ - DataFactoryPtr dfptr(fptr); - - /* 3) copy */ - DataFactoryPtr dfptr2 = dfptr; - - /* 2) use the & operator= */ - dfptr = dfptr2; - - /* 4) use the == and ! */ - if (dfptr2 == dfptr || !dfptr){} - - /* 5) Use the T* and * */ - DataFactory* ddmsf = dfptr; - DataFactory& ddmsr = *dfptr; - - /* 6) Use the -> */ - DataObjectPtr dptr = dfptr->create("nothing","nowhere"); - - /* and agin to catch the = */ - dptr = fptr->create("nothing","nowhere"); - - DataObjectPtr dptr2 = dptr; - - /* Use the T* and * */ - DataObject* dof = dptr; - DataObject& dor = *dptr; - - if (dptr2 == dptr || !dptr){} - - - ChangeSummaryPtr cptr = dptr->getChangeSummary(); - cptr = dptr->getChangeSummary(); - ChangeSummaryPtr cptr2 = cptr; - - ChangeSummary* cof = cptr; - ChangeSummary& cop = *cptr; - - - if (cptr2 == cptr || !cptr){} - - cptr->endLogging(); - - SequencePtr sptr = dptr->getSequence(); - sptr = dptr->getSequence(); - SequencePtr sptr2 = sptr; - - Sequence* sof = sptr; - Sequence& sop = *sptr; - - - if (sptr2 == sptr || !sptr){} - - sptr->getBooleanValue(0); - - - // Generate code for XMLDocumentPtr - XMLDocumentPtr xmldocptr1 = 0; - XMLDocumentPtr xmldocptr2 = xmldocptr1; - xmldocptr1 = xmldocptr2; - if (xmldocptr2 == xmldocptr1 || !xmldocptr1){} - XMLDocument* xmldocp = xmldocptr1; - XMLDocument& xmldocref = *xmldocptr2; - xmldocptr1->getEncoding(); - - // Generate code for XSDHelperPtr - XSDHelperPtr xsdhptr1 = 0; - XSDHelperPtr xsdhptr2 = xsdhptr1; - xsdhptr1 = xsdhptr2; - if (xsdhptr2 == xsdhptr1 || !xsdhptr1){} - XSDHelper* xsdhp = xsdhptr1; - XSDHelper& xsdhref = *xsdhptr2; - xsdhptr1->define("dummy"); - - // Generate code for XMLHelperPtr - XMLHelperPtr xmlhptr1 = 0; - XMLHelperPtr xmlhptr2 = xmlhptr1; - xmlhptr1 = xmlhptr2; - if (xmlhptr2 == xmlhptr1 || !xmlhptr1){} - XMLHelper* xmlhp = xmlhptr1; - XMLHelper& xmlhref = *xmlhptr2; - xmlhptr1->load("dummy"); - - // Generate code for DataGraphPtr - DataGraphPtr dgptr1 = 0; - DataGraphPtr dgptr2 = dgptr1; - dgptr1 = dgptr2; - if (dgptr2 == dgptr1 || !dgptr1){} - DataGraph* dghp = dgptr1; - DataGraph& dgref = *dgptr2; - dgptr1->getRootObject(); - -#endif - - } - }; -}; - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.h deleted file mode 100644 index dec13f2937..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/RefCountingPointer.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _REFCOUNTINGPOINTER_H -#define _REFCOUNTINGPOINTER_H - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDORuntimeException.h" - -#include - -namespace commonj{ -namespace sdo{ - -/** - * RefcountingPointer is a template for all SDO pointers. - * The ref count increases with each use, and drops when one of these - * goes out of scope. - * Refcounting pointers are a lot like smart pointers, however in this - * implementation there is a cast method to a void*, so unlike real - * smart pointers, a user might call "delete mypointer", which would - * compile, but cause a crash. - * RefCountingPointers do not need to be deleted. - */ - -template -class RefCountingPointer { - public: - /*SDO_API*/ RefCountingPointer(T* realPtr = 0); - /*SDO_API*/ RefCountingPointer(const RefCountingPointer& rhs); - /*SDO_API*/ ~RefCountingPointer(); - /*SDO_API*/ RefCountingPointer& operator=(const RefCountingPointer& rhs); - /*SDO_API*/ bool operator==(RefCountingPointer& test) const; - /*SDO_API*/ T* operator->() const; - /*SDO_API*/ T& operator*() const; - /*SDO_API*/ bool operator!() const; - -#ifdef MFT - // MFT == member function templates - // Notes on the items below. - // In our code, we use subclasses to expose the API, and super - // classes to implement. E,g DataObject and DataObjectImpl. - // In some cases, we know that the DataObject given to us is a - // DataObjectImpl, and cast it. With RefCountingPointers, however, - // the cast cannot work, as the RefCountingPointer to the superclass - // is not related to the RCP to the subclass. Recent changes in the - // C++ language allow this to work by defining an operator which - // causes a pointer of the other type to be returned, as long as pointee - // is acceptable as a parameter to the cosntructor of the other type - // of pointer. This works in C++.NET, but not in C++6: - operator RefCountingPointer() - { - return RefCountingPointer(pointee); - } - - // Since we are using C6, a possible workround is to provide a method - // which returns the dumb pointer, then construct a pointer to the - // base class from the pointer returned. This is that the operator T* does. - // The code in DataObject could be simpler if we used C7,and we should - // discusss changing. -#else - operator T*() {return pointee;} -#endif - - template - operator RefCountingPointer() - { - return RefCountingPointer(pointee); - } - - friend std::ostream& operator<< (std::ostream &os, const RefCountingPointer& ptr) - { - if (!ptr) - { - os << "RefCountingPointer is NULL" << std::endl; - } - else - { - ptr->printSelf(os); - } - - return os; - } - - private: - T *pointee; - void init(); -}; - - - -template -void RefCountingPointer::init() -{ - if (pointee == 0) return; - pointee->addRef(); -} - -template -/*SDO_API*/ RefCountingPointer::RefCountingPointer(T* realPtr) -:pointee(realPtr) -{ - init(); -} - -template -/*SDO_API*/ RefCountingPointer::RefCountingPointer(const RefCountingPointer& rhs) -: pointee(rhs.pointee) -{ - init(); -} - -template -/*SDO_API*/ RefCountingPointer::~RefCountingPointer() -{ - if (pointee)pointee->releaseRef(); -} - -template -/*SDO_API*/ RefCountingPointer& RefCountingPointer::operator=(const RefCountingPointer& rhs) -{ - if (pointee != rhs.pointee) - { - T *oldP = pointee; - pointee = rhs.pointee; - init(); - if (oldP) oldP->releaseRef(); - } - return *this; -} - -template -/*SDO_API*/ bool RefCountingPointer::operator!() const -{ - return (pointee == 0); -} - -template -/*SDO_API*/ bool RefCountingPointer::operator==(RefCountingPointer& test) const -{ - return (pointee == test.pointee); -} - -template -/*SDO_API*/ T* RefCountingPointer::operator->() const -{ - if (pointee == 0) - SDO_THROW_EXCEPTION("Pointer",SDONullPointerException, ""); - return pointee; -} - -template -/*SDO_API*/ T& RefCountingPointer::operator*() const -{ - return *pointee; -} - - -class DataObject; -typedef RefCountingPointer DataObjectPtr; -class DataGraph; -typedef RefCountingPointer DataGraphPtr; -class DataFactory; -typedef RefCountingPointer DataFactoryPtr; -class Sequence; -typedef Sequence* SequencePtr; -class ChangeSummary; -typedef ChangeSummary* ChangeSummaryPtr; -class XMLDocument; -typedef RefCountingPointer XMLDocumentPtr; -class XSDHelper; -typedef RefCountingPointer XSDHelperPtr; -class XMLHelper; -typedef RefCountingPointer XMLHelperPtr; - -}; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.cpp deleted file mode 100644 index 925ce3d372..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SAX2Attribute.h" - - -namespace commonj -{ - namespace sdo - { - -/** - * SAX2Attribute holds an attribute supplied by the SAX2 parser. - */ - SAX2Attribute::SAX2Attribute() - { - } - - SAX2Attribute::SAX2Attribute(const xmlChar **attribute) // localname/prefix/URI/value/end - { - name = attribute[0]; - prefix = attribute[1]; - uri = attribute[2]; - value = SDOXMLString(attribute[3],0, (int)(attribute[4] - attribute[3])); - } - - SAX2Attribute::~SAX2Attribute() - { - } - - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.h deleted file mode 100644 index 37a3469a94..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attribute.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SAX2ATTRIBUTE_H_ -#define _SAX2ATTRIBUTE_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLString.h" - -namespace commonj -{ - namespace sdo - { - -/** - * SAX2Attribute holds an attribute supplied by the SAX2 parser. - */ - - class SAX2Attribute - { - - public: - - SAX2Attribute(); - SAX2Attribute(const xmlChar **attribute); - - virtual ~SAX2Attribute(); - - const SDOXMLString& getName() const {return name;} - const SDOXMLString& getPrefix() const {return prefix;} - const SDOXMLString& getUri() const {return uri;} - const SDOXMLString& getValue() const {return value;} - - - private: - SDOXMLString name; - SDOXMLString prefix; - SDOXMLString uri; - SDOXMLString value; - - - - }; - } // End - namespace sdo -} // End - namespace commonj - -#endif //_SAX2ATTRIBUTE_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp deleted file mode 100644 index 016ebe08a4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SAX2Attributes.h" - -namespace commonj -{ - namespace sdo - { - -/** - * SAX2Attributes holds a list of attributes supplied by the SAX2 parser. - */ - SAX2Attributes::SAX2Attributes( - int nb_attributes, - int nb_defaulted, - const xmlChar **attrs) // localname/prefix/URI/value/end - { - for (int i=0; i < nb_attributes*5; i+=5) - { - attributes.insert(attributes.end(), SAX2Attribute(&attrs[i])); - } - } - - SAX2Attributes::SAX2Attributes() - { - } - - SAX2Attributes::~SAX2Attributes() - { - } - - const SAX2Attribute& SAX2Attributes::operator[] (int pos) const - { - return attributes[pos]; - } - - int SAX2Attributes::size () const - { - return attributes.size(); - } - - - const SAX2Attribute* SAX2Attributes::getAttribute(const SDOXMLString& attributeName) const - { - for (int i=0; i < attributes.size(); i++) - { - if (attributes[i].getName().equalsIgnoreCase(attributeName)) - { - return &attributes[i]; - } - } - return NULL; - } - - void SAX2Attributes::addAttribute(const SAX2Attribute& attr) - { - for (int i=0; i < attributes.size(); i++) - { - if (attributes[i].getUri().equals(attr.getUri())) - { - if (attributes[i].getName().equals(attr.getName())) - { - // oeverwrite this attribute - attributes[i] = attr; - return; - } - } - } - attributes.insert(attributes.end(), attr); - } - - - const SDOXMLString SAX2Attributes::nullValue; - - const SDOXMLString& SAX2Attributes::getValue( - const SDOXMLString& attributeUri, - const SDOXMLString& attributeName) const - { - for (int i=0; i < attributes.size(); i++) - { - if (attributes[i].getUri().equalsIgnoreCase(attributeUri)) - { - if (attributes[i].getName().equalsIgnoreCase(attributeName)) - { - return attributes[i].getValue(); - } - } - } - - return nullValue; - } - - const SDOXMLString& SAX2Attributes::getValue( - const SDOXMLString& attributeName) const - { - for (int i=0; i < attributes.size(); i++) - { - if (attributes[i].getName().equalsIgnoreCase(attributeName)) - { - return attributes[i].getValue(); - } - } - - return nullValue; - } - - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.h deleted file mode 100644 index 7c832214e3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Attributes.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SAX2ATTRIBUTES_H_ -#define _SAX2ATTRIBUTES_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SAX2Attribute.h" - -#include "vector" - - -namespace commonj -{ - namespace sdo - { - -/** - * SAX2Attributes holds a list of attributes supplied by the SAX2 parser. - */ - class SAX2Attributes - { - - public: - - SAX2Attributes(); - - SAX2Attributes( - int nb_attributes, - int nb_defaulted, - const xmlChar **attributes); - - virtual ~SAX2Attributes(); - - const SAX2Attribute& operator[] (int pos) const; - int size() const; - - const SDOXMLString& getValue( - const SDOXMLString& attributeUri, - const SDOXMLString& attributeName) const; - - const SDOXMLString& getValue( - const SDOXMLString& attributeName) const; - - const SAX2Attribute* getAttribute( - const SDOXMLString& attributeName) const; - - void addAttribute(const SAX2Attribute& attr); - private: - typedef std::vector ATTRIBUTE_LIST; - ATTRIBUTE_LIST attributes; - - static const SDOXMLString nullValue; - - - - }; - } // End - namespace sdo -} // End - namespace commonj - -#endif //_SAX2ATTRIBUTES_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.cpp deleted file mode 100644 index 9e8b13330e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SAX2Namespaces.h" - - -namespace commonj -{ - namespace sdo - { - - SAX2Namespaces::SAX2Namespaces() - { - } - - SAX2Namespaces::SAX2Namespaces(int nb_namespaces, const xmlChar** namespaces) - { - for (int i=0; isecond); - - } - - const SDOXMLString* SAX2Namespaces::findPrefix(const SDOXMLString& uri) const - { - NAMESPACE_MAP::const_iterator nsIter; - for (nsIter = namespaceMap.begin(); nsIter != namespaceMap.end(); nsIter++) - { - if (nsIter->second.equals(uri)) - return &(nsIter->first); - } - return 0; - } - - void SAX2Namespaces::merge(const SAX2Namespaces& inspaces) - { - NAMESPACE_MAP::const_iterator nsIter; - for (nsIter = inspaces.namespaceMap.begin(); - nsIter != inspaces.namespaceMap.end(); nsIter++) - { - // add will not overwrite if it already exists - namespaceMap[nsIter->first] = nsIter->second; - } - return; - } - - - - void SAX2Namespaces::add(const SDOXMLString& prefix, const SDOXMLString& uri) - { - namespaceMap[prefix] = uri; - } - - void SAX2Namespaces::empty() - { - namespaceMap.empty(); - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.h deleted file mode 100644 index 525ad73945..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Namespaces.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SAX2NAMESPACES_H_ -#define _SAX2NAMESPACES_H_ -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLString.h" -#include "map" - - -namespace commonj -{ - namespace sdo - { - -/** - * SAX2Namespaces holds a list of namespaces supplied by the SAX2 parser. - */ - - class SAX2Namespaces - { - - public: - - SAX2Namespaces(); - - SAX2Namespaces(int nb_namespaces, const xmlChar** namespaces); - - virtual ~SAX2Namespaces(); - - void add(const SDOXMLString& prefix, const SDOXMLString& uri); - - void merge(const SAX2Namespaces& inspaces); - - const SDOXMLString* find(const SDOXMLString& prefix) const; - const SDOXMLString* findPrefix(const SDOXMLString& uri) const; - - void empty(); - - private: - typedef std::map NAMESPACE_MAP; - NAMESPACE_MAP namespaceMap; - - - - }; - } // End - namespace sdo -} // End - namespace commonj - -#endif //_SAX2NAMESPACES_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp deleted file mode 100644 index 334d6f25d9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.cpp +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SAX2Parser.h" -#include "libxml/SAX2.h" -#include "commonj/sdo/SDORuntimeException.h" -using namespace commonj::sdo; - -/** - * SAX2Parser holds the methods which will be called back. - * The implementation uses libxml, which provides callbacks for - * errors, warnings , elements etc. These methods correspond to thos - * callbacks. - * Callbacks from libxml to these C methods are converted into calls - * to the C++ equivalent (with some parameter manipulation - * In the callback methods the void* ctx is a pointer to 'this' SAX2Parser - */ - - - -int sdo_isStandalone(void *ctx) -{ - return 0; -} - - -int sdo_hasInternalSubset(void *ctx) -{ - return(0); -} - -int sdo_hasExternalSubset(void *ctx) -{ - return(0); -} - -void sdo_internalSubset(void *ctx, const xmlChar *name, - const xmlChar *ExternalID, const xmlChar *SystemID) -{ -} - - -void sdo_externalSubset(void *ctx, const xmlChar *name, - const xmlChar *ExternalID, const xmlChar *SystemID) -{ -} - -xmlParserInputPtr sdo_resolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId) -{ - return(NULL); -} - - -xmlEntityPtr sdo_getEntity(void *ctx, const xmlChar *name) -{ - return(NULL); -} - - -xmlEntityPtr sdo_getParameterEntity(void *ctx, const xmlChar *name) -{ - return(NULL); -} - - -void sdo_entityDecl(void *ctx, const xmlChar *name, int type, - const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) -{ -} - - -void sdo_attributeDecl(void *ctx, const xmlChar * elem, - const xmlChar * name, int type, int def, - const xmlChar * defaultValue, xmlEnumerationPtr tree) -{ -} - -void sdo_elementDecl(void *ctx, const xmlChar *name, int type, - xmlElementContentPtr content) -{ -} - - -void sdo_notationDecl(void *ctx, const xmlChar *name, - const xmlChar *publicId, const xmlChar *systemId) -{ -} - -void sdo_unparsedEntityDecl(void *ctx, const xmlChar *name, - const xmlChar *publicId, const xmlChar *systemId, - const xmlChar *notationName) -{ -} - - -void sdo_setDocumentLocator(void *ctx, xmlSAXLocatorPtr loc) -{ -} - - -void sdo_startDocument(void *ctx) -{ - if (!((SAX2Parser*)ctx)->parserError) - ((SAX2Parser*)ctx)->startDocument(); -} - - -void sdo_endDocument(void *ctx) -{ - if (!((SAX2Parser*)ctx)->parserError) - ((SAX2Parser*)ctx)->endDocument(); -} - - -void sdo_startElement(void *ctx, const xmlChar *name, const xmlChar **atts) -{ - // ((SAX2Parser*)ctx)->startElement(name, atts); -} - - -void sdo_endElement(void *ctx, const xmlChar *name) -{ - // ((SAX2Parser*)ctx)->endElement(name); -} - - -void sdo_characters(void *ctx, const xmlChar *ch, int len) -{ - if (!((SAX2Parser*)ctx)->parserError) - ((SAX2Parser*)ctx)->characters(SDOXMLString(ch, 0, len)); -} - - -void sdo_reference(void *ctx, const xmlChar *name) -{ -} - - -void sdo_ignorableWhitespace(void *ctx, const xmlChar *ch, int len) -{ -} - - -void sdo_processingInstruction(void *ctx, const xmlChar *target, - const xmlChar *data) -{ -} - - -void sdo_cdataBlock(void *ctx, const xmlChar *value, int len) -{ -} - -void sdo_comment(void *ctx, const xmlChar *value) -{ -} - - -void sdo_warning(void *ctx, const char *msg, ...) -{ - va_list args; - va_start(args, msg); - ((SAX2Parser*)ctx)->warning(msg, args); - va_end(args); -} - -void sdo_error(void *ctx, const char *msg, ...) -{ - va_list args; - va_start(args, msg); - ((SAX2Parser*)ctx)->error(msg, args); - va_end(args); - - -} - -void sdo_fatalError(void *ctx, const char *msg, ...) -{ - va_list args; - va_start(args, msg); - ((SAX2Parser*)ctx)->fatalError(msg, args); - va_end(args); -} - - - -// =============== -// SAX2 callbacks -// =============== -void sdo_startElementNs(void *ctx, - const xmlChar *localname, - const xmlChar *prefix, - const xmlChar *URI, - int nb_namespaces, - const xmlChar **namespaces, - int nb_attributes, - int nb_defaulted, - const xmlChar **attributes) -{ - if (!((SAX2Parser*)ctx)->parserError) - ((SAX2Parser*)ctx)->startElementNs( - localname, - prefix, - URI, - SAX2Namespaces(nb_namespaces, namespaces), - SAX2Attributes(nb_attributes, nb_defaulted, attributes)); -} - - -void sdo_endElementNs(void *ctx, - const xmlChar *localname, - const xmlChar *prefix, - const xmlChar *URI) -{ - if (!((SAX2Parser*)ctx)->parserError) - ((SAX2Parser*)ctx)->endElementNs(localname, prefix, URI); -} - - -// The callback method structure -xmlSAXHandler SDOSAX2HandlerStruct = { - sdo_internalSubset, - sdo_isStandalone, - sdo_hasInternalSubset, - sdo_hasExternalSubset, - sdo_resolveEntity, - sdo_getEntity, - sdo_entityDecl, - sdo_notationDecl, - sdo_attributeDecl, - sdo_elementDecl, - sdo_unparsedEntityDecl, - sdo_setDocumentLocator, - sdo_startDocument, - sdo_endDocument, - sdo_startElement, - sdo_endElement, - sdo_reference, - sdo_characters, - sdo_ignorableWhitespace, - sdo_processingInstruction, - sdo_comment, - sdo_warning, - sdo_error, - sdo_fatalError, - sdo_getParameterEntity, - sdo_cdataBlock, - sdo_externalSubset, - XML_SAX2_MAGIC, - NULL, - sdo_startElementNs, - sdo_endElementNs, - NULL -}; - - -namespace commonj -{ - namespace sdo - { - - - - - SAX2Parser::SAX2Parser() - { - setter = 0; - parserError = false; - currentFile = 0; - } - - SAX2Parser::SAX2Parser(ParserErrorSetter* insetter) - { - setter = insetter; - parserError = false; - currentFile = 0; - } - - SAX2Parser::~SAX2Parser() - { - // xmlCleanupParser(); - if (currentFile != 0)delete currentFile; - - } - - const char* SAX2Parser::getCurrentFile() const - { - return currentFile; - } - - - void SAX2Parser::setCurrentFile(const char* filename) - { - if (currentFile != 0) - { - delete currentFile; - } - currentFile = new char[strlen(filename)+1]; - strcpy(currentFile,filename); - } - - int SAX2Parser::parse(const char* filename) - { - - parserError = false; - xmlSAXHandlerPtr handler = &SDOSAX2HandlerStruct; - - if (currentFile != 0) - { - delete currentFile; - } - currentFile = new char[strlen(filename)+1]; - strcpy(currentFile,filename); - - - int rc = xmlSAXUserParseFile(handler, this, filename); - if (rc == -1) - { - sdo_error(this, "xmlSAXUserParseFile returned an error %d", rc); - SDO_THROW_EXCEPTION("parse", SDOFileNotFoundException,messageBuffer); - } - return rc; - } - - void SAX2Parser::startDocument() - { - } - - void SAX2Parser::endDocument() - { - } - - void SAX2Parser::startElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - } - - void SAX2Parser::endElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI) - { - } - - void SAX2Parser::characters(const SDOXMLString& chars) - { - } - - - void SAX2Parser::warning(const char* msg, va_list args) - { - // warnings are perhaps too frequent - // vsprintf(messageBuffer, msg, args); - // if (setter != 0)setter->setError(messageBuffer); - } - - void SAX2Parser::fatalError(const char* msg, va_list args) - { - parserError = true; - vsprintf(messageBuffer, msg, args); - if (setter != 0)setter->setError(messageBuffer); - } - - void SAX2Parser::error(const char* msg, va_list args) - { - vsprintf(messageBuffer, msg, args); - if (setter != 0)setter->setError(messageBuffer); - } - - - void SAX2Parser::stream(std::istream& input) - { - char buffer[100]; - xmlSAXHandlerPtr handler = &SDOSAX2HandlerStruct; - parserError = false; - xmlParserCtxtPtr ctxt; - - input.read(buffer,4); - ctxt = xmlCreatePushParserCtxt(handler, this, - buffer, input.gcount(), NULL); - - while (input.read(buffer,100)) - { - xmlParseChunk(ctxt, buffer, input.gcount(), 0); - - } - - xmlParseChunk(ctxt, buffer, input.gcount(), 1); - xmlFreeParserCtxt(ctxt); - - if (parserError) - { - SDO_THROW_EXCEPTION("stream", SDOXMLParserException,messageBuffer); - } - - } - - int SAX2Parser::parse_twice(const char* filename) - { - parserError = false; - xmlSAXHandlerPtr handler = &SDOSAX2HandlerStruct; - - setCurrentFile(filename); - - int rc = xmlSAXUserParseFile(handler, this, filename); - if (rc == -1) - { - sdo_error(this, "xmlSAXUserParseFile returned an error %d", rc); - SDO_THROW_EXCEPTION("parse", SDOFileNotFoundException,messageBuffer); - } - - // parse twice - first was for groups - - if (setter)setter->clearErrors(); - - rc = xmlSAXUserParseFile(handler, this, filename); - if (rc == -1) - { - sdo_error(this, "xmlSAXUserParseFile returned an error %d", rc); - SDO_THROW_EXCEPTION("parse", SDOFileNotFoundException,messageBuffer); - } - return rc; - } - - void SAX2Parser::stream_twice(std::istream& input) - { - - std::vector buffer_vec; - int count = 0; - parserError = false; - - xmlSAXHandlerPtr handler = &SDOSAX2HandlerStruct; - xmlParserCtxtPtr ctxt; - - char bctx[5]; - input.read(bctx,4); - int bcount = input.gcount(); - - - ctxt = xmlCreatePushParserCtxt(handler, this, - bctx, bcount, NULL); - - buffer_vec.push_back(parse_buf_element()); - - while (input.read(buffer_vec[count].buf,1000)) - { - buffer_vec[count].len = input.gcount(); - xmlParseChunk(ctxt, buffer_vec[count].buf, - buffer_vec[count].len, 0); - buffer_vec.push_back(parse_buf_element()); - count++; - - } - - buffer_vec[count].len = input.gcount(); - xmlParseChunk(ctxt, buffer_vec[count].buf, - buffer_vec[count].len, 1); - xmlFreeParserCtxt(ctxt); - - if (parserError) - { - SDO_THROW_EXCEPTION("stream", SDOXMLParserException,messageBuffer); - } - - if (setter)setter->clearErrors(); - - ctxt = xmlCreatePushParserCtxt(handler, this, - bctx, bcount, NULL); - - for (int i=0;i 0) - { - xmlParseChunk(ctxt, buffer_vec[i].buf, - buffer_vec[i].len, 0); - } - } - - if (parserError) - { - SDO_THROW_EXCEPTION("stream", SDOXMLParserException,messageBuffer); - } - - } - - - std::istream& operator>>(std::istream& input, SAX2Parser& parser) - { - parser.stream(input); - return input; - } - - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.h deleted file mode 100644 index fd11d98fde..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SAX2Parser.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SAX2PARSER_H_ -#define _SAX2PARSER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/SAX2Attributes.h" -#include "commonj/sdo/ParserErrorSetter.h" - - - -#include "sstream" -namespace commonj -{ - namespace sdo - { - - class parse_buf_element - { - - public: - char buf[1000]; - int len; - }; - -/** - * SAX2Parser holds the methods which will be called back. - * The implementation uses libxml, which provides callbacks for - * errors, warnings , elements etc. These methods correspond to thos - * callbacks. - * Callbacks from libxml to these C methods are converted into calls - * to the C++ equivalent (with some parameter manipulation - * In the callback methods the void* ctx is a pointer to 'this' SAX2Parser - */ - class SAX2Parser - { - - public: - - SAX2Parser(); - - SAX2Parser(ParserErrorSetter* insetter); - - virtual ~SAX2Parser(); - - virtual int parse (const char* filename); - virtual int parse_twice (const char* filename); - - virtual void startDocument(); - virtual void endDocument(); - - virtual void startElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void endElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI); - - virtual void characters(const SDOXMLString& chars); - - virtual void warning(const char* msg, va_list args); - - virtual void fatalError(const char* msg, va_list args); - - virtual void error(const char* msg, va_list args); - - virtual void stream(std::istream& input); - virtual void stream_twice(std::istream& input); - - friend std::istream& operator>>(std::istream& input, SAX2Parser& parser); - - ParserErrorSetter* setter; - bool parserError; - - char messageBuffer[1024]; - - virtual const char* getCurrentFile() const; - virtual void setCurrentFile(const char* filename); - - private: - - char* currentFile; - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SAX2PARSER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDO.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDO.h deleted file mode 100644 index cc4fc6cf7b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDO.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/PropertyList.h" -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/TypeList.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/DataObjectList.h" -#include "commonj/sdo/XSDHelper.h" -#include "commonj/sdo/XMLHelper.h" -#include "commonj/sdo/EqualityHelper.h" -#include "commonj/sdo/CopyHelper.h" -#include "commonj/sdo/SdoRuntime.h" -#include "commonj/sdo/HelperProvider.h" -#include "commonj/sdo/SDODate.h" -#include "commonj/sdo/DataGraph.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDOUtils.h" -#include "commonj/sdo/ChangedDataObjectList.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/DataObjectInstance.h" -#include "commonj/sdo/DefaultLogWriter.h" -#include "commonj/sdo/Logger.h" -#include "commonj/sdo/LogWriter.h" -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/RefCountingObject.h" -#include "commonj/sdo/SdoCheck.h" -#include "commonj/sdo/Setting.h" -#include "commonj/sdo/SettingList.h" -#include "commonj/sdo/XMLDocument.h" -#include "commonj/sdo/DASValue.h" -#include "commonj/sdo/XpathHelper.h" -#include "commonj/sdo/TypeDefinition.h" -#include "commonj/sdo/TypeDefinitions.h" -#include "commonj/sdo/PropertyDefinition.h" - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.cpp deleted file mode 100644 index 9a129f8ca1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDODate.h" - -namespace commonj{ -namespace sdo{ - - - SDODate::~SDODate() - { - } - - SDODate::SDODate(time_t inval) - { - value = inval; - } - - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - - const time_t SDODate::getTime(void) const - { - return value; - } - - const char* SDODate::ascTime(void) const - { - return asctime(localtime(&value)); - } - -}; -}; -// end - namespace sdo - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.h deleted file mode 100644 index 59306462e5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDODate.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDO_SDODATE_H_ -#define _SDO_SDODATE_H_ - - -#include "commonj/sdo/export.h" -#include "time.h" - - - - -namespace commonj{ -namespace sdo{ - - - /////////////////////////////////////////////////////////////////////////// - // A representation of the type of a date. - /////////////////////////////////////////////////////////////////////////// - -/** - * SDODate - a means of hiding the time_t. - * The SDO API in several places uses method overloads to allow the - * same method to set many types of data. As time_t and long are - * sometimes synonymous, it was not possible to have a time_t and a - * long method, so SDODate simply wraps the time_t. - * SDODate also allows modifcation of the implementation, as time_t is - * only a short-term solution - better date/time handling is required. - */ - -class SDODate -{ - -public: - - - virtual SDO_API ~SDODate(); - - SDO_API SDODate(time_t inval); - - /** - * Hand out the date as a time_t - */ - virtual SDO_API const time_t getTime() const; - - /** - * Format the date as a string - */ - - virtual const char* ascTime(void) const; - - -private: - time_t value; -}; - -}; -}; -#endif //_SDO_SDODATE_H_ - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp deleted file mode 100644 index 09a014e8db..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDORuntimeException.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDORuntimeException.h" - -#include - -// ======================================================================== -// Constructor -// ======================================================================== -SDORuntimeException :: SDORuntimeException(const char* name, - severity_level sev, - const char* msg_text) - : severity(sev),location_set(0) -{ - class_name = new char[strlen(name) + 1]; - strcpy(class_name,name); - message_text = new char[strlen(msg_text)+1]; - strcpy(message_text,msg_text); - -} // end SDORuntimeException constuctor - -// ======================================================================== -// Constructor -// ======================================================================== -SDORuntimeException :: SDORuntimeException(const SDORuntimeException& c) - : - severity(c.getSeverity()), location_set(c.location_set) - -{ - class_name = new char[strlen(c.getEClassName()) + 1]; - strcpy(class_name, c.getEClassName()); - message_text = new char[strlen(c.getMessageText())+1]; - strcpy(message_text,c.getMessageText()); - for (int i=0;i -#include - - - -/** SDORuntimeException - Exception base class. - * - * - * Description : - * ------------- - * SDO exception class definition - * - * This is intended as a base class. - * - * Parent Classes : - * ---------------- - * none - * - * Public Member functions: - * ------------------------ - * - * Constructors : - * SDORuntimeExceptionm(severity_level sev=severe, - * const string &msg_text=""); - * - * creates the exception object. Parameters are: - * sev: the severity of the exception (Error, Severe) - * msg_text: descriptive message_text - * - * copy constructor not necessary - * - * Destructor : - * virtual ~SDORuntimeException(); - * - * Assignment operator: - * not necessary - * - * void setSeverity(severity_level sev); - * set the exception severity - * - * void setMessageText(const char* msg_text); - * set the message text associated with the exception. (This text should - * come from a message catalog as it may be written to stdout/stderr at - * some point) - * - * void setExceptionLocation(const char* file, - * unsigned long line, - * const char* function=""); - * - * adds the location of the exception. Parameters - * file: the filename from where the exception is being created - * (from __FILE__) - * line: the line number from where the exception is being created - * (from __LINE__) - * function: The function name from where the exception is being created - * - * severity_level getSeverity() const; - * returns the severity of the exception - * - * const char* getMessageText() const; - * returns the message text that describes this exception. - * - * const tring& getFileName() const; - * returns the file name from the location information in the exception - * - * unsigned long getLineNumber() const; - * returns the line number from the location information in the exception - * - * const char* getFunctionName() const; - * returns the function name from the location information in the exception - * - * Private Data Members : - * ---------------------- - * severity_level severity; * Severity of exception - * string message_text; * Message associated with exception - * string file_name; * File name (from __FILE__) - * unsigned long line_number; * Line number (from __LINE__) - * string function_name; * Function name - * - */ - -class SDORuntimeException -{ - public: - // Constructor - enum severity_level - { - Normal, - Warning, - Error, - Severe - }; - - SDO_API SDORuntimeException(const char *name="SDORuntimeException", - severity_level sev=Severe, - const char* msg_text=""); - - SDO_API SDORuntimeException(const SDORuntimeException& c); - - // Destructor - virtual SDO_API ~SDORuntimeException(); - - /** getEClassName() get the exception class - * - * returns the name of the exception class, which will be - * a subclass of SDORuntimeException - */ - - SDO_API const char* getEClassName() const; - - /** getSeverity returns a level from severity_levels - * - * Return severity - * from the enumerator severity_levels, which is: - * - * Normal,Warning, Error,Severe - */ - - SDO_API severity_level getSeverity() const; - - /** - * Return message text associated with exception - */ - - SDO_API const char* getMessageText() const; - - /** getFileName() the file where the exception occurred - * - * Return file name where exception was raised - */ - - SDO_API const char* getFileName() const; - - /** getLineNumber gives the line where the excepion occurred - * - * Return line number where exception was raised - */ - - SDO_API unsigned long getLineNumber() const; - - /** getFunctionName give the name of the raising function - * - * Return function name where exception was raised - */ - - SDO_API const char* getFunctionName() const; - - - /** setSeverity - * - * sets an exception severity - */ - - SDO_API void setSeverity(severity_level sev); - - /** setMessageText - * - * set the message text associated with exception - */ - - SDO_API void setMessageText(const char* msg_text); - - - /** setExceptionLocation - * - * set exception location - */ - - SDO_API void setExceptionLocation(const char* file, - unsigned long line, - const char* function=""); - - SDO_API void setLocation(const char* file, - unsigned long line, - const char* function=""); - - SDO_API void trace(const char* text="%1:\n %3 %4 %2"); - - SDO_API virtual std::ostream& PrintSelf(std::ostream &os) const; - - /** operator << to write the exception - * - * ostream operator << - */ - - SDO_API friend std::ostream& operator<< (std::ostream &os, const SDORuntimeException &except); - - protected: - - private: - - char* class_name; - - severity_level severity; // Severity of exception - - char* message_text; // Description of exception - - //* Location where the exception was last thrown*handled - - class location - { - public: - char* file; //* File name (from __FILE__) - unsigned long line; //* Line number (from __LINE__) - char* function; //* Function name - }; - - // Array of locations - enum {num_locations=5}; - location locations[num_locations]; - - // Index into locations array - int location_set; - - -}; // End SDORuntimeException class definition - -/** - *************************************************************************** - * - * SDOOutOfMemoryException - Exception for no-storage - * - * *************************************************************************** - */ - -class SDOOutOfMemoryException: public SDORuntimeException -{ - public: - SDOOutOfMemoryException(unsigned long size) - : SDORuntimeException("SDOOutOfMemoryException", Severe, - "Unable to obtain storage of length " + size) - { - } - private: -}; // End SDOOutOfMemory class definition - -/** - *************************************************************************** - * - * SDONullPointerException - Exception for no-storage - * - * *************************************************************************** - */ - -class SDONullPointerException: public SDORuntimeException -{ - public: - SDONullPointerException(const char* param) - : SDORuntimeException("SDONullPointerException", Warning, - "The referenced object is null ") - { - } - private: -}; // End SDOOutOfMemory class definition -/** -*************************************************************************** -* -* SDOPathNotFoundException - Exception for bad path -* -**************************************************************************** -*/ -class SDOPathNotFoundException: public SDORuntimeException -{ - public: - SDOPathNotFoundException(const char* path) - : SDORuntimeException("SDOPathNotFoundException", Warning, - path) - { - } - private: -}; // End SDOPathNotFoundException class definition - -/** -*************************************************************************** -* -* SDOPropertyNotFoundException - Exception for property not found -* -**************************************************************************** -*/ - -class SDOPropertyNotFoundException: public SDORuntimeException -{ - public: - SDOPropertyNotFoundException(const char* name) - : SDORuntimeException("SDOPropertyNotFoundException", Warning, - name) - { - } - private: -}; // End SDOPropertyNotFoundException class definition - -/** -*************************************************************************** -* -* SDOTypeNotFoundException - Exception for type not found. -* -**************************************************************************** -*/ -class SDOTypeNotFoundException: public SDORuntimeException -{ - public: - SDOTypeNotFoundException(const char* name) - : SDORuntimeException("SDOTypeNotFoundException", Warning, - name) - { - } - private: -}; // End SDOTypeNotFoundException class definition - -/** -*************************************************************************** -* -* SDOFileNotFoundException - Exception for file not found -* -**************************************************************************** -*/ - -class SDOFileNotFoundException: public SDORuntimeException -{ - public: - SDOFileNotFoundException(const char* name) - : SDORuntimeException("SDOFileNotFoundException", Warning, - name) - { - } - private: -}; // End SDOFileNotFoundException class definition -/** -*************************************************************************** -* -* SDOPropertyNotSetException - Exception for asking for the value of an -* unset/undefaulted prop -* -**************************************************************************** -*/ -class SDOPropertyNotSetException: public SDORuntimeException -{ - public: - SDOPropertyNotSetException(const char* name) - : SDORuntimeException("SDOPropertyNotSetException", Warning, - name) - { - } - private: -}; // End SDOPropertyNotSetException class definition -/** -*************************************************************************** -* -* SDOUnsupportedOperationException - Invalid action or unimplemented method. -* -**************************************************************************** -*/ -class SDOUnsupportedOperationException: public SDORuntimeException -{ - public: - SDOUnsupportedOperationException(const char* name) - : SDORuntimeException("SDOUnsupportedOperationException", Warning, - name) - { - } - private: -}; // End SDOTypeNotFoundException class definition - -/** -*************************************************************************** -* -* SDOInvalidConversionException - Invalid conversion - cannot convert to type. -* -**************************************************************************** -*/ -class SDOInvalidConversionException: public SDORuntimeException -{ - public: - SDOInvalidConversionException(const char* name) - : SDORuntimeException("SDOInvalidConversionException", Warning, - name) - { - } - private: -}; // End SDOTypeNotFoundException class definition -/** -*************************************************************************** -* -* SDOIllegalArgumentException - Invalid argument passed (null name?). -* -**************************************************************************** -*/ -class SDOIllegalArgumentException: public SDORuntimeException -{ - public: - SDOIllegalArgumentException(const char* name) - : SDORuntimeException("SDOIllegalArgumentException", Warning, - name) - { - } - private: -}; // End SDOTypeNotFoundException class definition -/** -**************************************************************************** -* -* SDOIndexOutOfRangeException - element index not in a list. -* -**************************************************************************** -*/ -class SDOIndexOutOfRangeException: public SDORuntimeException -{ - public: - SDOIndexOutOfRangeException(const char* name) - : SDORuntimeException("SDOIndexOutOfRangeException", Warning, - name) - { - } - private: -}; // End SDOTypeNotFoundException class definition - -/** -*************************************************************************** -* -* SDOXMLParserException - XMLParser error -* -**************************************************************************** -*/ -class SDOXMLParserException: public SDORuntimeException -{ - public: - SDOXMLParserException(const char* name) - : SDORuntimeException("SDOXMLParserException", Warning, - name) - { - } - private: -}; // End SDOTypeNotFoundException class definition - -/* -*************************************************************************** -* -* Macro definitions -* -**************************************************************************** -*/ -/** - * ========================================================================= - * Macro - SDO_THROW_EXCEPTION - * - * adds the current file name, line number and function name to the exception. - * then throws the exception. - * The parameter 'function_name' should be the name of the function throwing - * this exception. - * The parameter 'type' is the class of exception to throw and must be a - * SDORuntimeException or a class derived from SDORuntimeException. - * The parameter 'parameter' is the construction parameter for the exception - * ========================================================================= -*/ - - #define SDO_THROW_EXCEPTION(function_name, type, parameter ) \ - {\ - type ex(parameter); \ - ex.setExceptionLocation(__FILE__,__LINE__,#function_name); \ - throw ex;\ - } - -/** - ========================================================================= - * Macro - SDO_RETHROW_EXCEPTION - * - * adds the current file name, line number and function name to the exception. - * then re-throws the exception. - * The parameter 'function_name' should be the name of the function throwing - * this exception. - * ========================================================================= -*/ - #define SDO_RETHROW_EXCEPTION(function_name, exception) \ - (exception).setLocation(__FILE__,__LINE__,#function_name); \ - throw; - -/** - * ========================================================================= - * Macro - SDO_HANDLE_EXCEPTION - * - * adds the current file name, line number and function name to the exception. - * Writes an exception trace entry then continues. - * The parameter 'function_name' should be the name of the function handling - * this exception. - * ========================================================================= -*/ - #define SDO_HANDLE_EXCEPTION(function_name, exception) \ - {\ - (exception).setLocation(__FILE__,__LINE__,#function_name); \ - (exception).Trace("Exception handled by %1: \n %3 %4 %2");\ - } - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp deleted file mode 100644 index a4c60d105e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp +++ /dev/null @@ -1,1490 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOSAX2Parser.h" - -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/XMLQName.h" -#include "commonj/sdo/DASProperty.h" -#include "commonj/sdo/Logging.h" -#include "commonj/sdo/DASType.h" -#include "commonj/sdo/XSDTypeInfo.h" -#include "commonj/sdo/TypeImpl.h" -#include "commonj/sdo/DataObjectImpl.h" -#include "commonj/sdo/DataFactoryImpl.h" -#include -using namespace std; - -namespace commonj -{ - namespace sdo - { - - SDOSAX2Parser::SDOSAX2Parser( - DataFactoryPtr df, - const SDOXMLString& targetNamespace, - DataObjectPtr& rootDO, - ParserErrorSetter* insetter - ) - - : dataFactory(df), - targetNamespaceURI(targetNamespace), - rootDataObject(rootDO), - currentDataObject(0), - isDataGraph(false), - ignoreEvents(false), - dealingWithChangeSummary(false), - csbuilder(0), - SAX2Parser(insetter) - - - { - reset(); - if (targetNamespace.isNull()) - { - targetNamespaceURI = ""; - } - rootDataObject = 0; - newSequence = true; - } - - SDOSAX2Parser::~SDOSAX2Parser() - { - } - - void SDOSAX2Parser::reset() - { - rootDataObject = 0; - currentDataObject = 0; - isDataGraph = false; - ignoreEvents = false; - changeSummary = false; - IDMap.empty(); - IDRefs.empty(); - } - - - void SDOSAX2Parser::startDocument() - { - LOGINFO(INFO,"SDOSAX2Parser: startDocument"); - setNamespaces = true; - reset(); - } - - void SDOSAX2Parser::endDocument() - { - LOGENTRY(INFO,"SDOSAX2Parser: endDocument"); - // Iterate over IDREFs list and set references - ID_REFS::iterator refsIter; - for (refsIter = IDRefs.begin(); refsIter != IDRefs.end(); refsIter++) - { - try - { - const Type& type = refsIter->dataObject->getType(); - const Property& prop = refsIter->dataObject->getProperty((const char*)refsIter->property); - const Type& propType = ((TypeImpl&)type).getRealPropertyType(refsIter->property); - - // Allowing referenes to DataObjects only - if (!propType.isDataType()) - { - DataObjectPtr reffedDO; - ID_MAP::iterator idIter = IDMap.find(refsIter->value); - if (idIter != IDMap.end()) - { - reffedDO = idIter->second; - } - else - { - // assume it is an XPath? - - // Remove #/ from front of XPATH as getDataObject doeesnt - // support this yet - it does now - //SDOXMLString xpath(refsIter->value); - //if (xpath.firstIndexOf('#') == 0) - // xpath = xpath.substring(1); - //if (xpath.firstIndexOf('/') == 0) - // xpath = xpath.substring(1); - - reffedDO = rootDataObject->getDataObject((const char*)refsIter->value); - } - - if (!reffedDO) - { - continue; - } - - if (prop.isMany()) - { - DataObjectList& dol = refsIter->dataObject->getList(prop); - dol.append(reffedDO); - } - else - { - refsIter->dataObject->setDataObject(prop, reffedDO); - } - } - - } - catch (const SDORuntimeException&) - { - } - } - try { - // Now rebuild the changeSummary - if (csbuilder != 0) - { - csbuilder->buildChangeSummary(changeSummaryDO); - delete csbuilder; - csbuilder = 0; - } - } - catch (SDORuntimeException&) - { - } - - LOGEXIT(INFO,"SDOSAX2Parser: endDocument"); - } - - - bool SDOSAX2Parser::setDO(DataObjectPtr newDO, - SDOXMLString& propertyName) - { - LOGENTRY(INFO,"SDOSAX2Parser: setDO"); - - if (currentDataObject) - { - const Type& type = currentDataObject->getType(); - // go lower level so we can find open properties w/o exception - DataObject* dob = currentDataObject; - const PropertyImpl* pprop = ((DataObjectImpl*)dob)->getPropertyImpl((const char*)propertyName); - if (pprop == 0) - { - - LOGEXIT(INFO,"SDOSAX2Parser: setDO - exit1"); - return false; - } - - const Property& property = (Property&)*pprop; - //const Type& propertyType = ((TypeImpl&)type).getRealPropertyType(propertyName); - if (currentDataObject->getType().isSequencedType()) - { - SequencePtr seq = currentDataObject->getSequence(); - seq->addDataObject(property, newDO); - } - else - { - if (!property.isMany()) - { - currentDataObject->setDataObject((const char*)propertyName, newDO); - } - else - { - DataObjectList& dol = currentDataObject->getList((const char*)propertyName); - dol.append(newDO); - } - } - } - - setCurrentDataObject(newDO); - - LOGEXIT(INFO,"SDOSAX2Parser: setDO - exit2"); - return true; - } - - void SDOSAX2Parser::handleOpenAttribute( - SDOXMLString& tns, - const SDOXMLString& propuri, - const SDOXMLString& propname, - const SDOXMLString& value) - { - // first, see if there is a global element or attribute corresponding... - try - { - DataFactory* df = dataFactory; - const PropertyImpl* prop = 0; - const TypeImpl* ti = - ((DataFactoryImpl*)df)->findTypeImpl(propuri,"RootType"); - - if (ti != 0) - { - prop = (const PropertyImpl*)ti->getPropertyImpl(propname); - } - else - { - ti = ((DataFactoryImpl*)df)->findTypeImpl(tns,"RootType"); - } - - if (ti != 0) - { - prop = (const PropertyImpl*)ti->getPropertyImpl(propname); - } - - if (prop == 0) - { - // need to use the sequence interface if it exists - if (currentDataObject->getType().isSequencedType()) - { - SequencePtr seq = currentDataObject->getSequence(); - seq->addCString(propname, value); - } - else - { - currentDataObject->setCString((const char*)propname,value); - } - return; - } - - DataObject* dob = currentDataObject; - - switch (prop->getTypeEnum()) - { - case Type::BooleanType: - ((DataObjectImpl*)dob)->defineBoolean(propname); - break; - case Type::ByteType: - ((DataObjectImpl*)dob)->defineByte(propname); - break; - case Type::CharacterType: - ((DataObjectImpl*)dob)->defineCharacter(propname); - break; - case Type::BytesType: - ((DataObjectImpl*)dob)->defineBytes(propname); - break; - case Type::StringType: - ((DataObjectImpl*)dob)->defineString(propname); - break; - case Type::ShortType: - ((DataObjectImpl*)dob)->defineShort(propname); - break; - case Type::IntegerType: - ((DataObjectImpl*)dob)->defineInteger(propname); - break; - case Type::LongType: - ((DataObjectImpl*)dob)->defineLong(propname); - break; - case Type::DoubleType: - ((DataObjectImpl*)dob)->defineDouble(propname); - break; - case Type::FloatType: - ((DataObjectImpl*)dob)->defineFloat(propname); - break; - case Type::DateType: - ((DataObjectImpl*)dob)->defineDate(propname); - break; - } // switch - - // regardless of what type the property now is, we can set CString , and the - // right conversion will happen - - // need to use the sequence interface if it exists. - if (currentDataObject->getType().isSequencedType()) - { - SequencePtr seq = currentDataObject->getSequence(); - seq->addCString(propname, value); - } - else - { - currentDataObject->setCString((const char*)propname,value); - } - } - catch (SDORuntimeException) - { - } - return; - } - - - void SDOSAX2Parser::setAttributes( - SDOXMLString& tns, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - - LOGENTRY(INFO,"SDOSAX2Parser::setAttributes"); - - ////////////////////////////////////////////// - // The attributes are properties on the new DO - // Handle attributes - ////////////////////////////////////////////// - for (int i=0; i < attributes.size(); i++) - { - // Should ignore attributes like xsi:type - if (!(attributes[i].getUri().equalsIgnoreCase("http://www.w3.org/2001/XMLSchema-instance"))) - { - try - { - const SDOXMLString& propertyName = getSDOName(*currentDataObjectType, attributes[i].getName()); - DataObject* dob = currentDataObject; - const PropertyImpl* pprop = ((DataObjectImpl*)dob)->getPropertyImpl(propertyName); - if (pprop == 0 ) - { - if (currentDataObject->getType().isOpenType()) - { - // if its an open type, then attributes will be allowed to have - // an invalid name, and setCString will create them all as bytes - handleOpenAttribute(tns, attributes[i].getUri(), - attributes[i].getName(), - attributes[i].getValue()); - - } - else - { - LOGERROR_1(WARNING,"SDOSAX2Parser: Property not found on closed type (ignored):%s", - (const char*)(attributes[i].getName())); - } - } - else - { - const Property& prop = (Property&)*pprop; - SDOXMLString propValue; - - XSDPropertyInfo* pi = (XSDPropertyInfo*)((DASProperty*)&prop)->getDASValue("XMLDAS::PropertyInfo"); - if (pi && pi->getPropertyDefinition().isElement) - { - // xml instance is trying to set an attribute when schema defines property as element - LOGERROR_1(WARNING,"SDOSAX2Parser: Attribute %s should be an element. Attribute ignored", - (const char*)(attributes[i].getName())); - continue; - } - - if (pi && pi->getPropertyDefinition().isQName) - { - XMLQName qname(attributes[i].getValue(), - documentNamespaces, namespaces); - propValue = qname.getSDOName(); - } - else - { - propValue = attributes[i].getValue(); - } - - if ((pi && pi->getPropertyDefinition().isIDREF) - || prop.isReference()) - { - // remember this value to resolve later - IDRef ref(currentDataObject, attributes[i].getName(), propValue); - IDRefs.insert(IDRefs.end(), ref); - } - else - { - if (pi && pi->getPropertyDefinition().isID) - { - // add this ID to the map - IDMap[propValue] = currentDataObject; - } - // Always set the property as a String. SDO will do the conversion - currentDataObject->setCString((const char*)attributes[i].getName(), propValue); - } - } - } - catch (const SDOPropertyNotFoundException&) - { - LOGERROR_1(WARNING,"SDOSAX2Parser: Error processing attribute (ignored):%s", - (const char*)(attributes[i].getName())); - } - } - } // End iterate over attributes - - LOGEXIT(INFO,"SDOSAX2Parser:setAttributes"); - - } - - - const PropertyImpl* SDOSAX2Parser::handleOpenType( - SDOXMLString& tns, - const SDOXMLString& localname, - DataObjectImpl* dob, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes, - SDOXMLString& xsitypeURI, - SDOXMLString& xsitypeName, - bool bToBeNull) - { - // first, see if there is a global element or attribute corresponding... - const PropertyImpl* pprop; - DataObjectPtr newDO = 0; - try - { - DataFactory* df = dataFactory; - const TypeImpl* ti = 0; - const PropertyImpl* prop = 0; - SDOXMLString propertyName; - - ti = ((DataFactoryImpl*)df)->findTypeImpl(tns,"RootType"); - if (ti != 0) - { - propertyName = getSDOName((Type&)*ti, localname); - prop = ti->getPropertyImpl(propertyName); - } - else - { - propertyName = localname; - } - - if (prop != 0) - { - if (prop->isMany()) - { - pprop = ((DataObjectImpl*)dob)->defineList(propertyName); - - // the type of the list needs to be set, as chars sets a CString - try - { - DataObjectList& dl = ((DataObjectImpl*)dob)->getList((const char*)propertyName); - ((DataObjectListImpl*)&dl)->setType(prop->getType().getURI(), - prop->getType().getName()); - } - catch (SDORuntimeException) - { - // let it pass - the type will be Bytes - } - - if (prop->getType().isDataType()) - { - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - } - else - { - newDO = dataFactory->create( - prop->getType().getURI(), - prop->getType().getName()); - // here we need to use the sequence interface if it exists. - if (dob->getType().isSequencedType()) - { - SequencePtr seq = currentPropertySetting.dataObject->getSequence(); - seq->addDataObject(propertyName,newDO); - } - else - { - DataObjectList& dol = dob->getList((const char*)propertyName); - dol.append(newDO); - } - setCurrentDataObject(newDO); - setAttributes(tns, namespaces,attributes); - } - return pprop; - } - else - { - switch (prop->getTypeEnum()) - { - case Type::BooleanType: - pprop = ((DataObjectImpl*)dob)->defineBoolean((const char*)propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::ByteType: - pprop = ((DataObjectImpl*)dob)->defineByte((const char*)propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::CharacterType: - pprop = ((DataObjectImpl*)dob)->defineCharacter(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::BytesType: - pprop = ((DataObjectImpl*)dob)->defineBytes(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::StringType: - pprop = ((DataObjectImpl*)dob)->defineString(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::ShortType: - pprop = ((DataObjectImpl*)dob)->defineShort(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::IntegerType: - pprop = ((DataObjectImpl*)dob)->defineInteger(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::LongType: - pprop = ((DataObjectImpl*)dob)->defineLong(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::DoubleType: - pprop = ((DataObjectImpl*)dob)->defineDouble(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::FloatType: - pprop = ((DataObjectImpl*)dob)->defineFloat(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::DateType: - pprop = ((DataObjectImpl*)dob)->defineDate(propertyName); - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - break; - case Type::DataObjectType: - pprop = ((DataObjectImpl*)dob)->defineDataObject(propertyName, - prop->getType().getURI(), prop->getType().getName()); - newDO = dataFactory->create( - prop->getType().getURI(), - prop->getType().getName()); - // here we need to use the sequence interface if it exists. - if (dob->getType().isSequencedType()) - { - SequencePtr seq = dob->getSequence(); - seq->addDataObject(propertyName, newDO); - } - else - { - dob->setDataObject((const char*)propertyName, newDO); - } - setCurrentDataObject(newDO); - setAttributes(tns,namespaces,attributes); - break; - } - } // else - } // if prop != 0 - else - { - // The type is open, and the property doesnt exist, so we are creating - // a property, and need to find out the type to create. - // As I cannot tell if its a single value or many valued, I create all - // as many valued - // could be data object or primitive. All primitives will appear - // as bytes. - // UPDATE: Spec says that all elements will appear as DataObjects which - // are sequenced - the text will come out as text elements in the sequence - - if (!xsitypeName.isNull()) - { - // it has a type from xsi:type - newDO = dataFactory->create((const char*)xsitypeURI, (const char*)xsitypeName); - } - else - { - newDO = dataFactory->create(Type::SDOTypeNamespaceURI, "OpenDataObject"); - } - pprop = ((DataObjectImpl*)dob)->defineList(propertyName); - // here we need to use the sequence interface if it exists. - if (dob->getType().isSequencedType()) - { - SequencePtr seq = dob->getSequence(); - seq->addDataObject(propertyName, newDO); - } - else - { - DataObjectList& dol = dob->getList((const char*)propertyName); - dol.append(newDO); - } - setCurrentDataObject(newDO); - setAttributes(tns,namespaces,attributes); - } - return pprop; - } - catch (SDORuntimeException) - { - // fail to find the property or create a dummy - return 0; - } - } - - void SDOSAX2Parser::startElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - - { - LOGENTRY(INFO,"SDOSAX2Parser: startElementNs"); - - LOGINFO_1(INFO,"SDOSAX2Parser: startElementNs:%s", - (const char*)localname); - - newSequence = true; - - bool bToBeNull = false; - // Save the namespace information from the first element - if (setNamespaces) - { - documentNamespaces = namespaces; - setNamespaces = false; - } - - if (ignoreEvents) - { - // Check for the tag we are waiting for - if ( (ignoreTag.localname.equals(localname)) - && (ignoreTag.uri.equals(URI)) - && (ignoreTag.prefix.equals(prefix)) ) - { - ignoreTag.tagCount++; - } - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit1"); - return; - } - - if (URI.equalsIgnoreCase("http://www.w3.org/2001/XMLSchema")) - { - // ignore anything within a schema - LOGINFO_1(INFO,"SDOSAX2Parser ignores schema element:%s", - (const char *)localname); - - // We need to ignore all events until the end tag for this element - ignoreEvents = true; - ignoreTag.localname = localname; - ignoreTag.uri = URI; - ignoreTag.prefix = prefix; - ignoreTag.tagCount = 0; - return; - } - - - - if (dealingWithChangeSummary) - { - if (csbuilder == 0) - { - LOGERROR(ERROR,"SDOSAX2Parser:Parser builds summary with no builder"); - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit2"); - return; - } - csbuilder->processStart( - localname, - prefix, - URI, - namespaces, - attributes); - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit3"); - return; - } - - - if (URI.equalsIgnoreCase(Type::SDOTypeNamespaceURI.c_str())) - { - /////////////////////////////////////////////////////////////////////// - // Handle datagraph - /////////////////////////////////////////////////////////////////////// - if (localname.equalsIgnoreCase("datagraph")) - { - // Remember this is a datagraph. The root DO will be created - // later when we can have a better guess at the namespaceURI - isDataGraph = true; - } // end handling sdo:datagraph - - //////////////////////////////////// - // Handle ChangeSummary on datagraph - //////////////////////////////////// - if (localname.equals("changeSummary")) - { - changeSummary = true; - changeSummaryDO = currentDataObject; - - csbuilder = new ChangeSummaryBuilder( - dataFactory, rootDataObject ); - - changeSummaryLogging = true; - - - SDOXMLString logging = attributes.getValue("logging"); - if (!logging.isNull()) - { - if (logging.equals("false")) - { - changeSummaryLogging = false; - } - } - - LOGINFO(INFO,"SDOSAX2Parser:Start change summary"); - dealingWithChangeSummary = true; - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit4"); - return; - - } - - } - else - { - /////////////////////////////////////////////////////////////////////// - // Each element is a DataObject or a Property on the current DO - /////////////////////////////////////////////////////////////////////// - DataObjectPtr newDO = 0; - - SDOXMLString typeURI, typeName, propertyName; - - /////////////////////////////////////////////////////////////////////// - // Determine the type. It is either specified by the xsi:type attribute - // or the localname is the name of a property on "RootType" - /////////////////////////////////////////////////////////////////////// - int i; - for (i=0; i < attributes.size(); i++) - { - if (attributes[i].getUri().equalsIgnoreCase("http://www.w3.org/2001/XMLSchema-instance")) - { - if (attributes[i].getName().equalsIgnoreCase("type")) - { - SDOXMLString fullTypeName = attributes[i].getValue(); - SDOXMLString pref; - - int index = fullTypeName.firstIndexOf(':'); - if (index < 0) - { - typeName = fullTypeName; - } - else - { - // Is the namespace prefix defined? - typeName = fullTypeName.substring(index+1); - pref = fullTypeName.substring(0, index); - } - - // Convert the prefix to a namespace URI - const SDOXMLString* namespaceURI = namespaces.find(pref); - if (namespaceURI == 0) - { - namespaceURI = documentNamespaces.find(pref); - } - if (namespaceURI != 0) - { - typeURI = *namespaceURI; - } - } - else if (attributes[i].getName().equalsIgnoreCase("nil")) - { - if (attributes[i].getValue().equalsIgnoreCase("true")) - { - // the current setting needs to be setNull - bToBeNull = true; - } - } - } - } // End - attribute loop - - if (typeURI.isNull()) - { - typeURI = ""; - } - - SDOXMLString tns = URI; - - if (tns.isNull()) - tns = ""; - - try - { - if (currentDataObject == 0) - { - // This element should become the root data object - - // Target namespace will be: - // the targetNamespaceURI if specified - // or the URI of xsi:type if specified - // or the URI of this element - if (!typeURI.equals("")) - { - tns = typeURI; - } - - if (!targetNamespaceURI.isNull() && !targetNamespaceURI.equals("")) - { - tns = targetNamespaceURI; - } - - // Check for localname as a property of the RootType - // if we do not already know the type - if (typeName.isNull()) - { - const Type& rootType = dataFactory->getType(tns, "RootType"); - propertyName = getSDOName(rootType, localname); - const Type& newType = - ((TypeImpl&)(rootType)).getRealPropertyType(propertyName); - - typeURI = newType.getURI(); - typeName = newType.getName(); - } - - // Create the root DataObject - if (isDataGraph) - { - DataObjectPtr rootdo = dataFactory->create(tns, "RootType"); - setCurrentDataObject(rootdo); - changeSummaryDO = currentDataObject; - } - else - { - DataFactory* df = dataFactory; - ((DataFactoryImpl*)df)->setRootElementName((const char*)localname); - } - - // NOTE: always creating DO doesn't cater for DataType as top element - - const Type& tp = dataFactory->getType((const char*)typeURI,typeName); - if (tp.isDataType()) - { - newDO = dataFactory->create(tns, "RootType"); - currentPropertySetting = PropertySetting(newDO, localname, - bToBeNull); - - // TODO - need instead to record the fact that its a primitive, not - // a real DO - and then present it as the root. - // newDO = dataFactory->create(tns, "RootType"); - // const Type& tpr = dataFactory->getType(tns,"RootType"); - // XSDTypeInfo* typeInfo = (XSDTypeInfo*) - // ((DASType*)&tpr)->getDASValue("XMLDAS::TypeInfo"); - // if (typeInfo) - // { - // TypeDefinitionImpl* td; - // td = (TypeDefinitionImpl*)&(typeInfo->getTypeDefinition()); - // if (td)td->isExtendedPrimitive = true; - // currentPropertySetting = PropertySetting(newDO, "value" /*localname*/, - // bToBeNull); - - // } - // else - // { - // currentPropertySetting = PropertySetting(newDO, localname, - // bToBeNull); - // } - - } - else - { - - newDO = dataFactory->create((const char*)typeURI, (const char*)typeName); - - // get the type definition, and see if its an extended primitive. - - XSDTypeInfo* typeInfo = (XSDTypeInfo*) - ((DASType*)&tp)->getDASValue("XMLDAS::TypeInfo"); - if (typeInfo) - { - const TypeDefinitionImpl& typeDefinition = typeInfo->getTypeDefinition(); - if (typeDefinition.isExtendedPrimitive) - { - // The name of this element is the name of a property on the current DO - currentPropertySetting = PropertySetting(newDO, localname, - bToBeNull); - } - } - } - - } // End - currentDataObject == 0 - - else - { // currentDataObject != 0 - - // Get the Property from the dataObject - propertyName = getSDOName(*currentDataObjectType, localname); - const Type& type = currentDataObject->getType(); - - - // go lower level so we can find open properties w/o exception - DataObject* dob = currentDataObject; - const PropertyImpl* pprop = ((DataObjectImpl*)dob)->getPropertyImpl(propertyName); - if (pprop == 0) - { - if (type.isOpenType()) - { - pprop = handleOpenType( - tns, - localname, - (DataObjectImpl*)dob, - namespaces, - attributes, - typeURI, - typeName, - bToBeNull); - } - if (pprop == 0) - { - // this is an open property , we will need to create it - LOGERROR_1(WARNING,"SDOSAX2Parser Unknown element:%s", - (const char *)localname); - - // We need to ignore all events until the end tag for this element - ignoreEvents = true; - ignoreTag.localname = localname; - ignoreTag.uri = URI; - ignoreTag.prefix = prefix; - ignoreTag.tagCount = 0; - if (setter != 0) - { - char *msg = new char[strlen((const char*)localname) + 32]; - if (msg) { - sprintf(msg,"Parser found unknown element %s", - (const char*)localname); - setter->setError( msg ); - delete msg; - } - } - } - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit5"); - return; - } - else - { - - const Property& prop = (Property&)*pprop; - const TypeImpl* propType = ((TypeImpl&)type).getRealPropertyTypeImpl(propertyName); - if (propType == 0) - { - // could be a previously created open type property - propType = (const TypeImpl*)pprop->getTypeImpl(); - } - if (propType != 0) - { - XSDPropertyInfo* pi = (XSDPropertyInfo*)((DASProperty*)&prop)->getDASValue("XMLDAS::PropertyInfo"); - if ((pi && pi->getPropertyDefinition().isIDREF) - || prop.isReference()) - { - // The name of this element is the name of a property on the current DO - currentPropertySetting = PropertySetting(currentDataObject, propertyName, bToBeNull, - true); - } - - // If it is a DataType then we need set the value - else if (propType->isDataType() ) - { - // The name of this element is the name of a property on the current DO - currentPropertySetting = PropertySetting(currentDataObject, propertyName, - bToBeNull); - } - else - { - - // If typeName is not set then create object of Type of Property - // otherwise use the typeURI and typeName specified by e.g. xsi:type - if (typeName.isNull()) - { - newDO = dataFactory->create(propType->getURI(), propType->getName()); - } - else - { - newDO = dataFactory->create((const char*)typeURI, (const char*)typeName); - } - - XSDTypeInfo* typeInfo = (XSDTypeInfo*) - ((DASType*)propType)->getDASValue("XMLDAS::TypeInfo"); - if (typeInfo && typeInfo->getTypeDefinition().isExtendedPrimitive) - { - // The name of this element is the name of a property on the current DO - currentPropertySetting = PropertySetting(newDO, "value", bToBeNull); - } - - } - } - } // End // currentDataObject != 0 - } // end prop != 0 - if (newDO) - { - if (!setDO(newDO, propertyName)) - { - LOGERROR_1(WARNING,"SDOSAX2Parser Unknown element:%s", - (const char *)localname); - - // We need to ignore all events until the end tag for this element - ignoreEvents = true; - ignoreTag.localname = localname; - ignoreTag.uri = URI; - ignoreTag.prefix = prefix; - ignoreTag.tagCount = 0; - if (setter != 0) - { - char *msg = new char[strlen((const char*)localname) + 32]; - if (msg) { - sprintf(msg,"Parser found unknown element %s", - (const char*)localname); - setter->setError( msg ); - delete msg; - } - } - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit6"); - return; - } - } - } // end try - - catch (const SDOTypeNotFoundException& ) - { - - LOGERROR_1(WARNING,"SDOSAX2Parser Unknown element:%s", - (const char *)localname); - - // We need to ignore all events until the end tag for this element - ignoreEvents = true; - ignoreTag.localname = localname; - ignoreTag.uri = URI; - ignoreTag.prefix = prefix; - ignoreTag.tagCount = 0; - if (setter != 0) - { - char *msg = new char[strlen((const char*)localname) + 32]; - if (msg) { - sprintf(msg,"Parser found unknown element %s", - (const char*)localname); - setter->setError( msg ); - delete msg; - } - } - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit7"); - return; - } - -#ifdef _DEBUG - catch (const SDOPropertyNotFoundException& e ) -#else - catch (const SDOPropertyNotFoundException& ) -#endif - { - LOGERROR_1(WARNING,"SDOSAX2Parser Unknown element exception:%s", - (const char *)localname); - LOGSDOEXCEPTION(WARNING,"Exception:",e); - - // We need to ignore all events until the end tag for this element - ignoreEvents = true; - ignoreTag.localname = localname; - ignoreTag.uri = URI; - ignoreTag.prefix = prefix; - ignoreTag.tagCount = 0; - if (setter != 0) - { - char *msg = new char[strlen((const char*)localname) + 32]; - if (msg) - { - sprintf(msg,"Parser found unknown element %s", - (const char*)localname); - setter->setError( msg ); - delete msg; - } - } - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit8"); - return; - } - - setAttributes(tns,namespaces, attributes); - - } - LOGEXIT(INFO,"SDOSAX2Parser: startElementNs - exit9"); - } - - - void SDOSAX2Parser::endElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI) - { - - LOGENTRY(INFO,"SDOSAX2Parser: endElementNs"); - - newSequence = true; - - if (localname.equals("changeSummary")) - { - // end of change summary - dealingWithChangeSummary = false; - LOGINFO(INFO,"SDOSAX2Parser: Finished change summary"); - LOGEXIT(INFO,"SDOSAX2Parser: endElementNs - exit1"); - return; - } - - if (dealingWithChangeSummary) - - { - if (csbuilder == 0) - { - LOGERROR(WARNING,"SDOSAX2Parser: End change summary with no builder"); - LOGEXIT(INFO,"SDOSAX2Parser: endElementNs - exit2"); - return; - } - csbuilder->processEnd(localname, - prefix, - URI); - LOGEXIT(INFO,"SDOSAX2Parser: endElementNs - exit3"); - return; - } - - - if (ignoreEvents) - { - // Check for the tag we are waiting for - if ( (ignoreTag.localname.equals(localname)) - && (ignoreTag.uri.equals(URI)) - && (ignoreTag.prefix.equals(prefix)) ) - { - if (ignoreTag.tagCount == 0) - { - ignoreEvents = false; - } - ignoreTag.tagCount--; - } - LOGEXIT(INFO,"SDOSAX2Parser: endElementNs - exit4"); - return; - } - - // If currentPropertySetting is set (name is not null) - // then we need to set the property now - if (!currentPropertySetting.name.isNull()) - { - if (currentPropertySetting.isNULL) - { - - currentPropertySetting.dataObject-> - setNull((const char*)currentPropertySetting.name); - - } - else - { - if (currentPropertySetting.value.isNull()) - { - currentPropertySetting.value = SDOXMLString(""); - } - try - { - const Type& tp = currentPropertySetting.dataObject->getType(); - XSDTypeInfo* typeInfo = (XSDTypeInfo*) - ((DASType*)&tp)->getDASValue("XMLDAS::TypeInfo"); - if (typeInfo && typeInfo->getTypeDefinition().isExtendedPrimitive) - { - const Property& p = currentPropertySetting.dataObject->getProperty( - "value"); - if (p.isMany()) - { - // use the sequence interface if it exists. - if (currentPropertySetting.dataObject->getType().isSequencedType()) - { - SequencePtr seq = currentPropertySetting.dataObject->getSequence(); - seq->addCString("value", currentPropertySetting.value); - } - else - { - DataObjectList& dl = currentPropertySetting.dataObject-> - getList((const char*)"value"); - dl.append((const char*)currentPropertySetting.value); - } - - } - else - { - // use the sequence interface if it exists - if (currentPropertySetting.dataObject->getType().isSequencedType()) - { - SequencePtr seq = currentPropertySetting.dataObject->getSequence(); - seq->addCString("value", currentPropertySetting.value); - } - else - { - currentPropertySetting.dataObject-> - setCString((const char*)"value", currentPropertySetting.value ); - } - } - if (dataObjectStack.size() == 0 || rootDataObject == dataObjectStack.top()) - { - currentDataObject = 0; - currentDataObjectType = 0; - } - else - { - dataObjectStack.pop(); - currentDataObject = dataObjectStack.top(); - currentDataObjectType = &(currentDataObject->getType()); - } - - } - else - { - if (currentPropertySetting.isIDREF) - { - // remember this value to resolve later - IDRef ref(currentPropertySetting.dataObject, - currentPropertySetting.name, - currentPropertySetting.value ); - IDRefs.insert(IDRefs.end(), ref); - } - else - { - if (currentPropertySetting.dataObject->getType().isSequencedType()) - { - SequencePtr seq = currentPropertySetting.dataObject->getSequence(); - seq->addCString(currentPropertySetting.name, currentPropertySetting.value); - } - // Always set the property as a String. SDO will do the conversion - - // It might be a single setting for a many-valued property. - // may throw SDOPropertyNotFoundException - else { - const Property& p = currentPropertySetting.dataObject->getProperty( - (const char*)currentPropertySetting.name); - if (p.isMany()) - { - DataObjectList& dl = currentPropertySetting.dataObject-> - getList((const char*)currentPropertySetting.name); - dl.append((const char*)currentPropertySetting.value); - } - else - { - currentPropertySetting.dataObject-> - setCString((const char*)currentPropertySetting.name, currentPropertySetting.value ); - } - } - } - } - } -#ifdef _DEBUG - catch (const SDOPropertyNotFoundException& e) -#else - catch (const SDOPropertyNotFoundException&) -#endif - { - LOGSDOEXCEPTION(WARNING,"SDOSAX2Parser error attribute (ignored)",e); - } - } - currentPropertySetting = PropertySetting(); - - } - else - { - if (changeSummary - && changeSummaryLogging - && changeSummaryDO == currentDataObject) - { - // Set logging on for this DO before it is popped from stack - ChangeSummary* cs = currentDataObject->getChangeSummary(); - if (cs) - { - cs->beginLogging(); - } - changeSummary = false; - } - - if (dataObjectStack.size() == 0 || rootDataObject == dataObjectStack.top()) - { - currentDataObject = 0; - currentDataObjectType = 0; - } - else - { - dataObjectStack.pop(); - currentDataObject = dataObjectStack.top(); - currentDataObjectType = &(currentDataObject->getType()); - } - } - LOGEXIT(INFO,"SDOSAX2Parser: endElementNs - exit4"); - } - - - - void SDOSAX2Parser::characters(const SDOXMLString& chars) - { - if (chars.isNull()) return; - - if (!strcmp((const char*)chars,"\r") || - !strcmp((const char*)chars,"\n")) - { - newSequence = true; - return; - } - - if (dealingWithChangeSummary) - { - if (csbuilder == 0) - { - LOGERROR(WARNING,"SDOSAX2Parser: no builder"); - return; - } - csbuilder->processChars(chars); - return; - } - - if (ignoreEvents) - return; - - if (!currentPropertySetting.name.isNull()) - { - currentPropertySetting.value = currentPropertySetting.value + chars; - return; - } - DataObject* dob = currentDataObject; - if ((dob != 0) && ((DataObjectImpl*)dob)->getTypeImpl().isFromList()) - { - // this is a list,so we need to split it up - DataObjectList& dl = currentDataObject->getList( - (const char *)"values"); - - const char* str = (const char*)chars; - char* buf = new char[strlen(str)+1]; - if (!buf) return; - - strcpy(buf,str); - - int start_point = 0; - int end_point; - int final = strlen(buf); - - do { - if (start_point >= final)break; - while (buf[start_point] == (char)0x20 || buf[start_point] == (char)0x09 - || buf[start_point] == (char)0x0A || buf[start_point] == (char)0x0D )start_point++; - end_point = start_point; - while (buf[end_point] != (char)0x20 && buf[end_point] != (char)0x09 && - buf[end_point] != (char)0x0A && buf[end_point] != (char)0x0D && - buf[end_point] != 0x0)end_point++; - if (end_point == start_point)break; - *(buf+end_point) = 0; - dl.append((const char*)(buf+start_point)); - start_point = end_point + 1; - } while(1); - - delete buf; - return; - } - - - // If the current DataObject is a sequenced Type - // then add this as text to the sequence - if (currentDataObject && currentDataObjectType->isSequencedType()) - { - SequencePtr seq = currentDataObject->getSequence(); - if (seq) - { - if (newSequence == true) - { - seq->addText(chars); - newSequence = false; - } - else - { - for (int k= (int)(seq->size())-1; k>=0 ; k --) - { - if (seq->isText(k)) - { - const char * s = seq->getCStringValue(k); - - if (s) - { - char *combi = - new char[strlen(s)+strlen(chars) + 2]; - strcpy(combi,s); - strcat(combi,chars); - seq->setText(k,(const char*)combi); - delete combi; - } - else - { - seq->setText(k,chars); - } - return; - } - } - seq->addText(chars); - } - return; - } - } - - } - - - void SDOSAX2Parser::setCurrentDataObject(DataObjectPtr currentDO) - { - currentDataObject = currentDO; - dataObjectStack.push(currentDataObject); - currentDataObjectType = &(currentDataObject->getType()); - if (rootDataObject == 0) - { - rootDataObject = currentDataObject; - } - } - - const SDOXMLString& SDOSAX2Parser::getSDOName(const Type& type, const SDOXMLString& localName) - { - -/* XSDTypeInfo* typeInfo = (XSDTypeInfo*)((DASType*)&type)->getDASValue("XMLDAS::TypeInfo"); - if (typeInfo) - { - const TypeDefinitionImpl& typeDefinition = typeInfo->getTypeDefinition(); - XmlDasPropertyDefs::const_iterator propsIter; - for (propsIter = typeDefinition.properties.begin(); propsIter != typeDefinition.properties.end(); propsIter++) - { - const PropertyDefinitionImpl& prop = *propsIter; - if (prop.localname.equals(localName)) - { - return prop.name; - } - for (int i=0;i< prop.substituteNames.size();i++) - { - if (prop.substituteLocalNames[i].equals(localName)) - { - return prop.substituteNames[i]; - // possibly should be return prop.name; - } - } - } - } - */ - - PropertyList pl = type.getProperties(); - for (int i = 0; i < pl.size(); i++) - { - XSDPropertyInfo* pi = (XSDPropertyInfo*)((DASProperty*)&pl[i])->getDASValue("XMLDAS::PropertyInfo"); - if (pi) - { - const PropertyDefinitionImpl& propdef = pi->getPropertyDefinition(); - if (localName .equals(propdef.localname)) - return propdef.name; - - for (int j=0;j< propdef.substituteNames.size();j++) - { - if (propdef.substituteLocalNames[j].equals(localName)) - { - return propdef.substituteNames[j]; - // possibly should be return propdef.name; - } - } - } - } - - - - return localName; - } - - - std::istream& operator>>(std::istream& input, SDOSAX2Parser& parser) - { - parser.stream(input); - - return input; - } - - std::istringstream& operator>>(std::istringstream& input, SDOSAX2Parser& parser) - { - parser.stream(input); - - return input; - } - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.h deleted file mode 100644 index 67dc56e071..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOSAX2PARSER_H_ -#define _SDOSAX2PARSER_H_ -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SAX2Parser.h" - -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/PropertySetting.h" -#include "commonj/sdo/ChangeSummaryImpl.h" -#include "commonj/sdo/ChangeSummaryBuilder.h" - - -#include - -namespace commonj -{ - namespace sdo - { - - -/** - * SDOSAX2Parser implements SAX2Parser. - * This class gets called back by the libxml library, and - * deals with the creation of data objects from XML. - */ - - class SDOSAX2Parser : public SAX2Parser - { - - - public: - - - SDOSAX2Parser( - DataFactoryPtr df, - const SDOXMLString& targetNamespaceURI, - DataObjectPtr& rootDO, - ParserErrorSetter* insetter); - - virtual ~SDOSAX2Parser(); - - virtual void startDocument(); - virtual void endDocument(); - - virtual bool setDO(DataObjectPtr newDO, - SDOXMLString& propertyName); - - virtual void setAttributes( - SDOXMLString& tns, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void handleOpenAttribute( - SDOXMLString& tns, - const SDOXMLString& propuri, - const SDOXMLString& propname, - const SDOXMLString& value); - - virtual const PropertyImpl* handleOpenType( - SDOXMLString& tns, - const SDOXMLString& localname, - DataObjectImpl* dob, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes, - SDOXMLString& xsitypeURI, - SDOXMLString& xsitypeName, - bool bToBeNull); - - virtual void startElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void endElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI); - - virtual void characters(const SDOXMLString& chars); - - friend std::istream& operator>>(std::istream& input, SDOSAX2Parser& parser); - friend std::istringstream& operator>>(std::istringstream& input, SDOSAX2Parser& parser); - - - private: - SDOXMLString targetNamespaceURI; - DataFactoryPtr dataFactory; - DataObjectPtr& rootDataObject; - - - std::stack dataObjectStack; - - DataObjectPtr currentDataObject; - bool isDataGraph; - bool newSequence; - - void setCurrentDataObject(DataObjectPtr currentDO); - const Type* currentDataObjectType; - const SDOXMLString& getSDOName(const Type& type, const SDOXMLString& localName); - - PropertySetting currentPropertySetting; - - void reset(); - - bool setNamespaces; - SAX2Namespaces documentNamespaces; - - bool changeSummary; - DataObjectPtr changeSummaryDO; - bool changeSummaryLogging; - bool dealingWithChangeSummary; - ChangeSummaryBuilder* csbuilder; - - bool ignoreEvents; - struct ignoretag - { - SDOXMLString localname; - SDOXMLString uri; - SDOXMLString prefix; - int tagCount; - } ignoreTag; - - - typedef std::map ID_MAP; - ID_MAP IDMap; - - class IDRef - { - public: - IDRef(DataObjectPtr dataobj, - const SDOXMLString& prop, - const SDOXMLString& val) - : dataObject(dataobj), property(prop), value(val) - {} - - DataObjectPtr dataObject; - SDOXMLString property; - SDOXMLString value; - }; - - typedef std::list ID_REFS; - ID_REFS IDRefs; - }; - } // End - namespace sdo -} // End - namespace commonj - -#endif //_SDOSAX2PARSER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSPI.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSPI.h deleted file mode 100644 index 011d112d2f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSPI.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/DataFactory.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SDO.h" - -#include "commonj/sdo/DASValues.h" diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp deleted file mode 100644 index 496864b93a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp +++ /dev/null @@ -1,1416 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "libxml/uri.h" -#include "commonj/sdo/SDOSchemaSAX2Parser.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/XSDTypeInfo.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/Logging.h" -#include "commonj/sdo/SDOUtils.h" - - -#include - -extern "C" { - void sdo_error(void *ctx, const char *msg, ...); -} - -namespace commonj -{ - namespace sdo - { - - SDOSchemaSAX2Parser::SDOSchemaSAX2Parser(SchemaInfo& schemaInf, - ParserErrorSetter* insetter, - bool loadImpNamespace) - : schemaInfo(schemaInf), SAX2Parser(insetter), loadImportNamespace(loadImpNamespace) - { - bInSchema = false; - bInvalidElement = false; - bInInvalidContent = false; - bInvalidList = false; - inGroup = 0; - preParsing = true; - } - - SDOSchemaSAX2Parser::~SDOSchemaSAX2Parser() - { - } - - - void SDOSchemaSAX2Parser::storeStartElementEvent( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - // copy the event to as list for replay. - if (currentGroup) - { - currentGroup->events.insert( currentGroup->events.end(), - GroupEvent( - localname,prefix,URI,namespaces,attributes)); - } - - } - - void SDOSchemaSAX2Parser::storeEndElementEvent( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI) - { - // copy the event to as list for replay. - if (currentGroup) - { - currentGroup->events.insert(currentGroup->events.end(), - GroupEvent(localname,prefix,URI)); - } - - } - - void SDOSchemaSAX2Parser::replayEvents( - const SDOXMLString& uri, - const SDOXMLString& name, - bool isGroup, - const SAX2Attributes& groupAttributes) - { - for (int i=0;i< groupList.size(); i++) - { - if (groupList[i].isAttributeGroup != isGroup) - { - if ( - (!name.isNull() && name.equals(groupList[i].name)) - && - ( - (uri.isNull() && groupList[i].uri.isNull()) - || uri.equals(groupList[i].uri)) - ) - { - // Determine the maxOccurs value from the getValue().equalsIgnoreCase("1")) - { - isMany = true; - } - - int level = 0; - - for (int j=0;j< groupList[i].events.size();j++) - { - if (groupList[i].events[j].isStartEvent) - { - // For top level or we need to add the maxOccurrs - // attribute from the group definition if it was "many" - if ((level == 0) && isMany) - { - if (groupList[i].events[j].localname.equalsIgnoreCase("choice") - || groupList[i].events[j].localname.equalsIgnoreCase("sequence")) - { - // Add maxOccurs attribute to list - groupList[i].events[j].attributes.addAttribute(*groupMaxOccurrs); - } - } - - startElementNs( - (const SDOXMLString&) - groupList[i].events[j].localname, - (const SDOXMLString&) - groupList[i].events[j].prefix, - (const SDOXMLString&) - groupList[i].events[j].URI, - (const SAX2Namespaces&) - groupList[i].events[j].namespaces, - (const SAX2Attributes&) - groupList[i].events[j].attributes); - - level++; - } - else - { - endElementNs( - (const SDOXMLString&) - groupList[i].events[j].localname, - (const SDOXMLString&) - groupList[i].events[j].prefix, - (const SDOXMLString&) - groupList[i].events[j].URI); - - level--; - } - } - return; - } - } - } - // no group found - if (setter) - { - char *msg = new char[strlen((const char*)name) + 32]; - if (msg) - { - sprintf(msg,"Use of undefined group %s", - (const char*)name); - setter->setError( msg ); - delete msg; - } - } - } - - // ============================================================================ - // endDocument - // ============================================================================ - void SDOSchemaSAX2Parser::endDocument() - { - preParsing=!preParsing; - schemaInfo.getSchemaNamespaces().empty(); - } - - - // ============================================================================ - // startElementNS - // ============================================================================ - void SDOSchemaSAX2Parser::startElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startElementNs:%s",(const char*)localname); - - if (URI.equalsIgnoreCase("http://www.w3.org/2001/XMLSchema")) - { - - /////////////////////////////////////////////////////////////////////// - // Handle schema - // Set the URI from the targetNamespace of the xsd:schema element - // Remember namespace mappings - // Create the root Type - /////////////////////////////////////////////////////////////////////// - - - if (localname.equalsIgnoreCase("schema")) - { - bInSchema = true; - // Handle namespace definitions - - - schemaInfo.getSchemaNamespaces().merge(namespaces); - - // Handle attributes - for (int i=0; i < attributes.size(); i++) - { - if (attributes[i].getName().equalsIgnoreCase("targetNamespace")) - { - schemaInfo.setTargetNamespaceURI(attributes[i].getValue()); - } - } - - - currentType.uri = schemaInfo.getTargetNamespaceURI(); - currentType.name = "RootType"; - currentType.localname="RootType"; - return; - - } // end schema handling - if (preParsing) - { - // we are now pre-parsing groups so that we can allow them to be - // defined after use. - - if (inGroup > 0) - { - if ( localname.equalsIgnoreCase("group") - || localname.equalsIgnoreCase("attributeGroup")) - { - inGroup++; - } - // check for a group reference first - // we are inside a group.... - storeStartElementEvent( - localname, - prefix, - URI, - namespaces, - attributes); - return; - } - - if ( localname.equalsIgnoreCase("group") - || localname.equalsIgnoreCase("attributeGroup")) - { - inGroup++; - int i; - for (i=0; i < attributes.size(); i++) - { - if (attributes[i].getName().equalsIgnoreCase("ref")) - { - // dont store references. - return; - } - } - - groupList.insert(groupList.begin(),GroupDefinition()); - currentGroup = &groupList[0]; - - if (localname.equalsIgnoreCase("group")) - currentGroup->isAttributeGroup = false; - else currentGroup->isAttributeGroup = true; - - for (i=0; i < attributes.size(); i++) - { - if (attributes[i].getName().equalsIgnoreCase("name")) - { - currentGroup->uri = schemaInfo.getTargetNamespaceURI(); - currentGroup->name = attributes[i].getValue(); - } - } - } - } // end of preParsing groups. - else - { - if (inGroup == 0) - { - // Handle of other schema - if (localname.equalsIgnoreCase("import")) - { - // TODO - import and include treated equally for now - need to - // separate out the namespace info for import - startInclude(localname, prefix, URI, namespaces, attributes); - } - - // Handle of other schema - else if (localname.equalsIgnoreCase("include")) - { - startInclude(localname, prefix, URI, namespaces, attributes); - } - - /////////////////////////////////////////////////////////////////////// - // Handle elements and attributes - // These become Properties of the current Type - // ?? Any special handling of global elements??? - /////////////////////////////////////////////////////////////////////// - else if (localname.equalsIgnoreCase("element")) - { - if (!bInInvalidContent) startElement(localname, prefix, URI, namespaces, attributes); - } - else if (localname.equalsIgnoreCase("attribute")) - { - if (!bInInvalidContent) startAttribute(localname, prefix, URI, namespaces, attributes); - } - else if (localname.equalsIgnoreCase("any") - || localname.equalsIgnoreCase("anyAttribute")) - { - // the type containing this is to be created as open - if (!bInInvalidContent) currentType.isOpen = true; - } - - - /////////////////////////////////////////////////////////////////////// - // Handle complexType - // These become new types - /////////////////////////////////////////////////////////////////////// - else if (localname.equalsIgnoreCase("complexType")) - { - if (!bInInvalidContent) startComplexType(localname, prefix, URI, namespaces, attributes); - } // end complexType handling - - else if (localname.equalsIgnoreCase("choice") - || localname.equalsIgnoreCase("sequence") - || localname.equalsIgnoreCase("all")) - { - if (!bInInvalidContent) startGroup(localname, prefix, URI, namespaces, attributes); - } // end Group handling - - else if ( localname.equalsIgnoreCase("group") - || localname.equalsIgnoreCase("attributeGroup")) - { - - int i; - for (i=0; i < attributes.size(); i++) - { - if (attributes[i].getName().equalsIgnoreCase("ref")) - { - XMLQName qname(attributes[i].getValue(), - schemaInfo.getSchemaNamespaces(), - namespaces); - if (qname.getURI().isNull()) - { - replayEvents(schemaInfo.getTargetNamespaceURI(), qname.getLocalName(), - localname.equalsIgnoreCase("group"), attributes); - } - else - { - replayEvents(qname.getURI(), qname.getLocalName(), - localname.equalsIgnoreCase("group"), attributes); - } - } - } - inGroup++; - // if theres no 'ref' then its a group definition, and we - // already pre-parsed it. - } - else if (localname.equalsIgnoreCase("list")) - { - startList( - localname, - prefix, - URI, - namespaces, - attributes); - } - - /////////////////////////////////////////////////////////////////////// - // Handle simpleType - // These become new types - /////////////////////////////////////////////////////////////////////// - else if (localname.equalsIgnoreCase("simpleType")) - { - if (!bInInvalidContent) startSimpleType(localname, prefix, URI, namespaces, attributes); - } // end complexType handling - - else if (localname.equalsIgnoreCase("restriction")) - { - if (!bInInvalidContent) startRestriction(localname, prefix, URI, namespaces, attributes); - } - - else if (localname.equalsIgnoreCase("extension")) - { - if (!bInInvalidContent) startExtension(localname, prefix, URI, namespaces, attributes); - } - // Handle of other schema - else if (localname.equalsIgnoreCase("union")) - { - // TODO - unions not yet properly supported - for now, whatever the - // enclosing thing is, we will make it an extended primitive based on - // String. - bInInvalidContent = true; - //if (setter) - //{ - // setter->setError("Schema contains a union which is not yet implemented"); - //} - - currentType.parentTypeUri = "commonj.sdo"; - currentType.parentTypeName = "String"; - currentType.isRestriction = true; - - } - } - } - } - else // not in schema - check for any extra namespaces - { - schemaInfo.getSchemaNamespaces().merge(namespaces); - } - - } - - - // ============================================================================ - // endElementNs - // ============================================================================ - void SDOSchemaSAX2Parser::endElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI) - { - LOGINFO_1( INFO,"SchemaParser:endElementNs:%s",(const char*)localname); - - if (URI.equalsIgnoreCase("http://www.w3.org/2001/XMLSchema")) - { - if (localname.equalsIgnoreCase("schema")) - { - bInSchema = false; - } - - /////////////////////////////////////////////////////////////////////// - // Handle complexType - // Pop the Type off our stack - /////////////////////////////////////////////////////////////////////// - - // We do not support unions, so all inside a union, plus the containing - // element are invalid for now. - // - if (!bInInvalidContent) - { - if (preParsing) - { - if (inGroup > 0) - { - if (localname.equalsIgnoreCase("group") - || localname.equalsIgnoreCase("attributeGroup")) - { - inGroup--; - if (inGroup < 0)inGroup = 0; // should never happen. - } - if (inGroup > 0) // still need to store end of group ref - { - storeEndElementEvent( - localname, - prefix, - URI); - } - } - } - else - { - if (localname.equalsIgnoreCase("group") - || localname.equalsIgnoreCase("attributeGroup")) - { - inGroup--; - if (inGroup < 0) inGroup = 0; - // outside of preparse, dont need to do anything. - } - else if (inGroup == 0) - { - if (localname.equalsIgnoreCase("complexType")) - { - if (!bInvalidElement) defineType(); - } // end complexType handling - else if (localname.equalsIgnoreCase("simpleType")) - { - if (!bInvalidElement) defineType(); - } - else if (localname.equalsIgnoreCase("schema")) - { - if (!bInvalidElement) defineType(); - } // end complexType handling - else if (localname.equalsIgnoreCase("element") - || localname.equalsIgnoreCase("attribute")) - { - // PropertyDefinition should now be complete - if (!bInvalidElement) defineProperty(); - } - else if (localname.equalsIgnoreCase("choice") - || localname.equalsIgnoreCase("sequence") - || localname.equalsIgnoreCase("all")) - { - if (!bInvalidElement) currentType.isMany = false; - } - else if (localname.equalsIgnoreCase("list")) - { - // PropertyDefinition should now be complete - if (!bInvalidList) defineProperty(); - bInvalidList = false; - } - bInvalidElement = false; - } - } - - } // bInUnsupportedContent - if (localname.equalsIgnoreCase("union")) - { - bInInvalidContent = false; - // the enclosing element is not useful - // TODO - Instead of making the union invalid, we make it an - // extended primitive based on string - so its no longer invalid. - //bInvalidElement = true; - } - } - - } - - // ============================================================================ - // used by startInclude to try to locate the file - // ============================================================================ - - int SDOSchemaSAX2Parser::startSecondaryParse( - SDOSchemaSAX2Parser& schemaParser, - SDOXMLString& schemaLocation) - { - int i,j,k; - SDOXMLString sl = getCurrentFile(); - - i = sl.lastIndexOf('/'); - j = sl.lastIndexOf('\\'); - if ((j > i) || (i < 0))i=j; - if (i>=0) - { - sl = sl.substring(0,i+1) + schemaLocation; - try { - if (-1 != schemaParser.parse((const char *)sl)) - return 1; - } - catch (SDORuntimeException e) - { - } - k = schemaLocation.lastIndexOf('/'); - j = schemaLocation.lastIndexOf('\\'); - if ((j > k) || (k < 0))k=j; - if (k>=0) - { - sl = sl.substring(0,i+1) + schemaLocation.substring(0,k+1); - try { - if (-1 != schemaParser.parse((const char *)sl)) - return 1; - } - catch (SDORuntimeException e) - { - } - } - } - try { - if (-1 != schemaParser.parse((const char *)schemaLocation)) - return 1; - } - catch (SDORuntimeException e) - { - } - k = schemaLocation.lastIndexOf('/'); - j = schemaLocation.lastIndexOf('\\'); - if ((j > k) || (k < 0))k=j; - if (k>=0) - { - sl = schemaLocation.substring(0,k+1); - try { - if (-1 != schemaParser.parse((const char *)sl)) - return 1; - } - catch (SDORuntimeException e) - { - } - } - return 0; - } - - - // ============================================================================ - // startInclude - // ============================================================================ - void SDOSchemaSAX2Parser::startInclude( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startInclude:%s",(const char*)localname); - - if (!bInSchema) return; - - SchemaInfo schemaInf; - SDOSchemaSAX2Parser schemaParser(schemaInf, (ParserErrorSetter*)setter); - - TypeDefinitionsImpl* typedefs; - - SDOXMLString schemaLocation = attributes.getValue("schemaLocation"); - SDOXMLString importNamespace = attributes.getValue("namespace"); - if (!schemaLocation.isNull()) - { - if (startSecondaryParse(schemaParser,schemaLocation) == 0) - { - // - // we were not able to start the parse - return; - } - - typedefs = &schemaParser.getTypeDefinitions(); - - } - else - { - // schemaLocation isn't present. Try loading namespace for import - if (loadImportNamespace - && localname.equalsIgnoreCase("import") - && !importNamespace.isNull()) - { - try - { - SDOSchemaSAX2Parser sp(schemaInf, 0); - - sp.parse(importNamespace); - typedefs = &sp.getTypeDefinitions(); - } - catch (SDORuntimeException&) - { - return; - } - } - else - { - return; - } - } - - XMLDAS_TypeDefs types = typedefs->types; - XMLDAS_TypeDefs::iterator iter; - for (iter=types.begin(); iter != types.end(); iter++) - { - if ((*iter).second.name.equals("RootType") - && currentType.name.equals("RootType") - && (*iter).second.uri.equals(currentType.uri)) - { - // This must be true for an import/include to be - // legally positioned - - XMLDAS_TypeDefs::iterator find = typeDefinitions.types.find( - (*iter).first); - - std::list::iterator propit; - std::list::iterator currpropit; - bool found; - - for (propit = (*iter).second.properties.begin() ; - propit != (*iter).second.properties.end(); ++ propit) - { - found = false; - // do not merge properties whose names clash - for ( currpropit = currentType.properties.begin(); - currpropit != currentType.properties.end(); - ++currpropit) - { - if ((*currpropit).name.equals((*propit).name)) - { - found = true; - break; - } - } - if (!found) - { - currentType.properties.insert( - currentType.properties.end(),*propit); - } - } - } - else - { - typeDefinitions.types.insert(*iter); - } - } - - } - - - // ============================================================================ - // startList - // ============================================================================ - void SDOSchemaSAX2Parser::startList( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - - LOGINFO_1( INFO,"SchemaParser:startList:%s",(const char*)localname); - - if (!bInSchema) return; - - // invent a property called "values" to hold the list - - SDOXMLString typeName = attributes.getValue("itemType"); - - if (typeName.isNull()) - { - // we do not support lists with no item type (yet). - if (setter) - { - setter->setError("Schema contains a list with no type - not supported"); - } - bInvalidList = true; - return; - } - - currentType.dataType = false; - currentType.isFromList = true; - - // attribute to set the list type - // define an internal property to hold the list - PropertyDefinitionImpl thisProperty; - thisProperty.name = "values"; - thisProperty.localname = "values"; - thisProperty.isContainment = false; - thisProperty.isElement=true; - thisProperty.isMany = true; - - XMLQName qname = resolveTypeName( - typeName, - namespaces, - thisProperty.typeUri, - thisProperty.typeName); - thisProperty.fullTypeName = typeName; - - setCurrentProperty(thisProperty); - - } - - // ============================================================================ - // startElement - // ============================================================================ - void SDOSchemaSAX2Parser::startElement( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - - if (!bInSchema) return; - - PropertyDefinitionImpl thisProperty; - - LOGINFO_1( INFO,"SchemaParser:startElement:%s",(const char*)localname); - - thisProperty.isElement = true; - - setName(attributes, - thisProperty.name, - thisProperty.localname); - - - setType(thisProperty, attributes, namespaces); - - // Set isMany. currentType.isMany = true indicates we are in a - // group definition (sequence/choice) with maxOccurs>1 - if (currentType.isMany) - { - thisProperty.isMany = true; - } - else - { - SDOXMLString maxOccurs = attributes.getValue("maxOccurs"); - if (!maxOccurs.isNull()) - { - if (!maxOccurs.equalsIgnoreCase("1")) - { - thisProperty.isMany = true; - } - } - } - - // find aliases - thisProperty.aliases = attributes.getValue("aliasName"); - - // mark this as a substitution group. - // TODO - what about properties which have already been set into the tree, - // and might have a substitution? - - SDOXMLString substituteName = attributes.getValue("substitutionGroup"); - if (! substituteName.isNull()) - { - XMLQName qname = resolveTypeName( - substituteName, - namespaces, - thisProperty.substituteUri, - thisProperty.substituteName); - thisProperty.isSubstitute=true; - } - - // count the number of elements in the group - if (currentType.isMany) - { - currentType.groupElementCount++; - } - - setCurrentProperty(thisProperty); - - } - - // ============================================================================ - // startAttribute - // ============================================================================ - void SDOSchemaSAX2Parser::startAttribute( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - - LOGINFO_1( INFO,"SchemaParser:startAttribute:%s",(const char*)localname); - - if (!bInSchema) return; - - PropertyDefinitionImpl thisProperty; - - thisProperty.isElement = false; - - setName(attributes, - thisProperty.name, - thisProperty.localname); - - setType(thisProperty, attributes, namespaces); - - setCurrentProperty(thisProperty); - } - - // ============================================================================ - // startComplexType - // ============================================================================ - void SDOSchemaSAX2Parser::startComplexType( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startComplexType:%s",(const char*)localname); - - if (!bInSchema) return; - - TypeDefinitionImpl thisType; // set defaults - thisType.uri=schemaInfo.getTargetNamespaceURI(); - - setTypeName(thisType, attributes,namespaces); - - - - for (int i=0; i < attributes.size(); i++) - { - // If sdo:sequence="true" or mixed="true" it is sequenced - if ( (attributes[i].getUri().equalsIgnoreCase("commonj.sdo/xml") - && attributes[i].getName().equalsIgnoreCase("sequence")) - || attributes[i].getName().equalsIgnoreCase("mixed")) - { - if (attributes[i].getValue().equals("true")) - { - thisType.isSequenced = true; - } - } - // If abstract="true" it is abstract - else if (attributes[i].getName().equalsIgnoreCase("abstract")) - { - if (attributes[i].getValue().equals("true")) - { - thisType.isAbstract = true; - } - } - else if (attributes[i].getName().equalsIgnoreCase("aliasName")) - { - thisType.aliases = attributes[i].getValue(); - } - } - - setCurrentType(thisType); - } - - // ============================================================================ - // startSimpleType - // ============================================================================ - void SDOSchemaSAX2Parser::startSimpleType( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startSimpleType:%s",(const char*)localname); - - if (!bInSchema) return; - - TypeDefinitionImpl thisType; // set defaults - thisType.uri=schemaInfo.getTargetNamespaceURI(); - thisType.dataType = true; - - for (int i=0; i < attributes.size(); i++) - { - // If abstract="true" it is abstract - if (attributes[i].getName().equalsIgnoreCase("abstract")) - { - if (attributes[i].getValue().equals("true")) - { - thisType.isAbstract = true; - } - } - else if (attributes[i].getName().equalsIgnoreCase("aliasName")) - { - thisType.aliases = attributes[i].getValue(); - } - } - setTypeName(thisType, attributes,namespaces); - - // see if the type is going to be abstract... - - - setCurrentType(thisType); - } - - // ============================================================================ - // startRestriction - // ============================================================================ - void SDOSchemaSAX2Parser::startRestriction( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startRestriction:%s",(const char*)localname); - - if (!bInSchema) return; - - SDOXMLString base = attributes.getValue("base"); - if (!base.isNull()) - { - // Resolve typename to uri:name - XMLQName qname = resolveTypeName( - base, - namespaces, - currentType.parentTypeUri, - currentType.parentTypeName); - - currentType.isRestriction=true; - - - if(qname.getLocalName().equals("QName")) - { - currentType.isQName = true; - } - } - } - - // ============================================================================ - // startExtension - // ============================================================================ - void SDOSchemaSAX2Parser::startExtension( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startExtension:%s",(const char*)localname); - - if (!bInSchema) return; - - SDOXMLString base = attributes.getValue("base"); - if (!base.isNull()) - { - SDOXMLString typeUri; - SDOXMLString typeName; - // Resolve typename to uri:name - XMLQName qname = resolveTypeName( - base, - namespaces, - typeUri, - typeName); - - // If extending a simple type (an SDO DataType) we create a - // Property named "value" of this type rather than set the - // simple type as a base - currentType.isRestriction=false; - - // ?? Does this only apply within a tag?? - if (typeUri.equalsIgnoreCase(Type::SDOTypeNamespaceURI.c_str())) - { - // here the type needs to be flagged so that - // we know to serialize this property as an element with - // just the contents abc rather than - // value=abc - - - PropertyDefinitionImpl thisProperty; - thisProperty.name = "value"; - thisProperty.localname = "value"; - thisProperty.typeUri = typeUri; - thisProperty.typeName = typeName; - thisProperty.fullTypeName = base; - thisProperty.isContainment = false; - thisProperty.isElement=true; - - currentType.isExtendedPrimitive= true; - - if(qname.getLocalName().equals("QName")) - { - thisProperty.isQName = true; - } - - setCurrentProperty(thisProperty); - defineProperty(); - } - else - { - currentType.parentTypeUri = typeUri; - currentType.parentTypeName = typeName; - } - } - } - - // ============================================================================ - // startGroup - // ============================================================================ - void SDOSchemaSAX2Parser::startGroup( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes) - { - LOGINFO_1( INFO,"SchemaParser:startGroup:%s",(const char*)localname); - - if (!bInSchema) return; - - SDOXMLString maxOccurs = attributes.getValue("maxOccurs"); - if (!maxOccurs.isNull()) - { - if (!maxOccurs.equalsIgnoreCase("1")) - { - currentType.isMany = true; - } - } - } - - // ============================================================================ - // setCurrentType - // ============================================================================ - void SDOSchemaSAX2Parser::setCurrentType(const TypeDefinitionImpl& type) - { - typeStack.push(currentType); - currentType = type; - } - - // ============================================================================ - // defineType - // ============================================================================ - void SDOSchemaSAX2Parser::defineType() - { - // Set this Type as sequenced of more than one element in a group definition - if (currentType.groupElementCount > 1) - { - currentType.isSequenced = true; - } - - SDOXMLString typeQname = TypeDefinitionsImpl::getTypeQName(currentType.uri, currentType.localname); - typeDefinitions.types[typeQname] = currentType; - - if (currentProperty.typeName.isNull()) - { - // Set the type name to the name of this type - currentProperty.typeUri = currentType.uri; - currentProperty.typeName = currentType.localname; - } - - if (typeStack.size() != 0) - { - currentType = typeStack.top(); - typeStack.pop(); - } - else - { - currentType = TypeDefinitionImpl(); - } - } - - // ============================================================================ - // setCurrentProperty - // ============================================================================ - void SDOSchemaSAX2Parser::setCurrentProperty(const PropertyDefinitionImpl& prop) - { - propertyStack.push(currentProperty); - currentProperty = prop; - } - - // ============================================================================ - // defineProperty - // ============================================================================ - void SDOSchemaSAX2Parser::defineProperty() - { - - if (currentProperty.typeName.isNull()) - { - // Set the type of this property to default (sdo:String) - currentProperty.typeUri = Type::SDOTypeNamespaceURI.c_str(); - currentProperty.typeName = "String"; - } - - if (currentProperty.localname.isNull()) - currentProperty.localname = currentProperty.typeName; - - // Set isMany if property isMany OR if containing type isMany - // NOTE: The above comment is as per the SDO2.0 spec however this does not - // work when serializing a sequence containing a single-valued property and - // then deserializing. - // currentProperty.isMany = currentProperty.isMany || currentType.isMany; - - - currentType.properties.insert(currentType.properties.end(), currentProperty); - if (propertyStack.size() != 0) - { - currentProperty = propertyStack.top(); - propertyStack.pop(); - } - else - currentProperty = PropertyDefinitionImpl(); - - } - - // ============================================================================ - // setDefault - // ============================================================================ - void SDOSchemaSAX2Parser::setDefault( - PropertyDefinitionImpl& thisProperty, - const SAX2Attributes& attributes) - { - thisProperty.defaultValue = attributes.getValue("fixed"); - if (!thisProperty.defaultValue.isNull()) - { - thisProperty.isReadOnly = true; - } - else - { - thisProperty.defaultValue = attributes.getValue("default"); - } - } - - // ============================================================================ - // setName - // ============================================================================ - void SDOSchemaSAX2Parser::setName( - const SAX2Attributes& attributes, - SDOXMLString& sdoname, - SDOXMLString& localname) - { - for (int i=0; i < attributes.size(); i++) - { - // Handle sdo: annotations - if (attributes[i].getUri().equalsIgnoreCase("commonj.sdo/xml")) - { - // sdo:name overrides the property name - if (attributes[i].getName().equalsIgnoreCase("name")) - { - sdoname = attributes[i].getValue(); - } - } - else - { - - if (attributes[i].getName().equalsIgnoreCase("name")) - { - localname = attributes[i].getValue(); - // If name is already set it must have been an - // override using sdo:name - if (sdoname.isNull()) - { - sdoname = localname; - } - } - } - } - - } - - // ============================================================================ - // setType - // ============================================================================ - void SDOSchemaSAX2Parser::setType( - PropertyDefinitionImpl& property, - const SAX2Attributes& attributes, - const SAX2Namespaces& namespaces) - { - property.fullLocalTypeName = attributes.getValue("type"); - if (!property.fullLocalTypeName.isNull()) - { - XMLQName qname(property.fullLocalTypeName,schemaInfo.getSchemaNamespaces(), namespaces); - if (qname.getLocalName().equals("IDREF") - || qname.getLocalName().equals("IDREFS")) - { - property.fullTypeName = attributes.getValue("commonj.sdo/xml","propertyType"); - - property.isIDREF = true; - property.isContainment = false; - - if (qname.getLocalName().equals("IDREFS")) - { - property.isMany = true; - } - } - else if (qname.getLocalName().equals("anyURI")) - { - property.fullTypeName = attributes.getValue("commonj.sdo/xml","propertyType"); - } - else if (qname.getLocalName().equals("ID")) - { - property.isID = true; - currentType.IDPropertyName = property.name; - } - - else - { - property.fullTypeName = attributes.getValue("commonj.sdo/xml","dataType"); - } - } - - else - { - property.fullLocalTypeName = attributes.getValue("ref"); - if (!property.fullLocalTypeName.isNull()) - { - property.isReference = true; - } - } - - if (property.fullTypeName.isNull()) - { - property.fullTypeName = property.fullLocalTypeName; - } - - if (!property.fullTypeName.isNull()) - { - // Resolve typename to uri:name - XMLQName qname = resolveTypeName( - property.fullTypeName, - namespaces, - property.typeUri, - property.typeName); - - if(qname.getLocalName().equals("QName")) - { - property.isQName = true; - } - } - - } - - // ============================================================================ - // setTypeName - // ============================================================================ - void SDOSchemaSAX2Parser::setTypeName( - TypeDefinitionImpl& type, - const SAX2Attributes& attributes, - const SAX2Namespaces& namespaces) - { - std::map::iterator it; - setName(attributes, type.name, type.localname); - // If localname is not set it is anonymous so use the enclosing element name - - - if (type.localname.isNull()) - { - type.localname = currentProperty.name; - } - else - { - // check for an overriding url in the name - int i; - if ((i = type.localname.firstIndexOf(':')) > 0) - { - XMLQName qname(type.localname, - schemaInfo.getSchemaNamespaces(), - namespaces); - type.uri = qname.getURI(); - type.localname = qname.getLocalName(); - } - } - - // Set SDO name if not specified - if (type.name .isNull()) - { - type.name = type.localname ; - } - else - { - // check for an overriding url in the name - int i; - if ((i = type.name.firstIndexOf(':')) > 0) - { - XMLQName qname(type.name, - schemaInfo.getSchemaNamespaces(), - namespaces); - type.uri = qname.getURI(); - type.name = qname.getLocalName(); - } - } - } - - std::istream& operator>>(std::istream& input, SDOSchemaSAX2Parser& parser) - { - parser.stream(input); - - return input; - } - - std::istringstream& operator>>(std::istringstream& input, SDOSchemaSAX2Parser& parser) - { - parser.stream(input); - - return input; - } - - void SDOSchemaSAX2Parser::stream(std::istream& input) - { - // override to parse twice for groups - - stream_twice(input); - } - - - int SDOSchemaSAX2Parser::parse(const char* filename) - { - return parse_twice(filename); - } - - - - // ============================================================================ - // resolveTypeName - // ============================================================================ - XMLQName SDOSchemaSAX2Parser::resolveTypeName( - const SDOXMLString& fullTypeName, - const SAX2Namespaces& namespaces, - SDOXMLString& uri, - SDOXMLString& name) - { - XMLQName qname(fullTypeName, - schemaInfo.getSchemaNamespaces(), - namespaces); - - uri = qname.getURI(); - name = qname.getLocalName(); - - /////////////////////////////////////////////////////////////////////// - // Map the xsd types to SDO Types - /////////////////////////////////////////////////////////////////////// - if (qname.getURI().equalsIgnoreCase("http://www.w3.org/2001/XMLSchema")) - { - uri = Type::SDOTypeNamespaceURI.c_str(); - name = SDOUtils::XSDToSDO((const char*)(qname.getLocalName())); - if (name.isNull()) - { - name = "String"; - } - - } - - // Temporary hack: ChangeSummaryType is ChangeSummary in core - else if (qname.getURI().equalsIgnoreCase(Type::SDOTypeNamespaceURI.c_str())) - { - if (qname.getLocalName().equalsIgnoreCase("ChangeSummaryType")) - { - name = "ChangeSummary"; - } - - } - else if (qname.getURI().isNull()) - { - uri = schemaInfo.getTargetNamespaceURI(); - } - - return qname; - } - - } // End - namespace sdo - -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.h deleted file mode 100644 index 151ca763f4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOSCHEMASAX2PARSER_H_ -#define _SDOSCHEMASAX2PARSER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SAX2Parser.h" -#include "commonj/sdo/SchemaInfo.h" -#include "stack" -#include "commonj/sdo/TypeDefinitionsImpl.h" -#include "commonj/sdo/GroupDefinition.h" -#include "commonj/sdo/XMLQName.h" -#include "commonj/sdo/ParserErrorSetter.h" - -namespace commonj -{ - namespace sdo - { - - - -/** - * SDOSAX2Parser implements SAX2Parser. - * This class gets called back by the libxml library, and - * deals with the creation of metadata objects from XSD. - */ - - class SDOSchemaSAX2Parser : public SAX2Parser - { - - public: - - SDOSchemaSAX2Parser(SchemaInfo& schemaInfo, - ParserErrorSetter* insetter, - bool loadImportNamespace = false); - - virtual ~SDOSchemaSAX2Parser(); - - - virtual void startElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void endElementNs( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI); - - - virtual void stream(std::istream& input); - - virtual int parse(const char* filename); - - virtual void endDocument(); - - - const SDOXMLString& getTargetNamespaceURI() const {return schemaInfo.getTargetNamespaceURI();} - - TypeDefinitionsImpl& getTypeDefinitions() {return typeDefinitions;} - - friend std::istream& operator>>(std::istream& input, SDOSchemaSAX2Parser& parser); - friend std::istringstream& operator>>(std::istringstream& input, SDOSchemaSAX2Parser& parser); - - - private: - - // group handling. - - int inGroup; - bool preParsing; - GroupDefinition* currentGroup; - std::vector groupList; - - bool bInSchema; // only parse when within a schema - bool bInvalidElement; // where element content is not valid - bool bInInvalidContent; // actually inside invalid content. - bool bInvalidList; // a list with no type - not supported. - - virtual void replayEvents( - const SDOXMLString& uri, - const SDOXMLString& name, - bool isGroup, - const SAX2Attributes& groupAttributes); - - virtual void storeStartElementEvent( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void storeEndElementEvent( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI - ); - - virtual int startSecondaryParse( - SDOSchemaSAX2Parser& schemaParser, - SDOXMLString& schemaLocation); - - virtual void startInclude( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startElement( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startAttribute( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startComplexType( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startSimpleType( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startRestriction( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startExtension( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startGroup( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - virtual void startList( - const SDOXMLString& localname, - const SDOXMLString& prefix, - const SDOXMLString& URI, - const SAX2Namespaces& namespaces, - const SAX2Attributes& attributes); - - XMLQName resolveTypeName( - const SDOXMLString& fullTypeName, - const SAX2Namespaces& namespaces, - SDOXMLString& uri, - SDOXMLString& name); - - void setName( - const SAX2Attributes& attributes, - SDOXMLString& sdoname, - SDOXMLString& localname - ); - - void setType( - PropertyDefinitionImpl& property, - const SAX2Attributes& attributes, - const SAX2Namespaces& namespaces); - - void setTypeName( - TypeDefinitionImpl& type, - const SAX2Attributes& attributes, - const SAX2Namespaces& namespaces); - - void setDefault( - PropertyDefinitionImpl& thisProperty, - const SAX2Attributes& attributes); - - - SchemaInfo& schemaInfo; - - - PropertyDefinitionImpl currentProperty; - std::stack propertyStack; - void setCurrentProperty(const PropertyDefinitionImpl& property); - void defineProperty(); - - TypeDefinitionImpl currentType; - std::stack typeStack; - void setCurrentType(const TypeDefinitionImpl& type); - void defineType(); - - TypeDefinitionsImpl typeDefinitions; - - bool loadImportNamespace; - - }; - - - } // End - namespace sdo -} // End - namespace commonj -#endif //_SDOSCHEMASAX2PARSER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOString.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOString.h deleted file mode 100644 index 9661bb6294..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOString.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/disable_warn.h" - -#ifndef _SDOString_H_ -#define _SDOString_H_ -#include "commonj/sdo/export.h" - -#include -typedef std::string SDOString; - -#endif // _SDOString_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp deleted file mode 100644 index 2fb84d5765..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOUtils.h" -#include -using namespace std; - -// -// Utility methods to print a DataObject tree -// - -namespace commonj { - namespace sdo { - -////////////////////////////////////////////////////////////////////////// -// Conversions -////////////////////////////////////////////////////////////////////////// - - - std::map SDOUtils::SdoToXsd; - - std::map SDOUtils::XsdToSdo; - - bool SDOUtils::populated = false; - - bool SDOUtils::populate() - { - SDOUtils::XsdToSdo["ID"] = "String"; - SDOUtils::XsdToSdo["NCName"] = "String"; - SDOUtils::XsdToSdo["string"] = "String"; - SDOUtils::XsdToSdo["anyType"] = "DataObject"; - SDOUtils::XsdToSdo["int"] = "Integer"; - SDOUtils::XsdToSdo["integer"] = "Integer"; - SDOUtils::XsdToSdo["negativeInteger"] = "Integer"; - SDOUtils::XsdToSdo["nonNegativeInteger"] = "Integer"; - SDOUtils::XsdToSdo["positiveInteger"] = "Integer"; - SDOUtils::XsdToSdo["nonpositiveInteger"] = "Integer"; - SDOUtils::XsdToSdo["unsignedShort"] = "Integer"; - SDOUtils::XsdToSdo["unsignedInt"] = "Integer"; - SDOUtils::XsdToSdo["unsignedLong"] = "Long"; - SDOUtils::XsdToSdo["double"] = "Double"; - SDOUtils::XsdToSdo["short"] = "Short"; - SDOUtils::XsdToSdo["unsignedByte"] = "Short"; - SDOUtils::XsdToSdo["float"] = "Float"; - SDOUtils::XsdToSdo["boolean"] = "Boolean"; - SDOUtils::XsdToSdo["byte"] = "Byte"; - SDOUtils::XsdToSdo["base64Binary"] = "Bytes"; - SDOUtils::XsdToSdo["hexBinary"] = "Bytes"; - SDOUtils::XsdToSdo["anyURI"] = "URI"; - SDOUtils::XsdToSdo["QName"] = "URI"; - - SDOUtils::SdoToXsd["String"] = "string"; - SDOUtils::SdoToXsd["DataObject"] = "anyType"; - SDOUtils::SdoToXsd["Integer"] = "integer"; - SDOUtils::SdoToXsd["Long"] = "unsignedLong"; - SDOUtils::SdoToXsd["Double"] = "double"; - SDOUtils::SdoToXsd["Short"] = "short"; - SDOUtils::SdoToXsd["Float"] = "float"; - SDOUtils::SdoToXsd["Boolean"] = "boolean"; - SDOUtils::SdoToXsd["Byte"] = "byte"; - SDOUtils::SdoToXsd["Bytes"] = "base64Binary"; - SDOUtils::SdoToXsd["URI"] = "anyURI"; - - SDOUtils::populated = true; - return true; - } - - const char* SDOUtils::SDOToXSD(const char* sdoname) - { - if (sdoname == 0) - { - return SDOUtils::SdoToXsd["String"].c_str(); - } - if (!SDOUtils::populated) SDOUtils::populate(); - string& s = SDOUtils::SdoToXsd[sdoname]; - if (s.empty()) - { - return SDOUtils::SdoToXsd["String"].c_str(); - } - return s.c_str(); - } - - - const char* SDOUtils::XSDToSDO(const char* xsdname) - { - if (xsdname == 0) - { - return SDOUtils::XsdToSdo["string"].c_str(); - } - if (!SDOUtils::populated) SDOUtils::populate(); - string& s = SDOUtils::XsdToSdo[xsdname]; - if (s.empty()) - return SDOUtils::XsdToSdo["string"].c_str(); - return s.c_str(); - } - -////////////////////////////////////////////////////////////////////////// -// Print Tabs -////////////////////////////////////////////////////////////////////////// - - void SDOUtils::printTabs(ostream& out, unsigned int incr) - { - for (int ind=0; ind < incr; ind++) - { - out << " "; - } - } - -////////////////////////////////////////////////////////////////////////// -// Print a DatObject tree -////////////////////////////////////////////////////////////////////////// - - void SDOUtils::printDataObject(ostream& out, DataObjectPtr dataObject) - { - printDataObject(out, dataObject,0); - } - - - void SDOUtils::printDataObject(ostream& out ,DataObjectPtr dataObject, - unsigned int incr) - { - - out << ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO" - << endl; - - if (!dataObject)return; - - const Type& dataObjectType = dataObject->getType(); - printTabs(out, incr); - out << "DataObject type: " - << dataObjectType.getURI() - << "#" << dataObjectType.getName() << endl; - - incr++; - - ////////////////////////////////////////////////////////////// - // Iterate over all the properties - ////////////////////////////////////////////////////////////// - PropertyList pl = dataObject->getInstanceProperties(); - for (int i = 0; i < pl.size(); i++) - { - printTabs(out, incr); - out << "Property: " << pl[i].getName() << endl; - - const Type& propertyType = pl[i].getType(); - - printTabs(out, incr); - - out << "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()) - { - incr++; - DataObjectList& dol = dataObject->getList(pl[i]); - char cc[20]; - for (int j = 0; j getCString(pl[i]) <getDataObject(pl[i]),incr); - incr--; - } - } - else - { - printTabs(out, incr); - out << "Property Value: not set" <getTypes(); - for (int i = 0; i < tl.size(); i++) - { - out << "Type: " << tl[i].getURI()<< "#" << tl[i].getName() << - " isOpen: " << tl[i].isOpenType() - << " isSequenced: " << tl[i].isSequencedType() << endl; - PropertyList pl = tl[i].getProperties(); - for (int j = 0; j < pl.size(); j++) - { - out << "\tProperty: " << pl[j].getName() - << " type: " < -#include - -namespace commonj -{ - namespace sdo - { - - - /** - * SDOUtils will provide utility functions. - * The class currently holds a method to print data objects. - */ - - class SDOUtils - { - - public: - - static SDO_API void printDataObject(std::ostream& out, DataObjectPtr d); - static SDO_API const char* SDOToXSD(const char* sdoname); - static SDO_API const char* XSDToSDO(const char* xsdname); - static void printTypes(std::ostream& out, DataFactoryPtr df); - - private: - - static bool populate(); - static bool populated; - - static void printDataObject(std::ostream& out, DataObjectPtr d, unsigned int incr); - static void printTabs(std::ostream& out, unsigned int incr); - - static std::map XsdToSdo; - static std::map SdoToXsd; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOUTILS_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.cpp deleted file mode 100644 index 38a4ff9799..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLBufferWriter.h" -#include "commonj/sdo/SDORuntimeException.h" - -namespace commonj -{ - namespace sdo - { - - - - - SDOXMLBufferWriter::SDOXMLBufferWriter(DataFactoryPtr dataFactory) - : SDOXMLWriter(dataFactory) - { - buf = xmlBufferCreate(); - if (buf == NULL) - { - SDO_THROW_EXCEPTION("SDOXMLBufferWriter", SDOXMLParserException, "xmlBufferCreate failed"); - } - setWriter(xmlNewTextWriterMemory(buf, 0)); - } - - SDOXMLBufferWriter::~SDOXMLBufferWriter() - { - freeWriter(); - xmlBufferFree(buf); - } - - SDOXMLString SDOXMLBufferWriter::getBuffer() - { - freeWriter(); - return buf->content; - } - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.h deleted file mode 100644 index bcfb226806..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLBufferWriter.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXMLBUFFERWRITER_H_ -#define _SDOXMLBUFFERWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLWriter.h" - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXMLBufferWriter extends SDOXMLWriter and writes a buffer. - */ - class SDOXMLBufferWriter : public SDOXMLWriter - { - - public: - - SDOXMLBufferWriter(DataFactoryPtr dataFactory = NULL); - virtual ~SDOXMLBufferWriter(); - - SDOXMLString getBuffer(); - private: - xmlBufferPtr buf; - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXMLBUFFERWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.cpp deleted file mode 100644 index 6420af9a96..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLFileWriter.h" - -namespace commonj -{ - namespace sdo - { - - - - - SDOXMLFileWriter::SDOXMLFileWriter(const char* xmlFile, DataFactoryPtr dataFactory) - : SDOXMLWriter(dataFactory) - { - setWriter(xmlNewTextWriterFilename(xmlFile, 0)); - } - - SDOXMLFileWriter::~SDOXMLFileWriter() - { - - } - - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.h deleted file mode 100644 index 83e2aa5a2c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLFileWriter.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXMLFILEWRITER_H_ -#define _SDOXMLFILEWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLWriter.h" - - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXMLFileWriter extends SDOXMLWriter and writes a file. - */ - class SDOXMLFileWriter : public SDOXMLWriter - { - - public: - - SDOXMLFileWriter(const char* xmlFile, DataFactoryPtr dataFactory = NULL); - - virtual ~SDOXMLFileWriter(); - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXMLFILEWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.cpp deleted file mode 100644 index 12b1e59b9e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLStreamWriter.h" -#include - -namespace commonj -{ - namespace sdo - { - - - - - SDOXMLStreamWriter::SDOXMLStreamWriter(std::ostream& outXML, DataFactoryPtr dataFactory) - : SDOXMLBufferWriter(dataFactory), outXmlStream(outXML) - { - } - - SDOXMLStreamWriter::~SDOXMLStreamWriter() - { - } - - int SDOXMLStreamWriter::write(XMLDocumentPtr doc, int indent) - { - int rc = SDOXMLBufferWriter::write(doc, indent); - - // Now stream the buffer - outXmlStream << getBuffer(); - return rc; - } - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.h deleted file mode 100644 index 977ff63a63..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLStreamWriter.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXMLSTREAMWRITER_H_ -#define _SDOXMLSTREAMWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXMLBufferWriter.h" -#include - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXMLStreamWriter extends SDOXMLWriter and writes a stream. - */ - class SDOXMLStreamWriter : public SDOXMLBufferWriter - { - - public: - - SDOXMLStreamWriter(std::ostream& outXML, DataFactoryPtr dataFactory = NULL); - virtual ~SDOXMLStreamWriter(); - - int write(XMLDocumentPtr doc, int indent = -1); - private: - std::ostream& outXmlStream; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXMLSTREAMWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp deleted file mode 100644 index 72f93fe83d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLString.h" -#include -#include "libxml/globals.h" - -#include - -namespace commonj -{ - namespace sdo - { - - SDOXMLString::SDOXMLString() - : xmlForm(0) - { - } - - SDOXMLString::SDOXMLString(const xmlChar* xmlString) - { - xmlForm = xmlStrdup(xmlString); - } - - SDOXMLString::SDOXMLString(const char* localString) - { - xmlForm = xmlCharStrdup(localString); - } - - SDOXMLString::SDOXMLString(const SDOXMLString& str) - { - xmlForm = xmlStrdup(str.xmlForm); - } - - SDOXMLString::SDOXMLString(const xmlChar* str, int start, int len) - { - xmlForm = xmlStrsub(str, start, len); - } - - SDOXMLString& SDOXMLString::operator=(const SDOXMLString& str) - { - if (this != &str) - { - release(); - xmlForm = xmlStrdup(str.xmlForm); - } - return *this; - } - - SDOXMLString::operator std::string() const - { - if (xmlForm) - { - return (const char *)xmlForm; - } - return ""; - } - - SDOXMLString SDOXMLString::operator+(const SDOXMLString& str) const - { - xmlChar* newString = xmlStrncatNew(xmlForm, str.xmlForm, xmlStrlen(str.xmlForm)); - SDOXMLString retString(newString); - if (newString) - xmlFree(newString); - return retString; - } - - SDOXMLString& SDOXMLString::operator+=(const SDOXMLString& str) - { - xmlForm = xmlStrncat(xmlForm, str.xmlForm, xmlStrlen(str.xmlForm)); - return *this; - } - - SDOXMLString::~SDOXMLString() - { - release(); - } - - void SDOXMLString::release() - { - if (xmlForm) - xmlFree((void*)xmlForm); - } - - bool SDOXMLString::operator< (const SDOXMLString& str) const - { - if (xmlStrcmp(xmlForm, str.xmlForm) <0) - return true; - else - return false; - } - - bool SDOXMLString::operator==(const SDOXMLString& str) const - { - if (xmlStrEqual(xmlForm, str.xmlForm)) - return true; - else - return false; - } - - bool SDOXMLString::equals(const SDOXMLString& str) const - { - return equals(str.xmlForm); - } - - bool SDOXMLString::equals(const char* localString) const - { - return equals(SDOXMLString(localString)); - } - - - bool SDOXMLString::equals(const xmlChar* xmlString) const - { - if (xmlStrEqual(xmlForm, xmlString)) - return true; - else - return false; - } - - bool SDOXMLString::equalsIgnoreCase(const SDOXMLString& str) const - { - return equalsIgnoreCase(str.xmlForm); - } - - bool SDOXMLString::equalsIgnoreCase(const char* localString) const - { - return equalsIgnoreCase(SDOXMLString(localString)); - } - - - bool SDOXMLString::equalsIgnoreCase(const xmlChar* xmlString) const - { - if (xmlStrcasecmp(xmlForm, xmlString) == 0) - return true; - else - return false; - } - - - std::ostream& operator<<(std::ostream& output, const SDOXMLString& str) - { - if (str.xmlForm) - output << str.xmlForm; - return output; - } - - bool SDOXMLString::isNull() const - { - if (xmlForm) - return false; - else - return true; - } - - SDOXMLString SDOXMLString::toLower(unsigned int start, unsigned int length) - { - char* newString = new char[strlen(*this)+1]; - strcpy(newString, *this); - for (int i = start; (i<=(strlen(newString)) && i < length); i++) - { - newString[i] = tolower(newString[i]); - } - SDOXMLString retString(newString); - delete newString; - return retString; - } - - int SDOXMLString::firstIndexOf(const char ch) const - { - const xmlChar* loc = xmlStrchr(xmlForm, ch); - if (loc == 0) - { - return -1; - } - - return int(loc-xmlForm); - } - - int SDOXMLString::lastIndexOf(const char ch) const - { - const xmlChar* index = 0; - const xmlChar* loc = xmlStrchr(xmlForm, ch); - while (loc !=0) - { - index = loc; - loc = xmlStrchr(loc+1, ch); - } - - if (index == 0) - return -1; - - return int(index-xmlForm); - } - - SDOXMLString SDOXMLString::substring(int start, int length) const - { - if (length >0) - { - return SDOXMLString(xmlForm, start, length); - } - else - return SDOXMLString(); - } - - SDOXMLString SDOXMLString::substring(int start) const - { - - return SDOXMLString(xmlForm, start, xmlStrlen(xmlForm) - start); - } - - - } // End - namespace sdo -} // End - namespace commonj - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.h deleted file mode 100644 index 9b1026f1d8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLString.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/disable_warn.h" - -#ifndef _SDOXMLString_H_ -#define _SDOXMLString_H_ -#include "commonj/sdo/export.h" - -#include -#include - -namespace commonj -{ - namespace sdo - { - /** - * SDOXMLString - utility class for string handling. - * Keeps the string handling local to one place, so we can - * replace it with a more NLS friendly version later. - * Many places within the core should use this too instead - * of allocated char* buffers. (DataObject etc...) - */ - - class SDOXMLString - { - public: - SDO_SPI SDOXMLString(); - SDO_SPI SDOXMLString(const xmlChar* xmlString); - SDO_SPI SDOXMLString(const char* localString); - SDO_SPI SDOXMLString(const SDOXMLString& str); - SDO_SPI SDOXMLString(const xmlChar* str, int start, int len); - SDO_SPI virtual ~SDOXMLString(); - - SDO_SPI SDOXMLString& operator=(const SDOXMLString& str); - SDO_SPI SDOXMLString operator+(const SDOXMLString& str) const; - SDO_SPI SDOXMLString& operator+=(const SDOXMLString& str); - - - SDO_SPI bool operator== (const SDOXMLString& str) const; - SDO_SPI bool equals(const xmlChar* xmlString) const; - SDO_SPI bool equals(const char* localString) const; - SDO_SPI bool equals(const SDOXMLString& str) const; - SDO_SPI bool equalsIgnoreCase(const xmlChar* xmlString) const; - SDO_SPI bool equalsIgnoreCase(const char* localString) const; - SDO_SPI bool equalsIgnoreCase(const SDOXMLString& str) const; - - SDO_SPI bool operator< (const SDOXMLString& str) const; - - SDO_SPI operator std::string() const; - SDO_SPI operator const char*() const {return (const char*) xmlForm;} - SDO_SPI operator const xmlChar*() const {return xmlForm;} - - SDO_SPI friend std::ostream& operator<<(std::ostream& output, const SDOXMLString& str); - - SDO_SPI bool isNull() const; - - SDO_SPI SDOXMLString toLower( - unsigned int start = 0, - unsigned int length = 0); - - - SDO_SPI int firstIndexOf(const char ch) const; - SDO_SPI int lastIndexOf(const char ch) const; - SDO_SPI SDOXMLString substring(int start, int length) const; - SDO_SPI SDOXMLString substring(int start) const; - private : - xmlChar* xmlForm; - void release(); - }; - } // End - namespace sdo -} // End - namespace commonj - - - -#endif // _SDOXMLString_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp deleted file mode 100644 index 6865721f53..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp +++ /dev/null @@ -1,1232 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLWriter.h" -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/SDOString.h" -#include "iostream" -using namespace::std; -#include "commonj/sdo/DASProperty.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/XSDTypeInfo.h" -#include "commonj/sdo/ChangeSummary.h" -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/XMLQName.h" -#include "commonj/sdo/DataObjectImpl.h" - -namespace commonj -{ - namespace sdo - { - - - - - SDOXMLWriter::SDOXMLWriter( - DataFactoryPtr dataFact) - : dataFactory(dataFact) - { - - } - - SDOXMLWriter::~SDOXMLWriter() - { - freeWriter(); - } - - void SDOXMLWriter::setWriter(xmlTextWriterPtr textWriter) - { - writer = textWriter; - } - - void SDOXMLWriter::freeWriter() - { - if (writer != NULL) - { - xmlFreeTextWriter(writer); - writer = NULL; - } - } - - int SDOXMLWriter::write(XMLDocumentPtr doc, int indent) - { - if (!doc) - { - return 0; - } - - if (writer == NULL) - { - // Throw exception - return -1; - } - - int rc = 0; - - //namespaceUriStack.empty(); - //namespaceUriStack.push(SDOXMLString()); - //namespaces.empty(); - //namespaceStack.push(namespaces); - namespaceMap.empty(); - - if (indent >= 0) - { - xmlTextWriterSetIndent(writer, 1); - if (indent > 0) - { - char * chars = new char[indent+1]; - for (int i=0;igetXMLDeclaration()) - { - rc = xmlTextWriterStartDocument(writer, doc->getXMLVersion(), doc->getEncoding(), NULL); - if (rc < 0) { - SDO_THROW_EXCEPTION("write", SDOXMLParserException, "xmlTextWriterStartDocument failed"); - } - } - - DataObjectPtr root = doc->getRootDataObject(); - if (root) - { - const Type& rootType = root->getType(); - SDOXMLString rootTypeURI = rootType.getURI(); - SDOXMLString rootTypeName = rootType.getName(); - - // For the root DataObject we need to determine the element name - SDOXMLString elementURI = doc->getRootElementURI(); - if (elementURI.isNull() || elementURI.equals("")) - { - elementURI = rootTypeURI; - } - SDOXMLString elementName = doc->getRootElementName(); - if (elementName.isNull() || elementName.equals("")) - { - elementName = rootTypeName; - elementName = elementName.toLower(0,1); - } - - // If the element name is defined as a global element then we - // can supress the writing of xsi:type according to the spec - bool writeXSIType = true; - - try - { - // Locate the RootType - const Type& rootTy = dataFactory->getType(elementURI, "RootType"); - // Does a property exist with the given element name? - const Property& rootProp = rootTy.getProperty((const char*)elementName); - // Is this property of the correct Type? - const Type& rootPropType = rootProp.getType(); - if (rootTypeURI == (SDOXMLString)rootPropType.getURI() - && rootTypeName == (SDOXMLString)rootPropType.getName()) - { - writeXSIType = false; - } - } - catch(SDORuntimeException&) - { - } - - // Supress the writing of xsi:type as well for DataObjects of type - // commonj.sdo#OpenDataObject - if (writeXSIType && - rootTypeURI.equals("commonj.sdo") && rootTypeName.equals("OpenDataObject")) - { - writeXSIType = false; - } - - writeDO(root, elementURI, elementName, writeXSIType, true); - } - rc = xmlTextWriterEndDocument(writer); - if (rc < 0) { - SDO_THROW_EXCEPTION("write", SDOXMLParserException, "xmlTextWriterEndDocument failed"); - return rc; - } - - xmlTextWriterFlush(writer); - freeWriter(); - - return rc; - } - - ////////////////////////////////////////////////////////////////////////// - // Write Change Summary attributes - ////////////////////////////////////////////////////////////////////////// - - void SDOXMLWriter::handleChangeSummaryAttributes( - ChangeSummaryPtr cs, - DataObjectPtr dol) - { - int rc; - - SettingList& sl = cs->getOldValues(dol); - if (sl.size() == 0) - { - // no attributes - return; - } - for (int j=0;j< sl.size(); j++) - { - try { - - if (sl.get(j)->getProperty().isMany()) - { - // manys are elements - continue; - } - - if (sl.get(j)->getProperty().getType().isDataType()) - { - // data types are OK - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString(sl.get(j)->getProperty().getName()), - SDOXMLString(sl.get(j)->getCStringValue())); - } - else - { - DataObjectPtr dob = sl.get(j)->getDataObjectValue(); - if (dob) - { - if (cs->isDeleted(dob)) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString(sl.get(j)->getProperty().getName()), - SDOXMLString(cs->getOldXpath(dob))); - } - else - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString(sl.get(j)->getProperty().getName()), - SDOXMLString(dob->objectToXPath())); - } - } - else - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString(sl.get(j)->getProperty().getName()), - SDOXMLString("")); - } - } - } - catch (SDORuntimeException e) - { - // ignore this attribute - } - } - } - - ////////////////////////////////////////////////////////////////////////// - // Write Change Summary elements - ////////////////////////////////////////////////////////////////////////// - - void SDOXMLWriter::handleChangeSummaryElements( - ChangeSummaryPtr cs, - DataObjectPtr dob) - { - int rc; - - SettingList& sl = cs->getOldValues(dob); - - if (sl.size() == 0) - { - // there are no setting for this element. - return; - } - - for (int j=0;j< sl.size(); j++) - { - try - { - - // single values will have been covered by the attributes. - if (!sl.get(j)->getProperty().isMany()) continue; - - if (sl.get(j)->getProperty().getType().isDataType()) - { - - rc = xmlTextWriterWriteElement( - writer, - SDOXMLString(sl.get(j)->getProperty().getName()), - SDOXMLString(sl.get(j)->getCStringValue())); - - } // if datatype - else - { - DataObjectPtr dob2 = sl.get(j)->getDataObjectValue(); - if (!dob2) - { - continue; - } - if (cs->isDeleted(dob2)) - { - handleChangeSummaryDeletedObject(sl.get(j)->getProperty().getName(), cs,dob2); - } - else - { - rc = xmlTextWriterStartElement( - writer, - SDOXMLString(sl.get(j)->getProperty().getName())); - rc = xmlTextWriterWriteAttribute( - writer, - SDOXMLString("sdo:ref"), - SDOXMLString(dob2->objectToXPath())); - rc = xmlTextWriterEndElement( - writer); - } - } - } - catch (SDORuntimeException e) - { - // ignore this element - } - } // for - } - - - ////////////////////////////////////////////////////////////////////////// - // Write a deleted object and all its props - ////////////////////////////////////////////////////////////////////////// - - void SDOXMLWriter::handleChangeSummaryDeletedObject( - const char* name, - ChangeSummaryPtr cs, - DataObjectPtr dob) - { - - int rc, k; // TODO error handling - - SettingList& sl = cs->getOldValues(dob); - - rc = xmlTextWriterStartElement( - writer, - SDOXMLString(name)); - - if (sl.size() == 0) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("sdo:ref"), - SDOXMLString(cs->getOldXpath(dob))); - rc = xmlTextWriterEndElement(writer); - return; - } - - - try - { - // print single valued datatypes as attributes - - for (int j=0;j< sl.size(); j++) - { - //if (!sl.get(j)->isSet()) - //{ - // // unset properties dont need recording - ah but they do! - // - // continue; - //} - if ( sl.get(j)->getProperty().isMany()) - { - // manys are elements - continue; - } - if (!sl.get(j)->getProperty().getType().isDataType()) - { - // data objects are element in a deleted data object. - continue; - } - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString(sl.get(j)->getProperty().getName()), - SDOXMLString(sl.get(j)->getCStringValue())); - - } // for attributes - - - // now we are onto the many-values, - // and dataobject single values. - // - // handle deletions within deletions in reverse order, so they match the - // deletion records above. - - for (k=sl.size()-1;k>=0; k--) - { - - if ( !sl.get(k)->getProperty().getType().isDataType() && - sl.get(k)->getProperty().isMany()) - { - // its a dataobject type - DataObjectPtr dob2 = sl.get(k)->getDataObjectValue(); - if (!dob2) continue; - if (!cs->isDeleted(dob2)) continue; - handleChangeSummaryDeletedObject(sl.get(k)-> - getProperty().getName(),cs,dob2); - } - } // for attributes - - for (k=0;k< sl.size(); k++) - { - - if ( !sl.get(k)->getProperty().getType().isDataType()) - { - if (sl.get(k)->getProperty().isMany()) continue; - // its a single valued dataobject type - - DataObjectPtr dob2 = sl.get(k)->getDataObjectValue(); - if (!dob2) continue; - if (!cs->isDeleted(dob2)) continue; - handleChangeSummaryDeletedObject(sl.get(k)-> - getProperty().getName(),cs,dob2); - - } - else - { - if ( !sl.get(k)->getProperty().isMany()) continue; - - // could only be many valued data type - - rc = xmlTextWriterWriteElement(writer, - SDOXMLString(sl.get(k)->getProperty().getName()), - SDOXMLString(sl.get(k)->getCStringValue())); - } - } // for attributes - } - catch (SDORuntimeException e) - { - // ignore - and write the end-element - } - - rc = xmlTextWriterEndElement(writer); - } - - - ////////////////////////////////////////////////////////////////////////// - // Write the list of elements of a change summary - ////////////////////////////////////////////////////////////////////////// - - void SDOXMLWriter::handleSummaryChange( - const SDOXMLString& elementName, - ChangeSummaryPtr cs, - DataObjectPtr dob) - { - int rc; - DataObject* temp = dob; - const char* name; - try - { - name = temp->getContainmentProperty().getName(); - } - catch (SDORuntimeException e) - { - // This could be a root, and have no name. - name = 0; - } - - if (name == 0) - { - rc = xmlTextWriterStartElement( - writer, - elementName); - } - else - { - rc = xmlTextWriterStartElement( - writer, - SDOXMLString(name)); - } - - if (rc != 0) - { - // failed to write an element - return; - } - - try - { - name = temp->objectToXPath(); - } - catch (SDORuntimeException e) - { - name = 0; - } - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("sdo:ref"), - SDOXMLString(name)); - - handleChangeSummaryAttributes(cs, temp); - - handleChangeSummaryElements(cs, temp); - - rc = xmlTextWriterEndElement(writer); - - } - - ////////////////////////////////////////////////////////////////////////// - // Write a Change Summary - ////////////////////////////////////////////////////////////////////////// - - void SDOXMLWriter::handleChangeSummary( - const SDOXMLString& elementName, - ChangeSummaryPtr cs) - { - int i; - int rc; - - ChangedDataObjectList& changedDOs = cs->getChangedDataObjects(); - rc = xmlTextWriterStartElementNS(writer, - SDOXMLString("sdo"), SDOXMLString("changeSummary"), SDOXMLString(Type::SDOTypeNamespaceURI.c_str())); - if (rc != 0) return; - if (cs->isLogging()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("logging"), - SDOXMLString("true")); - } - - if (changedDOs.size() > 0) - { - - // write the creates/deletes in the order they - // happened, as elements. - - for (i=0;i< changedDOs.size();i++) - { - if (cs->isCreated(changedDOs[i]) - && changedDOs.getType(i) == ChangedDataObjectList::Create) - { - // TODO - should work out if theres a IDREF here - // TODO - can we have more than one create like this? - try - { - rc = xmlTextWriterWriteElement(writer, - SDOXMLString("create"), - SDOXMLString(changedDOs[i]->objectToXPath())); - } - catch (SDORuntimeException e) - { - // The object was not in our tree - we ignore it. - } - } - if (cs->isDeleted(changedDOs[i]) - && changedDOs.getType(i) == ChangedDataObjectList::Delete) - { - // TODO - should work out if theres a IDREF here - try - { - rc = xmlTextWriterWriteElement(writer, - SDOXMLString("delete"), - SDOXMLString(cs->getOldXpath(changedDOs[i]))); - } - catch (SDORuntimeException e) - { - // The object was not in the deleted list - we ignore it. - } - } - } - - - for (i=0;i< changedDOs.size();i++) - { - if (cs->isModified(changedDOs[i])) - { - handleSummaryChange(elementName, cs, changedDOs[i]); - } - } - - } - rc = xmlTextWriterEndElement(writer); - } - - ////////////////////////////////////////////////////////////////////////// - // Add to namespaces - ////////////////////////////////////////////////////////////////////////// - - void SDOXMLWriter::addToNamespaces(DataObjectImpl* dob) - { - std::map::iterator it; - SDOXMLString uri = dob->getType().getURI(); - - it = namespaceMap.find(uri); - if (it == namespaceMap.end()) - { - char buf[20]; - sprintf(buf,"%d",++spacescount); - SDOXMLString s = SDOXMLString("tns") + buf; - namespaceMap.insert(make_pair(uri,s)); - } - - PropertyList pl = dob->getInstanceProperties(); - for (int i = 0; i < pl.size(); i++) - { - if (!dob->isSet(pl[i]))continue; - - if (pl[i].isMany()) - { - if (!pl[i].getType().isDataType()) - { - DataObjectList& dl = dob->getList(pl[i]); - for (int k=0;k< dl.size() ;k++) - { - DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dl[k]; - if (d != 0)addToNamespaces(d); - } - } - } - else - { - if (!pl[i].getType().isDataType()) - { - DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dob->getDataObject(pl[i]); - if (d != 0)addToNamespaces(d); - } - else - { - XSDPropertyInfo* pi = getPropertyInfo(dob->getType(), pl[i]); - if (pi) - { - PropertyDefinitionImpl propdef; - propdef = pi->getPropertyDefinition(); - if (propdef.isElement)continue; - if (!propdef.isQName)continue; - - SDOXMLString propertyValue = (dob->getCString(pl[i])); - XMLQName qname(propertyValue); - - it = namespaceMap.find(qname.getURI()); - if (it == namespaceMap.end()) - { - char buf[20]; - sprintf(buf,"%d",++spacescount); - SDOXMLString s = SDOXMLString("tns") + buf; - namespaceMap.insert(make_pair(qname.getURI(),s)); - } - } - } - } - } - } - - - ////////////////////////////////////////////////////////////////////////// - // Write xmlns:xsi= if nexessary - ////////////////////////////////////////////////////////////////////////// - void SDOXMLWriter::writeXmlnsXsi() - { - SDOXMLString xsins("http://www.w3.org/2001/XMLSchema-instance"); - - std::map::iterator it = namespaceMap.find(xsins); - if (it == namespaceMap.end()) - { - SDOXMLString prefix("xmlns:xsi"); - xmlTextWriterWriteAttribute(writer, - prefix, xsins); - } - } - - ////////////////////////////////////////////////////////////////////////// - // Write a DatObject tree - ////////////////////////////////////////////////////////////////////////// - - int SDOXMLWriter::writeDO( - DataObjectPtr dataObject, - const SDOXMLString& elementURI, - const SDOXMLString& elementName, - bool writeXSIType, - bool isRoot) - { - - int rc; - - if (dataObject == 0) - return 0; - - - //SDOXMLString uri; - //if (!elementURI.equals(namespaceUriStack.top())) - //{ - // uri = elementURI; - // namespaceUriStack.push(elementURI); - //} - - const Type& dataObjectType = dataObject->getType(); - - ////////////////////////////////////////////////////////////////////////// - // suppose its a primitive type - just write the value - ////////////////////////////////////////////////////////////////////////// - if (dataObjectType.isDataType()) - { - if (dataObject->isNull("")) - { - rc = xmlTextWriterStartElementNS(writer, - NULL, elementName, elementURI); - if (rc < 0) - { - SDO_THROW_EXCEPTION("writeDO", - SDOXMLParserException, - "xmlTextWriterStartElementNS failed"); - } - rc = xmlTextWriterWriteAttribute(writer, - (const unsigned char*)"xsi:nil", - (const unsigned char*)"true"); - writeXmlnsXsi(); - rc = xmlTextWriterEndElement(writer); - } - else - { - xmlTextWriterWriteElement( - writer, - elementName, - SDOXMLString(dataObject->getCString(""))); - } - - // need to pop stacks before returning - //if (!uri.isNull()) - //{ - // namespaceUriStack.pop(); - //} - return 0; - - } - - - //namespaceStack.push(namespaces); - - - if (isRoot) - { - tnsURI=elementURI; - if (elementURI.equals("")) { - rc = xmlTextWriterStartElementNS(writer, NULL, elementName, NULL); - } - else - { - rc = xmlTextWriterStartElementNS(writer, NULL, elementName, elementURI); - } - if (rc < 0) { - SDO_THROW_EXCEPTION("writeDO", SDOXMLParserException, "xmlTextWriterStartElementNS failed"); - } - } - else - { - //xmlTextWriterWriteString(writer,SDOXMLString("\n")); - - SDOXMLString theName=elementName; - - if (!elementURI.isNull() && !elementURI.equals(tnsURI) && !elementURI.equals("")) - { - std::map::iterator it = namespaceMap.find(elementURI); - if (it != namespaceMap.end()) - { - theName = (*it).second; - theName += ":"; - theName += elementName; - } - } - - rc = xmlTextWriterStartElementNS(writer, NULL, theName, NULL); - if (rc < 0) { - SDO_THROW_EXCEPTION("writeDO", SDOXMLParserException, "xmlTextWriterStartElementNS failed"); - } - } - - - if (writeXSIType) - { - rc = xmlTextWriterWriteAttributeNS(writer, - SDOXMLString("xsi"), SDOXMLString("type"), - NULL, - /*SDOXMLString("http://www.w3.org/2001/XMLSchema-instance"),*/ - SDOXMLString(dataObject->getType().getName())); - if (isRoot) - { - namespaceMap.insert(make_pair( - SDOXMLString("http://www.w3.org/2001/XMLSchema-instance"), - SDOXMLString("xsi"))); - - } - else - { - writeXmlnsXsi(); - } - } - - - if (isRoot) - { - std::map::iterator it = namespaceMap.find(elementURI); - if (it == namespaceMap.end()) - { - SDOXMLString s = SDOXMLString("tns"); - namespaceMap.insert(make_pair(elementURI,s)); - } - DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dataObject; - spacescount = 1; - addToNamespaces(d); - -///////////////////////////////////////////////////////////////////////////////////// -// // build the namespace map, and write the items out at the -// // top of the tree. -// int spacecount = 0; -// DataObjectImpl* d = (DataObjectImpl*)(DataObject*)dataObject; -// if (d != 0) -// { -// TypeList types = (d->getDataFactory())->getTypes(); -// std::map::iterator it; -// -// for (int i = 0; i::iterator it = namespaceMap.find(uri); -// if (it == namespaceMap.end()) -// { -// char buf[4]; -// if (!elementURI.isNull()) -// { -// if (elementURI.equals(uri)) -// { -// SDOXMLString s = SDOXMLString("tns"); -// namespaceMap.insert(make_pair(uri,s)); -// } -// else -// { -// sprintf(buf,"%d",++spacecount); -// SDOXMLString s = SDOXMLString("tns") + buf; -// namespaceMap.insert(make_pair(uri,s)); -// } -// } -// } -// } -//////////////////////////////////////////////////////////////////////////////////// - - for (it = namespaceMap.begin();it != namespaceMap.end(); ++it) - { - if ((*it).first.equals("")) continue; - SDOXMLString space = SDOXMLString("xmlns:") + (*it).second; - rc = xmlTextWriterWriteAttribute(writer, - space, (*it).first); - } - } - - - ////////////////////////////////////////////////////////////////////////// - // write out the type if the xsi:type if the containing type is open - // and the property is not one of the declared properties - ////////////////////////////////////////////////////////////////////////// - if (!writeXSIType) - { - DataObject* dob = dataObject; - DataObjectImpl* cont = - ((DataObjectImpl*)dob)->getContainerImpl(); - if (cont != 0) - { - if (cont->getType().isOpenType()) - { - //if (dataObject->getType().getURI() != 0) - //{ - // std::string value = - // dataObject->getType().getURI(); - // value += ":"; - // value += dataObject->getType().getName(); - // rc = xmlTextWriterWriteAttribute(writer, - // (const unsigned char*)"xsi:type", - // (const unsigned char*)value.c_str()); - //} - //else - //{ - if (cont->getTypeImpl().getPropertyImpl(elementName) == 0) - { - rc = xmlTextWriterWriteAttribute(writer, - (const unsigned char*)"xsi:type", - (const unsigned char*)dataObject->getType().getName()); - - writeXmlnsXsi(); - } - } - } - } - - // write nil if required - if (dataObject->isNull("")) - { - rc = xmlTextWriterWriteAttribute(writer, - (const unsigned char*)"xsi:nil", - (const unsigned char*)"true"); - - writeXmlnsXsi(); - } - - - ////////////////////////////////////////////////////////////////////////// - // Iterate over all the properties to find attributes - ////////////////////////////////////////////////////////////////////////// - int i; - int j = 1; - PropertyList pl = dataObject->getInstanceProperties(); - for (i = 0; i < pl.size(); i++) - { - if (dataObject->isSet(pl[i])) - { - SDOXMLString propertyName(pl[i].getName()); - XSDPropertyInfo* pi = getPropertyInfo(dataObjectType, pl[i]); - PropertyDefinitionImpl propdef; - if (pi) - { - propdef = pi->getPropertyDefinition(); - propertyName = propdef.localname; - } - - // Elements are written as - if (propdef.isElement) - continue; - - // Many-valued properties are written as - if (pl[i].isMany()) - continue; - - // if (pl[i].isContainment()) - // continue; - - ////////////////////////////////////////////////////////////////////// - // Non contained properties become attributes - ////////////////////////////////////////////////////////////////////// - const Type& propertyType = pl[i].getType(); - - if (propertyType.isDataType()) - { - SDOXMLString propertyValue = (dataObject->getCString(pl[i])); - if (pi && pi->getPropertyDefinition().isQName) - { - XMLQName qname(propertyValue); - - //{ - //const SDOXMLString* prefix = namespaces.findPrefix(qname.getURI()); - //if (prefix == 0) - //{ - // char buffer[100]; - // SDOXMLString pref = "tns"; - // sprintf(buffer, "%d", i); - // pref += buffer; - // namespaces.add(pref, qname.getURI()); - // prefix = namespaces.findPrefix(qname.getURI()); - //} - - //if (prefix != 0 && !(*prefix).equals("")) - - std::map::iterator it = namespaceMap.find(qname.getURI()); - if (it != namespaceMap.end()) - { - propertyValue = (*it).second + ":" + qname.getLocalName(); - } - else - { - char buffer[20]; - SDOXMLString pref = "tnss"; - sprintf(buffer, "%d", j++); - pref += buffer; - rc = xmlTextWriterWriteAttributeNS(writer, - SDOXMLString("xmlns"), pref, NULL, qname.getURI()); - propertyValue = pref + ":" + qname.getLocalName(); - } - - } - rc = xmlTextWriterWriteAttribute(writer, - propertyName, propertyValue); - } - else - { - // Handle non-containment reference to DataObject - if (pl[i].isReference()) - { - writeReference(dataObject, pl[i], false); - } - } - } - } - - // -------------------- - // Handle ChangeSummary - // -------------------- - if (dataObject->getType().isChangeSummaryType()) - { - ChangeSummaryPtr changeSummary = dataObject->getChangeSummary(); - if (changeSummary) - { - handleChangeSummary(elementName, changeSummary); - } - } - - if (dataObjectType.isSequencedType()) - { - SequencePtr sequence = dataObject->getSequence(); - if (sequence) - { - for (i=0; isize(); i++) - { - - if (sequence->isText(i)) - { - rc = xmlTextWriterWriteString( - writer, - SDOXMLString(sequence->getCStringValue(i))); - continue; - } // end TextType - - const Property& seqProp = sequence->getProperty(i); - SDOXMLString seqPropName = seqProp.getName(); - const Type& seqPropType = seqProp.getType(); - - if (seqPropType.isDataObjectType()) - { - DataObjectPtr doValue; - if (seqProp.isMany()) - { - int index = sequence->getListIndex(i); - doValue = dataObject->getList(seqProp)[index]; - } - else - { - doValue = dataObject->getDataObject(seqProp); - } - - if (doValue) - { - // Handle non-containment reference to DataObject - if (seqProp.isReference()) - { - writeReference(dataObject, seqProp, true, doValue); - } - else - { - writeDO(doValue, doValue->getType().getURI(), seqPropName); - } - } - } // end DataObject - - - else - { - // Sequence member is a primitive - xmlTextWriterWriteElement( - writer, - seqPropName, - SDOXMLString(sequence->getCStringValue(i))); - - } // end DataType - } // end - iterate over sequence - - } - - } // end sequence handling - - else - { - - ////////////////////////////////////////////////////////////////////////// - // Iterate over all the properties to find elements - ////////////////////////////////////////////////////////////////////////// - for (i = 0; i < pl.size(); i++) - { - if (dataObject->isSet(pl[i])) - { - - SDOXMLString propertyName(pl[i].getName()); - XSDPropertyInfo* pi = getPropertyInfo(dataObjectType, pl[i]); - if (pi) - { - if (!pi->getPropertyDefinition().isElement) - continue; - propertyName = pi->getPropertyDefinition().localname; - } - - const Type& propertyType = pl[i].getType(); - - ////////////////////////////////////////////////////////////////////// - // For a many-valued property get the list of values - ////////////////////////////////////////////////////////////////////// - if (pl[i].isMany()) - { - DataObjectList& dol = dataObject->getList(pl[i]); - for (int j = 0; j getType().getURI(); - writeDO(dol[j], dol[j]->getType().getURI(), propertyName); - } - } - } // end IsMany - - ////////////////////////////////////////////////////////////////////// - // For a dataobject write the do - ////////////////////////////////////////////////////////////////////// - else if (!propertyType.isDataType()) - { - // Handle non-containment reference to DataObject - if (pl[i].isReference()) - { - if (pi) - writeReference(dataObject, pl[i], true); - } - else - { - DataObjectPtr propDO = dataObject->getDataObject(pl[i]); - writeDO(propDO, propDO->getType().getURI(), propertyName); - } - } - - ////////////////////////////////////////////////////////////////////// - // For a primitive - ////////////////////////////////////////////////////////////////////// - else - { - // Only write a primitive as an element if defined by the XSD - if (pi) - { - const Type& tp = dataObject->getType(); - XSDTypeInfo* typeInfo = (XSDTypeInfo*) - ((DASType*)&tp)->getDASValue("XMLDAS::TypeInfo"); - if (typeInfo && typeInfo->getTypeDefinition().isExtendedPrimitive) - { - xmlTextWriterWriteRaw( - writer, - SDOXMLString(dataObject->getCString(pl[i]))); - } - else - { - if (dataObject->isNull(pl[i])) - { - rc = xmlTextWriterStartElementNS(writer, NULL, propertyName, NULL); - if (rc < 0) - { - SDO_THROW_EXCEPTION("writeDO", - SDOXMLParserException, - "xmlTextWriterStartElementNS failed"); - } - rc = xmlTextWriterWriteAttribute(writer, - (const unsigned char*)"xsi:nil", - (const unsigned char*)"true"); - - writeXmlnsXsi(); - rc = xmlTextWriterEndElement(writer); - } - else - { - xmlTextWriterWriteElement( - writer, - propertyName, - SDOXMLString(dataObject->getCString(pl[i]))); - } - } - } - } - } - } - } - rc = xmlTextWriterEndElement(writer); - return rc; - - //namespaces = namespaceStack.top(); - //namespaceStack.pop(); - //if (!uri.isNull()) - //{ - // namespaceUriStack.pop(); - //} - } - - XSDPropertyInfo* SDOXMLWriter::getPropertyInfo(const Type& type, const Property& property) - { - if (dataFactory) - { - return (XSDPropertyInfo*)dataFactory->getDASValue(type, property.getName(), "XMLDAS::PropertyInfo"); - } - else - { - return (XSDPropertyInfo*)((DASProperty*)&property)->getDASValue("XMLDAS::PropertyInfo"); - } - - } - - void SDOXMLWriter::writeReference( - DataObjectPtr dataObject, - const Property& property, - bool isElement, - DataObjectPtr refferedToObject) - { - DataObjectPtr reffedObject = refferedToObject; - if (reffedObject == 0) - { - reffedObject = dataObject->getDataObject(property); - } - - // Get ID from referred to DataObject or use XPath - SDOXMLString refValue; - XSDTypeInfo* ti = (XSDTypeInfo*)((DASType*)&reffedObject->getType())-> - getDASValue("XMLDAS::TypeInfo"); - if (ti) - { - TypeDefinitionImpl typeDef = ti->getTypeDefinition(); - if (!typeDef.IDPropertyName.isNull()) - { - refValue = reffedObject->getCString((const char*)typeDef.IDPropertyName); - } - } - - if (refValue.isNull()) - { - // need to get XPATH - refValue = ((DataObjectImpl*)(DataObject*)reffedObject)->objectToXPath(); - } - - if (!refValue.isNull()) - { - if (isElement) - { - // Set the IDREF value - xmlTextWriterWriteElement(writer, - SDOXMLString(property.getName()), refValue); - } - else - { - // Set the IDREF value - xmlTextWriterWriteAttribute(writer, - SDOXMLString(property.getName()), refValue); - } - } - } - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.h deleted file mode 100644 index b71b49f942..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXMLWRITER_H_ -#define _SDOXMLWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include -#include "commonj/sdo/XMLDocument.h" -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/SchemaInfo.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/DataObjectImpl.h" - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXMLWriter writes a data object tree to XML - */ - class SDOXMLWriter - { - - public: - - SDOXMLWriter(DataFactoryPtr dataFactory = NULL); - - virtual ~SDOXMLWriter(); - - int write(XMLDocumentPtr doc, int indent=-1); - - protected: - void setWriter(xmlTextWriterPtr textWriter); - void freeWriter(); - - private: - xmlTextWriterPtr writer; - - void handleChangeSummaryAttributes( - ChangeSummaryPtr cs, - DataObjectPtr doB); - - void handleChangeSummaryElements( - ChangeSummaryPtr cs, - DataObjectPtr dob); - - void handleChangeSummaryDeletedObject( - const char* name, - ChangeSummaryPtr cs, - DataObjectPtr dob); - - void handleSummaryChange( - const SDOXMLString& elementName, - ChangeSummaryPtr cs, - DataObjectPtr dob); - - void handleChangeSummary( - const SDOXMLString& elementName, - ChangeSummaryPtr cs); - - void addToNamespaces(DataObjectImpl* dob); - - int writeDO( - DataObjectPtr dataObject, - const SDOXMLString& elementURI, - const SDOXMLString& elementName, - bool writeXSIType = false, - bool isRoot = false); - - SchemaInfo* schemaInfo; - DataFactoryPtr dataFactory; - - XSDPropertyInfo* getPropertyInfo(const Type& type, const Property& property); - - //std::stack namespaceUriStack; - //SAX2Namespaces namespaces; - //std::stack namespaceStack; - int spacescount; - std::map namespaceMap; - SDOXMLString tnsURI; - - - void writeReference( - DataObjectPtr dataObject, - const Property& property, - bool isElement, - DataObjectPtr refferedToObject = 0); - - void writeXmlnsXsi(); - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXMLWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.cpp deleted file mode 100644 index dfd464854a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXSDBufferWriter.h" -#include "commonj/sdo/SDORuntimeException.h" - -namespace commonj -{ - namespace sdo - { - - - - - SDOXSDBufferWriter::SDOXSDBufferWriter() - { - buf = xmlBufferCreate(); - if (buf == NULL) - { - SDO_THROW_EXCEPTION("SDOXSDBufferWriter", SDOXMLParserException, "xmlBufferCreate failed"); - } - setWriter(xmlNewTextWriterMemory(buf, 0)); - } - - SDOXSDBufferWriter::~SDOXSDBufferWriter() - { - freeWriter(); - xmlBufferFree(buf); - } - - SDOXMLString SDOXSDBufferWriter::getBuffer() - { - freeWriter(); - return xmlBufferContent(buf); - } - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.h deleted file mode 100644 index c9354a8916..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDBufferWriter.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXSDBUFFERWRITER_H_ -#define _SDOXSDBUFFERWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXSDWriter.h" - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXSDBufferWriter extends SDOXSDWriter and writes a buffer. - */ - class SDOXSDBufferWriter : public SDOXSDWriter - { - - public: - - SDOXSDBufferWriter(); - virtual ~SDOXSDBufferWriter(); - - SDOXMLString getBuffer(); - private: - xmlBufferPtr buf; - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXSDBUFFERWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.cpp deleted file mode 100644 index 2794026aa3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXSDFileWriter.h" - -namespace commonj -{ - namespace sdo - { - - - - - SDOXSDFileWriter::SDOXSDFileWriter(const char* xsdFile) - { - setWriter(xmlNewTextWriterFilename(xsdFile, 0)); - } - - SDOXSDFileWriter::~SDOXSDFileWriter() - { - - } - - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.h deleted file mode 100644 index a91becc15c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDFileWriter.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXSDFILEWRITER_H_ -#define _SDOXSDFILEWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXSDWriter.h" - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXSDFileWriter extends SDOXSDWriter and writes a file. - */ - class SDOXSDFileWriter : public SDOXSDWriter - { - - public: - - SDOXSDFileWriter(const char* xsdFile); - - virtual ~SDOXSDFileWriter(); - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXSDFILEWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.cpp deleted file mode 100644 index 0da33a80c0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXSDStreamWriter.h" -#include - -namespace commonj -{ - namespace sdo - { - - - - - SDOXSDStreamWriter::SDOXSDStreamWriter(std::ostream& outXML) - : outXmlStream(outXML) - { - } - - SDOXSDStreamWriter::~SDOXSDStreamWriter() - { - } - - int SDOXSDStreamWriter::write(const TypeList& types, const SDOXMLString& targetNamespaceURI, - const propertyMap& openprops, int indent) - { - int rc = SDOXSDBufferWriter::write(types, targetNamespaceURI, openprops, indent); - - // Now stream the buffer - outXmlStream << getBuffer(); - return rc; - } - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.h deleted file mode 100644 index 18dade91ef..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDStreamWriter.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXSDSTREAMWRITER_H_ -#define _SDOXSDSTREAMWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SDOXSDBufferWriter.h" -#include - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXSDStreamWriter extends SDOXSDWriter and writes a stream. - */ - class SDOXSDStreamWriter : public SDOXSDBufferWriter - { - - public: - - SDOXSDStreamWriter(std::ostream& outXML); - virtual ~SDOXSDStreamWriter(); - - int write(const TypeList& types, const SDOXMLString& targetNamespaceURI, - const propertyMap& openprops, int indent = -1); - private: - std::ostream& outXmlStream; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXSDSTREAMWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp deleted file mode 100644 index 59414a29aa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.cpp +++ /dev/null @@ -1,842 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXSDWriter.h" -#include "iostream" -using namespace::std; -#include "commonj/sdo/DASProperty.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/DataFactoryImpl.h" - -namespace commonj -{ - namespace sdo - { - - - - - SDOXSDWriter::SDOXSDWriter( - DataFactoryPtr dataFact) - : dataFactory(dataFact) - { - - } - - SDOXSDWriter::~SDOXSDWriter() - { - freeWriter(); - } - - void SDOXSDWriter::setWriter(xmlTextWriterPtr textWriter) - { - writer = textWriter; - } - - void SDOXSDWriter::freeWriter() - { - if (writer != NULL) - { - xmlFreeTextWriter(writer); - writer = NULL; - } - } - - - void SDOXSDWriter::writeProps( const propertyMap& pl, const SDOXMLString& targetNamespaceURI, - SDOXMLString& xsd) - { - int rc; - - // ------------------------------------------------------- - // Create definitions - // ------------------------------------------------------- - - propertyMap::const_iterator j; - for (j = pl.begin(); j != pl.end(); ++j) - { - const PropertyImpl& prop = (*j).second; - const Type& propType = prop.getType(); - - - SDOXMLString propTypeName = resolveName(propType.getURI(), - propType.getName(), targetNamespaceURI); - - - if (prop.isMany() || !prop.getType().isDataType()) - { - // ----------------------------- - // Write an definition - // ----------------------------- - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("element"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - SDOXMLString(prop.getName())); - - if (!propType.isDataType() && !prop.isContainment()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("sdoxml:propertyType"), - propTypeName); - propTypeName = "xsd:anyURI"; - } - - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("type"), - propTypeName); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("minOccurs"), - SDOXMLString("0")); - - if (prop.isMany()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("maxOccurs"), - SDOXMLString("unbounded")); - } - - // End element - rc = xmlTextWriterEndElement(writer); - } - else - { - // ------------------------------- - // Write an definition - // ------------------------------- - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("attribute"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - SDOXMLString(prop.getName())); - - if (!propType.isDataType()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("sdoxml:propertyType"), - propTypeName); - if (prop.isReference()) - { - propTypeName = "xsd:IDREF"; - } - else - { - propTypeName = "xsd:anyURI"; - } - } - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("type"), - propTypeName); - - // End attribute - rc = xmlTextWriterEndElement(writer); - - } // else - } // for - } // method - - - //////////////////////////////////////// - - int SDOXSDWriter::write(const TypeList& types, const SDOXMLString& targetNamespaceURI, - const propertyMap& openprops, int indent) - { - int i; - if (writer == NULL) - { - // Throw exception - return -1; - } - - int rc = 0; - - if (indent >= 0) - { - xmlTextWriterSetIndent(writer, 1); - if (indent > 0) - { - char * chars = new char[indent+1]; - for (int i=0;i definition including namespace information - // -------------------------------------------------------------- - SDOXMLString tns; - SDOXMLString xsd("xsd"); - SDOXMLString sdoURI(Type::SDOTypeNamespaceURI.c_str()); - - SDOXMLString schemaURI = "http://www.w3.org/2001/XMLSchema"; - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("schema"), schemaURI); - if (rc < 0) { - SDO_THROW_EXCEPTION("write", SDOXMLParserException, "xmlTextWriterStartElementNS failed"); - } - - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("xmlns:sdo"), - sdoURI); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("xmlns:sdoxml"), - sdoURI + "/xml"); - - // -------------------------------------------------------------- - // Add all namespaces found in type list - // -------------------------------------------------------------- - int spacecount = 0; - - std::map::iterator it; - - for (i = 0; i::iterator it = namespaceMap.find(uri); - if (it == namespaceMap.end()) - { - char buf[4]; - if (!targetNamespaceURI.isNull() - && !targetNamespaceURI.equals(uri)) - { - sprintf(buf,"%d",++spacecount); - SDOXMLString s = SDOXMLString("tns") + buf; - namespaceMap.insert(make_pair(uri,s)); - } - } - } - - for (it = namespaceMap.begin();it != namespaceMap.end(); ++it) - { - SDOXMLString space = SDOXMLString("xmlns:") + (*it).second; - rc = xmlTextWriterWriteAttribute(writer, - space, (*it).first); - } - - // -------------------------------------------------------------- - // Add targetNamespace if necessary - // -------------------------------------------------------------- - if (!targetNamespaceURI.isNull() && !targetNamespaceURI.equals("")) - { - tns = "tns:"; - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("xmlns:tns"), - targetNamespaceURI); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("targetNamespace"), - targetNamespaceURI); - } - - - // -------------------------------------------------------------- - // Now iterate through the Types creating elements as appropriate - // -------------------------------------------------------------- - for (i = 0; i 0) - { - unsigned int j = type.getAliasCount(); - SDOXMLString value = ""; - for (int i=0;igetURI(), baseType->getName(), targetNamespaceURI); - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("base"), - baseName); - - - rc = xmlTextWriterEndElement(writer); - } - rc = xmlTextWriterEndElement(writer); - - } - else - // --------------------------------------------------------------------- - // DataObject Types become ComplexType definitions with a global element - // --------------------------------------------------------------------- - { - rc = xmlTextWriterStartElementNS(writer,xsd, SDOXMLString("element"), NULL); - if (rc < 0) { - SDO_THROW_EXCEPTION("write", SDOXMLParserException, "xmlTextWriterStartElementNS failed"); - } - - SDOXMLString typeName; - it = namespaceMap.find(type.getURI()); - if (it != namespaceMap.end() && - !targetNamespaceURI.equals((*it).first)) - { - typeName = (*it).second + ":" + name; - } - else - { - typeName = name; - } - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - name.toLower(0,1)); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("type"), - typeName); - - rc = xmlTextWriterEndElement(writer); - - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("complexType"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - typeName); - - // ----------------------------------------------------- - // If there is an alias, write it - // ----------------------------------------------------- - if (type.getAliasCount() > 0) - { - unsigned int j = type.getAliasCount(); - SDOXMLString value = ""; - for (int i=0;i - // ----------------------------------------------------- - if (baseType != 0) - { - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("complexContent"), NULL); - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("extension"), NULL); - - SDOXMLString baseName = resolveName(baseType->getURI(), baseType->getName(), targetNamespaceURI); - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("base"), - baseName); - - // End extension - rc = xmlTextWriterEndElement(writer); - } - - // --------------------------- - // Iterate over the properties - // --------------------------- - PropertyList pl = type.getProperties(); - - if (pl.size() != 0) - { - bool inSequence = false; - - // ------------------------------------------------------- - // Create definitions - // ------------------------------------------------------- - - int j; - for (j = 0; j < pl.size(); j++) - { - const Property& prop = pl[j]; - const Type& propType = prop.getType(); - - SDOXMLString propTypeName = resolveName(propType.getURI(), - propType.getName(), targetNamespaceURI); - - bool isElement = false; - bool isQName = false; - XSDPropertyInfo* pi = (XSDPropertyInfo*) - ((DASProperty*)&prop)->getDASValue("XMLDAS::PropertyInfo"); - if (pi) - { - PropertyDefinitionImpl propdef = pi->getPropertyDefinition(); - if (propdef.isElement) - isElement=true; - if (propdef.isQName) - isQName=true; - } - - if (prop.isMany() - || prop.isContainment() - || isElement) - { - // ------------------------------------------------- - // Write or before first element - // ------------------------------------------------- - if (!inSequence) - { - if (type.isSequencedType()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("mixed"), - SDOXMLString("true")); - - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("choice"), NULL); - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("maxOccurs"), - SDOXMLString("unbounded")); - } - else - { - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("sequence"), NULL); - } - inSequence = true; - } - // ----------------------------- - // Write an definition - // ----------------------------- - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("element"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - SDOXMLString(prop.getName())); - - if (!propType.isDataType() && !prop.isContainment()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("sdoxml:propertyType"), - propTypeName); - propTypeName = "xsd:anyURI"; - } - - if (isQName) - { - propTypeName = "xsd:QName"; - } - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("type"), - propTypeName); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("minOccurs"), - SDOXMLString("0")); - - if (prop.isMany()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("maxOccurs"), - SDOXMLString("unbounded")); - } - - // ----------------------------------------------------- - // If there is an alias... - // ----------------------------------------------------- - if (prop.getAliasCount() > 0) - { - unsigned int j = prop.getAliasCount(); - SDOXMLString value = ""; - for (int i=0;i / if necessary - // ----------------------------------------------------- - if (inSequence) - { - // End sequence - rc = xmlTextWriterEndElement(writer); - } - - // --------------------------------- - // Add ChangeSummary if there is one - // --------------------------------- - if (type.isChangeSummaryType()) - { - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("element"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - SDOXMLString("changeSummary")); - - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("type"), - SDOXMLString("sdo:ChangeSummaryType")); - - rc = xmlTextWriterEndElement(writer); - } - - // ------------------------------------------------------- - // Create definitions - // ------------------------------------------------------- - for (j = 0; j < pl.size(); j++) - { - const Property& prop = pl[j]; - const Type& propType = prop.getType(); - - - SDOXMLString propTypeName = resolveName(propType.getURI(), - propType.getName(), targetNamespaceURI); - - bool isElement = false; - XSDPropertyInfo* pi = (XSDPropertyInfo*) - ((DASProperty*)&prop)->getDASValue("XMLDAS::PropertyInfo"); - if (pi) - { - if (pi->getPropertyDefinition().isElement) - isElement=true; - } - - if (!isElement - && !prop.isMany() - && !prop.isContainment()) - { - // ------------------------------- - // Write an definition - // ------------------------------- - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("attribute"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("name"), - SDOXMLString(prop.getName())); - - if (!propType.isDataType()) - { - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("sdoxml:propertyType"), - propTypeName); - if (prop.isReference()) - { - propTypeName = "xsd:IDREF"; - } - else - { - propTypeName = "xsd:anyURI"; - } - } - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("type"), - propTypeName); - - // End attribute - rc = xmlTextWriterEndElement(writer); - - } - - } - - } - - // ----------------------------------------------------- - // Write open type information - // ----------------------------------------------------- - if (type.isOpenType()) - { - // - - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("any"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("namespace"), - SDOXMLString("##other")); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("processContents"), - SDOXMLString("lax")); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("minOccurs"), - SDOXMLString("0")); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("maxOccurs"), - SDOXMLString("unbounded")); - - - // End element - rc = xmlTextWriterEndElement(writer); - - // ----------------------------------------------------- - // Write open type information 2 - // ----------------------------------------------------- - // - - rc = xmlTextWriterStartElementNS(writer, xsd, SDOXMLString("anyAttribute"), NULL); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("namespace"), - SDOXMLString("##any")); - - rc = xmlTextWriterWriteAttribute(writer, - SDOXMLString("processContents"), - SDOXMLString("lax")); - - // End element - rc = xmlTextWriterEndElement(writer); - - } - - // ----------------------------------------------------- - // End if necessary - // ----------------------------------------------------- - if (baseType != 0) - { - rc = xmlTextWriterEndElement(writer); - } - - - rc = xmlTextWriterEndElement(writer); - } - } - - - // ----------------------------------------------- - // Write any open content from the factory - // ----------------------------------------------- - if (openprops.size() != 0) - { - writeProps(openprops, targetNamespaceURI, xsd); - } - // End the definition - rc = xmlTextWriterEndElement(writer); - return rc; - } - - - // ======================================================================================== - // resolveName - resolve a Type uri and name to xsd equivalent - // ======================================================================================== - SDOXMLString SDOXSDWriter::resolveName(const SDOXMLString& uri, const SDOXMLString& name, const SDOXMLString& targetNamespaceURI) - { - SDOXMLString resolvedName = name; - if (uri.equals(Type::SDOTypeNamespaceURI.c_str())) - { - resolvedName = "xsd:"; - if (name.equalsIgnoreCase("Boolean")) - { - resolvedName += "boolean"; - } - else if (name.equalsIgnoreCase("Byte")) - { - resolvedName += "byte"; - } - else if (name.equalsIgnoreCase("Bytes")) - { - resolvedName += "hexBinary"; - } - else if (name.equalsIgnoreCase("Character")) - { - resolvedName += "string"; - } - else if (name.equalsIgnoreCase("DataObject")) - { - resolvedName += "anyType"; - } - else if (name.equalsIgnoreCase("Date")) - { - resolvedName += "dateTime"; - } - else if (name.equalsIgnoreCase("DateTime")) - { - resolvedName += "dateTime"; - } - else if (name.equalsIgnoreCase("Day")) - { - resolvedName += "gDay"; - } - else if (name.equalsIgnoreCase("Decimal")) - { - resolvedName += "decimal"; - } - else if (name.equalsIgnoreCase("Double")) - { - resolvedName += "double"; - } - else if (name.equalsIgnoreCase("Duration")) - { - resolvedName += "duration"; - } - else if (name.equalsIgnoreCase("Float")) - { - resolvedName += "float"; - } - else if (name.equalsIgnoreCase("Int")) - { - resolvedName += "int"; - } - else if (name.equalsIgnoreCase("Integer")) - { - resolvedName += "integer"; - } - else if (name.equalsIgnoreCase("Long")) - { - resolvedName += "long"; - } - else if (name.equalsIgnoreCase("Month")) - { - resolvedName += "gMonth"; - } - else if (name.equalsIgnoreCase("MonthDay")) - { - resolvedName += "gMonthDay"; - } - else if (name.equalsIgnoreCase("Object")) - { - resolvedName += "anySimpleType"; - } - else if (name.equalsIgnoreCase("Short")) - { - resolvedName += "short"; - } - else if (name.equals("String")) - { - resolvedName += "String"; - } - else if (name.equalsIgnoreCase("Strings")) - { - resolvedName += "string"; - } - else if (name.equalsIgnoreCase("Time")) - { - resolvedName += "time"; - } - else if (name.equalsIgnoreCase("Year")) - { - resolvedName += "gYear"; - } - else if (name.equalsIgnoreCase("YearMonth")) - { - resolvedName += "gYearMonth"; - } - else if (name.equalsIgnoreCase("YearMonthDay")) - { - resolvedName += "date"; - } - else if (name.equalsIgnoreCase("URI")) - { - resolvedName += "anyURI"; - } - else - { - resolvedName += "String"; - } - } - else if (!targetNamespaceURI.isNull() && uri.equals(targetNamespaceURI)) - { - resolvedName = "tns:"; - resolvedName += name; - } - else - { - SDOXMLString propTypeName; - std::map::iterator it; - it = namespaceMap.find(uri); - if (it != namespaceMap.end() && - !targetNamespaceURI.equals((*it).first)) - { - resolvedName = (*it).second + ":" + name; - } - } - - return resolvedName; - } - - - - } // End - namespace sdo -} // End - namespace commonj - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.h deleted file mode 100644 index 7ba5b2421d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SDOXSDWriter.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDOXSDWRITER_H_ -#define _SDOXSDWRITER_H_ - -#include "commonj/sdo/disable_warn.h" - -#include -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/DataFactoryImpl.h" - - -namespace commonj -{ - namespace sdo - { - -/** - * SDOXSDWriter writes XSD from types and properties. - * The writer takes the contents of a data factory and writes an - * XSD which will be usable to serialize data from the graph. - */ - class SDOXSDWriter - { - - public: - - SDOXSDWriter(DataFactoryPtr dataFactory = NULL); - - virtual ~SDOXSDWriter(); - - int write(const TypeList& types, const SDOXMLString& targetNamespaceURI, - const propertyMap& openprops, int indent = -1); - - protected: - void setWriter(xmlTextWriterPtr textWriter); - void freeWriter(); - - private: - xmlTextWriterPtr writer; - - std::map namespaceMap; - - void writeProps( const propertyMap& pl, const SDOXMLString& targetNamespaceURI, - SDOXMLString& xsd); - int writeDO(DataObjectPtr dataObject, const SDOXMLString& elementName); - - DataFactoryPtr dataFactory; - - SDOXMLString resolveName(const SDOXMLString& uri, const SDOXMLString& name, const SDOXMLString& targetNamespaceURI); - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SDOXSDWRITER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.cpp deleted file mode 100644 index 10a5870ae0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SchemaInfo.h" -namespace commonj -{ - namespace sdo - { - - SchemaInfo::SchemaInfo() - : targetNamespaceURI("") - { - } - - SchemaInfo::~SchemaInfo() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.h deleted file mode 100644 index 4beb0108f5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SchemaInfo.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SCHEMAINFO_H_ -#define _SCHEMAINFO_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/DataObject.h" - -namespace commonj -{ - namespace sdo - { - -/** - * - * SchemaInfo holds information supplied by the parser on the schema - * held in an XSD - */ - class SchemaInfo - { - - public: - SDO_SPI SchemaInfo(); - SDO_SPI virtual ~SchemaInfo(); - - SDO_SPI SAX2Namespaces& getSchemaNamespaces() {return schemaNamespaces;} - - SDO_SPI const SDOXMLString& getTargetNamespaceURI() const {return targetNamespaceURI;} - SDO_SPI void setTargetNamespaceURI(const SDOXMLString& URI) {targetNamespaceURI = URI;} - - private: - SAX2Namespaces schemaNamespaces; - SDOXMLString targetNamespaceURI; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_SCHEMAINFO_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.cpp deleted file mode 100644 index fcf252ece1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SdoCheck.h" - -extern "C" { - SDO_API int SDOCheck(void) - { - return 0; - } -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.h deleted file mode 100644 index 858009dee3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoCheck.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/export.h" - - -/** - * SDOCheck is a simple C method which can be called to verify that - * this is an SDO library - this is used in building - */ - -extern "C" { - SDO_API int SDOCheck(void); -} - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.cpp deleted file mode 100644 index 54fcc8c2fc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SdoRuntime.h" -#include -#include - -namespace commonj{ -namespace sdo{ - - -const unsigned int SdoRuntime::major = 0; -const unsigned int SdoRuntime::minor = 9; -const unsigned int SdoRuntime::fix =4; -char* SdoRuntime::version = 0; - - - -const char* SdoRuntime::getVersion() -{ - if (SdoRuntime::version == 0) - { - SdoRuntime::version = new char[11]; - sprintf(SdoRuntime::version,"%02d:%02d:%04d", - SdoRuntime::major, SdoRuntime::minor, SdoRuntime::fix); - } - return (const char *)SdoRuntime::version; - -} - -const unsigned int SdoRuntime::getMajor() -{ - return SdoRuntime::major; -} - -const unsigned int SdoRuntime::getMinor() -{ - return SdoRuntime::minor; -} - -const unsigned int SdoRuntime::getFix() -{ - return SdoRuntime::fix; -} - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.h deleted file mode 100644 index 3503307939..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SdoRuntime.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SDO_RUNTIME_H -#define SDO_RUNTIME_H -#include "commonj/sdo/export.h" - -namespace commonj{ -namespace sdo{ - -/** - * SDORuntime gives information about the version of the library. - */ - -class SdoRuntime -{ - public: - - virtual ~SdoRuntime(); - - /** - * The version as a string major:minor:fix - */ - - static SDO_API const char* getVersion(); - - /** - * The major version as an integer. - */ - - static SDO_API const unsigned int getMajor(); - - /** - * The minor version as an integer. - */ - - static SDO_API const unsigned int getMinor(); - - /** - * The fix level as an integer. - */ - - static SDO_API const unsigned int getFix(); - - - private: - static const unsigned int major; - static const unsigned int minor; - static const unsigned int fix; - static char* version; - -}; -}; -}; - - -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.cpp deleted file mode 100644 index 489fb3f505..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" - -#include "commonj/sdo/Sequence.h" - -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SDORuntimeException.h" - - -namespace commonj{ -namespace sdo{ - -// all delegated to sequenceimpl -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.h deleted file mode 100644 index a697119460..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Sequence.h +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SEQUENCE_H_ -#define _SEQUENCE_H_ - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/RefCountingObject.h" -#include "commonj/sdo/RefCountingPointer.h" -#include "commonj/sdo/SDODate.h" -#include "commonj/sdo/Type.h" - - -namespace commonj{ -namespace sdo{ - -class Property; /* forward declaration */ -class DataObject; - -/** - * A sequence is a heterogeneous list of properties and corresponding values. - * It represents an ordered arbitrary mixture of data values from more - * than one property of a {@link DataObject data object}. - */ - -class Sequence : public RefCountingObject -{ - public: - /** size() returns the number of elements - * - * Returns the number of entries in the sequence. - */ - - SDO_API virtual unsigned int size() = 0; - - /** - * - * A Sequence element is either a free text item, or represents a property - * setting. If the element is a property setting, then the information - * held in the element consists of: - * -# The property which was set. - * -# The element of that property if it was many valued. - * -# The value which was set. - * - * If the sequence element is text, then there is no property, and only the - * methods for text retrieval will work. Use the isText() method to check - * before calling getProperty(). - */ - - SDO_API virtual const Property& getProperty(unsigned int index) = 0; - - /** - * Return the data object associated with this sequence - */ - - SDO_API virtual const DataObjectPtr getDataObject() = 0; - - /** - * - * The element of that property if it was many valued. Zero if the - * property was single valued. - */ - - SDO_API virtual unsigned int getListIndex(unsigned int index) = 0; - - /** - * - * The element contains the actual value set within the property. The - * method required to get that value will vary depending on the type - * of the property. This is shorthand for getProperty.getTypeEnum(). - */ - - SDO_API virtual Type::Types getTypeEnum(unsigned int index) = 0; - - /** - * - * This method searched the sequence for a setting which corresponds - * to the specified index of the specified property. Searches for single - * valued property settings may omit the pindex parameter. - */ - - - SDO_API virtual unsigned int getIndex(const Property& p, unsigned int pindex=0) = 0; - SDO_API virtual unsigned int getIndex(const char* propName, unsigned int pindex=0) = 0; - - /** - * - * These methods retrieve the setting according to the type of the - * property concerned. If a retrieval method is used which does not correspond to - * the correct type, a conversion will be performed, or an illegal conversion - * exception will be thrown. - */ - - SDO_API virtual const char* getCStringValue(unsigned int index) = 0; - SDO_API virtual bool getBooleanValue(unsigned int index) = 0; - SDO_API virtual char getByteValue(unsigned int index) = 0; - SDO_API virtual wchar_t getCharacterValue(unsigned int index) = 0; - SDO_API virtual unsigned int getStringValue(unsigned int index, wchar_t* val, unsigned int max) = 0; - SDO_API virtual unsigned int getBytesValue(unsigned int index, char* val, unsigned int max) = 0; - SDO_API virtual short getShortValue(unsigned int index) = 0; - SDO_API virtual long getIntegerValue(unsigned int index) = 0; - SDO_API virtual int64_t getLongValue(unsigned int index) = 0; - SDO_API virtual float getFloatValue(unsigned int index) = 0; - SDO_API virtual long double getDoubleValue(unsigned int index) = 0; - SDO_API virtual const SDODate getDateValue(unsigned int index) = 0; - SDO_API virtual DataObjectPtr getDataObjectValue(unsigned int index) = 0; - - /** - * - * getlength applies to string and byte buffer types, and allows the - * client to allocate the correct size of buffer before retrieving the - * value. - */ - - SDO_API virtual unsigned int getLength(unsigned int index) = 0; - - - /** - * - * The setter methods use an element of the sequence to perform a - * property setting. The value in the sequence is updated, and so is the - * rel value of the property in the data object. - */ - - SDO_API virtual void setCStringValue( unsigned int index, const char* s ) = 0; - SDO_API virtual void setBooleanValue( unsigned int index, bool b ) = 0; - SDO_API virtual void setByteValue( unsigned int index, char c ) = 0; - SDO_API virtual void setCharacterValue( unsigned int index, wchar_t c ) = 0; - SDO_API virtual void setStringValue( unsigned int index, const wchar_t* s , unsigned int len) = 0; - SDO_API virtual void setBytesValue( unsigned int index, const char* s , unsigned int len) = 0; - SDO_API virtual void setShortValue( unsigned int index, short s ) = 0; - SDO_API virtual void setIntegerValue( unsigned int index, long i ) = 0; - SDO_API virtual void setLongValue( unsigned int index, int64_t l ) = 0; - SDO_API virtual void setFloatValue( unsigned int index, float f ) = 0; - SDO_API virtual void setDoubleValue(unsigned int index, long double d ) = 0; - SDO_API virtual void setDateValue(unsigned int index, const SDODate t ) = 0; - SDO_API virtual void setDataObjectValue(unsigned int index, DataObjectPtr d ) = 0; - - - /** - * - * Sequences may be added to by usign the addXXX methods. These provoke - * a setting of the real value of the property concerned, and also append - * an element to the sequence to reflect that setting. - * Additions may be performed based on property name, property index or - * the Property itself. - */ - - SDO_API virtual bool addCString( const char* propertyName,const char* s ) = 0; - SDO_API virtual bool addBoolean( const char* propertyName,bool b ) = 0; - SDO_API virtual bool addByte( const char* propertyName,char c ) = 0; - SDO_API virtual bool addCharacter( const char* propertyName,wchar_t c ) = 0; - SDO_API virtual bool addString( const char* propertyName,const wchar_t* s , unsigned int len) = 0; - SDO_API virtual bool addBytes ( const char* propertyName,const char* s , unsigned int len) = 0; - SDO_API virtual bool addShort( const char* propertyName,short s ) = 0; - SDO_API virtual bool addInteger( const char* propertyName,long i ) = 0; - SDO_API virtual bool addLong( const char* propertyName,int64_t l ) = 0; - SDO_API virtual bool addFloat( const char* propertyName,float f ) = 0; - SDO_API virtual bool addDouble(const char* propertyName,long double d ) = 0; - SDO_API virtual bool addDate(const char* propertyName,const SDODate t ) = 0; - SDO_API virtual bool addDataObject(const char* propertyName,DataObjectPtr d ) = 0; - - - SDO_API virtual bool addCString( unsigned int propertyIndex,const char* s ) = 0; - SDO_API virtual bool addBoolean( unsigned int propertyIndex,bool b ) = 0; - SDO_API virtual bool addByte( unsigned int propertyIndex,char c ) = 0; - SDO_API virtual bool addCharacter( unsigned int propertyIndex,wchar_t c ) = 0; - SDO_API virtual bool addString( unsigned int propertyIndex,const wchar_t* s , unsigned int len) = 0; - SDO_API virtual bool addBytes( unsigned int propertyIndex,const char* s , unsigned int len) = 0; - SDO_API virtual bool addShort( unsigned int propertyIndex,short s ) = 0; - SDO_API virtual bool addInteger( unsigned int propertyIndex,long i ) = 0; - SDO_API virtual bool addLong( unsigned int propertyIndex,int64_t l ) = 0; - SDO_API virtual bool addFloat( unsigned int propertyIndex,float f ) = 0; - SDO_API virtual bool addDouble(unsigned int propertyIndex,long double d ) = 0; - SDO_API virtual bool addDate(unsigned int propertyIndex,const SDODate t ) = 0; - SDO_API virtual bool addDataObject(unsigned int propertyIndex,DataObjectPtr d ) = 0; - - - - SDO_API virtual bool addCString( const Property& property,const char* s ) = 0; - SDO_API virtual bool addBoolean( const Property& property,bool b ) = 0; - SDO_API virtual bool addByte( const Property& property,char c ) = 0; - SDO_API virtual bool addCharacter( const Property& property,wchar_t c ) = 0; - SDO_API virtual bool addString ( const Property& property,const wchar_t* s , unsigned int len) = 0; - SDO_API virtual bool addBytes( const Property& property,const char* s , unsigned int len) = 0; - SDO_API virtual bool addShort( const Property& property,short s ) = 0; - SDO_API virtual bool addInteger( const Property& property,long i ) = 0; - SDO_API virtual bool addLong( const Property& property,int64_t l ) = 0; - SDO_API virtual bool addFloat( const Property& property,float f ) = 0; - SDO_API virtual bool addDouble(const Property& property,long double d ) = 0; - SDO_API virtual bool addDate(const Property& property,const SDODate t ) = 0; - SDO_API virtual bool addDataObject(const Property& property,DataObjectPtr d ) = 0; - - - /** - * - * Sequences may be added to by usign the addXXX methods. These provoke - * a setting of the real value of the property concerned, and also append - * an element to the sequence to reflect that setting. - * Additions may be performed based on property name, property index or - * the Property itself. - * The add method also has an override to allow insertion of a sequence element - * before any index. - */ - - SDO_API virtual bool addCString( unsigned int index,const char* propertyName,const char* s ) = 0; - SDO_API virtual bool addBoolean( unsigned int index,const char* propertyName,bool b ) = 0; - SDO_API virtual bool addByte( unsigned int index,const char* propertyName,char c ) = 0; - SDO_API virtual bool addCharacter( unsigned int index,const char* propertyName,wchar_t c ) = 0; - SDO_API virtual bool addString( unsigned int index,const char* propertyName,const wchar_t* s, unsigned int len ) = 0; - SDO_API virtual bool addBytes( unsigned int index,const char* propertyName,const char* s , unsigned int len) = 0; - SDO_API virtual bool addShort( unsigned int index,const char* propertyName,short s ) = 0; - SDO_API virtual bool addInteger( unsigned int index,const char* propertyName,long i ) = 0; - SDO_API virtual bool addLong( unsigned int index,const char* propertyName,int64_t l ) = 0; - SDO_API virtual bool addFloat( unsigned int index,const char* propertyName,float f ) = 0; - SDO_API virtual bool addDouble(unsigned int index,const char* propertyName,long double d ) = 0; - SDO_API virtual bool addDate(unsigned int index,const char* propertyName,const SDODate t ) = 0; - SDO_API virtual bool addDataObject(unsigned int index,const char* propertyName,DataObjectPtr d ) = 0; - - - SDO_API virtual bool addCString( unsigned int index,unsigned int propertyIndex,const char* s ) = 0; - SDO_API virtual bool addBoolean( unsigned int index,unsigned int propertyIndex,bool b ) = 0; - SDO_API virtual bool addByte( unsigned int index,unsigned int propertyIndex,char c ) = 0; - SDO_API virtual bool addCharacter( unsigned int index,unsigned int propertyIndex,wchar_t c ) = 0; - SDO_API virtual bool addString( unsigned int index,unsigned int propertyIndex,const wchar_t* s , unsigned int len) = 0; - SDO_API virtual bool addBytes( unsigned int index,unsigned int propertyIndex,const char* s , unsigned int len) = 0; - SDO_API virtual bool addShort( unsigned int index,unsigned int propertyIndex,short s ) = 0; - SDO_API virtual bool addInteger( unsigned int index,unsigned int propertyIndex,long i ) = 0; - SDO_API virtual bool addLong( unsigned int index,unsigned int propertyIndex,int64_t l ) = 0; - SDO_API virtual bool addFloat( unsigned int index,unsigned int propertyIndex,float f ) = 0; - SDO_API virtual bool addDouble(unsigned int index,unsigned int propertyIndex,long double d ) = 0; - SDO_API virtual bool addDate(unsigned int index,unsigned int propertyIndex,const SDODate t ) = 0; - SDO_API virtual bool addDataObject(unsigned int index,unsigned int propertyIndex,DataObjectPtr d ) = 0; - - - SDO_API virtual bool addCString( unsigned int index,const Property& property,const char* s ) = 0; - SDO_API virtual bool addBoolean( unsigned int index,const Property& property,bool b ) = 0; - SDO_API virtual bool addByte( unsigned int index,const Property& property,char c ) = 0; - SDO_API virtual bool addCharacter( unsigned int index,const Property& property,wchar_t c ) = 0; - SDO_API virtual bool addString( unsigned int index,const Property& property,const wchar_t* s , unsigned int len) = 0; - SDO_API virtual bool addBytes( unsigned int index,const Property& property,const char* s , unsigned int len) = 0; - SDO_API virtual bool addShort( unsigned int index,const Property& property,short s ) = 0; - SDO_API virtual bool addInteger( unsigned int index,const Property& property,long i ) = 0; - SDO_API virtual bool addLong( unsigned int index,const Property& property,int64_t l ) = 0; - SDO_API virtual bool addFloat( unsigned int index,const Property& property,float f ) = 0; - SDO_API virtual bool addDouble(unsigned int index,const Property& property,long double d ) = 0; - SDO_API virtual bool addDate(unsigned int index,const Property& property,const SDODate t ) = 0; - SDO_API virtual bool addDataObject(unsigned int index,const Property& property,DataObjectPtr d ) = 0; - - - /** remove() removes an item. - * - * Remove the item at the specified index in the sequence. - * This has no effect on the value of the property in the data object, - * but the setting is no longer recorded. - */ - SDO_API virtual void remove(unsigned int index) = 0; - SDO_API virtual void removeAll(const Property& p) = 0; - - /** - * Moves an entry in the sequence from one index to another. This - * makes the entry appear to have been set at a different point in - * the sequence, but does not alter the actual value set. - */ - - SDO_API virtual void move(unsigned int toIndex, unsigned int fromIndex) = 0; - - /** - * The text setting APIs add an element to the sequence which - * is not a property setting. - * This is text which may be retieved in sequence with the settings. - */ - - SDO_API virtual bool addText(const char* text) = 0; - SDO_API virtual bool addText(unsigned int index, const char* text) = 0; - SDO_API virtual bool setText(unsigned int index, const char* text) = 0; - - /** - * isText returns true if the element is not a property setting. - * This method should be used before getting the Property, to avoid an - * exception - */ - - SDO_API virtual bool isText(unsigned int index) = 0; - -}; - - -}; -}; - -#endif //_SEQUENCE_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp deleted file mode 100644 index 53a576bd7c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.cpp +++ /dev/null @@ -1,987 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/disable_warn.h" -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" - -#include "commonj/sdo/SequenceImpl.h" - -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/DataObjectImpl.h" -#include "commonj/sdo/SDORuntimeException.h" -using namespace std; - - -#define CHECK_RANGE\ - if (index >= the_list.size()){\ - std::string msg("Index out of range:");\ - msg += index;\ - SDO_THROW_EXCEPTION("Sequence API", SDOIndexOutOfRangeException,\ - msg.c_str());\ - }\ - unsigned int j = 0;\ - for (i = the_list.begin(); (j < index) && (i != the_list.end()); ++i)\ - {\ - j++;\ - } - - -namespace commonj{ -namespace sdo{ - - SequenceImpl::SequenceImpl() - { - SDO_THROW_EXCEPTION("Sequence constructor", SDORuntimeException,\ - "SequenceImpl::construction without a data object");\ - } - - SequenceImpl::SequenceImpl(DataObject* indo) - { - the_do = (DataObjectImpl*)indo; - } - - SequenceImpl::SequenceImpl(SequenceImpl* inseq) - { - // take a copy of the_list - the_list = inseq->the_list; - } - - unsigned int SequenceImpl::size() - { - return the_list.size(); - } - - - /** - * Return the data object associated with this sequence - */ - - const DataObjectPtr SequenceImpl::getDataObject() - { - return the_do; - } - - const Property& SequenceImpl::getProperty(unsigned int index) - { - SEQUENCE_ITEM_LIST::iterator i; - - if (isText(index)) - { - std::string msg("Cannot get property of a text item"); - msg += index; - SDO_THROW_EXCEPTION("getProperty", SDOUnsupportedOperationException, - msg.c_str()); - } - - unsigned int j = 0; - for (i = the_list.begin() ; (j < index) && (i != the_list.end()); ++i){j++;} - - if (i != the_list.end()) { - return *((*i).getProp()); - } - std::string msg("Index out of range:"); - msg += index; - SDO_THROW_EXCEPTION("getProperty", SDOIndexOutOfRangeException, - msg.c_str()); - } - - Type::Types SequenceImpl::getTypeEnum(unsigned int index) - { - SEQUENCE_ITEM_LIST::iterator i; - - unsigned int j = 0; - for (i = the_list.begin() ; (j < index) && (i != the_list.end()); ++i){j++;} - - if (i != the_list.end()) { - if ((*i).getProp() == 0) { - // text type - return Type::TextType; - } - return (*i).getProp()->getTypeEnum(); - } - std::string msg("Index out of range:"); - msg += index; - SDO_THROW_EXCEPTION("getTypeEnum", SDOIndexOutOfRangeException, - msg.c_str()); - } - - unsigned int SequenceImpl::getListIndex(unsigned int index) - { - SEQUENCE_ITEM_LIST::iterator i; - unsigned int j = 0; - for (i = the_list.begin() ; (j < index) && (i != the_list.end()); ++i){j++;} - - if (i != the_list.end()) { - if ((*i).getProp() == 0) - { - std::string msg("Get list index on text property"); - SDO_THROW_EXCEPTION("getListIndex", SDOUnsupportedOperationException, - msg.c_str()); - } - if ( (*i).getProp()->isMany()) - { - return (*i).getIndex(); - } - else - { - std::string msg("Get list index on text single valued property"); - SDO_THROW_EXCEPTION("getListIndex", SDOUnsupportedOperationException, - msg.c_str()); - } - } - std::string msg("Index out of range:"); - msg += index; - SDO_THROW_EXCEPTION("getListIndex", SDOIndexOutOfRangeException, - msg.c_str()); - } - - unsigned int SequenceImpl::getIndex(const char* propName, unsigned int pindex) - { - SEQUENCE_ITEM_LIST::iterator i; - unsigned int j = 0; - for (i=the_list.begin(), j=0;i != the_list.end();++i,++j) { - const Property* p = (*i).getProp(); - if (p == 0 ) continue; // avoid text - if (!strcmp(p->getName(), propName)) { - if (p->isMany()) - { - if( pindex == (*i).getIndex())return j; - } - else { - return j; - } - } - } - SDO_THROW_EXCEPTION("getIndex", SDOIndexOutOfRangeException, - "SequenceImpl::getIndex - property Setting not in sequence"); - } - - unsigned int SequenceImpl::getIndex(const Property& p, unsigned int pindex) - { - return getIndex(p.getName(), pindex); - } - - /////////////////////////////////////////////////////////////////////////// - // specific getters for prims and data objects - /////////////////////////////////////////////////////////////////////////// - - -#define StringGetter(returntype,primtype,defval)\ - returntype SequenceImpl::get##primtype##Value(unsigned int index)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - CHECK_RANGE;\ - const Property* p = (*i).getProp();\ - if (p == 0) {\ - return (*i).getText();\ - }\ - if (p->isMany())\ - {\ - DataObjectList& dol = the_do->getList(*p);\ - DataObject* list_do = dol[(*i).getIndex()];\ - if (list_do != 0)\ - {\ - return ((DataObjectImpl*)list_do)->get##primtype();\ - }\ - return defval;\ - }\ - return the_do->get##primtype(*((*i).getProp()));\ - } - -#define getter(returntype,primtype,defval)\ - returntype SequenceImpl::get##primtype##Value(unsigned int index)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - CHECK_RANGE;\ - const Property* p = (*i).getProp();\ - if (p == 0) {\ - return defval;\ - }\ - if (p->isMany())\ - {\ - DataObjectList& dol = the_do->getList(*p);\ - DataObject* list_do = dol[(*i).getIndex()];\ - if (list_do != 0)\ - {\ - return ((DataObjectImpl*)list_do)->get##primtype();\ - }\ - return defval;\ - }\ - return the_do->get##primtype(*((*i).getProp()));\ - } - -#define ObjectGetter(returntype,primtype,defval)\ - returntype SequenceImpl::get##primtype##Value(unsigned int index)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - CHECK_RANGE;\ - const Property* p = (*i).getProp();\ - if (p == 0) {\ - return defval;\ - }\ - if (p->isMany())\ - {\ - DataObjectList& dol = the_do->getList(*p);\ - DataObject* list_do = dol[(*i).getIndex()];\ - if (list_do != 0)\ - {\ - return list_do;\ - }\ - return defval;\ - }\ - return the_do->get##primtype(*((*i).getProp()));\ - } - -#define CharGetter(returntype,primtype,defval)\ - unsigned int SequenceImpl::get##primtype##Value(unsigned int index, returntype ptr, unsigned int max)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - CHECK_RANGE;\ - const Property* p = (*i).getProp();\ - if (p == 0) {\ - return defval;\ - }\ - if (p->isMany())\ - {\ - DataObjectList& dol = the_do->getList(*p);\ - DataObject* list_do = dol[(*i).getIndex()];\ - if (list_do != 0)\ - {\ - return ((DataObjectImpl*)list_do)->get##primtype(ptr, max);\ - }\ - return defval;\ - }\ - return the_do->get##primtype(*((*i).getProp()), ptr, max);\ - } - - -StringGetter(const char* , CString, 0); - -CharGetter( wchar_t* , String, 0); -CharGetter( char*, Bytes, 0); - -unsigned int SequenceImpl::getLength(unsigned int index) -{ - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - const Property* p = (*i).getProp(); - switch (p->getTypeEnum()) - { - case Type::StringType: - return getStringValue(index,0,0); - case Type::BytesType: - return getBytesValue(index,0,0); - default: - return 0; - } -} - -getter(bool, Boolean, false); -getter(char, Byte, (char)0); -getter(wchar_t, Character, 0); -getter(short, Short, 0); -getter(long, Integer, 0L); -getter(int64_t, Long, 0); -getter(float, Float, (float)0); -getter(long double, Double, 0); -getter(const SDODate, Date, 0); - -ObjectGetter(RefCountingPointer , DataObject, 0); - - - /////////////////////////////////////////////////////////////////////////// - // generic getter for those types which support it - /////////////////////////////////////////////////////////////////////////// - - void SequenceImpl::setCStringValue( unsigned int index, const char* s ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - (*i).setText(s); - return; - } - the_do->setCString(*((*i).getProp()),s); - - } - void SequenceImpl::setBooleanValue( unsigned int index, bool b ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setBoolean(*((*i).getProp()),b); - } - - void SequenceImpl::setByteValue( unsigned int index, char c ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setByte(*((*i).getProp()),c); - } - - void SequenceImpl::setCharacterValue( unsigned int index, wchar_t c ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setCharacter(*((*i).getProp()),c); - } - void SequenceImpl::setStringValue( unsigned int index, const wchar_t* s , unsigned int len) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setString(*((*i).getProp()),s, len); - } - void SequenceImpl::setBytesValue( unsigned int index, const char* s , unsigned int len) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setBytes(*((*i).getProp()),s, len); - } - void SequenceImpl::setShortValue( unsigned int index, short s ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setShort(*((*i).getProp()),s); - } - - void SequenceImpl::setIntegerValue( unsigned int index, long l) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setInteger(*((*i).getProp()),l); - } - - - void SequenceImpl::setLongValue( unsigned int index, int64_t l ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setLong(*((*i).getProp()),l); - } - - void SequenceImpl::setFloatValue( unsigned int index, float f ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setFloat(*((*i).getProp()),f); - } - - - void SequenceImpl::setDoubleValue(unsigned int index, long double d ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setDouble(*((*i).getProp()),d); - } - - void SequenceImpl::setDateValue(unsigned int index, const SDODate t ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setDate(*((*i).getProp()),t); - } - - void SequenceImpl::setDataObjectValue(unsigned int index, DataObjectPtr d ) - { - SEQUENCE_ITEM_LIST::iterator i; - CHECK_RANGE; - if ((*i).getProp() == 0) { - return; - } - the_do->setDataObject(*((*i).getProp()),d); - } - - -#define doadder(primtype,primval)\ - bool SequenceImpl::add##primtype(const char* propertyName, primval v)\ - {\ - const PropertyImpl* p = the_do->getPropertyImpl(propertyName);\ - if (p == 0)\ - {\ - if (the_do->getType().isOpenType())\ - {\ - p = the_do->define ##primtype (propertyName, v->getType());\ - }\ - if (p == 0)\ - {\ - std::string msg("Cannot find property:");\ - msg += propertyName;\ - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException,\ - msg.c_str());\ - }\ - }\ - return add##primtype((const Property&)*p,v);\ - }\ - bool SequenceImpl::add##primtype(unsigned int propertyIndex, primval v)\ - {\ - return add##primtype(the_do->getProperty(propertyIndex), v);\ - }\ - bool SequenceImpl::add##primtype(const Property& p, primval v)\ - {\ - if (p.isMany())\ - {\ - DataObjectList& dol = the_do->getList(p);\ - dol.append((primval)v);\ - /* the_list.push_back(seq_item(&p,dol.size()-1));*/\ - return true;\ - }\ - SEQUENCE_ITEM_LIST::iterator i;\ - for (i=the_list.begin();i != the_list.end();++i) {\ - const Property* pp = (*i).getProp();\ - if (pp == 0) continue;\ - if (!strcmp(pp->getName(),p.getName()))\ - {\ - SDO_THROW_EXCEPTION("add", SDOUnsupportedOperationException,\ - "Sequence::add of property which already exists in sequence");\ - }\ - }\ - the_do->set##primtype(p,v);\ - the_list.push_back(seq_item(&p,0));\ - return true;\ - } - - -#define adder(primtype,primval, platval)\ - bool SequenceImpl::add##primtype(const char* propertyName, primval v)\ - {\ - const PropertyImpl* p = the_do->getPropertyImpl(propertyName);\ - if (p == 0)\ - {\ - if (the_do->getType().isOpenType())\ - {\ - p = the_do->define ##primtype (propertyName);\ - }\ - if (p == 0)\ - {\ - std::string msg("Cannot find property:");\ - msg += propertyName;\ - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException,\ - msg.c_str());\ - }\ - }\ - return add##primtype((const Property&)*p,v);\ - }\ - bool SequenceImpl::add##primtype(unsigned int propertyIndex, primval v)\ - {\ - return add##primtype(the_do->getProperty(propertyIndex), v);\ - }\ - bool SequenceImpl::add##primtype(const Property& p, primval v)\ - {\ - if (p.isMany())\ - {\ - DataObjectList& dol = the_do->getList(p);\ - dol.append((platval)v);\ - /* the_list.push_back(seq_item(&p,dol.size()-1));*/\ - return true;\ - }\ - SEQUENCE_ITEM_LIST::iterator i;\ - for (i=the_list.begin();i != the_list.end();++i) {\ - const Property* pp = (*i).getProp();\ - if (pp == 0) continue;\ - if (!strcmp(pp->getName(),p.getName()))\ - {\ - SDO_THROW_EXCEPTION("add", SDOUnsupportedOperationException,\ - "Sequence::add of property which already exists in sequence");\ - }\ - }\ - the_do->set##primtype(p,v);\ - the_list.push_back(seq_item(&p,0));\ - return true;\ - } - -adder( CString , const char* , const char* ); -adder( Boolean, bool, bool); -adder( Byte, char , char ); -adder(Character, wchar_t, wchar_t); -adder(Short, short, short); -#if __WORDSIZE ==64 -adder(Integer, long, int64_t); -#else -adder(Integer, long, long); -#endif -adder(Long, int64_t, int64_t); -adder(Float, float, float); -adder(Double, long double, long double); -adder(Date, const SDODate, const SDODate); -doadder(DataObject, RefCountingPointer ); - - -#define charAdder(primtype,primval)\ - bool SequenceImpl::add##primtype(const char* propertyName, primval v, unsigned int len)\ - {\ - const PropertyImpl* p = the_do->getPropertyImpl(propertyName);\ - if (p == 0)\ - {\ - if (the_do->getType().isOpenType())\ - {\ - p = the_do->define ##primtype (propertyName);\ - }\ - if (p == 0)\ - {\ - std::string msg("Cannot find property:");\ - msg += propertyName;\ - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException,\ - msg.c_str());\ - }\ - }\ - return add##primtype((const Property&)*p,v, len);\ - }\ - bool SequenceImpl::add##primtype(unsigned int propertyIndex, primval v, unsigned int len)\ - {\ - return add##primtype(the_do->getProperty(propertyIndex), v, len);\ - }\ - bool SequenceImpl::add##primtype(const Property& p, primval v, unsigned int len)\ - {\ - if (p.isMany())\ - {\ - DataObjectList& dol = the_do->getList(p);\ - dol.append((primval)v, len);\ - /*the_list.push_back(seq_item(&p,dol.size()-1));*/\ - return true;\ - }\ - SEQUENCE_ITEM_LIST::iterator i;\ - for (i=the_list.begin();i != the_list.end();++i) {\ - const Property* pp = (*i).getProp();\ - if (pp == 0) continue;\ - if (!strcmp(pp->getName(),p.getName()))\ - {\ - SDO_THROW_EXCEPTION("add", SDOUnsupportedOperationException,\ - "Sequence::add of property which already exists in sequence");\ - }\ - }\ - the_do->set##primtype(p,v, len);\ - the_list.push_back(seq_item(&p,0));\ - return true;\ - } - - -charAdder ( String, const wchar_t* ); -charAdder ( Bytes , const char* ); - - -#define inserter(primtype,primval, platval)\ - bool SequenceImpl::add##primtype(unsigned int index, const char* propertyName, primval v)\ - {\ - const PropertyImpl* p = the_do->getPropertyImpl(propertyName);\ - if (p == 0)\ - {\ - if (the_do->getType().isOpenType())\ - {\ - p = the_do->define ##primtype (propertyName);\ - }\ - if (p == 0)\ - {\ - std::string msg("Cannot find property:");\ - msg += propertyName;\ - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException,\ - msg.c_str());\ - }\ - }\ - return add##primtype(index,(const Property&)*p,v);\ - }\ - bool SequenceImpl::add##primtype(unsigned int index, unsigned int propertyIndex, primval v)\ - {\ - return add##primtype(index,the_do->getProperty(propertyIndex), v);\ - }\ - bool SequenceImpl::add##primtype(unsigned int index, const Property& p, primval v)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - SEQUENCE_ITEM_LIST::iterator i2 = the_list.end();\ - int j;\ - if (index >= the_list.size()) {\ - return add##primtype(p,v);\ - }\ - if (p.isMany())\ - {\ - DataObjectList& dol = the_do->getList(p);\ - dol.append((platval)v);\ - j = 0;\ - for (i=the_list.begin();(j < index) && (i != the_list.end());++i) {\ - j++;\ - }\ - /*the_list.insert(i,seq_item(&p,dol.size()-1));*/\ - return true;\ - }\ - j = 0;\ - for (i=the_list.begin();i != the_list.end();++i) {\ - const Property* pp = (*i).getProp();\ - if (pp == 0) continue;\ - if (!strcmp(pp->getName(),p.getName()))\ - {\ - SDO_THROW_EXCEPTION("Insert", SDOUnsupportedOperationException,\ - "Sequence::insert of property which already exists in sequence");\ - }\ - if (j == index) {\ - i2 = i;\ - }\ - j++;\ - }\ - the_do->set##primtype(p,v);\ - the_list.insert(i2,seq_item(&p,0));\ - return true;\ - } - -#define doinserter(primtype,primval)\ - bool SequenceImpl::add##primtype(unsigned int index, const char* propertyName, primval v)\ - {\ - const PropertyImpl* p = the_do->getPropertyImpl(propertyName);\ - if (p == 0)\ - {\ - if (the_do->getType().isOpenType())\ - {\ - p = the_do->define ##primtype (propertyName, v->getType());\ - }\ - if (p == 0)\ - {\ - std::string msg("Cannot find property:");\ - msg += propertyName;\ - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException,\ - msg.c_str());\ - }\ - }\ - return add##primtype(index,(const Property&)*p,v);\ - }\ - bool SequenceImpl::add##primtype(unsigned int index, unsigned int propertyIndex, primval v)\ - {\ - return add##primtype(index,the_do->getProperty(propertyIndex), v);\ - }\ - bool SequenceImpl::add##primtype(unsigned int index, const Property& p, primval v)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - SEQUENCE_ITEM_LIST::iterator i2 = the_list.end();\ - int j;\ - if (index >= the_list.size()) {\ - return add##primtype(p,v);\ - }\ - if (p.isMany())\ - {\ - DataObjectList& dol = the_do->getList(p);\ - dol.append((primval)v);\ - j = 0;\ - for (i=the_list.begin();(j < index) && (i != the_list.end());++i) {\ - j++;\ - }\ - /*the_list.insert(i,seq_item(&p,dol.size()-1));*/\ - return true;\ - }\ - j = 0;\ - for (i=the_list.begin();i != the_list.end();++i) {\ - const Property* pp = (*i).getProp();\ - if (pp == 0) continue;\ - if (!strcmp(pp->getName(),p.getName()))\ - {\ - SDO_THROW_EXCEPTION("Insert", SDOUnsupportedOperationException,\ - "Sequence::insert of property which already exists in sequence");\ - }\ - if (j == index) {\ - i2 = i;\ - }\ - j++;\ - }\ - the_do->set##primtype(p,v);\ - the_list.insert(i2,seq_item(&p,0));\ - return true;\ - } - -inserter( CString , const char* , const char* ); -inserter( Boolean, bool, bool); -inserter( Byte, char , char ); -inserter(Character, wchar_t, wchar_t ); -inserter(Short, short, short ); -#if __WORDSIZE ==64 -inserter(Integer, long, int64_t ); -#else -inserter(Integer, long, long ); -#endif -inserter(Long, int64_t, int64_t); -inserter(Float, float, float ); -inserter(Double, long double, long double); -inserter(Date, const SDODate, const SDODate); -doinserter(DataObject, RefCountingPointer); - - - -#define charInserter(primtype,primval)\ - bool SequenceImpl::add##primtype(unsigned int index, const char* propertyName, primval v, unsigned int len)\ - {\ - const PropertyImpl* p = the_do->getPropertyImpl(propertyName);\ - if (p == 0)\ - {\ - if (the_do->getType().isOpenType())\ - {\ - p = the_do->define ##primtype (propertyName);\ - }\ - if (p == 0)\ - {\ - std::string msg("Cannot find property:");\ - msg += propertyName;\ - SDO_THROW_EXCEPTION("getProperty", SDOPropertyNotFoundException,\ - msg.c_str());\ - }\ - }\ - return add##primtype(index,(const Property&)*p,v, len);\ - }\ - bool SequenceImpl::add##primtype(unsigned int index, unsigned int propertyIndex, primval v, unsigned int len)\ - {\ - return add##primtype(index,the_do->getProperty(propertyIndex), v, len);\ - }\ - bool SequenceImpl::add##primtype(unsigned int index, const Property& p, primval v, unsigned int len)\ - {\ - SEQUENCE_ITEM_LIST::iterator i;\ - SEQUENCE_ITEM_LIST::iterator i2 = the_list.end();\ - unsigned int j;\ - if (index >= the_list.size()) {\ - return add##primtype(p,v, len);\ - }\ - if (p.isMany())\ - {\ - DataObjectList& dol = the_do->getList(p);\ - dol.append((primval)v, len);\ - j = 0;\ - for (i=the_list.begin();(j < index) && (i != the_list.end());++i) {\ - j++;\ - }\ - /*the_list.insert(i,seq_item(&p,dol.size()-1));*/\ - return true;\ - }\ - j = 0;\ - for (i=the_list.begin();i != the_list.end();++i) {\ - const Property* pp = (*i).getProp();\ - if (pp == 0) continue;\ - if (!strcmp(pp->getName(),p.getName()))\ - {\ - SDO_THROW_EXCEPTION("Insert", SDOUnsupportedOperationException,\ - "Sequence::insert of property which already exists in sequence");\ - }\ - if (j == index) {\ - i2 = i;\ - }\ - j++;\ - }\ - the_do->set##primtype(p,v, len);\ - the_list.insert(i2,seq_item(&p,0));\ - return true;\ - } - - -charInserter( String , const wchar_t* ); -charInserter (Bytes , const char* ); - - - - - - void SequenceImpl::push(const Property& p, unsigned int index) - { - the_list.push_back(seq_item(&p,index)); - } - - void SequenceImpl::remove(unsigned int index) - { - if (index >= the_list.size()) { - std::string msg("Index out of range:"); - msg += index; - SDO_THROW_EXCEPTION("Sequence remove", SDOIndexOutOfRangeException, - msg.c_str()); - } - SEQUENCE_ITEM_LIST::iterator i; - int j = 0; - for (i=the_list.begin();(j < index) && (i != the_list.end()) ; ++i) - { - j++; - } - the_list.erase(i); - return; - } - - void SequenceImpl::removeAll(const Property& p) - { - int j = 0; - const Property* prop; - SEQUENCE_ITEM_LIST::iterator i = the_list.begin(); - - while (i != the_list.end()) - { - prop = (*i).getProp(); - if (prop != 0) - { - if (!strcmp(prop->getName(), p.getName())) - { - i = the_list.erase(i); - } - else - { - ++i; - } - } - else - { - ++i; - } - - } - - return; - } - - void SequenceImpl::move(unsigned int toIndex, unsigned int fromIndex) - { - if (fromIndex >= the_list.size()) { - std::string msg("Index out of range:"); - msg += fromIndex; - SDO_THROW_EXCEPTION("Sequence Move", SDOIndexOutOfRangeException, - msg.c_str()); - } - - if (toIndex == fromIndex) return; - - SEQUENCE_ITEM_LIST::iterator i1, - i2 = the_list.end(), - i3 = the_list.end(); - int j = 0; - for (i3 = the_list.begin(); - j < toIndex && j < fromIndex && - i3 != the_list.end() ; ++i3); - { - if (j == toIndex) i1 = i3; - if (j == fromIndex) i2 = i3; - j++; - } - - if (toIndex < fromIndex) - { - the_list.insert( i1, *i2); - the_list.erase(i2); - } - else - { - if (toIndex + 1 == the_list.size()) - { - the_list.push_back(*i2); - } - else - { - the_list.insert(++i1,*i2); - } - the_list.erase(i2); - } - return; - } - - bool SequenceImpl::addText(const char* text) - { - the_list.push_back(seq_item(text)); - return true; - } - - bool SequenceImpl::isText(unsigned int index) - { - if (index >= the_list.size()) { - return false; - } - SEQUENCE_ITEM_LIST::iterator i; - int j = 0; - for (i= the_list.begin(); (j < index) && (i != the_list.end()); ++i) - { - j++; - } - if ((*i).getProp() == 0) - { - return true; - } - - return false; - } - - bool SequenceImpl::addText(unsigned int index, const char* text) - { - if (index >= the_list.size()) { - return addText(text); - } - - SEQUENCE_ITEM_LIST::iterator i; - int j = 0; - for (i= the_list.begin(); (j < index) && (i != the_list.end()); ++i) - { - j++; - } - the_list.insert(i,seq_item(text)); - return true; - } - - bool SequenceImpl::setText(unsigned int index, const char* text) - { - if (index >= the_list.size()) { - return false; - } - - if (!isText(index)) - { - return false; - } - - SEQUENCE_ITEM_LIST::iterator i; - int j = 0; - for (i= the_list.begin(); (j < index) && (i != the_list.end()); ++i) - { - j++; - } - (*i).setText(text); - return true; - } - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h deleted file mode 100644 index 5a47598276..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SEQUENCEIMPL_H_ -#define _SEQUENCEIMPL_H_ - -#include "commonj/sdo/disable_warn.h" - -#include - - -#include "commonj/sdo/Sequence.h" -#include "commonj/sdo/SDODate.h" - -#define SequenceImplPtr RefCountingPointer - -namespace commonj{ -namespace sdo{ - -class Property; /* forward declaration */ -class DataObjectImpl; - -/** SequenceImpl implements the abstract class Sequence. - * - * A sequence is a heterogeneous list of properties and corresponding values. - * It represents an ordered arbitrary mixture of data values from more - * than one property of a {@link DataObject data object}. - */ - -class SequenceImpl : public Sequence -{ - public: - /////////////////////////////////////////////////////////////////////////// - // Returns the number of entries in the sequence. - // @return the number of entries. - /////////////////////////////////////////////////////////////////////////// - virtual unsigned int size(); - - /////////////////////////////////////////////////////////////////////////// - // Returns the property for the given entry index. - /////////////////////////////////////////////////////////////////////////// - virtual const Property& getProperty(unsigned int index); - - /** - * Return the data object associated with this sequence - */ - - SDO_API virtual const DataObjectPtr getDataObject(); - - /////////////////////////////////////////////////////////////////////////// - // Returns the property for the given entry index. - /////////////////////////////////////////////////////////////////////////// - virtual unsigned int getIndex(const Property& p, unsigned int pindex=0); - virtual unsigned int getIndex(const char* propName, unsigned int pindex=0); - - virtual unsigned int getListIndex(unsigned int index); - - Type::Types getTypeEnum(unsigned int index); - - - /////////////////////////////////////////////////////////////////////////// - // Returns the property value for the given entry index. - // @param index the index of the entry. - // @return the value for the given entry index.. - /////////////////////////////////////////////////////////////////////////// - virtual const char* getCStringValue(unsigned int index); - virtual bool getBooleanValue(unsigned int index); - virtual char getByteValue(unsigned int index); - virtual wchar_t getCharacterValue(unsigned int index); - virtual unsigned int getStringValue(unsigned int index, wchar_t* val, unsigned int max); - virtual unsigned int getBytesValue(unsigned int index, char* val, unsigned int max); - virtual short getShortValue(unsigned int index); - virtual long getIntegerValue(unsigned int index); - virtual int64_t getLongValue(unsigned int index); - virtual float getFloatValue(unsigned int index); - virtual long double getDoubleValue(unsigned int index); - virtual const SDODate getDateValue(unsigned int index); - virtual DataObjectPtr getDataObjectValue(unsigned int index); - - virtual unsigned int getLength(unsigned int index); - - /////////////////////////////////////////////////////////////////////////// - // sets the entry at a specified index to the new value. - // @param index the index of the entry. - // @param value the new value for the entry. - /////////////////////////////////////////////////////////////////////////// - - virtual void setCStringValue( unsigned int index, const char* s ); - virtual void setBooleanValue( unsigned int index, bool b ); - virtual void setByteValue( unsigned int index, char c ); - virtual void setCharacterValue( unsigned int index, wchar_t c ); - virtual void setBytesValue( unsigned int index, const char* s , unsigned int len); - virtual void setStringValue( unsigned int index, const wchar_t* s , unsigned int len); - virtual void setShortValue( unsigned int index, short s ); - virtual void setIntegerValue( unsigned int index, long i ); - virtual void setLongValue( unsigned int index, int64_t l ); - virtual void setFloatValue( unsigned int index, float f ); - virtual void setDoubleValue( unsigned int index, long double d ); - virtual void setDateValue( unsigned int index, const SDODate t ); - virtual void setDataObjectValue(unsigned int index, DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // adds a new entry with the specified property name and value - // to the end of the entries. - // @param propertyName the name of the entry's property. - // @param value the value for the entry. - /////////////////////////////////////////////////////////////////////////// - virtual bool addCString( const char* propertyName,const char* s ); - virtual bool addBoolean( const char* propertyName,bool b ); - virtual bool addByte( const char* propertyName,char c ); - virtual bool addCharacter( const char* propertyName,wchar_t c ); - virtual bool addString( const char* propertyName,const wchar_t* s , unsigned int len); - virtual bool addBytes( const char* propertyName,const char* s , unsigned int len); - virtual bool addShort( const char* propertyName,short s ); - virtual bool addInteger( const char* propertyName,long i ); - virtual bool addLong( const char* propertyName,int64_t l ); - virtual bool addFloat( const char* propertyName,float f ); - virtual bool addDouble( const char* propertyName,long double d ); - virtual bool addDate( const char* propertyName,const SDODate t ); - virtual bool addDataObject(const char* propertyName,DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // adds a new entry with the specified property index and value - // to the end of the entries. - // @param propertyIndex the index of the entry's property. - // @param value the value for the entry. - /////////////////////////////////////////////////////////////////////////// - virtual bool addCString( unsigned int propertyIndex,const char* s ); - virtual bool addBoolean( unsigned int propertyIndex,bool b ); - virtual bool addByte( unsigned int propertyIndex,char c ); - virtual bool addCharacter( unsigned int propertyIndex,wchar_t c ); - virtual bool addString( unsigned int propertyIndex,const wchar_t* s , unsigned int len); - virtual bool addBytes( unsigned int propertyIndex,const char* s , unsigned int len); - virtual bool addShort( unsigned int propertyIndex,short s ); - virtual bool addInteger( unsigned int propertyIndex,long i ); - virtual bool addLong( unsigned int propertyIndex,int64_t l ); - virtual bool addFloat( unsigned int propertyIndex,float f ); - virtual bool addDouble( unsigned int propertyIndex,long double d ); - virtual bool addDate( unsigned int propertyIndex,const SDODate t ); - virtual bool addDataObject(unsigned int propertyIndex,DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // adds a new entry with the specified property and value - // to the end of the entries. - // @param property the property of the entry. - // @param value the value for the entry. - /////////////////////////////////////////////////////////////////////////// - - virtual bool addCString( const Property& property,const char* s ); - virtual bool addBoolean( const Property& property,bool b ); - virtual bool addByte( const Property& property,char c ); - virtual bool addCharacter( const Property& property,wchar_t c ); - virtual bool addString( const Property& property,const wchar_t* s , unsigned int len); - virtual bool addBytes( const Property& property,const char* s , unsigned int len); - virtual bool addShort( const Property& property,short s ); - virtual bool addInteger( const Property& property,long i ); - virtual bool addLong( const Property& property,int64_t l ); - virtual bool addFloat( const Property& property,float f ); - virtual bool addDouble( const Property& property,long double d ); - virtual bool addDate( const Property& property,const SDODate t ); - virtual bool addDataObject(const Property& property,DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // adds a new entry with the specified property name and value - // at the specified entry index. - // @param index the index at which to add the entry. - // @param propertyName the name of the entry's property. - // @param value the value for the entry. - /////////////////////////////////////////////////////////////////////////// - virtual bool addCString( unsigned int index,const char* propertyName,const char* s ); - virtual bool addBoolean( unsigned int index,const char* propertyName,bool b ); - virtual bool addByte( unsigned int index,const char* propertyName,char c ); - virtual bool addCharacter( unsigned int index,const char* propertyName,wchar_t c ); - virtual bool addString( unsigned int index,const char* propertyName,const wchar_t* s , unsigned int len); - virtual bool addBytes( unsigned int index,const char* propertyName,const char* s , unsigned int len); - virtual bool addShort( unsigned int index,const char* propertyName,short s ); - virtual bool addInteger( unsigned int index,const char* propertyName,long i ); - virtual bool addLong( unsigned int index,const char* propertyName,int64_t l ); - virtual bool addFloat( unsigned int index,const char* propertyName,float f ); - virtual bool addDouble( unsigned int index,const char* propertyName,long double d ); - virtual bool addDate( unsigned int index,const char* propertyName,const SDODate t ); - virtual bool addDataObject(unsigned int index,const char* propertyName,DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // adds a new entry with the specified property index and value - // at the specified entry index. - // @param index the index at which to add the entry. - // @param propertyIndex the index of the entry's property. - // @param value the value for the entry. - /////////////////////////////////////////////////////////////////////////// - virtual bool addCString( unsigned int index,unsigned int propertyIndex,const char* s ); - virtual bool addBoolean( unsigned int index,unsigned int propertyIndex,bool b ); - virtual bool addByte( unsigned int index,unsigned int propertyIndex,char c ); - virtual bool addCharacter( unsigned int index,unsigned int propertyIndex,wchar_t c ); - virtual bool addString( unsigned int index,unsigned int propertyIndex,const wchar_t* s , unsigned int len); - virtual bool addBytes( unsigned int index,unsigned int propertyIndex,const char* s , unsigned int len); - virtual bool addShort( unsigned int index,unsigned int propertyIndex,short s ); - virtual bool addInteger( unsigned int index,unsigned int propertyIndex,long i ); - virtual bool addLong( unsigned int index,unsigned int propertyIndex,int64_t l ); - virtual bool addFloat( unsigned int index,unsigned int propertyIndex,float f ); - virtual bool addDouble( unsigned int index,unsigned int propertyIndex,long double d ); - virtual bool addDate( unsigned int index,unsigned int propertyIndex,const SDODate t ); - virtual bool addDataObject(unsigned int index,unsigned int propertyIndex,DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // adds a new entry with the specified property and value - // at the specified entry index. - // @param index the index at which to add the entry. - // @param property the property of the entry. - // @param value the value for the entry. - /////////////////////////////////////////////////////////////////////////// - virtual bool addCString( unsigned int index,const Property& property,const char* s ); - virtual bool addBoolean( unsigned int index,const Property& property,bool b ); - virtual bool addByte( unsigned int index,const Property& property,char c ); - virtual bool addCharacter( unsigned int index,const Property& property,wchar_t c ); - virtual bool addString( unsigned int index,const Property& property,const wchar_t* s , unsigned int len); - virtual bool addBytes( unsigned int index,const Property& property,const char* s , unsigned int len); - virtual bool addShort( unsigned int index,const Property& property,short s ); - virtual bool addInteger( unsigned int index,const Property& property,long i ); - virtual bool addLong( unsigned int index,const Property& property,int64_t l ); - virtual bool addFloat( unsigned int index,const Property& property,float f ); - virtual bool addDouble( unsigned int index,const Property& property,long double d ); - virtual bool addDate( unsigned int index,const Property& property,const SDODate t ); - virtual bool addDataObject(unsigned int index,const Property& property,DataObjectPtr d ); - - - /////////////////////////////////////////////////////////////////////////// - // removes the entry at the given entry index. - // @param index the index of the entry - /////////////////////////////////////////////////////////////////////////// - virtual void remove(unsigned int index); - virtual void removeAll(const Property& p); - - /////////////////////////////////////////////////////////////////////////// - // pushes a new entry without setting the property. - // @param index the index of the entry - /////////////////////////////////////////////////////////////////////////// - virtual void push(const Property& p, unsigned int index); - - /////////////////////////////////////////////////////////////////////////// - // Moves the entry at fromIndex to toIndex. - // @param toIndex the index of the entry destination. - // @param fromIndex the index of the entry to move. - /////////////////////////////////////////////////////////////////////////// - virtual void move(unsigned int toIndex, unsigned int fromIndex); - - /////////////////////////////////////////////////////////////////////////// - // adds a new Setting with the SDO text Property - // to the end of the Settings. - // @param text value of the Setting. - /////////////////////////////////////////////////////////////////////////// - virtual bool addText(const char* text); - - /////////////////////////////////////////////////////////////////////////// - // adds a new Setting with the SDO text Property - // to the Settings. - // @param index the index at which to add the entry. - // @param text value of the Setting. - /////////////////////////////////////////////////////////////////////////// - virtual bool addText(unsigned int index, const char* text); - - /////////////////////////////////////////////////////////////////////////// - // sets a text Property - // @param index the index at which to set the entry. - // @param text value of the Setting. - /////////////////////////////////////////////////////////////////////////// - bool setText(unsigned int index, const char* text); - - /////////////////////////////////////////////////////////////////////////// - // Checks if an entry is text or a setting. - /////////////////////////////////////////////////////////////////////////// - virtual bool isText(unsigned int index); - - SequenceImpl(DataObject* the_do); - SequenceImpl(SequenceImpl* s); - - private: - - SequenceImpl(); - - DataObjectImpl* the_do; - - class seq_item { - public: - seq_item(const Property* p, unsigned int i): - the_prop(p) - { - index = i; - text = 0; - } - seq_item(const char* t) - { - text = new char[strlen(t) + 1]; - strcpy(text,t); - the_prop = 0; - } - - ~seq_item() - { - if (text) { - delete text; - } - } - - seq_item(const seq_item& sin) - { - the_prop = sin.the_prop; - index = sin.index; - if (sin.text) { - text = new char[strlen(sin.text) +1]; - strcpy(text, sin.text); - } - else - { - text =0; - } - } - - const Property* getProp() {return the_prop;} - unsigned int getIndex() { return index;} - char* getText() { return text;} - void setProp(Property* p) { the_prop = p;} - void setText(const char* intext) - { - if (intext != 0) - { - if (text != 0) - { - delete text; - } - text = new char[strlen(intext) +1]; - strcpy(text,intext); - } - } - void setIndex(unsigned int i) - { - index = i; - } - private: - const Property* the_prop; - unsigned int index; - char* text; - }; - - typedef std::list SEQUENCE_ITEM_LIST; - - SEQUENCE_ITEM_LIST the_list; - -}; -}; -}; - -#endif //_SEQUENCE_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.cpp deleted file mode 100644 index 932a7c90f3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.cpp +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Setting.h" -#include "commonj/sdo/TypeImpl.h" - -namespace commonj{ -namespace sdo { - - Setting::Setting(bool set, bool nul, void* invalue, unsigned int len, const Property& p, unsigned int inindex) - : bisSet(set), bisNull(nul) , value(invalue),theProp(&p) - { - index = inindex; - length = len; - strbuf = 0; - } - - void Setting::copy(const Setting& s) - { - bisSet = s.isSet(); - bisNull = s.isNull(); - index = s.getIndex(); - length = s.getLength(); - theProp = &(s.getProperty()); - strbuf = 0; - switch (theProp->getTypeEnum()) - { - case Type::BooleanType: - value = new long; - *(long*)value = (long)s.getBooleanValue(); - break; - case Type::ByteType: - value = new long; - *(long*)value = (long)s.getByteValue(); - break; - case Type::CharacterType: - value = new long; - *(long*)value = (long)s.getCharacterValue(); - break; - case Type::IntegerType: - value = new long; - *(long*)value = (long)s.getIntegerValue(); - break; - case Type::ShortType: - value = new long; - *(long*)value = (long)s.getShortValue(); - break; - case Type::DoubleType: - value = new long double; - *(long double*)value = s.getDoubleValue(); - break; - case Type::FloatType: - value = new float; - *(float*)value = s.getFloatValue(); - break; - case Type::LongType: - value = new int64_t; - *(int64_t*)value = s.getLongValue(); - break; - case Type::DateType: - value = new long; - *(long*)value = long(s.getDateValue().getTime()); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - value = new wchar_t[length]; - s.getStringValue((wchar_t*)value,length); - break; - case Type::BytesType: - value = new char[length]; - s.getBytesValue((char*)value,length); - break; - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - value = s.getDataObjectValue(); - default: - break; - } - } - - Setting& Setting::operator=(const Setting& s) - { - if (this == &s) return *this; - copy(s); - return *this; - } - - Setting::Setting(const Setting& s) - { - copy(s); - } - - Setting::~Setting() - { - // The value has been allocated for everything except data objects - - switch (theProp->getTypeEnum()) - { - case Type::BooleanType: - case Type::ByteType: - case Type::CharacterType: - case Type::IntegerType: - case Type::ShortType: - delete (long*)value; - break; - case Type::DoubleType: - delete (long double*)value; - break; - case Type::FloatType: - delete (float*)value; - break; - case Type::LongType: - delete (int64_t*)value; - break; - case Type::DateType: - delete (long*)value; - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - delete (wchar_t*)value; - break; - case Type::BytesType: - delete (char*)value; - break; - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - default: - break; - } - if (strbuf != 0) delete strbuf; - } - - const Property& Setting::getProperty() const - { - return *theProp; - } - - const Type& Setting::getType() const - { - return theProp->getType(); - } - - bool Setting::getBooleanValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToBoolean(value, length); - //if (value == 0) return false; - //if (*(long*)value != 0) { - // return true; - //} - //return false; - } - - char Setting::getByteValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToByte(value, length); - //if (value == 0) return 0; - //return (char)*(long*)value; - } - - wchar_t Setting::getCharacterValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToCharacter(value, length); - //if (value == 0) return 0; - //return (wchar_t)*(long*)value; - } - - unsigned int Setting::getBytesValue(char* buffer, unsigned int max) const - { - if (buffer == 0 && max == 0) return length; - - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToBytes(value, buffer,length, max); - //int i; - //char* c = (char*)value; - //for (i=0;i < max && i < length;i++) - //{ - // buffer[i] = (char)*c; - // c++; - //} - //return i; - } - - unsigned int Setting::getStringValue(wchar_t* buffer, unsigned int max) const - { - if (buffer == 0 && max == 0) return length; - - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToString(value, buffer,length, max); - //int i; - //wchar_t* c = (wchar_t*)value; - //for (i=0;i < max && i < length;i++) - //{ - // buffer[i] = (wchar_t)*c; - // c++; - //} - //return i; - } - - short Setting::getShortValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToShort(value,length); - //return (short)*(long*)value; - } - - long Setting::getIntegerValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToInteger(value, length); - //return *(long*)value; - } - - - int64_t Setting::getLongValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToLong(value, length); - //return (int64_t)*(int64_t*)value; - } - - float Setting::getFloatValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToFloat(value, length); - //return (float)*(float*)value; - } - - const SDODate Setting::getDateValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToDate(value, length); - } - - - long double Setting::getDoubleValue() const - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToDouble(value, length); - //return (long double)*(long double*)value; - } - - const char* Setting::getCStringValue() - { - TypeImpl* t = (TypeImpl*)&(getType()); - return t->convertToCString(value, &strbuf, length); - //return (const char*)value; - } - - RefCountingPointer Setting::getDataObjectValue() const - { - DataObject *dob = (DataObject*)value; - return RefCountingPointer(dob); - } - - - unsigned int Setting::getLength() const - { - return length; - } - - unsigned int Setting::getIndex() const - { - return index; - } - - bool Setting::isSet() const - { - return bisSet; - } - - bool Setting::isNull() const - { - return bisNull; - } - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.h deleted file mode 100644 index 19980d7b04..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Setting.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SETTING_H -#define SETTING_H - -#include "commonj/sdo/export.h" - -#include "commonj/sdo/Type.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SDODate.h" - -namespace commonj{ -namespace sdo { - - class Property; - - /** - * A Setting encapsulates a property and a corresponding single value of - * the property's type. - */ - - class Setting - { - public: - - Setting(bool set, bool nul, void* invalue, unsigned int len, const Property& p, - unsigned int inindex); - - Setting(const Setting& s); - - void copy(const Setting& s); - - Setting& operator=(const Setting& s); - - - virtual ~Setting(); - - - /** getProperty returns the property set. - * - * Returns the property of the Setting. - * @return the Setting property. - */ - - SDO_API const Property& getProperty() const; - - /** getType returns the type of the property - * - * Returns the type of this property. This is the same as - * getProperty().getType() - */ - - SDO_API const Type& getType() const; - - /** getTypeEnum returns the type enumerator - * - * Returns the enum for the type of this property - */ - - SDO_API Type::Types getTypeEnum() const; - - - /** get methods get the right type of value from the setting - * - * - * Returns the value of the Setting. This must be of the right type for - * Setting value. - */ - - SDO_API bool getBooleanValue() const; - SDO_API char getByteValue() const; - SDO_API wchar_t getCharacterValue() const; - SDO_API unsigned int getBytesValue(char* buffer, unsigned int max) const; - SDO_API unsigned int getStringValue(wchar_t* buffer, unsigned int max) const; - SDO_API short getShortValue() const; - SDO_API long getIntegerValue() const; - SDO_API int64_t getLongValue() const; - SDO_API float getFloatValue() const; - SDO_API long double getDoubleValue() const; - SDO_API const SDODate getDateValue() const; - SDO_API const char* getCStringValue() ; - SDO_API DataObjectPtr getDataObjectValue() const; - - - - /** getIndex returns the index in a many-valued property - * - * Returns the index of the Setting, if this is many valued - */ - - SDO_API unsigned int getIndex() const; - - - /** getLength gives the length of a string or bytes - * - * Returns the length of the setting, if this is a String or - * Bytes type - */ - - SDO_API unsigned int getLength() const ; - - /** isSet returns whether the property WAS set. - * - * Returns whether or not the property is set. This value comes from the - * setting, and tells us whether the property was set before the change - * occurred. - */ - - SDO_API bool isSet() const; - - /** isNull is true if the property value WAS null - * - * Returns whether or not the property was null beforfe the setting - * happened. - */ - - SDO_API bool isNull() const; - - private: - - bool bisSet; - bool bisNull; - void* value; - const Property* theProp; - unsigned int length; - unsigned int index; - char* strbuf; - }; -}; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.cpp deleted file mode 100644 index 398de36a07..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDORuntimeException.h" - -#include "commonj/sdo/SettingList.h" -#include "commonj/sdo/Logger.h" -#include "commonj/sdo/Setting.h" - -namespace commonj{ -namespace sdo { - - -//SettingList::SettingList(SETTING_VECTOR p) : slist (p) -//{ -//} - -/*SettingList::SettingList(const SettingList &pin) -{ - Logger::log("SettingList copy constructor\n"); - slist = std::vector(pin.getVec()); -} -*/ - -SettingList::SettingList() -{ -} - -SettingList::~SettingList() -{ - while (slist.size() > 0) - { - Setting* s = slist[0]; - slist.erase(slist.begin()); - delete s; - } - -} - - -Setting& SettingList::operator[] (int pos) const -{ - validateIndex(pos); - return (*slist[pos]); -} - -Setting* SettingList::get(int pos) -{ - validateIndex(pos); - return (slist[pos]); -} - -int SettingList::size () const -{ - return slist.size(); -} - -//SETTING_VECTOR SettingList::getVec() const -//{ -// return slist; -//} - -void SettingList::insert (unsigned int index, Setting* d) -{ - slist.insert(slist.begin()+index, d); -} - -void SettingList::append ( Setting* d) -{ - slist.insert(slist.end(),d); -} - -void SettingList::remove(unsigned int index) -{ - validateIndex(index); - const Setting* s = slist[index]; - slist.erase(slist.begin()+index); - delete s; - return; -} - -void SettingList::validateIndex(int index) const -{ - if ((index < 0) || (index > size())) - { - std::string msg("Index out of range:"); - msg += index; - SDO_THROW_EXCEPTION("ValidateIndex", SDOIndexOutOfRangeException, - msg.c_str()); - - } - -} - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.h deleted file mode 100644 index 1f34acea72..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/SettingList.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SETTINGLIST_H -#define SETTINGLIST_H - - - -#include -#include "commonj/sdo/Setting.h" - -namespace commonj{ -namespace sdo{ - -typedef std::vector< Setting*> SETTING_VECTOR; - -/** SettingList is a list of settings returned by a change summary - */ - -class SettingList -{ - -public: - //SettingList(SETTING_VECTOR sl); - SettingList(); - - virtual ~SettingList(); - - /** [] is the index operator - * - * This gives access to elements of the list - */ - - SDO_API virtual Setting& operator[] (int pos) const; - - /** size() returns the number of settings - * - * This method returns the size of the list os settings found. - * These may be creations, deletions or changes. - */ - - SDO_API virtual int size () const; - - virtual void insert (unsigned int index, Setting* d); - virtual void append ( Setting* d); - virtual void remove (unsigned int index); - virtual Setting* get (int pos); - - -private: - SETTING_VECTOR slist; - - void validateIndex(int index) const; -}; - -}; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.cpp deleted file mode 100644 index d63a9ed7d2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/Type.h" - -namespace commonj{ -namespace sdo{ - - - Type::~Type() - { - } - - const SDOString Type::SDOTypeNamespaceURI = "commonj.sdo"; - -}; -}; -// end - namespace sdo - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.h deleted file mode 100644 index d4de2b5506..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/Type.h +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _SDO_TYPE_H_ -#define _SDO_TYPE_H_ - - -#include "commonj/sdo/export.h" - -#include "commonj/sdo/PropertyList.h" -#include "commonj/sdo/SDOString.h" - - -namespace commonj{ -namespace sdo{ - - - - -class Property; - - /** - * - * Type is a representation of the type of a property of a data object. - */ - -class Type -{ - -public: - - -/** \enum Types - * - * This is the enumerator for all DataType types. All DataObjectType types - * appear as a Type::Types of DataObjectType. - * otherTypes, ChangeSumamryType and TextType are not used by client code. - */ - - - SDO_API enum Types - { - // Zero is a value for 'unknown type; - all data objects' - OtherTypes = 0, - BigDecimalType, - BigIntegerType, - BooleanType, - ByteType, - BytesType, - CharacterType, - DateType, - DoubleType, - FloatType, - IntegerType, - LongType, - ShortType, - StringType, - UriType, - DataObjectType, - ChangeSummaryType, - TextType, - OpenDataObjectType, - num_types - }; - - virtual SDO_API ~Type(); - - /** getName returns the name of the type - * - * This method returns a const char* name of the type. - */ - - virtual SDO_API const char* getName() const = 0; - - /** getAlias returns the n'th alias - * - * This method returns a const char* corresponding to the - * alias at index n of the list of aliases. Use getAliasCount to - * discover the size of the list. - */ - - virtual SDO_API const char* getAlias(unsigned int index = 0) const = 0; - - /** getAliasCount returns the number of aliases - * - * This method returns the number of aliases for this type - */ - - virtual SDO_API unsigned int getAliasCount() const = 0; - - /** getBaseType returns the base if there is one - * - * This method returns a const Type* corresponding to the - * base Type for this type. The base type is the one which - * this type inherits from. - */ - - virtual SDO_API const Type* getBaseType() const = 0; - - /** getURI returns the URI for this type - * - * This method returns the URI for this type. The URI may be - * null. - */ - - virtual SDO_API const char* getURI() const = 0; - - - - /** getProperties returns a list of properties for this type - * - * This method returns the list of properties for this type. - * Instances of open types may have more properties than appear - * in this list. - * See the propertylist API. - */ - - virtual SDO_API PropertyList getProperties() const = 0; - - - /** getProperty returns a property for this type - * - * This method returns a property, by index or by name - */ - - virtual SDO_API const Property& getProperty(const char* propertyName) const = 0; - virtual SDO_API const Property& getProperty(const SDOString& propertyName) const = 0; - virtual SDO_API const Property& getProperty(unsigned int index) const = 0; - - /** getPropertyIndex returns an index - * - * This method returns a property index for a named property - */ - - virtual SDO_API unsigned int getPropertyIndex(const char* propertyName) const = 0; - virtual SDO_API unsigned int getPropertyIndex(const SDOString& propertyName) const = 0; - - /** isDataObjectType true if not a DataType - * - * This method returns true if the type is not a DataType, and is therefore - * a DataObjectType with properties. - */ - - virtual SDO_API bool isDataObjectType() const = 0; - - - /** isSequencedType true if the type is sequenced - * - * This method returns true if the type is sequenced, and is therefore - * objects of this type can be manipulate via their sequence interface. - */ - - virtual SDO_API bool isSequencedType() const = 0; - - - /** isOpenType true if the type is open - * - * Normal types have a predefined list of properties. Trying to set - * properties which do not exist will cause an exception to be thrown. - * Open types, on the other hand, may have properties added to their - * instances runtime. These properties get added silently when setting a - * property value for a property which does not exist. - * Different instances of these objects may have different lists of - * open properties. - */ - - virtual SDO_API bool isOpenType() const = 0; - - /** isAbstractType true if the type is not instantiable. - * - * An abstract type may not be instantiated. It is useful only as - * a base type to some other non-abstract type. - */ - - virtual SDO_API bool isAbstractType() const = 0; - - /** isDataType true if the type is not an object. - * - * A DataType is anything which is not a DataObjectType. This method - * is the opposite of isDataObjectType(). - */ - - virtual SDO_API bool isDataType() const = 0; - - - /** isChangeSummaryType true if the type is a change summary. - * - * There is only one type called ChangeSummary. This method serves - * no purpose in the C++ implementation. - */ - - virtual SDO_API bool isChangeSummaryType() const = 0; - - /** getTypeEnum gets the enum for this type. - * - * Each DataType has a defined value in the list of Types. - */ - - virtual SDO_API Type::Types getTypeEnum() const = 0; - - /** equals compares uri and name. - * - * The types are equal if the URI and Name are equal. - */ - - virtual SDO_API bool equals(const Type& tother) const = 0; - - static SDO_API const SDOString SDOTypeNamespaceURI; -}; - -}; -}; -#endif //_SDO_TYPE_H_ - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.cpp deleted file mode 100644 index 876dfbce29..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/TypeDefinition.h" -#include "commonj/sdo/TypeDefinitionImpl.h" - -namespace commonj -{ - namespace sdo - { - TypeDefinition::TypeDefinition() - { - typedefinition = new TypeDefinitionImpl(); - } - - TypeDefinition::~TypeDefinition() - { - if (typedefinition != 0) delete typedefinition; - } - - void TypeDefinition::copy (const TypeDefinition& td) - { - if (typedefinition != 0) delete typedefinition; - typedefinition = new TypeDefinitionImpl(*(td.typedefinition)); - } - - TypeDefinition::TypeDefinition(const TypeDefinition& td) - { - copy(td); - } - - TypeDefinition& TypeDefinition::operator=(const TypeDefinition& td) - { - if (this != &td) - { - copy(td); - } - return *this; - } - - TypeDefinitionImpl* TypeDefinition::getTypeDefinition() - { - return typedefinition; - } - - void TypeDefinition::setUri(const char * inuri) - { - typedefinition->uri = inuri; - } - void TypeDefinition::setUri(const SDOString& inuri) - { - typedefinition->uri = inuri.c_str(); - } - - const char * TypeDefinition::getUri() const - { - return (const char *)typedefinition->uri; - } - - - void TypeDefinition::setName(const char * inname) - { - typedefinition->name = inname; - } - void TypeDefinition::setName(const SDOString& inname) - { - typedefinition->name = inname.c_str(); - } - - const char * TypeDefinition::getName() const - { - return (const char *)typedefinition->name; - } - - - void TypeDefinition::setLocalName(const char * inname) - { - typedefinition->localname = inname; - } - void TypeDefinition::setLocalName(const SDOString& inname) - { - typedefinition->localname = inname.c_str(); - } - - const char * TypeDefinition::getLocalName() const - { - return (const char *)typedefinition->localname; - } - - - void TypeDefinition::setAliases(const char * inaliases) - { - typedefinition->aliases = inaliases; - } - void TypeDefinition::setAliases(const SDOString& inaliases) - { - typedefinition->aliases = inaliases.c_str(); - } - - const char * TypeDefinition::getAliases() const - { - return (const char*)typedefinition->aliases; - } - - void TypeDefinition::setParentType(const char* uri, const char* name, - bool isrestriction) - { - typedefinition->parentTypeUri = uri; - typedefinition->parentTypeName = name; - typedefinition->isRestriction = isrestriction; - } - void TypeDefinition::setParentType(const SDOString& uri, - const SDOString& name, - bool isrestriction) - { - typedefinition->parentTypeUri = uri.c_str(); - typedefinition->parentTypeName = name.c_str(); - typedefinition->isRestriction = isrestriction; - } - - const char * TypeDefinition::getParentTypeUri() const - { - return (const char *)typedefinition->parentTypeUri; - } - - const char * TypeDefinition::getParentTypeName() const - { - return (const char *)typedefinition->parentTypeName; - } - - void TypeDefinition::setIDPropertyName(const char * idpropname) - { - typedefinition->IDPropertyName = idpropname; - } - void TypeDefinition::setIDPropertyName(const SDOString& idpropname) - { - typedefinition->IDPropertyName = idpropname.c_str(); - } - - const char * TypeDefinition::getIDPropertyName() const - { - return (const char *)typedefinition->IDPropertyName; - } - - void TypeDefinition::addPropertyDefinition(PropertyDefinition& p) - { - typedefinition->properties.push_back((PropertyDefinitionImpl&)(*(p.getPropertyDefinition()))); - } - - bool TypeDefinition::getIsDataType() const - { - return typedefinition->dataType; - } - - bool TypeDefinition::getIsOpen() const - { - return typedefinition->isOpen; - } - - bool TypeDefinition::getIsSequenced() const - { - return typedefinition->isSequenced; - } - - bool TypeDefinition::getIsAbstract() const - { - return typedefinition->isAbstract; - } - - bool TypeDefinition::getIsExtendedPrimitive() const - { - return typedefinition->isExtendedPrimitive; - } - - bool TypeDefinition::getIsFromList() const - { - return typedefinition->isFromList; - } - - bool TypeDefinition::getIsQName() const - { - return typedefinition->isQName; - } - - bool TypeDefinition::getIsMany() const - { - return typedefinition->isMany; - } - - void TypeDefinition::setIsDataType(bool value) - { - typedefinition->dataType = value; - } - - void TypeDefinition::setIsOpen(bool value) - { - typedefinition->isOpen = value; - } - - void TypeDefinition::setIsSequenced(bool value) - { - typedefinition->isSequenced = value; - } - - void TypeDefinition::setIsAbstract(bool value) - { - typedefinition->isAbstract = value; - } - - void TypeDefinition::setIsExtendedPrimitive(bool value) - { - typedefinition->isExtendedPrimitive = value; - } - - void TypeDefinition::setIsFromList(bool value) - { - typedefinition->isFromList = value; - } - - void TypeDefinition::setIsQName(bool value) - { - typedefinition->isQName = value; - } - - void TypeDefinition::setIsMany(bool value) - { - typedefinition->isMany = value; - } - - - int TypeDefinition::getGroupElementCount() const - { - return typedefinition->groupElementCount; - } - - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.h deleted file mode 100644 index 6e52e7bbf0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinition.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _TYPEDefinition_H_ -#define _TYPEDefinition_H_ - -#include "export.h" - - -#include "commonj/sdo/PropertyDefinition.h" -#include "commonj/sdo/SDOString.h" -#include "list" - - -namespace commonj -{ - namespace sdo - { - - class TypeDefinitionImpl; - - -/** - * TypeDefinitionImpl holds information gathered from parsing the - * XSD and used for creating Types - */ - class SDO_API TypeDefinition - { - - public: - - - /*SDO_API*/ TypeDefinition(); - TypeDefinition(const TypeDefinition& td); - TypeDefinition& operator=(const TypeDefinition& td); - - /*SDO_API*/ virtual ~TypeDefinition(); - - - TypeDefinitionImpl* getTypeDefinition(); - - /*SDO_API*/ void setUri(const char * inuri) ; - /*SDO_API*/ void setUri(const SDOString& inuri) ; - - /*SDO_API*/ const char * getUri() const; - - /*SDO_API*/ void setName(const char * inname) ; - /*SDO_API*/ void setName(const SDOString& inname) ; - /*SDO_API*/ const char * getName() const; - - /*SDO_API*/ void setLocalName(const char * inname) ; - /*SDO_API*/ void setLocalName(const SDOString& inname) ; - /*SDO_API*/ const char * getLocalName() const; - - /*SDO_API*/ void setAliases(const char * inaliases) ; - /*SDO_API*/ void setAliases(const SDOString& inaliases) ; - /*SDO_API*/ const char * getAliases() const; - - - /*SDO_API*/ void setParentType(const char* uri, const char* name, - bool isrestriction); - /*SDO_API*/ void setParentType(const SDOString& uri, - const SDOString& name, - bool isrestriction); - /*SDO_API*/ const char * getParentTypeUri() const; - /*SDO_API*/ const char * getParentTypeName() const; - - /*SDO_API*/ void setIDPropertyName(const char * idpropname) ; - /*SDO_API*/ void setIDPropertyName(const SDOString& idpropname) ; - /*SDO_API*/ const char * getIDPropertyName() const; - - - /*SDO_API*/ void addPropertyDefinition(PropertyDefinition& p); - - /*SDO_API*/ bool getIsDataType() const; - /*SDO_API*/ bool getIsOpen() const; - /*SDO_API*/ bool getIsSequenced() const; - /*SDO_API*/ bool getIsAbstract() const; - /*SDO_API*/ bool getIsExtendedPrimitive() const; - /*SDO_API*/ bool getIsFromList() const; - /*SDO_API*/ bool getIsQName() const; - /*SDO_API*/ bool getIsMany() const; - - /*SDO_API*/ void setIsDataType(bool value); - /*SDO_API*/ void setIsOpen(bool value); - /*SDO_API*/ void setIsSequenced(bool value); - /*SDO_API*/ void setIsAbstract(bool value); - /*SDO_API*/ void setIsExtendedPrimitive(bool value); - /*SDO_API*/ void setIsFromList(bool value); - /*SDO_API*/ void setIsQName(bool value); - /*SDO_API*/ void setIsMany(bool value); - - /*SDO_API*/ int getGroupElementCount() const; - - private : - TypeDefinitionImpl *typedefinition; - void copy(const TypeDefinition& td); - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_TYPEDefinition_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.cpp deleted file mode 100644 index d593473ade..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/TypeDefinitionImpl.h" -namespace commonj -{ - namespace sdo - { - TypeDefinitionImpl::TypeDefinitionImpl() - : dataType(false), - isOpen(false), - isSequenced(false), - isMany(false), - isQName(false), - isAbstract(false), - groupElementCount(0), - isExtendedPrimitive(false), - isFromList(false) - { - } - - TypeDefinitionImpl::~TypeDefinitionImpl() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.h deleted file mode 100644 index 2b608ad5ba..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionImpl.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _TYPEDefinitionImpl_H_ -#define _TYPEDefinitionImpl_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/PropertyDefinitionImpl.h" -#include "list" - - -namespace commonj -{ - namespace sdo - { - - typedef std::list XmlDasPropertyDefs; - -/** - * TypeDefinitionImpl holds information gathered from parsing the - * XSD and used for creating Types - */ - class TypeDefinitionImpl - { - - public: - TypeDefinitionImpl(); - virtual ~TypeDefinitionImpl(); - - - SDOXMLString uri; - SDOXMLString name; - SDOXMLString localname; - - SDOXMLString aliases; - - SDOXMLString parentTypeUri; - SDOXMLString parentTypeName; - bool isRestriction; - - SDOXMLString IDPropertyName; - - bool dataType; - XmlDasPropertyDefs properties; - - bool isOpen; - bool isSequenced; - bool isAbstract; - - bool isExtendedPrimitive; - - bool isFromList; - - - bool isMany; - int groupElementCount; - - bool isQName; - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_TYPEDefinitionImpl_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.cpp deleted file mode 100644 index aa02c7fd95..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/TypeDefinitions.h" -#include "commonj/sdo/TypeDefinitionsImpl.h" - -namespace commonj -{ - namespace sdo - { - TypeDefinitions::TypeDefinitions() - { - typedefinitions = new TypeDefinitionsImpl(); - } - - TypeDefinitions::~TypeDefinitions() - { - if (typedefinitions != 0) delete typedefinitions; - } - - void TypeDefinitions::copy (const TypeDefinitions& tds) - { - if (typedefinitions != 0) delete typedefinitions; - typedefinitions = new TypeDefinitionsImpl(*(tds.typedefinitions)); - } - - TypeDefinitions::TypeDefinitions(const TypeDefinitions& tds) - { - copy(tds); - } - - TypeDefinitions& TypeDefinitions::operator=(const TypeDefinitions& tds) - { - if (this != &tds) - { - copy(tds); - } - return *this; - } - - void TypeDefinitions::addTypeDefinition(TypeDefinition& t) - { - if (typedefinitions == 0) - { - typedefinitions = new TypeDefinitionsImpl(); - } - - typedefinitions->types[ - typedefinitions->getTypeQName( - t.getUri(),t.getName())] = (TypeDefinitionImpl&)(*t.getTypeDefinition()); - } - - TypeDefinitionsImpl& TypeDefinitions::getTypeDefinitions() - { - if (typedefinitions == 0) - { - typedefinitions = new TypeDefinitionsImpl(); - } - return *typedefinitions; - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.h deleted file mode 100644 index a6840e05bc..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitions.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _TYPEDefinitions_H_ -#define _TYPEDefinitions_H_ - - -#include "commonj/sdo/TypeDefinition.h" -#include "map" - -namespace commonj -{ - namespace sdo - { - - class TypeDefinitionsImpl; - -/** - * TypeDefinitionsImpl holds a list information gathered from parsing the - * XSD and used for creating Types - */ - class SDO_API TypeDefinitions - { - - public: - /*SDO_API*/ TypeDefinitions(); - TypeDefinitions(const TypeDefinitions& tds); - TypeDefinitions& operator=(const TypeDefinitions& tds); - - /*SDO_API*/ virtual ~TypeDefinitions(); - - /*SDO_API*/ void addTypeDefinition(TypeDefinition& t); - - TypeDefinitionsImpl& getTypeDefinitions(); - - private: - TypeDefinitionsImpl* typedefinitions; - void copy(const TypeDefinitions& tds); - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_TYPEDefinitions_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.cpp deleted file mode 100644 index da86aad53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/TypeDefinitionsImpl.h" -namespace commonj -{ - namespace sdo - { - TypeDefinitionsImpl::TypeDefinitionsImpl() - { - } - - TypeDefinitionsImpl::~TypeDefinitionsImpl() - { - } - - SDOXMLString TypeDefinitionsImpl::getTypeQName(const SDOXMLString& typeUri, const SDOXMLString& typeName) - { - return typeUri + "#" + typeName; - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.h deleted file mode 100644 index da85b7110e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeDefinitionsImpl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _TYPEDefinitionsImpl_H_ -#define _TYPEDefinitionsImpl_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/TypeDefinitionImpl.h" -#include "map" - -namespace commonj -{ - namespace sdo - { - typedef std::map XMLDAS_TypeDefs; - -/** - * TypeDefinitionsImpl holds a list information gathered from parsing the - * XSD and used for creating Types - */ - class TypeDefinitionsImpl - { - - public: - TypeDefinitionsImpl(); - virtual ~TypeDefinitionsImpl(); - static SDOXMLString getTypeQName(const SDOXMLString& typeUri, const SDOXMLString& typeName); - - - XMLDAS_TypeDefs types; - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_TYPEDefinitionsImpl_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp deleted file mode 100644 index c42baad2b1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp +++ /dev/null @@ -1,3617 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "commonj/sdo/Logger.h" - -#include "commonj/sdo/PropertyImpl.h" -#include "commonj/sdo/TypeImpl.h" - -#include -#include -#include -#include -using namespace std; - -#include -#include -using namespace std; - -#include "commonj/sdo/SDORuntimeException.h" - -namespace commonj{ -namespace sdo{ - - - - char* TypeImpl::types[num_types] = { - "Other Types", - "BigDecimal", - "BigInteger", - "Boolean" , - "Byte", - "Bytes", - "Character", - "Date" , - "Double" , - "Float" , - "Integer" , - "Long" , - "Short" , - "String" , - "URI" , - "DataObject", - "ChangeSummary", - "Text", - "OpenDataObject" - }; - - - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - - void TypeImpl::addChangeSummary(void) - { - changeSummaryType = true; - } - - bool TypeImpl::isChangeSummaryType() const - { - return changeSummaryType; - } - - - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - - bool TypeImpl::isFromList() const - { - return bFromList; - } - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - - bool TypeImpl::isDataType(void) const - { - return isPrimitive; - } - - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - - TypeImpl::TypeImpl(const TypeImpl& t) - { - isResolving = false; - isResolved = false; - brestriction = t.brestriction; - bFromList = t.bFromList; - } - - TypeImpl::TypeImpl(const Type* base, const char* uri, - const char* inname, - bool isSeq, - bool isOp, - bool isAbs, - bool isData, - bool isRestriction) - { - init(uri,inname,isSeq,isOp, isAbs, isData); - baseType = (TypeImpl*)base; - brestriction = isRestriction; - bFromList = false; - } - - TypeImpl::TypeImpl(const char* uri, const char* inname, - bool isSeq, - bool isOp, - bool isAbs, - bool isData, - bool isFromList) - - { - init(uri,inname,isSeq,isOp,isAbs, isData); - baseType = 0; - brestriction = false; - bFromList= false; - bFromList = isFromList; - } - - void TypeImpl::init(const char* uri, const char* inname, - bool isSeq, - bool isOp, - bool isAbs, - bool isData) - { - isResolving = false; - isResolved = false; - localPropsSize = 0; - changeSummaryType = false; - isSequenced = isSeq; - isOpen = isOp; - isAbstract = isAbs; - isPrimitive = isData; - name = new char[strlen(inname)+1]; - strcpy(name,inname); - - if (uri == 0) - { - typeURI = new char[1]; - typeURI[0] = 0; - typeEnum = DataObjectType; - return; - } - - typeURI = new char[strlen(uri)+1]; - strcpy(typeURI,uri); - - if (!strcmp(uri,Type::SDOTypeNamespaceURI.c_str())) { - for (int i = 0; i < num_types ; i++) { - if (!strcmp(inname,types[i])) { - typeEnum = (Types)i; - if (i <= UriType) isPrimitive = true; - // Note - you could create Text, but it would - // not be recognised as primitive. - return; - } - } - } - - // All other types are data object types - for now - typeEnum = DataObjectType; - } - - - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - TypeImpl::TypeImpl() - { - } - - /////////////////////////////////////////////////////////////////////////// - // - /////////////////////////////////////////////////////////////////////////// - - TypeImpl::~TypeImpl() - { - // Types free their corresponding properties, but not the types - // of those properties - // Need to free only those we allocated - unsigned int count = 0, start = props.size() - localPropsSize; - std::list::iterator i; - for (i= props.begin(); i != props.end() ; ++i) - { - if (count >= start) { - delete(*i); - } - count++; - } - if (name != 0)delete name; - if (typeURI != 0) delete typeURI; - for (unsigned int j = 0; j < aliases.size();j++) - { - delete aliases[j]; - } - } - - /////////////////////////////////////////////////////////////////////////// - // Sets a data type as sequenced. - /////////////////////////////////////////////////////////////////////////// - - void TypeImpl::setSequenced(bool set) - { - isSequenced = set; - } - - /////////////////////////////////////////////////////////////////////////// - // Sets a data type as open. - /////////////////////////////////////////////////////////////////////////// - - void TypeImpl::setOpen(bool set) - { - isOpen = set; - } - - /////////////////////////////////////////////////////////////////////////// - // Sets a data type as open. - /////////////////////////////////////////////////////////////////////////// - - void TypeImpl::setBaseType(const Type* bt, bool isRestriction) - { - baseType = (TypeImpl*)bt; - brestriction = isRestriction; - - // DataType and Sequenced must be the same as the base Type - isPrimitive = baseType->isPrimitive; - if (isPrimitive) - { - typeEnum = baseType->typeEnum; - } - - // Removing the following and allowing "sequenced" to be inherited from base type - /* - if (isSequenced && !baseType->isSequenced) - { - // Its an error to be sequenced and inherit from a - // non-sequenced type - string msg("Cannot be sequenced and inherit from a non-sequenced base type:"); - msg += getURI(); - msg += " "; - msg += getName(); - SDO_THROW_EXCEPTION("setBaseType", - SDOUnsupportedOperationException, - msg.c_str()); - } - */ - - isSequenced = baseType->isSequenced; - - // if the base is open then this type must be open too. - if (baseType->isOpenType()) - { - isOpen = true; - } - } - - bool TypeImpl::equals(const Type& tother) const - { - if (strcmp(typeURI,tother.getURI())) return false; - // TODO - aliases - if (strcmp(name, tother.getName())) return false; - return true; - } - - - const Type* TypeImpl::getBaseType() const - { - return (Type*)baseType; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the name of the type. - /////////////////////////////////////////////////////////////////////////// - - const char* TypeImpl::getName() const - { - return name; - } - - void TypeImpl::setAlias(const char* alias) - { - char* tmp = new char[strlen(alias)+1]; - strcpy(tmp,alias); - aliases.push_back(tmp); - } - - - - - const char* TypeImpl::getAlias(unsigned int index) const - { - if (index < aliases.size()) - { - return aliases[index]; - } - return name; - } - - unsigned int TypeImpl::getAliasCount() const - { - return aliases.size(); - } - /////////////////////////////////////////////////////////////////////////// - // Returns the namespace URI of the type. - /////////////////////////////////////////////////////////////////////////// - const char* TypeImpl::getURI() const - { - return typeURI; - } - - void TypeImpl::throwIfNestedChangeSummary() const - { - PROPERTY_LIST::const_iterator i; - for (i = props.begin(); i != props.end(); ++i) - { - - const TypeImpl *t = ((*i)->getTypeImpl()); - if (t != 0) - { - if (t->isDataObjectType()) - { - if (t->isChangeSummaryType()) - { - string msg(" Nested change summary type:"); - msg += t->getURI(); - msg += " "; - msg += t->getName(); - SDO_THROW_EXCEPTION("resolve", - SDOUnsupportedOperationException, - msg.c_str()); - } - t->throwIfNestedChangeSummary(); - } - } - } - } - - void TypeImpl::validateChangeSummary() - { - if (!isChangeSummaryType()) return; - throwIfNestedChangeSummary(); - } - - PROPERTY_LIST TypeImpl::getCompoundProperties() - { - return props; - } - - void TypeImpl::initCompoundProperties() - { - // We have already met this type in the resolution heirarchy - if (isResolving) - { - string msg(" circular type dependency on:"); - msg += getURI(); - msg += " "; - msg += getName(); - - SDO_THROW_EXCEPTION("initCompoundProperties", - SDOUnsupportedOperationException, - msg.c_str()); - } - - if (isResolved) - { - return; - } - - isResolving = true; - - - if (baseType != 0) - { - baseType->initCompoundProperties(); - PROPERTY_LIST pl = baseType->getCompoundProperties(); - localPropsSize = props.size(); - - // spec says the properties which are common are taken from - // the superclass. I imagine this will change , and only the - // ones taken from the subclass will be used. - - if (brestriction) - { - // restrict the properties to only those which - // appear in the parent - std::list::iterator p1,p; - for (p=pl.begin();p!=pl.end();++p) - { - for (p1=props.begin();p1!=props.end();++p1) - { - if (!strcmp((*p1)->getName(), - (*p)->getName())) - { - props.erase(p1); - localPropsSize = props.size(); - break; - } - } - } - - } - - props.insert(props.begin(),pl.begin(), pl.end()); - - isPrimitive = !(baseType->isDataObjectType()); - } - if (isPrimitive && (props.size() > 0)) - { - string msg("Add property to data type:"); - msg += getURI(); - msg += " "; - msg += getName(); - SDO_THROW_EXCEPTION("initCompoundProperties", - SDOUnsupportedOperationException, - msg.c_str()); - } - isResolved = true; - isResolving = false; - return; - } - - - /////////////////////////////////////////////////////////////////////////// - // Returns the list of the properties of this type. - /////////////////////////////////////////////////////////////////////////// - PropertyList TypeImpl::getProperties() const - { - return props; - } - - unsigned int TypeImpl::getPropertiesSize() const - { - return props.size(); - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified name. - /////////////////////////////////////////////////////////////////////////// - const Property& TypeImpl::getProperty(const char* propertyName) const - { - PropertyImpl* pi = getPropertyImpl(propertyName); - if (pi == 0) - { - string msg("Property not found:"); - msg += propertyName; - SDO_THROW_EXCEPTION("getProperty", - SDOPropertyNotFoundException, msg.c_str()); - } - return (Property&)*pi; - } - const Property& TypeImpl::getProperty(const SDOString& propertyName) const - { - PropertyImpl* pi = getPropertyImpl(propertyName); // ??? GMW - if (pi == 0) - { - string msg("Property not found:"); - msg += propertyName; - SDO_THROW_EXCEPTION("getProperty", - SDOPropertyNotFoundException, msg.c_str()); - } - return (Property&)*pi; - } - - - /////////////////////////////////////////////////////////////////////////// - // Substitute Support - get the real underlying type - /////////////////////////////////////////////////////////////////////////// - - const Type& TypeImpl::getRealPropertyType(const std::string& propertyName) const - { - const TypeImpl* ti = getRealPropertyTypeImpl(propertyName); - if (ti != 0)return (Type&)*ti; - - string msg("Property not found:"); - msg += propertyName; - SDO_THROW_EXCEPTION("getProperty", - SDOPropertyNotFoundException, msg.c_str()); - - } - - - const TypeImpl* TypeImpl::getRealPropertyTypeImpl(const std::string& propertyName) const - { - - std::list::const_iterator i; - for (i = props.begin(); i != props.end(); ++i) - { - if (propertyName == (*i)->getName()) - { - return ((*i)->getTypeImpl()); - } - for (unsigned int k=0;k < (*i)->getAliasCount(); k++) - { - if (propertyName == (*i)->getAlias(k)) - { - return ((*i)->getTypeImpl()); - } - } - for (unsigned int j=0;j < (*i)->getSubstitutionCount(); j++) - { - if (propertyName == (*i)->getSubstitutionName(j)) - { - return (TypeImpl*)(*i)->getSubstitutionType(j); - } - } - } - return 0; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified name. - /////////////////////////////////////////////////////////////////////////// - - PropertyImpl* TypeImpl::getPropertyImpl(const SDOString& propertyName) const - { - - // Extension - find the property from an xpath - // you should not be able to have both "." and "[" before a "/" - this is assumed. - - if (propertyName.length() == 0) return 0; - - // strchr returns NULL if target not found - // find_first_of returns string::npos in that case - // find_first_of returns the subscript of the character found eg 0 if it is the first - size_t tokenend = propertyName.find_first_of('/'); - size_t bracket = propertyName.find_first_of('['); - size_t dot = propertyName.find_first_of('.'); - size_t dotOrBracketOrSlash = propertyName.find_first_of(".[/"); - SDOString copy; - // char* copy; - - int len = propertyName.length(); - if (dotOrBracketOrSlash != string::npos) - { - len = dotOrBracketOrSlash; - } - - if (len != 0) - { - copy.assign(propertyName, 0, len); - } - else - { - copy = propertyName; - } - - std::list::const_iterator i; - for (i = props.begin(); i != props.end(); ++i) - { - if (!strcmp(copy.c_str(),(*i)->getName())) // ie the two strings are the same - { - // delete copy; - if ((tokenend != string::npos) && (propertyName.length() - tokenend) > 1) - { - // There is someting to the right of the "/" - const TypeImpl* ti = (*i)->getTypeImpl(); - if (ti != 0) - { - PropertyImpl* p = ti->getPropertyImpl(SDOString(propertyName, tokenend + 1, string::npos)); - return p; - } - else - { - return (PropertyImpl*)(*i); - } - } - else { - return (PropertyImpl*)(*i); - } - } - - for (unsigned int j = 0; j < (*i)->getSubstitutionCount(); j++) - { - if (!strcmp(copy.c_str(), (*i)->getSubstitutionName(j))) // ie the two strings are the same - { - // delete copy; - if ((tokenend != string::npos) && (propertyName.length() - tokenend) > 1) - { - // There is someting to the right of the "/" - const TypeImpl* ti = (*i)->getTypeImpl(); - if (ti != 0) - { - // PropertyImpl* p = ti->getPropertyImpl((const char *)(tokenend+1)); - PropertyImpl* p = ti->getPropertyImpl(SDOString(propertyName, tokenend + 1, string::npos)); - return p; - } - else - { - return (PropertyImpl*)(*i); - } - } - else { - return (PropertyImpl*)(*i); - } - } - } - for (unsigned int k = 0; k < (*i)->getAliasCount(); k++) - { - if (!strcmp(copy.c_str(), (*i)->getAlias(k))) // ie the two strings are the same - { - // delete copy; - if ((tokenend != string::npos) && (propertyName.length() - tokenend) > 1) - { - const TypeImpl* ti = (*i)->getTypeImpl(); - if (ti != 0) - { - // PropertyImpl* p = ti->getPropertyImpl((const char *)(tokenend+1)); - PropertyImpl* p = ti->getPropertyImpl(SDOString(propertyName, tokenend + 1, string::npos)); - return p; - } - else - { - return (PropertyImpl*)(*i); - } - } - else { - return (PropertyImpl*)(*i); - } - } - } - } - return 0; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified name. - /////////////////////////////////////////////////////////////////////////// - PropertyImpl* TypeImpl::getPropertyImplPure(const char* propertyName) const - { - - - std::list::const_iterator i; - for (i = props.begin(); i != props.end(); ++i) - { - if (!strcmp(propertyName,(*i)->getName())) - { - return (PropertyImpl*)(*i); - } - for (unsigned int k=0;k < (*i)->getAliasCount(); k++) - { - if (!strcmp(propertyName,(*i)->getAlias(k))) - { - return (PropertyImpl*)(*i); - } - } - } - return 0; - } - - - /////////////////////////////////////////////////////////////////////////// - // Returns the property index with the specified name. - /////////////////////////////////////////////////////////////////////////// - unsigned int TypeImpl::getPropertyIndex(const char* propertyName) const - { - return getPropertyIndex(SDOString(propertyName)); - } - unsigned int TypeImpl::getPropertyIndex(const SDOString& propertyName) const - { - std::list::const_iterator i; - int j = 0; - for (i = props.begin(); i != props.end(); ++i) - { - if (!strcmp(propertyName.c_str(), (*i)->getName())) - { - return j; - } - j++; - } - string msg("Property not found:"); - msg += propertyName; - SDO_THROW_EXCEPTION("getPropertyIndex", - SDOPropertyNotFoundException, msg.c_str()); - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified name. - /////////////////////////////////////////////////////////////////////////// - const Property& TypeImpl::getProperty(unsigned int index) const - { - PropertyImpl* pi = getPropertyImpl(index); - if (pi == 0) - { - string msg("Property not found for index:"); - msg += index; - SDO_THROW_EXCEPTION("getProperty" , - SDOPropertyNotFoundException, msg.c_str()); - } - return (Property&)*pi; - } - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified index. - /////////////////////////////////////////////////////////////////////////// - PropertyImpl* TypeImpl::getPropertyImpl(unsigned int index) const - { - std::list::const_iterator i; - int count = 0; - for (i = props.begin() ; i != props.end() ; ++i) - { - if (count == index)return (PropertyImpl*)(*i); - count++; - } - return 0; - } - - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified name. - /////////////////////////////////////////////////////////////////////////// - void TypeImpl::addProperty(const char* propname, - const TypeImpl& t, - bool many, bool rdonly, bool cont) - { - // do not add duplicate properties - if (!getPropertyImplPure(propname)) - { - props.insert(props.end(),new PropertyImpl(*this, - propname, t, many,rdonly, cont)); - localPropsSize++; - } - } - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this Type specifies DataObjects.. - /////////////////////////////////////////////////////////////////////////// - bool TypeImpl::isDataObjectType() const - { - return !isPrimitive; - } - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this Type specifies Sequenced DataObjects. - /////////////////////////////////////////////////////////////////////////// - bool TypeImpl::isSequencedType() const - { - return isSequenced; - } - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this Type allows any form of open content. - /////////////////////////////////////////////////////////////////////////// - bool TypeImpl::isOpenType() const - { - /* TODO - handle open types */ - return isOpen; - } - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this type may not be instantiated. - /////////////////////////////////////////////////////////////////////////// - bool TypeImpl::isAbstractType() const - { - return isAbstract; - } - - void TypeImpl::setAbstract(bool set) - { - isAbstract = set; - } - - /////////////////////////////////////////////////////////////////////////// - // TODO - override ==. - /////////////////////////////////////////////////////////////////////////// - bool TypeImpl::equals(const Type& t) - { - return ( strcmp(getName(),t.getName()) == 0 - && strcmp(getURI (),t.getURI ()) == 0 ); - } - - /////////////////////////////////////////////////////////////////////////// - // getTypeEnum. - /////////////////////////////////////////////////////////////////////////// - Type::Types TypeImpl::getTypeEnum(void) const - { - return typeEnum; - } - - - /////////////////////////////////////////////////////////////////////////// - // Conversions. - // convert is used in the process of setting a value. The input is the - // result of a setXXX, so in the first case setBoolean. The typeEnum is the - // type of the value being set and governs the expected final result in - // the value* buffer. - /////////////////////////////////////////////////////////////////////////// - - unsigned int TypeImpl::convert(void** value,const bool b) const - { - switch (typeEnum) - { - case BooleanType: - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (*value != 0)delete (char*)(*value); - *value = new char[sizeof(long)]; - *(long*)*value = (long)b; - return sizeof(long); - - case LongType: - if (*value != 0)delete (char*)(*value); - *value = new char[sizeof(int64_t)]; - *(int64_t*)*value = (int64_t)b; - return sizeof(int64_t); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - if (*value != 0)delete (char*)(*value); - // spec change - types - *value = new wchar_t[6]; - if (b) - { - ((wchar_t*)(*value))[0] = (wchar_t)'t'; - ((wchar_t*)(*value))[1] = (wchar_t)'r'; - ((wchar_t*)(*value))[2] = (wchar_t)'u'; - ((wchar_t*)(*value))[3] = (wchar_t)'e'; - ((wchar_t*)(*value))[4] = 0; - return 4; - } - else - { - ((wchar_t*)(*value))[0] = (wchar_t)'f'; - ((wchar_t*)(*value))[1] = (wchar_t)'a'; - ((wchar_t*)(*value))[2] = (wchar_t)'l'; - ((wchar_t*)(*value))[3] = (wchar_t)'s'; - ((wchar_t*)(*value))[4] = (wchar_t)'e'; - ((wchar_t*)(*value))[5] = 0; - return 5; - } - break; - - - case BytesType: - { - if (*value != 0)delete (char*)(*value); - // spec change - types - *value = new char[6]; - if (b) - { - strcpy((char*)*value, "true"); - return 4; - } - else - { - strcpy((char*)*value, "false"); - return 5; - } - break; - - } - - case DoubleType: - case FloatType: - case DateType: - case OtherTypes: - case DataObjectType: - case ChangeSummaryType: - default: - { - string msg("Cannot set Boolean on object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("setBoolean" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - return 0; - } - - unsigned int TypeImpl::convert(void** value,const char c) const - { -#if __WORDSIZE ==64 - return convert(value,(int64_t)c); -#else - return convert(value,(long)c); -#endif - } - - unsigned int TypeImpl::convert(void** value,const wchar_t c) const - { -#if __WORDSIZE ==64 - return convert(value,(int64_t)c); -#else - return convert(value,(long)c); -#endif - } - - // This is set CString... - unsigned int TypeImpl::convert(void** value,const char* c) const - { - - switch (typeEnum) - { - case BooleanType: - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - if ((c == 0) || strcmp(c,"true")) - { - *(long*)*value = 0; - } - else - { - *(long*)*value = 1; - } - return sizeof(long); - - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (*value != 0) delete ((char*)*value); - *value = new char[sizeof(long)]; - *(long*)*value = atoi(c); - return sizeof(long); - - case DoubleType: - if (*value != 0) delete ((char*)*value); - *value = new char[sizeof(long double)]; - // TODO - atof not suitable here - *(long double*)*value = (long double)atof(c); - return sizeof(long double); - - case FloatType: - if (*value != 0) delete ((char*)*value); - *value = new char[sizeof(float)]; - *(float*)*value = (float)atof(c); - return sizeof(float); - - case LongType: - if (*value != 0) delete ((char*)*value); - *value = new char[sizeof(int64_t)]; -#if defined(WIN32) || defined (_WINDOWS) - *(int64_t*)*value = (int64_t)_atoi64(c); -#else - *(int64_t*)*value = (int64_t)strtoll(c, NULL, 0); -#endif - return sizeof(int64_t); - - case DateType: - if (*value != 0) delete ((char*)*value); - *value = new char[sizeof(time_t)]; - *(time_t*)*value = (time_t)atoi(c); - return sizeof(time_t); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - { - if (*value != 0) delete ((wchar_t*)*value); - wchar_t* vw = new wchar_t[strlen(c)+1]; - for (unsigned int i=0;i< strlen(c);i++) - { - vw[i] = (wchar_t)c[i]; - } - vw[strlen(c)] = 0; - *value = (void*)vw; - return strlen(c); - } - break; - case BytesType: - { - if (*value != 0) delete ((char*)*value); - char* vc = new char[strlen(c)+1]; - for (unsigned int i=0;i< strlen(c);i++) - { - vc[i] = (char)c[i]; - } - vc[strlen(c)] = 0; - *value = (void*)vc; - return strlen(c); - } - break; - - case OtherTypes: - case DataObjectType: - case ChangeSummaryType: - default: - { - string msg("Cannot set CString on object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("setString" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - return 0; - } - - // +++ - - // This is set CString... - // The value supplied in s is converted and written to value. - unsigned int TypeImpl::convert(void** value, const SDOString& c) const - { - switch (typeEnum) - { - case BooleanType: - if (*value != 0) delete ((char*) *value); - *value = new char[sizeof(long)]; - - if (c == "true") - { - *(long*)*value = 0; - } - else - { - *(long*)*value = 1; - } - return sizeof(long); - - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (*value != 0) delete ((char*)*value); - - *value = new char[sizeof(long)]; - *(long*)*value = atoi(c.c_str()); - return sizeof(long); - - case DoubleType: - if (*value != 0) delete ((char*)*value); - - *value = new char[sizeof(long double)]; - // TODO - atof not suitable here - *(long double*)*value = (long double)atof(c.c_str()); - return sizeof(long double); - - case FloatType: - if (*value != 0) delete ((char*)*value); - - *value = new char[sizeof(float)]; - *(float*)*value = (float)atof(c.c_str()); - return sizeof(float); - - case LongType: - if (*value != 0) delete ((char*)*value); - - *value = new char[sizeof(int64_t)]; -#if defined(WIN32) || defined (_WINDOWS) - *(int64_t*)*value = (int64_t)_atoi64(c.c_str()); -#else - *(int64_t*)*value = (int64_t)strtoll(c.c_str(), NULL, 0); -#endif - return sizeof(int64_t); - - case DateType: - if (*value != 0) delete ((char*)*value); - *value = new char[sizeof(time_t)]; - *(time_t*)*value = (time_t)atoi(c.c_str()); - return sizeof(time_t); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - { - if (*value != 0) delete ((wchar_t*)*value); - wchar_t* vw = new wchar_t[c.length() + 1]; - for (unsigned int i = 0; i < c.length(); i++) - { - vw[i] = (wchar_t)c[i]; - } - vw[c.length()] = 0; - *value = (void*)vw; - return c.length(); - } - break; - case BytesType: - { - if (*value != 0) delete ((char*)*value); - char* vc = new char[c.length() + 1]; - for (unsigned int i = 0; i < c.length(); i++) - { - vc[i] = (char)c[i]; - } - vc[c.length()] = 0; - *value = (void*)vc; - return c.length(); - } - break; - - case OtherTypes: - case DataObjectType: - case ChangeSummaryType: - default: - { - string msg("Cannot set CString on object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("setString" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - return 0; - } - - - // --- - - // setString - unsigned int TypeImpl::convert(void** value,const wchar_t* b, unsigned int len) const - { - unsigned int i; - switch (typeEnum) - { - case BigDecimalType: - case BigIntegerType: - case UriType: - case StringType: - { - if (*value != 0) delete ((wchar_t*)*value); - wchar_t* vw = new wchar_t[len+1]; - for (i=0;i 4) - { - *(long*)*value = 0; - } - else - { - if (b[0] == (wchar_t)'t' && - b[1] == (wchar_t)'r' && - b[2] == (wchar_t)'u' && - b[3] == (wchar_t)'e' ) - *(long*)*value = 1; - else *(long*)*value = 0; - } - return sizeof(long); - - case CharacterType: - case ByteType: - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - if (len > 0) - { - *(long*)*value = (long)b[0]; - } - else - { - *(long*)*value = (long)0; - } - return sizeof(long); - - case ShortType: - case IntegerType: - { - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - int val = 0; - for (unsigned int j=0;j 4) - { - *(long*)*value = 0; - } - else - { - if (b[0] == (char)'t' && - b[1] == (char)'r' && - b[2] == (char)'u' && - b[3] == (char)'e' ) - *(long*)*value = 1; - else *(long*)*value = 0; - } - return sizeof(long); - - case ByteType: - case CharacterType: - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - if (len > 0) - { - *(long*)*value = (long)b[0]; - } - else - { - *(long*)*value = (long)0; - } - return sizeof(long); - - case IntegerType: - case ShortType: - { - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - int val = 0; - for (unsigned int j=0;j 4) - { - *(long*)*value = 0; - } - else - { - if (b == "true") - *(long*)*value = 1; - else *(long*)*value = 0; - } - return sizeof(long); - - case ByteType: - case CharacterType: - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - if (len > 0) - { - *(long*)*value = (long)b[0]; - } - else - { - *(long*)*value = (long)0; - } - return sizeof(long); - - case IntegerType: - case ShortType: - { - if (*value != 0)delete ((char*)*value); - *value = new char[sizeof(long)]; - int val = 0; - for (unsigned int j=0;jmax?max:len; - } - case BytesType: - { - if (value == 0) return 0; - char* tmp = (char*)value; - for (i=0;(i < len) && (i < max);i++) - { - outval[i] = (wchar_t)(tmp[i]); - } - return len>max?max:len; - } - - case BooleanType: - { - if (max < 4) return 0; - if (value == 0 || *(long*)value == 0) { - if (max < 5) return 0; - outval[0] = (wchar_t)'f'; - outval[1] = (wchar_t)'a'; - outval[2] = (wchar_t)'l'; - outval[3] = (wchar_t)'s'; - outval[4] = (wchar_t)'e'; - return 5; - } - else - { - outval[0] = (wchar_t)'t'; - outval[1] = (wchar_t)'r'; - outval[2] = (wchar_t)'u'; - outval[3] = (wchar_t)'e'; - return 4; - } - } - - case ByteType: - { - if (value == 0) return 0; - long tmp = *(long*)value; - outval[0] = (wchar_t)(tmp&0xFF); - return 1; - } - - case CharacterType: - { - if (value == 0) return 0; - long tmp = *(long*)value; - outval[0] = (wchar_t)(tmp & 0xFFFF); - return 1; - } - - case ShortType: - case IntegerType: - { - if (value == 0) return 0; - long tmp = *(long*)value; -#if defined(WIN32) || defined (_WINDOWS) - wchar_t* tmpstr = new wchar_t[MAX_LONG_SIZE]; - _ltow(tmp,tmpstr,10); - if (wcslen(tmpstr) > max) return 0; - _ltow(tmp,outval,10); - return wcslen(outval); -#else - sprintf(tmpstr, "%ld", tmp); - if (strlen(tmpstr) > max) return 0; - for (j=0; j< strlen(tmpstr); j++) - { - outval[j] = (wchar_t)tmpstr[j]; - } - delete tmpstr; - return j; -#endif - } - - - case LongType: - { - if (value == 0) return 0; - int64_t tmp = *(int64_t*)value; -#if defined(WIN32) || defined (_WINDOWS) - wchar_t* tmpstr = new wchar_t[MAX_LONG_SIZE]; - _i64tow(tmp,tmpstr,10); - if (wcslen(tmpstr) > max) - { - delete tmpstr; - return 0; - } - _i64tow(tmp,outval,10); - return wcslen(outval); -#else - sprintf(tmpstr, "%lld", tmp); - if (strlen(tmpstr) > max) return 0; - for (j=0; j< strlen(tmpstr); j++) - { - outval[j] = (wchar_t)tmpstr[j]; - } - delete tmpstr; - return j; -#endif - } - - case DateType: - { - - if (value == 0) return 0; - string msg("Conversion to string not implemented from type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getString" , - SDOInvalidConversionException, msg.c_str()); - break; - } - - case DoubleType: - { - if (value == 0) return 0; - if (max < MAX_DOUBLE_SIZE) return 0; - wchar_t* fmt = new wchar_t[5]; - fmt[0] = (wchar_t)'%'; - fmt[1] = (wchar_t)'.'; - fmt[2] = (wchar_t)'3'; - fmt[3] = (wchar_t)'e'; - fmt[4] = (wchar_t)0; -#if defined(WIN32) || defined (_WINDOWS) - swprintf((wchar_t*)outval,fmt,*(long double*)value); -#else -#if defined(NO_SWPRINTF) - { - int k; - char *tmpbuf = new char[50]; - wchar_t *tmpw = (wchar_t*)outval; - sprintf(tmpbuf,"%.3Le",*(long double*)value); - for (k=0;kmax?max:len; - } - - case BigDecimalType: - case BigIntegerType: - case UriType: - case StringType: - { - if (value == 0) return 0; - wchar_t* tmp = (wchar_t*)value; - for (i=0;(i < max) && (i < len);i++) - { - outval[i] = (char)(tmp[i]); - } - return len>max?max:len; - } - - case BooleanType: - { - if (value == 0 || *(long*)value == 0) { - if (max < 5) return 0; - outval[0] = 'f'; - outval[1] = 'a'; - outval[2] = 'l'; - outval[3] = 's'; - outval[4] = 'e'; - return 5; - } - else { - if (max < 4) return 0; - outval[0] = 't'; - outval[1] = 'r'; - outval[2] = 'u'; - outval[3] = 'e'; - return 4; - } - return 0; - } - - case CharacterType: - case ByteType: - { - if (value == 0) return 0; - long tmp = *(long*)value; - outval[0] = (char)(tmp&0xFF); - return 1; - } - - case ShortType: - case IntegerType: - { - if (value == 0) return 0; - long tmp = *(long*)value; - char* tmpstr = new char[MAX_LONG_SIZE]; - sprintf(tmpstr, "%ld", tmp); - if (strlen(tmpstr) > max) - { - delete tmpstr; - return 0; - } - delete tmpstr; - sprintf(outval, "%ld", tmp); - return strlen(outval); - } - - - case LongType: - { - if (value == 0) return 0; - int64_t tmp = *(int64_t*)value; - char * tmpstr = new char[MAX_LONG_SIZE]; - sprintf(tmpstr, "%lld", tmp); - if (strlen(tmpstr) > max) - { - delete tmpstr; - return 0; - } - delete tmpstr; - sprintf(outval, "%lld", tmp); - return strlen(outval); - } - case DateType: - { - if (value == 0) return 0; - string msg("Conversion to string not implemented from type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getBytes" , - SDOInvalidConversionException, msg.c_str()); - break; - } - - case DoubleType: - if (value == 0) return 0; - if (max < MAX_DOUBLE_SIZE) return 0; - sprintf(outval,"%.3Le",*(long double*)value); - return strlen(outval); - - case FloatType: - if (value == 0) return 0; - if (max < MAX_FLOAT_SIZE) return 0; - sprintf(outval,"%.3e",*(float*)value); - return strlen(outval); - - case OtherTypes: - case DataObjectType: - default: - { - if (max < 9) return 0; - sprintf(outval,"%08x",value); - //string msg("Cannot get Bytes from object of type:"); - //msg += getName(); - //SDO_THROW_EXCEPTION("getBytes" , - // SDOInvalidConversionException, msg.c_str()); - return strlen(outval); - } - } - return 0; - } - - // +++ - - // value is a pointer to the byte stream that is the value to convert - // outval is the resulting string representation of value - // len is the length of the input byte stream, it is used only when the length cannot be inferred from other information. - // max is the maximum size allowed for the output byte stream. (Not strictly needed when the output is an std::string but we maintain the behaviour from the earlier method. - - // Questions - // 1. Why isn't value const? - // - unsigned int TypeImpl::convertToBytes(const void* value, - SDOString& outval, - unsigned int len, - unsigned int max) const - { - unsigned int i; - outval.erase(); - switch (typeEnum) - { - case BytesType: - { - if (value == 0) return 0; - - const char* tempPtr = (const char*) value; - unsigned int count = (len > max) ? max : len; - outval.assign(tempPtr, count); - - return count; - } - - case BigDecimalType: - case BigIntegerType: - case UriType: - case StringType: - { - if (value == 0) return 0; - - const wchar_t* tempPtr = (const wchar_t*) value; - unsigned int count = (len > max) ? max : len; - - // The following loop copies the low byte from each 2 byte wchar_t - // into one byte of the target array eg H_E_L_P -> HELP - for (i = 0; (i < count); i++) - { - outval += (char)(tempPtr[i]); - } - return count; - } - - case BooleanType: - { - if (value == 0 || *(const long*)value == 0) { - if (max < 5) return 0; - outval = "false"; - return 5; - } - else { - if (max < 4) return 0; - outval = "true"; - return 4; - } - return 0; - } - - case CharacterType: - case ByteType: - { - if (value == 0) return 0; - - const long tmp = *(const long*)value; - outval += (char)(tmp&0xFF); - return 1; - } - - case ShortType: - case IntegerType: - { - if (value == 0) return 0; - - const long tmp = *(const long*) value; - char* tmpstr = new char[MAX_LONG_SIZE + 1]; - sprintf(tmpstr, "%ld", tmp); - if (strlen(tmpstr) > max) - { - delete tmpstr; - return 0; - } - outval = tmpstr; - delete tmpstr; - return outval.length(); - } - - case LongType: - { - if (value == 0) return 0; - - const int64_t tmp = *(const int64_t*)value; - char* tmpstr = new char[MAX_LONG_SIZE + 1]; - sprintf(tmpstr, "%lld", tmp); - if (strlen(tmpstr) > max) - { - delete tmpstr; - return 0; - } - outval = tmpstr; - delete tmpstr; - return outval.length(); - } - case DateType: - { - if (value == 0) return 0; - - string msg("Conversion to string not implemented from type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getBytes" , - SDOInvalidConversionException, msg.c_str()); - break; - } - - case DoubleType: - { - if (value == 0) return 0; - - if (max < MAX_DOUBLE_SIZE) return 0; - - char* tmpstr = new char[MAX_DOUBLE_SIZE + 1]; - sprintf(tmpstr, "%.3Le", *(const long double*)value); - outval = tmpstr; - delete tmpstr; - return outval.length(); - } - - case FloatType: - { - if (value == 0) return 0; - - if (max < MAX_FLOAT_SIZE) return 0; - - char* tmpstr = new char[MAX_FLOAT_SIZE + 1]; - sprintf(tmpstr, "%.3Le", *(const float*)value); - outval = tmpstr; - delete tmpstr; - return outval.length(); - } - - case OtherTypes: - case DataObjectType: - default: - { - if (max < 9) return 0; - - char tmpstr[9]; - sprintf(tmpstr, "%08x", value); - outval = tmpstr; - //string msg("Cannot get Bytes from object of type:"); - //msg += getName(); - //SDO_THROW_EXCEPTION("getBytes" , - // SDOInvalidConversionException, msg.c_str()); - return outval.length(); - } - } - return 0; - } - - // --- - - const char* TypeImpl::convertToCString(void* value, char** asstringbuf, unsigned int len) const - { - unsigned int i; - - switch (typeEnum) - { - case BooleanType: - if (value == 0 || *(long*)value == 0) { - *asstringbuf = new char[6]; - strcpy(*asstringbuf,"false"); - } - else { - *asstringbuf = new char[5]; - strcpy(*asstringbuf,"true"); - } - return *asstringbuf; - - case ByteType: - *asstringbuf = new char[MAX_LONG_SIZE]; - if (value == 0){ - sprintf(*asstringbuf,"%ld",0); - } - else { - sprintf(*asstringbuf,"%ld",*(long*)value); - } - return *asstringbuf; - - case CharacterType: - *asstringbuf = new char[MAX_LONG_SIZE]; - if (value == 0){ - sprintf(*asstringbuf,"%ld",0); - } - else { - sprintf(*asstringbuf,"%ld", *(long*)value); - } - return *asstringbuf; - - case IntegerType: - *asstringbuf = new char[MAX_LONG_SIZE]; - if (value == 0){ - sprintf(*asstringbuf,"%ld",0); - } - else { - sprintf(*asstringbuf,"%ld", *(long*)value); - } - return *asstringbuf; - - case ShortType: - *asstringbuf = new char[MAX_LONG_SIZE]; - if (value == 0){ - sprintf(*asstringbuf,"%ld",0); - } - else { - sprintf(*asstringbuf,"%ld", *(long*)value); - } - return *asstringbuf; - - case DoubleType: - *asstringbuf = new char[MAX_DOUBLE_SIZE]; - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - (*asstringbuf)[0] = 0; - return *asstringbuf; - } - sprintf(*asstringbuf,"%.3Le",*(long double*)value); - return *asstringbuf; - - case FloatType: - *asstringbuf = new char[MAX_FLOAT_SIZE]; - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - (*asstringbuf)[0] = 0; - return *asstringbuf; - } - sprintf(*asstringbuf,"%.3e", *(float*)value); - return *asstringbuf; - - case LongType: - { - *asstringbuf = new char[MAX_LONG_SIZE]; - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - (*asstringbuf)[0] = 0; - return *asstringbuf; - } - int64_t temp = *(int64_t*)value; -#if defined(WIN32) || defined (_WINDOWS) - sprintf(*asstringbuf,"%I64d", temp); -#else - sprintf(*asstringbuf,"%lld", temp); -#endif - return *asstringbuf; - } - case DateType: - *asstringbuf = new char[MAX_LONG_SIZE]; - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - (*asstringbuf)[0] = 0; - return *asstringbuf; - } - sprintf(*asstringbuf,"%ld", *(time_t*)value); - return *asstringbuf; - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - { - if (value == 0 || len == 0) - { - *asstringbuf = new char[1]; - (*asstringbuf)[0] = 0; - return *asstringbuf; - } - *asstringbuf = new char[len + 1]; - wchar_t* tmp = (wchar_t*)value; - for (i=0;i< len;i++) - { - (*asstringbuf)[i] = tmp[i] & 0xFF; - } - (*asstringbuf)[i] = 0; - return *asstringbuf; - } - - case BytesType: - { - if (value == 0 || len == 0) - { - *asstringbuf = new char[1]; - (*asstringbuf)[0] = 0; - return *asstringbuf; - } - *asstringbuf = new char[len + 1]; - char* tmp = (char*)value; - for (i=0;i< len ;i++) - { - (*asstringbuf)[i] = (char)(tmp[i]); - } - (*asstringbuf)[i] = 0; - return *asstringbuf; - } - - - case OtherTypes: - case DataObjectType: - default: - { - *asstringbuf = new char[9]; - sprintf(*asstringbuf,"%08x",value); - //string msg("Cannot get CString from object of type:"); - //msg += getName(); - //SDO_THROW_EXCEPTION("getCString" , - // SDOInvalidConversionException, msg.c_str()); - return *asstringbuf; - } - } - return 0; - } - - const bool TypeImpl::convertToBoolean(void* value, unsigned int len) const - { - switch (typeEnum) - { - case BooleanType: - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (value == 0) return false; - if (*(long*)value != 0) return true; - return false; - - case DoubleType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return false; - } - if (*(long double*)value != 0.0) return true; - return false; - - case FloatType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return false; - } - if (*(float*)value != 0.0) return true; - return false; - - case LongType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return false; - } - if (*(int64_t*)value != 0)return true; - return false; - - case DateType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return false; - } - if (*(time_t*)value != 0)return true; - return false; - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - if (value == 0 || len < 4) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return false; - } - if ( ((wchar_t*)value)[0] == (wchar_t)'t' && - ((wchar_t*)value)[1] == (wchar_t)'r' && - ((wchar_t*)value)[2] == (wchar_t)'u' && - ((wchar_t*)value)[3] == (wchar_t)'e' ) - return true; - - return false; - - case BytesType: - if (value == 0 || len < 4) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return false; - } - if (!strncmp((char*)value,"true", 4)) return true; - return false; - - case OtherTypes: - case DataObjectType: - default: - { - string msg("Cannot get Boolean from object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getBoolean" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - - } - - const char TypeImpl::convertToByte(void* value , unsigned int len) const - { - switch (typeEnum) - { - case BooleanType: - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (value == 0) return 0; - return (char)(*(long*)value); - - case DoubleType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (char)(*(long double*)value); - - case FloatType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (char)(*(float*)value); - - case LongType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (char)(*(int64_t*)value); - - case DateType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - - return (char)(*(time_t*)value); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - { - if (value == 0) return 0; - // Assume the string is a number eg "123" and attempt to convert it. - -#if defined(WIN32) || defined(_WINDOWS) - return (char) _wtoi((wchar_t*) value); -#else - char* tmpstr = new char[len + 1]; - short s = 0; - wchar_t* srcptr = (wchar_t*) value; - - for (int j = 0; j < len; j++) - { - tmpstr[j] = (char) srcptr[j]; - } - tmpstr[len] = 0; - s = (char) atoi(tmpstr); - delete tmpstr; - return (char) s; -#endif - } - - case BytesType: - { - if (value == 0) return 0; - return (char)*(char*)value; - } - - - case OtherTypes: - case DataObjectType: - default: - { - string msg("Cannot get Byte from object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getByte" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - } - - const wchar_t TypeImpl::convertToCharacter(void* value, unsigned int len) const - { - switch (typeEnum) - { - case BooleanType: - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (value == 0) return 0; - return (wchar_t)(*(long*)value); - - case DoubleType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (wchar_t)(*(long double*)value); - - case FloatType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (wchar_t)(*(float*)value); - - case LongType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (wchar_t)(*(int64_t*)value); - - case DateType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (wchar_t)(*(time_t*)value); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - { - if (value == 0) return 0; - return *(wchar_t*)value; - } - - case BytesType: - { - if (value == 0) return 0; - return (wchar_t)*(char*)value; - } - - case OtherTypes: - case DataObjectType: - default: - { - string msg("Cannot get Character from object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getCharacter" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - } - const short TypeImpl::convertToShort(void* value, unsigned int len) const - { -#if ! defined(WIN32) && !defined (_WINDOWS) - char* tmpstr = new char[len+1]; - short s = 0; -#endif - switch (typeEnum) - { - case BooleanType: - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (value == 0) return 0; - return (short)(*(long*)value); - - case DoubleType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (short)(*(long double*)value); - - case FloatType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (short)(*(float*)value); - - case LongType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (short)(*(int64_t*)value); - - case DateType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (short)(*(time_t*)value); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - if (value == 0 || len == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } -#if defined(WIN32) || defined (_WINDOWS) - return (short)_wtoi((wchar_t*)value); -#else - for (int j=0;j< len;j++) - { - tmpstr[j] = (char)((char *)value)[j]; - } - tmpstr[len] = 0; - s = (short) atoi(tmpstr); - delete tmpstr; - return s; -#endif - - - case BytesType: - case OtherTypes: - case DataObjectType: - default: - { - string msg("Cannot get Short from object of type:"); - msg += getName(); - SDO_THROW_EXCEPTION("getShort" , - SDOInvalidConversionException, msg.c_str()); - break; - } - } - } - - -/* const int TypeImpl::convertToInt(void* value, unsigned int len) const - { - switch (typeEnum) - { - case BooleanType: - case ByteType: - case CharacterType: - case IntegerType: - case ShortType: - if (value == 0) return 0; - return (int)(*(long*)value); - - case DoubleType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (int)(*(long double*)value); - - case FloatType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (int)(*(float*)value); - - case LongType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (int)(*(int64_t*)value); - - case DateType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } - return (int)(*(time_t*)value); - - case BigDecimalType: - case BigIntegerType: - case StringType: - case UriType: - if (value == 0) - { - // Conversions might set from a zero value, as they are used - // by the default Setting code as well - return 0; - } -#if defined(WIN32) || defined (_WINDOWS) - return (int)_wtoi((wchar_t*)value); -#else - char* tmp = new char[len+1]; - int j = 0;; - for (j=0;j -#include -#include -#include "commonj/sdo/DASType.h" -#include "commonj/sdo/PropertyImpl.h" -#include "commonj/sdo/SDODate.h" - - -#define MAX_LONG_SIZE 20 -#define MAX_FLOAT_SIZE 32 -#define MAX_DOUBLE_SIZE 32 -#define BOOL_SIZE 5 -#define CHAR_SIZE 1 -#define BYTE_SIZE 1 - - - -namespace commonj{ -namespace sdo{ - -class DataObject; -class PropertyList; -class MetadataGraph; - - -#ifndef PROPERTY_LIST - typedef std::list PROPERTY_LIST; -#endif - -/** - * TypeImpl implements the abstract class Type. - * A representation of the type of property of a data object. - */ - - -class TypeImpl : public DASType -{ - -public: - - - virtual ~TypeImpl(); - - /** convert - converts between types - * - * When a DataObject is queried for the value of one of its - * properties, the method to call varies according to the - * type of the property. - * If the wrong API is called (E.g getBoolean() called on - * an Integer value), then a conversion is attempted. - * Many conversions will succeed and return the value, - * others will throw an InvalidConversionException - */ - - unsigned int convertDate( void ** value, const SDODate i) const; - unsigned int convert( void ** value,const char* s) const; - unsigned int convert(void ** value, const SDOString& s) const; - unsigned int convert( void ** value,const wchar_t* s, unsigned int len) const; - unsigned int convert( void ** value,const char* s, unsigned int len) const; - unsigned int convert(void ** value, const SDOString& s, unsigned int len) const; - unsigned int convert( void ** value,const bool b) const; - unsigned int convert( void ** value,const char c) const; - unsigned int convert( void ** value,const wchar_t c) const; - unsigned int convert( void ** value,const short s) const; -#if __WORDSIZE !=64 - unsigned int convert( void ** value,const long i) const; -#endif - unsigned int convert( void ** value,const int64_t l) const; - unsigned int convert( void ** value,const float f) const; - unsigned int convert( void ** value,const long double d) const; - unsigned int convert( void ** value,DataObject* dob) const; - - const char* convertToCString( void* value , char** inbuf, unsigned int len) const; - const bool convertToBoolean( void* value, unsigned int len) const; - const char convertToByte( void* value,unsigned int len ) const; - unsigned int convertToString( void* value , wchar_t* val, unsigned int len, - unsigned int max) const; - unsigned int convertToBytes( void* value , char* val, unsigned int len, - unsigned int max) const; - unsigned int convertToBytes( const void* value , SDOString& val, unsigned int len, - unsigned int max) const; - const wchar_t convertToCharacter( void* value ,unsigned int len) const; - const short convertToShort( void* value ,unsigned int len) const; - const long convertToInteger( void* value ,unsigned int len) const; - const int64_t convertToLong( void* value ,unsigned int len) const; - const float convertToFloat( void* value ,unsigned int len) const; - const long double convertToDouble(void* value ,unsigned int len) const; - DataObject* convertToDataObject(void* value ,unsigned int len) const; - const SDODate convertToDate (void* value ,unsigned int len) const; - - /** equals - compares - * - * equals returns true if the name and uri are the same - */ - - bool equals(const Type& t); - - /////////////////////////////////////////////////////////////////////////// - // Returns the name of the type. - /////////////////////////////////////////////////////////////////////////// - const char* getName() const; - - /////////////////////////////////////////////////////////////////////////// - // Alias support. - // @return nth alias - /////////////////////////////////////////////////////////////////////////// - virtual const char* getAlias(unsigned int index = 0) const ; - virtual unsigned int getAliasCount() const ; - virtual void setAlias(const char* alias); - - - - /////////////////////////////////////////////////////////////////////////// - // Returns the namespace URI of the type. - /////////////////////////////////////////////////////////////////////////// - const char* getURI() const; - - /////////////////////////////////////////////////////////////////////////// - // Returns the list of the properties of this type. - /////////////////////////////////////////////////////////////////////////// - PropertyList getProperties() const; - - /////////////////////////////////////////////////////////////////////////// - // add a property to a Type whilst building - this is for DAS - /////////////////////////////////////////////////////////////////////////// - void addProperty(const char* name, - const TypeImpl& t, bool many, bool rdonly, bool cont); - - /////////////////////////////////////////////////////////////////////////// - // Returns the property with the specified name. - /////////////////////////////////////////////////////////////////////////// - const Property& getProperty(const char* propertyName) const ; - const Property& getProperty(const SDOString& propertyName) const ; - const Property& getProperty(unsigned int index) const ; - - PropertyImpl* getPropertyImpl(const SDOString& propertyName) const ; - PropertyImpl* getPropertyImpl(unsigned int index) const ; - - - /////////////////////////////////////////////////////////////////////////// - // Substitute support - /////////////////////////////////////////////////////////////////////////// - // get the property with no substitute possible. - PropertyImpl* getPropertyImplPure(const char* propertyName) const ; - - // get the type of the property even if its a substitute - const Type& getRealPropertyType(const std::string& propertyName) const ; - const TypeImpl* getRealPropertyTypeImpl(const std::string& propertyName) const ; - - - - unsigned int getPropertyIndex(const char* propertyName) const ; - unsigned int getPropertyIndex(const SDOString& propertyName) const ; - - unsigned int getPropertiesSize() const; - /////////////////////////////////////////////////////////////////////////// - // Indicates if this Type specifies DataObjects. - /////////////////////////////////////////////////////////////////////////// - bool isDataObjectType() const; - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this Type specifies Sequenced DataObjects. - /////////////////////////////////////////////////////////////////////////// - bool isSequencedType() const; - void setSequenced(bool set); - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this Type allows any form of open content. If false, - // dataObject.getInstanceProperties() must be the same as - // DataObject.getType().getProperties(). - /////////////////////////////////////////////////////////////////////////// - bool isOpenType() const; - void setOpen(bool set); - - /////////////////////////////////////////////////////////////////////////// - // Indicates if this type may not be instantiated. - /////////////////////////////////////////////////////////////////////////// - bool isAbstractType() const; - void setAbstract(bool set); - - /////////////////////////////////////////////////////////////////////////// - // Set the base type for inherited types - /////////////////////////////////////////////////////////////////////////// - void setBaseType(const Type* tb, bool isRestriction = false); - const Type* getBaseType() const; - - - /////////////////////////////////////////////////////////////////////////// - // Indicates a non-object type - /////////////////////////////////////////////////////////////////////////// - bool isDataType() const; - - /////////////////////////////////////////////////////////////////////////// - // Indicates a non-object type - /////////////////////////////////////////////////////////////////////////// - Type::Types getTypeEnum() const; - - /////////////////////////////////////////////////////////////////////////// - // set this type as a change summary holder - /////////////////////////////////////////////////////////////////////////// - void addChangeSummary(); - - /////////////////////////////////////////////////////////////////////////// - // Say if this type is allowed to have a summary - /////////////////////////////////////////////////////////////////////////// - bool isChangeSummaryType() const; - - /////////////////////////////////////////////////////////////////////////// - // Used by the DAS to resolve the base type properties list - /////////////////////////////////////////////////////////////////////////// - void initCompoundProperties(); - - /////////////////////////////////////////////////////////////////////////// - // Used by the DAS to chack for nested change summaries - /////////////////////////////////////////////////////////////////////////// - void validateChangeSummary(); - - virtual bool equals(const Type& tother) const; - - virtual bool isFromList() const; - - -private: - friend class DataFactoryImpl; - - bool changeSummaryType; - - bool bFromList; - - void* newValue(void* v, int size) const; - - PROPERTY_LIST getCompoundProperties(); - - void throwIfNestedChangeSummary() const; - - TypeImpl(const char* uri,const char* name, - bool isSeq= false, - bool isOp = false, - bool isAbs = false, - bool isData = false, - bool isFromList = false); - - TypeImpl(const Type* base, const char* uri,const char* name, - bool isSeq = false, - bool isOp = false, - bool isAbs = false, - bool isData = false, - bool isRest = false); - - void init(const char* uri, const char* inname, - bool isSeq, - bool isOp, - bool isAbs, - bool isData); - - - - TypeImpl(); - TypeImpl(const TypeImpl& t); - - - char* name; - char* typeURI; - - - bool isPrimitive; - bool isSequenced; - bool isOpen; - bool isAbstract; - - // baseType properties included - bool isResolved; - // check for circular dependency - bool isResolving; - - Types typeEnum; - - static char* types[num_types]; - - // alias support - - std::vector aliases; - - - PROPERTY_LIST props; - - - // type inheritance - TypeImpl* baseType; - bool brestriction; /* if this is a restriction of the base type - rather than an extension.*/ - // says how many of the props are really in this data object type. - unsigned int localPropsSize; - -}; - -}; -}; - -#endif //_TYPEIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.cpp deleted file mode 100644 index c1f7278ab6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 SDO_EXPORTS - #define SDO_EXPORTS -#endif - -#include "commonj/sdo/export.h" -#include -#include "commonj/sdo/Property.h" -#include "commonj/sdo/Type.h" -#include "commonj/sdo/TypeList.h" -#include "commonj/sdo/Logger.h" - -using namespace std; - -namespace commonj{ -namespace sdo { - - -/** TypeList provides access to a list of Types. - * - * The data factory can return a list of types available. This - * class wraps that list and provides access to Types by - * iteration - */ - -SDO_API TypeList::TypeList(std::vector p) : plist (p) -{ -} - -SDO_API TypeList::TypeList(const TypeList &pin) -{ - plist = std::vector(pin.getVec()); -} - -SDO_API TypeList::TypeList() -{ -} - -SDO_API TypeList::~TypeList() -{ -} - - -SDO_API const Type& TypeList::operator[] (int pos) const -{ - return *plist[pos]; -} - -SDO_API int TypeList::size () const -{ - return plist.size(); -} - -std::vector TypeList::getVec() const -{ - return plist; -} - -SDO_API void TypeList::insert (const Type* t) -{ - plist.insert(plist.end(),t); -} - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.h deleted file mode 100644 index b003a8d37d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/TypeList.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _TYPELIST_H_ -#define _TYPELIST_H_ -#include "commonj/sdo/export.h" - -#include -#include "commonj/sdo/Type.h" - -namespace commonj{ -namespace sdo -{ -class Type; - -/** TypeList - provides access to a list of Types - * - * The data factory can return a list of types available. This - * class wraps that list and provides access to Types by - * iteration - */ - -class TypeList -{ -private: - std::vector plist; - std::vector getVec() const; -public: - SDO_API TypeList(const TypeList &pin); - SDO_API TypeList(std::vector p); - SDO_API TypeList(); - virtual SDO_API ~TypeList(); - SDO_API const Type& operator[] (int pos) const; - SDO_API int size () const; - SDO_API void insert (const Type* t); -}; -}; -}; - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.cpp deleted file mode 100644 index d6dfd02c8e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XMLDocument.h" -namespace commonj -{ - namespace sdo - { - - XMLDocument::~XMLDocument() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.h deleted file mode 100644 index 757ba2113a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocument.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XMLDOCUMENT_H_ -#define _XMLDOCUMENT_H_ - - -#include "commonj/sdo/export.h" - -#include "commonj/sdo/DataObject.h" - -namespace commonj -{ - namespace sdo - { - /** XMLDocument - place for holding a graph - * - * The XMLDocument class provides a place to hold a loaded - * graph of data. The root element name is maintained here so that - * the graph can be serialized to the same name later. - */ - - - class XMLDocument : public RefCountingObject - { - - public: - - SDO_API virtual ~XMLDocument(); - - /** getRootDataObject- return the topmost data object - * - * When XML data is loaded, there is one base element which becomes - * the root data object. As this data object is not a property of any - * other data object, it has no name - * The XMLDocument stores the name which was in the XML file. - * This root data object has a URI and a Name only within this - * XMLDocument - */ - - SDO_API virtual DataObjectPtr getRootDataObject() const = 0; - - /** getRootElementName- return the topmost data objects name - * - * When XML data is loaded, there is one base element which becomes - * the root data object. As this data object is not a property of any - * other data object, it has no name - * The XMLDocument stores the name/uri which was in the XML file. - */ - SDO_API virtual const char* getRootElementURI() const = 0; - - /** getRootElementURI- return the topmost data objects uri - * - * When XML data is loaded, there is one base element which becomes - * the root data object. As this data object is not a property of any - * other data object, it has no name - * The XMLDocument stores the name/uri which was in the XML file. - */ - SDO_API virtual const char* getRootElementName() const = 0; - - /** getEncoding- return the encoding for this document - * - * NOT IMPLEMENTED - * This returns the encoding specified in the original XML. - */ - SDO_API virtual const char* getEncoding() const = 0; - - /** setEncoding- set the encoding to save this document - * - * This sets the encoding to save this data to XML. - */ - SDO_API virtual void setEncoding(const char* encoding) = 0; - SDO_API virtual void setEncoding(const SDOString& encoding) = 0; - - /** getXMLDeclaration - * - * NOT IMPLEMENTED - */ - SDO_API virtual bool getXMLDeclaration() const = 0; - - /** setXMLDeclaration - * - * Sets the XMLDeclaration - */ - SDO_API virtual void setXMLDeclaration(bool xmlDeclaration) = 0; - - /** getXMLVersion- return the xml version for this document - * - * NOT IMPLEMENTED - */ - SDO_API virtual const char* getXMLVersion() const = 0; - - /** setXMLVersion- sets the version for this document - * - * NOT IMPLEMENTED - */ - SDO_API virtual void setXMLVersion(const char* xmlVersion) = 0; - SDO_API virtual void setXMLVersion(const SDOString& xmlVersion) = 0; - - /** getSchemaLocation- return the schema location - * - * NOT IMPLEMENTED - */ - SDO_API virtual const char* getSchemaLocation() const = 0; - - /** setSchemaLocation - * - * Sets the XML Schema location. - */ - SDO_API virtual void setSchemaLocation(const char* schemaLocation) = 0; - SDO_API virtual void setSchemaLocation(const SDOString& schemaLocation) = 0; - - /** getNoNamespaceSchemaLocation - * - * NOT IMPLEMENTED - */ - SDO_API virtual const char* getNoNamespaceSchemaLocation() const = 0; - - /** setNoNamespaceSchemaLocation - * - * Sets the nonamespace schema location - */ - SDO_API virtual void setNoNamespaceSchemaLocation(const char* noNamespaceSchemaLocation) = 0; - SDO_API virtual void setNoNamespaceSchemaLocation(const SDOString& noNamespaceSchemaLocation) = 0; - - SDO_API friend std::istream& operator>>(std::istream& input, XMLDocument& doc); - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_XMLDOCUMENT_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.cpp deleted file mode 100644 index 1a97f26765..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XMLDocumentImpl.h" - -namespace commonj -{ - namespace sdo - { - XMLDocumentImpl::XMLDocumentImpl( - DataObjectPtr dob, - const char* rootURI, - const char* rootName) - : dataObject(dob), - rootElementURI(rootURI), - rootElementName(rootName), - xmlDeclaration(true), - encoding("UTF-8"), - xmlVersion("1.0") - { - } - - XMLDocumentImpl::~XMLDocumentImpl() - { - } - - void XMLDocumentImpl::setEncoding(const char* enc) - { - encoding = enc; - } - void XMLDocumentImpl::setEncoding(const SDOString& enc) - { - encoding = enc.c_str(); - } - - void XMLDocumentImpl::setXMLDeclaration(bool xmlDecl) - { - xmlDeclaration = xmlDecl; - } - - void XMLDocumentImpl::setXMLVersion(const char* xmlVer) - { - xmlVersion = xmlVer; - } - void XMLDocumentImpl::setXMLVersion(const SDOString& xmlVer) - { - xmlVersion = xmlVer.c_str(); - } - - void XMLDocumentImpl::setSchemaLocation(const char* schemaLoc) - { - schemaLocation = schemaLoc; - } - void XMLDocumentImpl::setSchemaLocation(const SDOString& schemaLoc) - { - schemaLocation = schemaLoc.c_str(); - } - - void XMLDocumentImpl::setNoNamespaceSchemaLocation(const char* noNamespaceSchemaLoc) - { - noNamespaceSchemaLocation = noNamespaceSchemaLoc; - } - void XMLDocumentImpl::setNoNamespaceSchemaLocation(const SDOString& noNamespaceSchemaLoc) - { - noNamespaceSchemaLocation = noNamespaceSchemaLoc.c_str(); - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.h deleted file mode 100644 index f7726a449c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLDocumentImpl.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XMLDocumentImpl_H_ -#define _XMLDocumentImpl_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/XMLDocument.h" -#include "commonj/sdo/DataObject.h" -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/SDOString.h" - - -namespace commonj -{ - namespace sdo - { - -/** XMLDocumentImpl place for holding a graph - * - * The XMLDocumentImpl class implements the abstract XMLDocument. - * Provides a place to hold a loaded - * graph of data. The root element name is maintained here so that - * the graph can be serialized to the same name later. - */ - - class XMLDocumentImpl : public XMLDocument - { - - public: - XMLDocumentImpl(); - - XMLDocumentImpl( - DataObjectPtr dataObject); - - XMLDocumentImpl( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName); - - virtual ~XMLDocumentImpl(); - - virtual DataObjectPtr getRootDataObject() const {return dataObject;} - virtual const char* getRootElementURI() const {return rootElementURI;} - virtual const char* getRootElementName() const {return rootElementName;} - virtual const char* getEncoding() const {return encoding;} - virtual void setEncoding(const char* enc); - virtual void setEncoding(const SDOString& enc); - - virtual bool getXMLDeclaration() const {return xmlDeclaration;} - virtual void setXMLDeclaration(bool xmlDecl); - - virtual const char* getXMLVersion() const {return xmlVersion;} - virtual void setXMLVersion(const char* xmlVer); - virtual void setXMLVersion(const SDOString& xmlVer); - - virtual const char* getSchemaLocation() const {return schemaLocation;} - virtual void setSchemaLocation(const char* schemaLoc); - virtual void setSchemaLocation(const SDOString& schemaLoc); - - virtual const char* getNoNamespaceSchemaLocation() const { return noNamespaceSchemaLocation;} - virtual void setNoNamespaceSchemaLocation(const char* noNamespaceSchemaLoc); - virtual void setNoNamespaceSchemaLocation(const SDOString& noNamespaceSchemaLoc); - - - friend std::istream& operator>>(std::istream& input, XMLDocumentImpl& doc); - private: - DataObjectPtr dataObject; - SDOXMLString rootElementURI; - SDOXMLString rootElementName; - SDOXMLString encoding; - bool xmlDeclaration; - SDOXMLString xmlVersion; - SDOXMLString schemaLocation; - SDOXMLString noNamespaceSchemaLocation; - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_XMLDocumentImpl_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.cpp deleted file mode 100644 index 0e1018ac99..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XMLHelper.h" -namespace commonj -{ - namespace sdo - { - ////////////////////////////////////////////////////////////////////// - // Construction/Destruction - ////////////////////////////////////////////////////////////////////// - XMLHelper::~XMLHelper() - { - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.h deleted file mode 100644 index 6ff248cd98..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelper.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XMLHELPER_H_ -#define _XMLHELPER_H_ - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/XMLDocument.h" -#include "commonj/sdo/RefCountingObject.h" - -namespace commonj -{ - namespace sdo - { - /** - * - * XMLHelper provides the ability to load XML data into - * a data object graph, according to a schema - */ - - class XMLHelper : public RefCountingObject - { - public: - - /** load/loadFile - loads xml data - * - * De-serializes the specified XML file building a graph of DataObjects. - * Returns a pointer to the root data object - */ - - SDO_API virtual XMLDocumentPtr createDocument( - const char* elementname = 0, - const char* rootElementURI=0) = 0; - SDO_API virtual XMLDocumentPtr createDocument( - const SDOString& elementname, - const SDOString& rootElementURI) = 0; - - SDO_API virtual XMLDocumentPtr loadFile( - const char* xmlFile, - const char* targetNamespaceURI=0) = 0; - SDO_API virtual XMLDocumentPtr loadFile( - const SDOString& xmlFile, - const SDOString& targetNamespaceURI = "") = 0; - - SDO_API virtual XMLDocumentPtr load( - std::istream& inXml, - const char* targetNamespaceURI=0) = 0; - SDO_API virtual XMLDocumentPtr load( - std::istream& inXml, - const SDOString& targetNamespaceURI = "") = 0; - - SDO_API virtual XMLDocumentPtr load( - const char* inXml, - const char* targetNamespaceURI=0) = 0; - SDO_API virtual XMLDocumentPtr load( - const SDOString& inXml, - const SDOString& targetNamespaceURI = "") = 0; - - /** save saves the graph to XML - * - * save - Serializes the datagraph to the XML file - */ - - SDO_API virtual void save(XMLDocumentPtr doc, - const char* xmlFile, - int indent = -1) = 0; - SDO_API virtual void save(XMLDocumentPtr doc, - const SDOString& xmlFile, - int indent = -1) = 0; - - SDO_API virtual void save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - const char* xmlFile, - int indent = -1) = 0; - SDO_API virtual void save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - const SDOString& xmlFile, - int indent = -1) = 0; - - /** save saves the graph to XML - * - * save - Serializes the datagraph to the XML stream - */ - - SDO_API virtual void save(XMLDocumentPtr doc, std::ostream& outXml, - int indent = -1) = 0; - - SDO_API virtual void save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - std::ostream& outXml, - int indent = -1) = 0; - SDO_API virtual void save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - std::ostream& outXml, - int indent = -1) = 0; - - /** save saves the graph to XML - * - * save - Serializes the datagraph to a string - */ - - SDO_API virtual char* save(XMLDocumentPtr doc, int indent = -1) = 0; - SDO_API virtual char* save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - int indent = -1) = 0; - SDO_API virtual char* save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - int indent = -1) = 0; - - /** createDocument creates an XMLDocument - * - * An XMLDocument holds a root data object and all its - * tree of children. This provides the means of storing the - * name to be applied to the root element when serializing - */ - - SDO_API virtual XMLDocumentPtr createDocument( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName) = 0; - SDO_API virtual XMLDocumentPtr createDocument( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName) = 0; - - /***********************************/ - /* Destructor */ - /***********************************/ - SDO_API virtual ~XMLHelper(); - - /** getErrorCount gets number of parse errors - * - * Parser error count - the parse may have - * succeeded or partially succeeded or failed. There - * may be errors to report or handle. - */ - - virtual int getErrorCount() const = 0; - - /** getErrorMessage gets the nth error message - * - * Each error has a message, usually giving the line and file - * in which the parser error occurred. - */ - - virtual const char* getErrorMessage(int errnum) const = 0; - - - }; - } // End - namespace sdo -} // End - namespace commonj - -#endif //_XMLHELPER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp deleted file mode 100644 index 37ad60e647..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.cpp +++ /dev/null @@ -1,488 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLFileWriter.h" // Include first to avoid libxml compile problems! -#include "commonj/sdo/SDOXMLStreamWriter.h" // Include first to avoid libxml compile problems! -#include "commonj/sdo/SDOXMLBufferWriter.h" // Include first to avoid libxml compile problems! -#include "commonj/sdo/XMLHelperImpl.h" -#include "commonj/sdo/XMLDocumentImpl.h" -#include -#include -#include -#include "commonj/sdo/SDOSAX2Parser.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/XSDTypeInfo.h" -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/DataFactoryImpl.h" - - -namespace commonj -{ - namespace sdo - { - - - ////////////////////////////////////////////////////////////////////// - // Construction/Destruction - ////////////////////////////////////////////////////////////////////// - - XMLHelperImpl::XMLHelperImpl(DataFactoryPtr df) - { - dataFactory = (DataFactory*)df; - if (!dataFactory) - { - dataFactory = DataFactory::getDataFactory(); - } - } - - XMLHelperImpl::~XMLHelperImpl() - { - clearErrors(); - } - - DataFactoryPtr XMLHelperImpl::getDataFactory() - { - if (!dataFactory) - { - dataFactory = DataFactory::getDataFactory(); - } - return dataFactory; - } - - XMLDocumentPtr XMLHelperImpl::createDocument(DataObjectPtr dataObject) - { - - SDOXMLString rootElementName = ""; - SDOXMLString rootElementURI = ""; - if (dataObject) - { - // Set the root element name to the name of the containment property - // or null if there is no container - try - { - DataObjectPtr cont = dataObject->getContainer(); - if (cont != 0) - { - const Property& containmentProp = dataObject->getContainmentProperty(); - rootElementName = containmentProp.getName(); - rootElementURI = cont->getType().getURI(); - } - else - { - DataFactory* df = dataFactory; - rootElementURI = dataObject->getType().getURI(); - rootElementName = ((DataFactoryImpl*)df)->getRootElementName().c_str(); - } - } - catch (SDOPropertyNotFoundException&) - {} - } - - return new XMLDocumentImpl(dataObject, rootElementURI, rootElementName); - } - - -// const TypeImpl* XMLHelperImpl::findRoot(DataFactory* df, -// const char* rootElementURI) -// { -// if (rootElementURI != 0) -// { -// return ((DataFactoryImpl*)df)->findTypeImpl -// (rootElementURI, "RootType"); -// } - -// const TypeList& tl = df->getTypes(); -// for (int i=0;ifindTypeImpl(tl[i].getURI(), "RootType"); -// } -// } - -// return 0; - -// } - const TypeImpl* XMLHelperImpl::findRoot(DataFactory* df, - const SDOString& rootElementURI) - { - - const TypeImpl* rootTypePtr = ((DataFactoryImpl*)df)->findTypeImpl(rootElementURI.c_str(), - "RootType"); - - if (rootTypePtr != 0) - { - return rootTypePtr; - } - - const TypeList& tl = df->getTypes(); - for (int i = 0; i < tl.size(); i++) - { - if (!strcmp("RootType", tl[i].getName())) - { - return ((DataFactoryImpl*)df)->findTypeImpl(tl[i].getURI(), "RootType"); - } - } - return 0; - } - - XMLDocumentPtr XMLHelperImpl::createDocument(const char* elementname, - const char* rootElementURI) - { - if (rootElementURI == 0) - { - if (elementname == 0) - { - return createDocument(SDOString(""), SDOString("")); - } - else - { - return createDocument(SDOString(elementname), SDOString("")); - } - } - else - { - if (elementname == 0) - { - return createDocument(SDOString(""), SDOString(rootElementURI)); - } - else - { - return createDocument(SDOString(elementname), SDOString(rootElementURI)); - } - } - } - -// XMLDocumentPtr XMLHelperImpl::createDocument(const char* elementname, -// const char* rootElementURI) -// { -// DataFactory* dp = (DataFactory*)getDataFactory(); -// if (dp == 0) return 0; - -// const TypeImpl* rType = findRoot(dp,rootElementURI); -// if (rType == 0) -// { -// std::string msg("createDocument - cannot find element "); -// if (elementname != 0) msg += elementname; -// SDO_THROW_EXCEPTION("createDocument", SDOUnsupportedOperationException, -// msg.c_str()); -// } - -// if ((elementname != 0) && (strlen(elementname) != 0)) -// { -// PropertyImpl* pl = rType->getPropertyImpl(elementname); -// if (pl == 0) -// { -// std::string msg("createDocument - cannot find element "); -// msg += elementname; -// SDO_THROW_EXCEPTION("createDocument", SDOUnsupportedOperationException, -// msg.c_str()); -// } - -// const Type& tp = pl->getType(); -// DataObjectPtr dob = dp->create(tp); -// return new XMLDocumentImpl(dob, -// tp.getURI(), /*tp.getName()*/ elementname); -// } -// else -// { -// const Property& pl = rType->getProperty((unsigned int)0); -// const Type& tp = pl.getType(); -// DataObjectPtr dob = dp->create(tp); -// return new XMLDocumentImpl(dob, -// tp.getURI(), /*tp.getName()*/ pl.getName()); -// } - -// std::string msg("createDocument - unable to find root type in namespace "); -// if (rootElementURI != 0) -// msg += rootElementURI; -// else -// msg += " NULL"; -// SDO_THROW_EXCEPTION("createDocument", SDOUnsupportedOperationException, -// msg.c_str()); -// } - - // +++ - - XMLDocumentPtr XMLHelperImpl::createDocument(const SDOString& elementname, - const SDOString& rootElementURI) - { - DataFactory* dp = (DataFactory*)getDataFactory(); - if (dp == 0) return 0; - - const TypeImpl* rType = findRoot(dp, rootElementURI); - if (rType == 0) - { - std::string msg("createDocument - cannot find element "); - msg += elementname; - SDO_THROW_EXCEPTION("createDocument", SDOUnsupportedOperationException, - msg.c_str()); - } - - if (elementname.length() != 0) - { - PropertyImpl* pl = rType->getPropertyImpl(elementname); - if (pl == 0) - { - std::string msg("createDocument - cannot find element "); - msg += elementname; - SDO_THROW_EXCEPTION("createDocument", SDOUnsupportedOperationException, - msg.c_str()); - } - - const Type& tp = pl->getType(); - DataObjectPtr dob = dp->create(tp); - return new XMLDocumentImpl(dob, - tp.getURI(), /*tp.getName()*/ - elementname.c_str()); - } - else - { - const Property& pl = rType->getProperty((unsigned int)0); - const Type& tp = pl.getType(); - DataObjectPtr dob = dp->create(tp); - return new XMLDocumentImpl(dob, - tp.getURI(), /*tp.getName()*/ pl.getName()); - } - - std::string msg("createDocument - unable to find root type in namespace "); - msg += " NULL"; - SDO_THROW_EXCEPTION("createDocument", SDOUnsupportedOperationException, - msg.c_str()); - } - - // --- - - XMLDocumentPtr XMLHelperImpl::createDocument( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName) - { - return new XMLDocumentImpl(dataObject, rootElementURI, rootElementName); - } - XMLDocumentPtr XMLHelperImpl::createDocument( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName) - { - return new XMLDocumentImpl(dataObject, rootElementURI.c_str(), rootElementName.c_str()); - } - - XMLDocumentPtr XMLHelperImpl::loadFile( - const char* xmlFile, - const char* targetNamespaceURI) - { - DataObjectPtr rootDataObject; - clearErrors(); - SDOSAX2Parser sdoParser(getDataFactory(), targetNamespaceURI, rootDataObject, - this); - if (sdoParser.parse(xmlFile) == 0) - { - return createDocument(rootDataObject); - } - return 0; - } - XMLDocumentPtr XMLHelperImpl::loadFile( - const SDOString& xmlFile, - const SDOString& targetNamespaceURI) - { - DataObjectPtr rootDataObject; - clearErrors(); - SDOSAX2Parser sdoParser(getDataFactory(), - targetNamespaceURI.c_str(), - rootDataObject, - this); - if (sdoParser.parse(xmlFile.c_str()) == 0) - { - return createDocument(rootDataObject); - } - return 0; - } - - - XMLDocumentPtr XMLHelperImpl::load( - std::istream& inXml, - const char* targetNamespaceURI) - { - DataObjectPtr rootDataObject; - SDOSAX2Parser sdoParser(getDataFactory(), targetNamespaceURI, rootDataObject, - this); - clearErrors(); - inXml>>sdoParser; - return createDocument(rootDataObject); - } - XMLDocumentPtr XMLHelperImpl::load( - std::istream& inXml, - const SDOString& targetNamespaceURI) - { - DataObjectPtr rootDataObject; - SDOSAX2Parser sdoParser(getDataFactory(), - targetNamespaceURI.c_str(), - rootDataObject, - this); - clearErrors(); - inXml>>sdoParser; - return createDocument(rootDataObject); - } - - XMLDocumentPtr XMLHelperImpl::load( - const char* inXml, - const char* targetNamespaceURI) - { - std::istringstream str(inXml); - return load(str, targetNamespaceURI); - } - XMLDocumentPtr XMLHelperImpl::load( - const SDOString& inXml, - const SDOString& targetNamespaceURI) - { - std::istringstream str(inXml); - return load(str, targetNamespaceURI); - } - - void XMLHelperImpl::save(XMLDocumentPtr doc, const char* xmlFile, int indent) - { - SDOXMLFileWriter writer(xmlFile, dataFactory); - writer.write(doc, indent); - } - void XMLHelperImpl::save(XMLDocumentPtr doc, const SDOString& xmlFile, int indent) - { - SDOXMLFileWriter writer(xmlFile.c_str(), dataFactory); - writer.write(doc, indent); - } - - void XMLHelperImpl::save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - const char* xmlFile, - int indent) - { - save(createDocument(dataObject,rootElementURI, rootElementName), xmlFile, - indent); - } - void XMLHelperImpl::save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - const SDOString& xmlFile, - int indent) - { - save(createDocument(dataObject,rootElementURI, rootElementName), xmlFile, - indent); - } - - - // Serializes the datagraph to a stream - void XMLHelperImpl::save(XMLDocumentPtr doc, std::ostream& outXml, - int indent) - { - SDOXMLStreamWriter writer(outXml, dataFactory); - writer.write(doc, indent); - } - - void XMLHelperImpl::save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - std::ostream& outXml, - int indent ) - { - save(createDocument(dataObject,rootElementURI, rootElementName), outXml, indent); - } - void XMLHelperImpl::save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - std::ostream& outXml, - int indent ) - { - save(createDocument(dataObject,rootElementURI, rootElementName), outXml, indent); - } - - // Serializes the datagraph to a std::string - char* XMLHelperImpl::save(XMLDocumentPtr doc, - int indent) - { - SDOXMLBufferWriter writer(dataFactory); - writer.write(doc, indent); - SDOXMLString ret = writer.getBuffer(); - char* retString = new char[strlen(ret) +1]; - strcpy(retString, ret); - return retString; - } - char* XMLHelperImpl::save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - int indent) - { - return save(createDocument(dataObject,rootElementURI, rootElementName), - indent); - } - char* XMLHelperImpl::save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - int indent) - { - return save(createDocument(dataObject,rootElementURI, rootElementName), - indent); - } - - int XMLHelperImpl::getErrorCount() const - { - return parseErrors.size(); - } - - - const char* XMLHelperImpl::getErrorMessage(int errnum) const - { - if (errnum >= 0 && errnum < parseErrors.size()) - { - return parseErrors[errnum]; - } - return 0; - } - - void XMLHelperImpl::setError(const char* message) - { - if (message == 0) return; - char * m = new char[strlen(message) + 1]; - strcpy(m,message); - m[strlen(message)] = 0; - parseErrors.push_back(m); - } - - void XMLHelperImpl::clearErrors() - { - while (!parseErrors.empty()) - { - if (*parseErrors.begin() != 0) - { - delete (char*)(*parseErrors.begin()); - } - parseErrors.erase(parseErrors.begin()); - } - } - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h deleted file mode 100644 index d7200746dd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLHelperImpl.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XMLHELPERIMPL_H_ -#define _XMLHELPERIMPL_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/XMLHelper.h" -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/SchemaInfo.h" -#include "commonj/sdo/TypeDefinitionsImpl.h" -#include "commonj/sdo/ParserErrorSetter.h" - -namespace commonj -{ - namespace sdo - { - - /** - * - * XMLHelperImpl is the implementation of the abstract class - * XMLHelper. - * Provides the ability to load XML data into - * a data object graph, according to a schema - */ - - class XMLHelperImpl : public XMLHelper, ParserErrorSetter - { - public: - // Constructor - XMLHelperImpl(DataFactoryPtr dataFactory); - - // Destructor - virtual ~XMLHelperImpl(); - - virtual int getErrorCount() const; - virtual const char* getErrorMessage(int errnum) const; - virtual void setError(const char* error); - - - /** load/loadFile - loads xml data - * - * De-serializes the specified XML file building a graph of DataObjects. - * Returns a pointer to the root data object - */ - - virtual XMLDocumentPtr createDocument( - const char* elementname= 0, - const char* rootElementURI=0); - - virtual XMLDocumentPtr createDocument( - const SDOString& elementname, - const SDOString& rootElementURI); - - virtual XMLDocumentPtr loadFile( - const char* xmlFile, - const char* targetNamespaceURI = 0); - virtual XMLDocumentPtr loadFile( - const SDOString& xmlFile, - const SDOString& targetNamespaceURI = ""); - - virtual XMLDocumentPtr load( - std::istream& inXml, - const char* targetNamespaceURI = 0); - virtual XMLDocumentPtr load( - std::istream& inXml, - const SDOString& targetNamespaceURI = ""); - - virtual XMLDocumentPtr load( - const char* inXml, - const char* targetNamespaceURI = 0); - virtual XMLDocumentPtr load( - const SDOString& inXml, - const SDOString& targetNamespaceURI = ""); - - virtual XMLDocumentPtr createDocument( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName); - virtual XMLDocumentPtr createDocument( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName); - - /** save saves the graph to XML - * - * save - Serializes the datagraph to the XML file - */ - - void save(XMLDocumentPtr doc, - const char* xmlFile, - int indent = -1); - void save(XMLDocumentPtr doc, - const SDOString& xmlFile, - int indent = -1); - - void save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - const char* xmlFile, int indent = -1); - void save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - const SDOString& xmlFile, int indent = -1); - - /** save saves the graph to XML - * - * save - Serializes the datagraph to a stream - */ - - void save(XMLDocumentPtr doc, std::ostream& outXml, - int indent = -1); - void save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - std::ostream& outXml, - int indent = -1); - void save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - std::ostream& outXml, - int indent = -1); - - /** save saves the graph to XML - * - * save - Serializes the datagraph to a string - */ - char* save(XMLDocumentPtr doc,int indent = -1); - char* save( - DataObjectPtr dataObject, - const char* rootElementURI, - const char* rootElementName, - int indent = -1); - char* save( - DataObjectPtr dataObject, - const SDOString& rootElementURI, - const SDOString& rootElementName, - int indent = -1); - - private: - int parse(const char* source); - void clearErrors(); - - std::vector parseErrors; - - // Instance variables - DataFactoryPtr dataFactory; - SDOXMLString targetNamespaceURI; - - XMLDocumentPtr createDocument(DataObjectPtr dataObject); - -// const TypeImpl* findRoot(DataFactory* df, -// const char* rootElementURI); - const TypeImpl* findRoot(DataFactory* df, - const SDOString& rootElementURI); - - DataFactoryPtr getDataFactory(); - }; - - } // End - namespace sdo -} // End - namespace commonj - -#endif // _XMLHELPERIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.cpp deleted file mode 100644 index 9f897a8525..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XMLQName.h" -namespace commonj -{ - namespace sdo - { - - - XMLQName::XMLQName() - { - } - - XMLQName::XMLQName(const SDOXMLString& sdouri) - { - int index = sdouri.lastIndexOf('#'); - if (index < 0) - { - localName = sdouri; - } - else - { - uri = sdouri.substring(0, index); - localName = sdouri.substring(index+1); - } - } - - XMLQName::XMLQName( - const SDOXMLString& qname, - const SAX2Namespaces& globalNamespaces, - const SAX2Namespaces& localNamespaces) - { - SDOXMLString prefix; - - int index = qname.firstIndexOf(':'); - if (index < 0) - { - localName = qname; - } - else - { - prefix = qname.substring(0, index); - localName = qname.substring(index+1); - } - - const SDOXMLString* namespaceURI = localNamespaces.find(prefix); - if (namespaceURI == 0) - { - namespaceURI = globalNamespaces.find(prefix); - } - if (namespaceURI != 0) - { - uri = *namespaceURI; - } - - } - - XMLQName::~XMLQName() - { - } - - SDOXMLString XMLQName::getSDOName() const - { - return uri + "#" + localName; - } - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.h deleted file mode 100644 index 4efeb15bc5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XMLQName.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XMLQName_H_ -#define _XMLQName_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/DataObject.h" - -namespace commonj -{ - namespace sdo - { - -/** XMLQname wraps a qualified name - * - * This class holds a QName and provides access to its - * members - */ - - class XMLQName - { - - public: - XMLQName(); - XMLQName(const SDOXMLString& sdoUri); - XMLQName( - const SDOXMLString& qname, - const SAX2Namespaces& globalNamespaces, - const SAX2Namespaces& localNamespaces = SAX2Namespaces()); - - SDOXMLString getSDOName() const ; - const SDOXMLString& getURI() const {return uri;} - const SDOXMLString& getLocalName() const {return localName;} - virtual ~XMLQName(); - - private: - SDOXMLString uri; - SDOXMLString localName; - - - }; - } // End - namespace sdo -} // End - namespace commonj - - -#endif //_XMLQName_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.cpp deleted file mode 100644 index 310716cc8c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XSDHelper.h" - -namespace commonj -{ - namespace sdo - { - - - XSDHelper::~XSDHelper() - { - } - - - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.h deleted file mode 100644 index 3cf07f310d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelper.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XSDHELPER_H_ -#define _XSDHELPER_H_ - - -#include "commonj/sdo/export.h" -#include "commonj/sdo/RefCountingObject.h" -#include "commonj/sdo/DataFactory.h" -#include "commonj/sdo/TypeDefinitions.h" - -namespace commonj -{ - namespace sdo - { - - /** - * - * XSDHelper provides the means of loading and saving XSD information - * from/to the metadata (Types and properties) - */ - - class XSDHelper : public RefCountingObject - { - public: - - /** define builds types/properties from file or stream - * - * define/defineFile - * - * Populates the data factory with Types and Properties from the schema - * Loads from file, stream or char* buffer. - * The return value is the URI of the root Type - * - */ - - SDO_API virtual const char* defineFile(const char* schemaFile, bool loadImportNamespace = false) = 0; - SDO_API virtual const char* defineFile(const SDOString& schemaFile, bool loadImportNamespace = false) = 0; - SDO_API virtual const char* define(std::istream& schema, bool loadImportNamespace = false) = 0; - SDO_API virtual const char* define(const char* schema, bool loadImportNamespace = false) = 0; - SDO_API virtual const char* define(const SDOString& schema, bool loadImportNamespace = false) = 0; - - /** generate buildsXSD from types/properties - * - * generate/generateFile - * - * Saves the types/properties to an XSD stream or file - * - */ - - SDO_API virtual char* generate( - const TypeList& types, - const char* targetNamespaceURI = "", - int indent = -1) = 0; - SDO_API virtual char* generate( - const TypeList& types, - const SDOString& targetNamespaceURI = "", - int indent = -1) = 0; - SDO_API virtual void generate( - const TypeList& types, - std::ostream& outXsd, - const char* targetNamespaceURI = "", - int indent = -1) = 0; - SDO_API virtual void generate( - const TypeList& types, - std::ostream& outXsd, - const SDOString& targetNamespaceURI = "", - int indent = -1) = 0; - SDO_API virtual void generateFile( - const TypeList& types, - const char* fileName, - const char* targetNamespaceURI = "", - int indent = -1) = 0; - SDO_API virtual void generateFile( - const TypeList& types, - const SDOString& fileName, - const SDOString& targetNamespaceURI = "", - int indent = -1) = 0; - - /***********************************/ - /* Destructor */ - /***********************************/ - SDO_API virtual ~XSDHelper(); - - /** getDataFactory() - * - * Return the DataFactory - */ - - SDO_API virtual DataFactoryPtr getDataFactory() = 0; - - /** getRootTypeURI - * - * Return the URI for the root Type - */ - - SDO_API virtual const char* getRootTypeURI() = 0; - - /** getErrorCount gets number of parse errors - * - * Parser error count - the parse may have - * succeeded or partially succeeded or failed. There - * may be errors to report or handle. - */ - - virtual int getErrorCount() const = 0; - - /** getErrorMessage gets the nth error message - * - * Each error has a message, usually giving the line and file - * in which the parser error occurred. - */ - - virtual const char* getErrorMessage(int errnum) const = 0; - - /** - * - * used for defining types from type definitions - */ - - SDO_API virtual void defineTypes(TypeDefinitions& types) = 0; - - - }; - }//End - namespace sdo -} // End - namespace commonj - -#endif //_XSDHELPER_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp deleted file mode 100644 index aa99a3260e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp +++ /dev/null @@ -1,652 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDOXMLFileWriter.h" // Include first to avoid libxml compile problems! -#include "commonj/sdo/SDOXMLStreamWriter.h" // Include first to avoid libxml compile problems! -#include "commonj/sdo/SDOXMLBufferWriter.h" // Include first to avoid libxml compile problems! -#include "commonj/sdo/SDOXSDFileWriter.h" -#include "commonj/sdo/SDOXSDStreamWriter.h" -#include "commonj/sdo/SDOXSDBufferWriter.h" -#include "commonj/sdo/XSDHelperImpl.h" -#include "commonj/sdo/XMLDocumentImpl.h" -#include -#include -#include -#include "commonj/sdo/SDOSchemaSAX2Parser.h" -#include "commonj/sdo/SDOSAX2Parser.h" -#include "commonj/sdo/XSDPropertyInfo.h" -#include "commonj/sdo/XSDTypeInfo.h" - -#include "commonj/sdo/SDORuntimeException.h" -#include "commonj/sdo/DASProperty.h" -#include "commonj/sdo/Logging.h" -#include "commonj/sdo/Type.h" - -namespace commonj -{ - namespace sdo - { - - /** XSDHelperImpl - * - * XSDHelperImpl is the implementation of the abstract class - * XSDHelper. - * Provides the means of loading and saving XSD information - * from/to the metadata (Types and properties) - */ - - XSDHelperImpl::XSDHelperImpl(DataFactoryPtr df) - { - dataFactory = (DataFactory*)df; - if (!dataFactory) - { - dataFactory = DataFactory::getDataFactory(); - } - } - - XSDHelperImpl::~XSDHelperImpl() - { - clearErrors(); - } - - /** define builds types/properties from file or stream - * - * define/defineFile - * - * Populates the data factory with Types and Properties from the schema - * Loads from file, stream or char* buffer. - * The return value is the URI of the root Type - * - */ - - const char* XSDHelperImpl::defineFile(const char* schema, bool loadImportNamespace) - { - - SDOSchemaSAX2Parser schemaParser(schemaInfo, this, loadImportNamespace); - clearErrors(); - if (schemaParser.parse(schema) == 0) - { - defineTypes(schemaParser.getTypeDefinitions()); - return schemaInfo.getTargetNamespaceURI(); - } - return 0; - } - const char* XSDHelperImpl::defineFile(const SDOString& schema, bool loadImportNamespace) - { - - SDOSchemaSAX2Parser schemaParser(schemaInfo, this, loadImportNamespace); - clearErrors(); - if (schemaParser.parse(schema.c_str()) == 0) - { - defineTypes(schemaParser.getTypeDefinitions()); - return schemaInfo.getTargetNamespaceURI(); - } - return 0; - } - - const char* XSDHelperImpl::define(std::istream& schema, bool loadImportNamespace) - { - SDOSchemaSAX2Parser schemaParser(schemaInfo, this, loadImportNamespace); - clearErrors(); - schema >> schemaParser; - defineTypes(schemaParser.getTypeDefinitions()); - return schemaInfo.getTargetNamespaceURI(); - } - - const char* XSDHelperImpl::define(const char* schema, bool loadImportNamespace) - { - std::istringstream str(schema); - SDOSchemaSAX2Parser schemaParser(schemaInfo, this, loadImportNamespace); - clearErrors(); - str >> schemaParser; - defineTypes(schemaParser.getTypeDefinitions()); - return schemaInfo.getTargetNamespaceURI(); - return define(str); - } - const char* XSDHelperImpl::define(const SDOString& schema, bool loadImportNamespace) - { - std::istringstream str(schema); - SDOSchemaSAX2Parser schemaParser(schemaInfo, this, loadImportNamespace); - clearErrors(); - str >> schemaParser; - defineTypes(schemaParser.getTypeDefinitions()); - return schemaInfo.getTargetNamespaceURI(); - return define(str); - } - - void XSDHelperImpl::newSubstitute(const char* entryName, - PropertyDefinitionImpl& prop) - { - try - { - const char* typeUri = prop.substituteUri.isNull() ? - prop.typeUri : prop.substituteUri; - const Type& rootType = dataFactory->getType(typeUri, entryName); - PropertyList pl = rootType.getProperties(); - for (int j = 0; j < pl.size(); j++) - { - if (!pl[j].getType().isDataType() - && strcmp(pl[j].getType().getURI(),Type::SDOTypeNamespaceURI.c_str())) - { - // recurse the tree.. - newSubstitute(pl[j].getType().getName(), - prop); - - if (!strcmp(pl[j].getName(),prop.substituteName)) - { - dataFactory->setPropertySubstitute(rootType.getURI(), - rootType.getName(), - pl[j].getName(), - prop.name, - typeUri, - prop.typeName); - XSDPropertyInfo* pi = (XSDPropertyInfo*) - ((DASProperty*)&pl[j])->getDASValue("XMLDAS::PropertyInfo"); - if (pi) - { - PropertyDefinitionImpl& propdef = (PropertyDefinitionImpl&)pi->getPropertyDefinition(); - propdef.substituteNames.push_back(prop.name); - propdef.substituteLocalNames.push_back(prop.localname); - } - - } - - } - } - } - catch (const SDORuntimeException&) - { - } - } - - void XSDHelperImpl::addSubstitutes(PropertyDefinitionImpl& prop, - TypeDefinitionImpl& ty) - { - try - { - const char* typeUri = prop.substituteUri.isNull() ? - ty.uri : prop.substituteUri; - DataFactoryImpl* df = (DataFactoryImpl*)(DataFactory*)dataFactory; - const Type* rootType = df->findType(typeUri,"RootType"); - if (rootType == 0) return; - PropertyList pl = rootType->getProperties(); - for (int j = 0; j < pl.size(); j++) - { - XSDPropertyInfo* pi = (XSDPropertyInfo*) - ((DASProperty*)&pl[j])->getDASValue("XMLDAS::PropertyInfo"); - if (pi) - { - PropertyDefinitionImpl& propdef = (PropertyDefinitionImpl&)pi->getPropertyDefinition(); - if (propdef.isSubstitute && propdef.substituteName.equals(prop.name)) - { - - LOGINFO_1(INFO,"XSDHelper adding substitute for property %s", (const char*)prop.name); - - dataFactory->setPropertySubstitute(typeUri,ty.name, - prop.name, propdef.name, - pl[j].getType().getURI(), - pl[j].getType().getName()); - prop.substituteNames.push_back(propdef.name); - prop.substituteLocalNames.push_back(propdef.localname); - } - } - } - } - catch (const SDORuntimeException&) - { - } - } - - - /** defineTypes - * - * This method works through all the data gathered during parsing - * and defines all the types using the data factory. - */ - - void XSDHelperImpl::defineTypes(TypeDefinitions& types) - { - defineTypes(types.getTypeDefinitions()); - } - - - /** defineTypes - * - * This method works through all the data gathered during parsing - * and defines all the types using the data factory. - */ - - void XSDHelperImpl::defineTypes(TypeDefinitionsImpl& typedefs) - { - DataFactoryImpl* df = (DataFactoryImpl*)(DataFactory*)dataFactory; - - XMLDAS_TypeDefs types = typedefs.types; - XMLDAS_TypeDefs::iterator iter; - - - for (iter=types.begin(); iter != types.end(); iter++) - { - TypeDefinitionImpl& ty = iter->second; - try - { - /* - string isSeqCode = "false"; - if (ty.isSequenced) - isSeqCode = "true"; - string isOpenCode = "false"; - if (ty.isOpen) - isOpenCode = "true"; - string isAbstractCode = "false"; - if (ty.isAbstract) - isAbstractCode = "true"; - string uriCode = "0"; - if (!ty.uri.isNull()) - { - uriCode = "\"" + string(ty.uri) + "\""; - } - - string addTypeCode = "dataFactory->addType(\n" - + uriCode + ", \"" + string(ty.name) + "\", \n" - + isSeqCode + ", " + isOpenCode + ", " + isAbstractCode +");"; - cout << addTypeCode.c_str() <addType((const char*)ty.uri, (const char*)ty.name, ty.isSequenced, - ty.isOpen, ty.isAbstract, ty.dataType, ty.isFromList); - df->setDASValue( - (const char*)ty.uri, (const char*)ty.name, - "XMLDAS::TypeInfo", - new XSDTypeInfo(ty)); - - // add aliases - if (!ty.aliases.isNull()) - { - SDOXMLString al = ty.aliases; - SDOXMLString al1 = ""; - int index; - while (!al.isNull() && !al.equals("")) - { - index = al.lastIndexOf(' '); - if (index < 0) - { - al1 = al; - al = ""; - } - else - { - al1 = al.substring(index + 1); - al = al.substring(0,index); - } - if (!al1.isNull() && !al1.equals("")) - { - df->setAlias( - ty.uri, - ty.name, - (const char*)al1); - } - } - } - - } - catch (SDORuntimeException& e) - { - SDO_RETHROW_EXCEPTION("defineTypes", e); - } - } - for (iter=types.begin(); iter != types.end(); iter++) - { - TypeDefinitionImpl& ty = iter->second; - if (!ty.parentTypeName.isNull()) - { - try - { - /* - string uriCode = "0"; - if (!ty.uri.isNull()) - { - uriCode = "\"" + string(ty.uri) + "\""; - } - string parentUriCode = "0"; - if (!ty.uri.isNull()) - { - parentUriCode = "\"" + string(ty.parentTypeUri) + "\""; - } - - string addTypeCode = "dataFactory->setBaseType(\n" - + uriCode + ", \"" + string(ty.name) + "\", \n" - + parentUriCode + ", \"" + string(ty.parentTypeName) + "\");"; - - cout << addTypeCode.c_str() <setBaseType( - (const char*)ty.uri, - (const char*)ty.name, - (const char*)ty.parentTypeUri, - (const char*)ty.parentTypeName, - (const char*)ty.isRestriction); - } - catch (SDORuntimeException& e) - { - SDO_RETHROW_EXCEPTION("defineTypes", e); - } - } - - XmlDasPropertyDefs::iterator propsIter; - for (propsIter = ty.properties.begin(); propsIter != ty.properties.end(); propsIter++) - { - PropertyDefinitionImpl& prop = *propsIter; - - // For a refence we need to determine the type from the - // global element declaration - if(prop.isReference) - { - - bool refFound = false; - - if (prop.name.isNull()) - prop.name = prop.typeName; - - - XMLDAS_TypeDefs::iterator refTypeIter = - types.find(TypeDefinitionsImpl::getTypeQName(prop.typeUri, "RootType")); - if(refTypeIter != types.end()) - { - - TypeDefinitionImpl rootTy = refTypeIter->second; - - // find the property on the root type - XmlDasPropertyDefs::iterator refPropsIter; - for (refPropsIter = rootTy.properties.begin(); refPropsIter != rootTy.properties.end(); refPropsIter++) - { - - if (refPropsIter->localname.equals(prop.typeName)) - { - prop.typeUri = refPropsIter->typeUri; - prop.typeName = refPropsIter->typeName; - refFound = true; - } - } - } - if (!refFound) - { - - // Check if this type is already defined to the data factory - try - { - const Type& rootType = dataFactory->getType(prop.typeUri, "RootType"); - PropertyList pl = rootType.getProperties(); - - for (int j = 0; j < pl.size(); j++) - { - - XSDPropertyInfo* pi = (XSDPropertyInfo*) - ((DASProperty*)&pl[j])->getDASValue("XMLDAS::PropertyInfo"); - - - - if (prop.typeName.equals(pl[j].getName()) - || (pi && prop.typeName.equals(pi->getPropertyDefinition().localname))) - { - prop.typeUri = pl[j].getType().getURI(); - prop.typeName = pl[j].getType().getName(); - refFound = true; - break; - } - } - } - catch (const SDORuntimeException&) - { - } - } - // If we haven't been able to resolve this reference we should ignore it - if (!refFound) - { - LOGINFO_1(INFO,"XsdHelper:no matching reference for %s", - (const char *)prop.name); - continue; - } - } - - if (prop.name.isNull()) - { - continue; - } - XMLDAS_TypeDefs::iterator propTypeIter = - types.find(TypeDefinitionsImpl::getTypeQName(prop.typeUri, prop.typeName)); - if(propTypeIter != types.end()) - { - prop.typeName = propTypeIter->second.name; - } - - try - { - - df->addPropertyToType((const char*)ty.uri, (const char*)ty.name, - (const char*)prop.name, - (const char*)prop.typeUri, - (const char*)prop.typeName, - (const char*)prop.isMany, - (const char*)prop.isReadOnly, - (const char*)prop.isContainment); - - LOGINFO_1(INFO,"XSDHelper adds property %s",(const char*)(prop.name)); - - if (!prop.aliases.isNull()) - { - SDOXMLString al = prop.aliases; - SDOXMLString al1 = ""; - int index; - while (!al.isNull() && !al.equals("")) - { - index = al.lastIndexOf(' '); - if (index < 0) - { - al1 = al; - al = ""; - } - else - { - al1 = al.substring(index + 1); - al = al.substring(0,index); - } - if (!al1.isNull() && !al1.equals("")) - { - df->setAlias( - (const char*)ty.uri, - (const char*)ty.name, - (const char*)prop.name, - (const char*)al1); - } - } - } - if (prop.isSubstitute) - { - // we have a new substitute - so will check the existing graph for - // substitutions to insert - - LOGINFO_1(INFO,"XSDHelper: Found new substitute %s",(const char*)(prop.name)); - - newSubstitute( "RootType",prop); - } - else - { - addSubstitutes(prop,ty); - } - - // Do not add DASValue to ChangeSummary - if (!(prop.typeUri.equals(Type::SDOTypeNamespaceURI.c_str()) - && prop.typeName.equals("ChangeSummary"))) - { - df->setDASValue( - ty.uri, ty.name, - prop.name, - "XMLDAS::PropertyInfo", - new XSDPropertyInfo(prop)); - } - } - catch (SDORuntimeException& e) - { - SDO_RETHROW_EXCEPTION("defineTypes", e); - } - } - - } - } // End - defineTypes - - /** getDataFactory returns the factory - * - */ - - DataFactoryPtr XSDHelperImpl::getDataFactory() - { - return dataFactory; - } - - - /** generate buildsXSD from types/properties - * - * generate/generateFile - * - * Saves the types/properties to an XSD stream or file - * - */ - - void XSDHelperImpl::generateFile( - const TypeList& types, - const char* fileName, - const char* targetNamespaceURI, - int indent - ) - { - SDOXSDFileWriter writer(fileName); - DataFactory* fac = dataFactory; - writer.write(types, targetNamespaceURI, - ((DataFactoryImpl*)fac)->getOpenProperties(), indent); - } - void XSDHelperImpl::generateFile( - const TypeList& types, - const SDOString& fileName, - const SDOString& targetNamespaceURI, - int indent - ) - { - SDOXSDFileWriter writer(fileName.c_str()); - DataFactory* fac = dataFactory; - writer.write(types, targetNamespaceURI.c_str(), - ((DataFactoryImpl*)fac)->getOpenProperties(), indent); - } - - void XSDHelperImpl::generate( - const TypeList& types, - std::ostream& outXml, - const char* targetNamespaceURI, - int indent - ) - { - SDOXSDStreamWriter writer(outXml); - DataFactory* fac = dataFactory; - writer.write(types, targetNamespaceURI, - ((DataFactoryImpl*)fac)->getOpenProperties(), indent); - } - void XSDHelperImpl::generate( - const TypeList& types, - std::ostream& outXml, - const SDOString& targetNamespaceURI, - int indent - ) - { - SDOXSDStreamWriter writer(outXml); - DataFactory* fac = dataFactory; - writer.write(types, targetNamespaceURI.c_str(), - ((DataFactoryImpl*)fac)->getOpenProperties(), indent); - } - - char* XSDHelperImpl::generate( - const TypeList& types, - const char* targetNamespaceURI, - int indent - ) - { - SDOXSDBufferWriter writer; - DataFactory* fac = dataFactory; - writer.write(types, targetNamespaceURI, - ((DataFactoryImpl*)fac)->getOpenProperties(), indent); - SDOXMLString ret = writer.getBuffer(); - char* retString = new char[strlen(ret) +1]; - strcpy(retString, ret); - return retString; - } - char* XSDHelperImpl::generate( - const TypeList& types, - const SDOString& targetNamespaceURI, - int indent - ) - { - SDOXSDBufferWriter writer; - DataFactory* fac = dataFactory; - writer.write(types, targetNamespaceURI.c_str(), - ((DataFactoryImpl*)fac)->getOpenProperties(), indent); - SDOXMLString ret = writer.getBuffer(); - char* retString = new char[strlen(ret) +1]; - strcpy(retString, ret); - return retString; - } - - int XSDHelperImpl::getErrorCount() const - { - return parseErrors.size(); - } - - - const char* XSDHelperImpl::getErrorMessage(int errnum) const - { - if (errnum >= 0 && errnum < parseErrors.size()) - { - return parseErrors[errnum]; - } - return 0; - } - - void XSDHelperImpl::setError(const char* message) - { - if (message == 0) return; - char * m = new char[strlen(message) + 1]; - strcpy(m,message); - m[strlen(message)] = 0; - parseErrors.push_back(m); - } - - void XSDHelperImpl::clearErrors() - { - while (!parseErrors.empty()) - { - if (*parseErrors.begin() != 0) - { - delete (char*)(*parseErrors.begin()); - } - parseErrors.erase(parseErrors.begin()); - } - } - - - } // End - namespace sdo -} // End - namespace commonj diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h deleted file mode 100644 index ee0c2a5e56..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XSDHELPERIMPL_H_ -#define _XSDHELPERIMPL_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/XSDHelper.h" -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDOXMLString.h" -#include "commonj/sdo/SAX2Namespaces.h" -#include "commonj/sdo/SchemaInfo.h" -#include "commonj/sdo/TypeDefinitionsImpl.h" -#include "commonj/sdo/ParserErrorSetter.h" - -namespace commonj -{ - namespace sdo - { - - /** - * - * XSDHelperImpl is the implementation of the abstract class - * XSDHelper. - * Provides the means of loading and saving XSD information - * from/to the metadata (Types and properties) - */ - - class XSDHelperImpl : public XSDHelper, ParserErrorSetter - { - public: - - // Constructor - XSDHelperImpl(DataFactoryPtr dataFactory); - - // Destructor - virtual ~XSDHelperImpl(); - - /** define builds types/properties from file or stream - * - * define/defineFile - * - * Populates the data factory with Types and Properties from the schema - * Loads from file, stream or char* buffer. - * The return value is the URI of the root Type - * - */ - virtual const char* defineFile(const char* schemaFile, bool loadImportNamespace = false); - virtual const char* defineFile(const SDOString& schemaFile, bool loadImportNamespace = false); - virtual const char* define(std::istream& schema, bool loadImportNamespace = false); - virtual const char* define(const char* schema, bool loadImportNamespace = false); - virtual const char* define(const SDOString& schema, bool loadImportNamespace = false); - - /** getErrorCount gets number of parse errors - * - * Parser error count - the parse may have - * succeeded or partially succeeded or failed. There - * may be errors to report or handle. - */ - - virtual int getErrorCount() const; - - /** getErrorMessage gets the nth error message - * - * Each error has a message, usually giving the line and file - * in which the parser error occurred. - */ - - virtual const char* getErrorMessage(int errnum) const; - virtual void setError(const char* error); - - /** generate buildsXSD from types/properties - * - * generate/generateFile - * - * Saves the types/properties to an XSD stream or file - * - */ - - virtual char* generate( - const TypeList& types, - const char* targetNamespaceURI = "", - int indent = -1 - ); - virtual char* generate( - const TypeList& types, - const SDOString& targetNamespaceURI = "", - int indent = -1 - ); - void generate( - const TypeList& types, - std::ostream& outXsd, - const char* targetNamespaceURI = "", - int indent = -1 - ); - void generate( - const TypeList& types, - std::ostream& outXsd, - const SDOString& targetNamespaceURI = "", - int indent = -1 - ); - virtual void generateFile( - const TypeList& types, - const char* fileName, - const char* targetNamespaceURI = "", - int indent = -1); - virtual void generateFile( - const TypeList& types, - const SDOString& fileName, - const SDOString& targetNamespaceURI = "", - int indent = -1); - - virtual DataFactoryPtr getDataFactory(); - - // Return the URI for the root Type - virtual const char* getRootTypeURI() - { - return schemaInfo.getTargetNamespaceURI(); - } - - virtual void defineTypes(TypeDefinitions& types); - - private: - virtual void clearErrors(); - - void newSubstitute(const char* entryName, - PropertyDefinitionImpl& prop); - - void addSubstitutes(PropertyDefinitionImpl& prop, - TypeDefinitionImpl& ty); - - void defineTypes(TypeDefinitionsImpl& types); - int parse(const char* source); - - // Instance variables - DataFactoryPtr dataFactory; // metadata - SchemaInfo schemaInfo; - - std::vector parseErrors; - - }; - - } // End - namespace sdo -} // End - namespace commonj - -#endif // _XSDHELPERIMPL_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.cpp deleted file mode 100644 index c1124b648a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XSDPropertyInfo.h" - -namespace commonj -{ - namespace sdo - { - - /** - * - * This holds a property definition during the parsing process - * when all properties need to be read and stored prior to creation - * within the data facttory. - */ - - XSDPropertyInfo::XSDPropertyInfo() - { - } - - XSDPropertyInfo::XSDPropertyInfo(const PropertyDefinitionImpl& prop) - : property(prop) - { - } - - - XSDPropertyInfo::~XSDPropertyInfo() - { - } - - - } -} -// end - namespace sdo - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.h deleted file mode 100644 index d6ebad81e0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDPropertyInfo.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XSDPropertyInfo_H_ -#define _XSDPropertyInfo_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/DASValue.h" -#include "commonj/sdo/PropertyDefinitionImpl.h" -#include "commonj/sdo/SDOXMLString.h" - -namespace commonj -{ - namespace sdo - { - - /** - * - * This holds a property definition during the parsing process. - * This holds a property definition during the parsing process - * when all properties need to be read and stored prior to creation - * within the data facttory. - */ - - class XSDPropertyInfo : public DASValue - { - public: - - XSDPropertyInfo(); - XSDPropertyInfo(const PropertyDefinitionImpl& prop); - - virtual ~XSDPropertyInfo(); - - const PropertyDefinitionImpl& getPropertyDefinition() {return property;} - - - private: - PropertyDefinitionImpl property; - }; - } -} -#endif //_XSDPropertyInfo_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.cpp deleted file mode 100644 index 214027fcb6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XSDTypeInfo.h" - -namespace commonj -{ - namespace sdo - { - - /** XSDTypeInfo - * - * This holds a type definition during the parsing process - * when all types need to be read and stored prior to creation - * within the data facttory. - */ - - XSDTypeInfo::XSDTypeInfo() - { - } - - XSDTypeInfo::XSDTypeInfo(const TypeDefinitionImpl& typeDef) - : typeDefinition(typeDef) - { - } - - - XSDTypeInfo::~XSDTypeInfo() - { - - } - } -} -// end - namespace sdo - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.h deleted file mode 100644 index 16dd8c6eb8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XSDTypeInfo.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _XSDTypeInfo_H_ -#define _XSDTypeInfo_H_ - -#include "commonj/sdo/disable_warn.h" - -#include "commonj/sdo/DASValue.h" -#include "commonj/sdo/TypeDefinitionImpl.h" - -namespace commonj -{ - namespace sdo - { - /** - * - * This holds a type definition during the parsing process - * when all types need to be read and stored prior to creation - * within the data factory. - */ - - class XSDTypeInfo : public DASValue - { - public: - XSDTypeInfo(); - XSDTypeInfo(const TypeDefinitionImpl& typeDef); - virtual ~XSDTypeInfo(); - const TypeDefinitionImpl& getTypeDefinition() {return typeDefinition;} - - private: - TypeDefinitionImpl typeDefinition; - }; - } -} -#endif //_XSDTypeInfo_H_ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.cpp deleted file mode 100644 index de5aff341b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/XpathHelper.h" - -#include -using std::string; - -namespace commonj{ -namespace sdo{ - -/** - * - * will provide utilities to help with xpath parsing - */ - -/** isIndexed - true if [] or . - * - * Returns true if the path has an index, indicating a many valued - * property at the end of the path. - */ - - -const bool XpathHelper::isIndexed(const char* path) -{ - if (path == 0) - { - return false; - } - else - { - return isIndexed(SDOString(path)); - } -} - -const bool XpathHelper::isIndexed(const SDOString& path) -{ - size_t lastSlash = path.rfind('/'); - - if (lastSlash == string::npos) - { - // Search from start of path - if (path.find('[') != string::npos) - { - return true; - } - if (path.find('.') != string::npos) - { - return true; - } - } - else - { - // Search from lastSlash - if (path.find('[', lastSlash) != string::npos) - { - return true; - } - if (path.find('.', lastSlash) != string::npos) - { - return true; - } - } - - return false; -} - -}; -}; - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.h deleted file mode 100644 index 1e02ea1dd3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/XpathHelper.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 XPATH_HELPER_H -#define XPATH_HELPER_H - -#include "commonj/sdo/export.h" -#include "commonj/sdo/SDOString.h" - -namespace commonj{ -namespace sdo{ - -/** - * - * XpathHelper provides utilities to help with xpath parsing - */ - -class XpathHelper -{ - public: - - virtual ~XpathHelper(); - - /** isIndexed - true if [] or . - * - * Returns true if the path has an index, indicating a many valued - * property at the end of the path. - */ - - static SDO_API const bool isIndexed(const char * path); - static SDO_API const bool isIndexed(const SDOString& path); - -}; -}; -}; - - -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/disable_warn.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/disable_warn.h deleted file mode 100644 index b02bb5bd81..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/disable_warn.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 _DISABLE_WARN_H_ -#define _DISABLE_WARN_H_ - -#if defined(WIN32) || defined (_WINDOWS) -#pragma warning(disable: 4786) -#endif - -#endif diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/export.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/export.h deleted file mode 100644 index 4a2d5f49ce..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/commonj/sdo/export.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#define SDO4CPP_VERSION 20051202 - -#if defined(WIN32) || defined (_WINDOWS) - -#define int64_t __int64 - -#ifdef SDO_EXPORTS -#include "commonj/sdo/disable_warn.h" -# define SDO_API __declspec(dllexport) -# define SDO_SPI __declspec(dllexport) -# define EXPIMP -#else -# define SDO_API __declspec(dllimport) -# define SDO_SPI __declspec(dllimport) -# define EXPIMP extern -#endif - -#else -#include -#include -#include -#include -#include -# define SDO_API -# define SDO_SPI -# define EXPIMP -#endif - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/deploy.bat deleted file mode 100644 index 8d6629ec40..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/src/deploy.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sdo root not specified -goto usage -) -set deploydir=%1\deploy -set srcdir=%1\runtime\core\src - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -copy %srcdir%\commonj\sdo\*.h %deploydir%\include\commonj\sdo - -copy %inpath%\tuscany_sdo.lib %deploydir%\lib -copy %inpath%\tuscany_sdo.dll %deploydir%\bin - -if exist %inpath%\tuscany_sdo.pdb copy %inpath%\tuscany_sdo.pdb %deploydir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtbuild b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtbuild deleted file mode 100644 index 17ebd43324..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtbuild +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtproject b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtproject deleted file mode 100644 index 48a12e6664..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.cdtproject +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.project b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.project deleted file mode 100644 index 32920ef4cf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - tuscany_sdo_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-1.0-incubating-M2-RC3/sdo/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs deleted file mode 100644 index 0c77f0af0f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Feb 15 16:37:24 GMT 2006 -eclipse.preferences.version=1 -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1698024418=\n\n\n\n\n -environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.1720042110=\n\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1698024418=\n\n\n\n -environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.1720042110=\n\n\n\n -environment/project=\n\n -environment/project/cdt.managedbuild.config.gnu.exe.debug.1698024418=\n\n\n\n -environment/project/cdt.managedbuild.config.gnu.exe.release.1720042110=\n\n\n\n diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xml deleted file mode 100644 index 43f4e46e1b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - -1A Partridge in a Pear Tree1.99012Turtle Doves2.99013French Hens3.99014Calling Birds4.99015Golden Rings5.99016Geese a-laying6.99017Swans a-swimming7.99018Maids a-milking8.99019Ladies dancing9.990110Lords a-leaping10.990111Pipers piping11.990112Drummers drumming12.9901 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xsd deleted file mode 100644 index f8f1cb9d47..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Catalog.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Customer.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Customer.xsd deleted file mode 100644 index 948dd07e85..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Customer.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Order.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Order.xsd deleted file mode 100644 index b11fce2e60..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/47293Order.xsd +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48601.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48601.xsd deleted file mode 100644 index 9e0b117520..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48601.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xml deleted file mode 100644 index 0197503c98..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - John - Fitzgerald - Doe - 1 2 3 - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xsd deleted file mode 100644 index 45678b9a30..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48686.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xml deleted file mode 100644 index 97ab07c448..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Doe - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xsd deleted file mode 100644 index fa2bf9ef75..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xml.txt deleted file mode 100644 index d7b9d4b8d4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xml.txt +++ /dev/null @@ -1,42 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:TNS#FormalNameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:TNS#NameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:TNS#RootType -Property:formalname of type FormalNameType -Property:last of type String -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -*******************************END TYPES****************** -===== DataObject contents ===== -first:string: - -middle:string: - -last:string:Doe - -title:string:Mr. - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xsd.txt deleted file mode 100644 index 822a05ec7f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/48736_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:TNS#FormalNameType -Property:last of type String -Type:TNS#NameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:TNS#RootType -Property:formalname of type FormalNameType -Property:last of type String -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Atom1.0.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Atom1.0.xsd deleted file mode 100644 index a421b56c69..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Atom1.0.xsd +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xml deleted file mode 100644 index 180b050bf5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - NCE - PAR - DATA - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xsd deleted file mode 100644 index dd1f296a3a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/BadElement.xsd +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Catalog.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Catalog.xsd deleted file mode 100644 index 2c3708285a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Catalog.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Customer.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Customer.xsd deleted file mode 100644 index 1f21545592..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Customer.xsd +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Makefile.am deleted file mode 100644 index 060580dfbb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -noinst_PROGRAMS = tuscany_sdo_test -SUBDIRS = -TESTS=tuscany_sdo_test -AM_CPPFLAGS = $(CPPFLAGS) -tuscany_sdo_test_SOURCES = sdotest.cpp sdotest2.cpp utils.cpp main.cpp - -EXTRA_DIST = *.xsd *.xml *.txt *.wsdl test/*.* test2/*.* t2/*.* g/*.* bugs/1/*.* -noinst_HEADERS=sdotest.h - -tuscany_sdo_test_LDADD = \ - -L$(top_builddir)/runtime/core/src/commonj/sdo -ltuscany_sdo \ - -L${LIBXML2_LIB} -lxml2 - - -INCLUDES = -I$(top_builddir)/runtime/core/test \ - -I$(top_builddir)/runtime/core/src diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xml deleted file mode 100644 index d7b95510ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╔╩╦╠â•â•¬Â¤Ã°ÃÊËÈıÃÃŽÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýï´­±‗¾¶§÷¸°¨·¹³²■  - Pound:£ Dollar:$ Euro:Ç or â–ˆ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xsd deleted file mode 100644 index 2f2d53c5a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/OddChars.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Order.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Order.xsd deleted file mode 100644 index d87f690236..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Order.xsd +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Readme.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Readme.txt deleted file mode 100644 index 326131a78c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Readme.txt +++ /dev/null @@ -1,108 +0,0 @@ - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License.48736_xml.txt - -=============================================================== - -The following files are licensed as above. They do not contain the -licence header text as they are to used to test generated output -and are therefore classed as binary files: - - -48736_xsd.txt -b46633.txt -b46634_out.txt -b47137.txt -b47137b.txt -b47293.txt -b48633_xml.txt -b48633b_xsd.txt -b48636_xml.txt -b48636_xsd.txt -b48686_xml.txt -b48686_xsd.txt -badelement.txt -bothgroups_xsd.txt -bothgroupssamename_xsd.txt -bug2.txt -bug45933-output.txt -bug48300_xml.txt -bug48300_xsd.txt -bunique-out.txt -bunique-out.xsd_safe.txt -bunique-outxml.txt -buniqueread-out.txt -carotest3.txt -csload-output.txt -csload2-output.txt -csload3-output.txt -cssave-output.txt -cssave2-output.txt -datetest.txt -defaults.txt -doctest.txt -emptycs1.txt -emptycs2.txt -emptycs3.txt -getproptest.txt -groupingroup_xsd.txt -grouprefingroup_xsd.txt -grouptoolate_xsd.txt -groupwithprefix_xsd.txt -inc1.txt -inc2.txt -jira490.txt -jira705_out.txt -list1_xml.txt -list1_xsd.txt -loadload-output.txt -maintest.txt -matttest1.txt -merle1.txt -notns.txt -nulltest.txt -oddchars.txt -openloadNSout.txt -openseq.txt -order1.txt -order2.txt -querytest.txt -saveopen-output.txt -scenario1.txt -scenario2.txt -scenario3.txt -scenario4.txt -scenario5.txt -sequence.txt -setmany.txt -setnull.txt -showdefault1.txt -showdefault2.txt -simple.txt -stock_wsdl.txt -stock_xml.txt -testabstract.txt -testerrors.txt -testinc2.txt -testopen.txt -testorder.txt -teststyles.txt -testsubsload.txt -testutils.txt -testwsdl.txt -travel.txt -userdata.txt -xhtml_out.txt diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/SdoGenerate.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/SdoGenerate.cpp deleted file mode 100644 index 8806243fe8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/SdoGenerate.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -/* work in progress on generation of structures from sdos*/ - -#include -#include - -#pragma warning(disable:4786) - -#include -using namespace std; - - - -#include "sdotest.h" - - - -using namespace commonj::sdo; - - -char* sdotest::convert(const char* uri) -{ - char* newval = (char*)malloc(strlen(uri) + 1); - strcpy(newval,uri); - - char* c; - while ((c = strchr(newval,'.')) != 0) - { - char * tmp = (char*)malloc(strlen(newval) + 5); - strncpy(tmp,newval, c - newval); - tmp[c-newval] = 0; - strcat(tmp,""); - strcat(tmp,c+1); - free(newval); - newval = tmp; - } - return newval; -} - - -void sdotest::generate(DataFactoryPtr fac) -{ - try { - - TypeList tl = fac->getTypes(); - - - cout << "// Generated structures " << endl; - - for (int i=0;i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style1.xsd deleted file mode 100644 index 25d800a02c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style1.xsd +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style2.xsd deleted file mode 100644 index a6aaf51013..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style2.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style3.xsd deleted file mode 100644 index 62db1fa13e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style3.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style4.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style4.xsd deleted file mode 100644 index ab4bd6ef46..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/Style4.xsd +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingSchema.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingSchema.xsd deleted file mode 100644 index 2f2d53c5a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingSchema.xsd +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingUsingSchema.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingUsingSchema.xml deleted file mode 100644 index d4a292083d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/TravelBookingUsingSchema.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - LHR - SNG - - - SNG - LHR - - - Excelsior - 222-3333 - 303 - - - Seedy Lodge - 888-9999 - 14 - - - Hilton - 444-5555 - 456 - foo - - - Bird Baths of Singapore - 50 - - - Steve -

      134 Shirley Road
      - 1234-8908-6543-900 - - - - John - - - Jane - - - Bill - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/axis.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/axis.xsd deleted file mode 100644 index 8832ae1afd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/axis.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xml deleted file mode 100644 index 5d6d2d7336..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xsd deleted file mode 100644 index 263f8bae30..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46617b.xsd +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46633.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46633.txt deleted file mode 100644 index da34a5196e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46633.txt +++ /dev/null @@ -1,8 +0,0 @@ -A modified of type myspace#Department -Property employees[(null)] was unset before the change -Property ints[(null)] was unset before the change -Property bool was unset before the change -A modified of type myspace#Department -Property employees[(null)] was unset before the change -Property ints[(null)] was unset before the change -Property bool was unset before the change diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46634_out.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46634_out.txt deleted file mode 100644 index 0a978a4a66..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46634_out.txt +++ /dev/null @@ -1,2 +0,0 @@ - -Jane Doe diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46693.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46693.xsd deleted file mode 100644 index deb00d0473..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b46693.xsd +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.txt deleted file mode 100644 index d525bd7776..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.txt +++ /dev/null @@ -1,6 +0,0 @@ -Property:value -Property:isPermaLink -Property:value -Value:Hello -Property:isPermaLink -Value:true diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.xsd deleted file mode 100644 index dbeba3fd22..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.txt deleted file mode 100644 index 202a17fc21..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.txt +++ /dev/null @@ -1,31 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:companyNS#CompanyType -Type:companyNS#DepartmentType -Type:companyNS#EmployeeType -Type:companyNS#RootType -Type:companyNS#guid -Property:departments -Property:guid -Property:name -Property:employeeOfTheMonth -Property:departments -Property:guid -guid Value:Wilbur -guid isPermaLink:Property:name -Property:employeeOfTheMonth diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.xsd deleted file mode 100644 index f78ce703f3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47137b.xsd +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47293.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47293.txt deleted file mode 100644 index 9d571da67c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b47293.txt +++ /dev/null @@ -1,27 +0,0 @@ -Type:catalogNS#CatalogTypeType:catalogNS#RootTypeType:commonj.sdo#BigDecimalType:commonj.sdo#BigIntegerType:commonj.sdo#BooleanType:commonj.sdo#ByteType:commonj.sdo#BytesType:commonj.sdo#ChangeSummaryType:commonj.sdo#CharacterType:commonj.sdo#DataObjectType:commonj.sdo#DateType:commonj.sdo#DoubleType:commonj.sdo#FloatType:commonj.sdo#IntegerType:commonj.sdo#LongType:commonj.sdo#OpenDataObjectType:commonj.sdo#ShortType:commonj.sdo#StringType:commonj.sdo#URIType:customerNS#AddressTypeType:customerNS#CustomerTypeType:customerNS#PaymentTypeType:customerNS#RootTypeType:orderNS#OrderStatusType:orderNS#OrderTypeType:orderNS#RootTypeType:orderNS#itemType:catalogNS#CatalogType -Type:catalogNS#RootType -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:customerNS#AddressType -Type:customerNS#CustomerType -Type:customerNS#PaymentType -Type:customerNS#RootType -Type:orderNS#OrderStatus -Type:orderNS#OrderType -Type:orderNS#RootType -Type:orderNS#item diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48602.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48602.xsd deleted file mode 100644 index 859068d11d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48602.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xml deleted file mode 100644 index 201b90fcc1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - John - Fitzgerald - Doe - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xsd deleted file mode 100644 index ad3b1acb92..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633_xml.txt deleted file mode 100644 index 7c0425d298..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633_xml.txt +++ /dev/null @@ -1,10 +0,0 @@ -===== DataObject contents ===== -first:string:John - -middle:string:Fitzgerald - -last:string:Doe - -title:string:Mr. - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b.xsd deleted file mode 100644 index f2ddbca89f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b_xsd.txt deleted file mode 100644 index 0836fda6cd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48633b_xsd.txt +++ /dev/null @@ -1,31 +0,0 @@ -***** TESTANY ****************************************** -Type:TNS#RootType -Property:version of type String -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#NameType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Type:http://www.wrox.com/name#RootType -Property:first of type String -Property:middle of type String -Property:last of type String -Property:name of type NameType -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xml deleted file mode 100644 index 50e4d9c017..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - John - Fitzgerald - Doe - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xsd deleted file mode 100644 index b14da69279..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xml.txt deleted file mode 100644 index 4b5b55ced7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xml.txt +++ /dev/null @@ -1,36 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** -===== DataObject contents ===== -first:string:John - -middle:string:Fitzgerald - -last:string:Doe - -title:string:Mr. - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xsd.txt deleted file mode 100644 index 81ccaee474..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48636_xsd.txt +++ /dev/null @@ -1,26 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xml deleted file mode 100644 index d4dc9e1852..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - John - Fitzgerald - Doe - 1 2 3 - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xsd deleted file mode 100644 index 3845d69471..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xml.txt deleted file mode 100644 index f4899d810e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xml.txt +++ /dev/null @@ -1,46 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#ages -Property:values (many) of type Integer -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:ages (many) of type ages -*******************************END TYPES****************** -===== DataObject contents ===== -first:string:John - -middle:string:Fitzgerald - -last:string:Doe - -ages: list dataObject[0]= -===== DataObject contents ===== -values: list integer[0]=1 - -integer[1]=2 - -integer[2]=3 - -===== End DataObject ===== - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xsd.txt deleted file mode 100644 index df670b8066..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/b48686_xsd.txt +++ /dev/null @@ -1,28 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#ages -Property:values (many) of type Integer -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:ages (many) of type ages -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/badelement.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/badelement.txt deleted file mode 100644 index f9ddc1e3b1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/badelement.txt +++ /dev/null @@ -1,2 +0,0 @@ -BADELEMENT correctly found errors: -Parser found unknown element ThisJustAintPartOfTheSchema diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups.xsd deleted file mode 100644 index 36d1b8f047..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups_xsd.txt deleted file mode 100644 index 5d92da21c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroups_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Property:firstattribute of type String -Property:secondattribute of type String -Property:thirdattribute of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename.xsd deleted file mode 100644 index 0ccdf615f0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename_xsd.txt deleted file mode 100644 index 5d92da21c5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bothgroupssamename_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -Property:firstattribute of type String -Property:secondattribute of type String -Property:thirdattribute of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug2.txt deleted file mode 100644 index aae01a0c9c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug2.txt +++ /dev/null @@ -1,9 +0,0 @@ -MObject Property companies -Property:name:Acme -End of MObject Property companies -MObject Property companies -End of MObject Property companies -Change summary should have no entries... -MObject Property companies -End of MObject Property companies -Change summary should have no entries... diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug45933-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug45933-output.txt deleted file mode 100644 index 366d41ef02..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug45933-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -false diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xml deleted file mode 100644 index e4b79cdf2f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - This is my online shop - The CT Shop - php - - - - - - Name for the shop - Shop Name - - - - - - - - CT Shop - CT Shop - - - - - Colour of background for Shop - Branding - - - - - - Olive - Olive - - - - Lime - Lime - - - - Gray - Gray - - - - Teal - Teal - - - - Silver - Silver - - - - White - White - - - - Olive - Olive - - - - - Product Catalog for the shop - Product Catalog - - - - - - - - - - Catalog - Catalog - - - - - Shopping cart for the shop - Shopping Cart - - - - - - Cart - Cart - - - - GCCart - GCCart - - - - MyCart - MyCart - - - - - - Cart - Cart - - - - - Payment Modules for the shop - Payment Module - - - - - - MyPayPal - MyPayPal - - - - PayPal - PayPal - - - - USPayPal - USPayPal - - - - MyStormPay - MyStormPay - - - - StormPay - StormPay - - - - - - PayPal - PayPal - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xsd deleted file mode 100644 index e0e69eebf1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300.xsd +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xml.txt deleted file mode 100644 index d8b1345d0d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xml.txt +++ /dev/null @@ -1,424 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#RootType -Property:template of type TemplateType -Property:unboundTemplateParameter of type unboundTemplateParameter -Property:description of type description -Property:factory of type factory -Property:valueprovider of type valueprovider -Property:value of type value -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#TemplateType -Property:displayName of type String -Property:templateType of type String -Property:description of type String -Property:expert of type String -Property:icon of type String -Property:verifiers (many) of type String -Property:globalHelperArguments (many) of type String -Property:unboundTemplateParameters (many) of type unboundTemplateParameter -Property:name of type String -Property:version of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#description -Property:description of type String -Property:displayName of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#factory -Property:kind of type String -Property:name of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#unboundTemplateParameter -Property:description of type description -Property:verifiers (many) of type String -Property:constraints (many) of type value -Property:factory of type factory -Property:defaults (many) of type value -Property:name of type String -Property:expert of type String -Property:multiplicity of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#value -Property:description of type String -Property:displayName of type String -Property:data of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#valueprovider -Property:values (many) of type value -*******************************END TYPES****************** -===== DataObject contents ===== -displayName:string:The CT Shop - -templateType:string:php - -description:string:This is my online shop - -expert:string: - -icon:string: - -verifiers: list string[0]= - -globalHelperArguments: list string[0]= - - -unboundTemplateParameters: list dataObject[0]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Name for the shop - -displayName:string:Shop Name - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string: - -data:string: - -===== End DataObject ===== - -factory:dataObject - - null or unset - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:CT Shop - -data:string:CT Shop - -===== End DataObject ===== - -name:string:name - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Colour of background for Shop - -displayName:string:Branding - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Olive - -data:string:Olive - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:string: - -displayName:string:Lime - -data:string:Lime - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:string: - -displayName:string:Gray - -data:string:Gray - -===== End DataObject ===== - -dataObject[3]= -===== DataObject contents ===== -description:string: - -displayName:string:Teal - -data:string:Teal - -===== End DataObject ===== - -dataObject[4]= -===== DataObject contents ===== -description:string: - -displayName:string:Silver - -data:string:Silver - -===== End DataObject ===== - -dataObject[5]= -===== DataObject contents ===== -description:string: - -displayName:string:White - -data:string:White - -===== End DataObject ===== - -factory:dataObject - - null or unset - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Olive - -data:string:Olive - -===== End DataObject ===== - -name:string:branding - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Product Catalog for the shop - -displayName:string:Product Catalog - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string: - -data:string: - -===== End DataObject ===== - -factory:dataObject -===== DataObject contents ===== -kind:string:php - -name:string:CatalogFactory - -===== End DataObject ===== - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Catalog - -data:string:Catalog - -===== End DataObject ===== - -name:string:catalog - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[3]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Shopping cart for the shop - -displayName:string:Shopping Cart - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Cart - -data:string:Cart - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:string: - -displayName:string:GCCart - -data:string:GCCart - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:string: - -displayName:string:MyCart - -data:string:MyCart - -===== End DataObject ===== - -factory:dataObject -===== DataObject contents ===== -kind:string:php - -name:string:CartFactory - -===== End DataObject ===== - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:Cart - -data:string:Cart - -===== End DataObject ===== - -name:string:cart - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -dataObject[4]= -===== DataObject contents ===== -description:dataObject -===== DataObject contents ===== -description:string:Payment Modules for the shop - -displayName:string:Payment Module - -===== End DataObject ===== - -verifiers: list string[0]= - - -constraints: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:MyPayPal - -data:string:MyPayPal - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -description:string: - -displayName:string:PayPal - -data:string:PayPal - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -description:string: - -displayName:string:USPayPal - -data:string:USPayPal - -===== End DataObject ===== - -dataObject[3]= -===== DataObject contents ===== -description:string: - -displayName:string:MyStormPay - -data:string:MyStormPay - -===== End DataObject ===== - -dataObject[4]= -===== DataObject contents ===== -description:string: - -displayName:string:StormPay - -data:string:StormPay - -===== End DataObject ===== - -factory:dataObject -===== DataObject contents ===== -kind:string:php - -name:string:PaymentFactory - -===== End DataObject ===== - -defaults: list dataObject[0]= -===== DataObject contents ===== -description:string: - -displayName:string:PayPal - -data:string:PayPal - -===== End DataObject ===== - -name:string:payment - -expert:string:false - -multiplicity:string:1..1 - -===== End DataObject ===== - -name:string:CTShop - -version:string:1.0.0 - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xsd.txt deleted file mode 100644 index 38d7c904f0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bug48300_xsd.txt +++ /dev/null @@ -1,58 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#RootType -Property:template of type TemplateType -Property:unboundTemplateParameter of type unboundTemplateParameter -Property:description of type description -Property:factory of type factory -Property:valueprovider of type valueprovider -Property:value of type value -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#TemplateType -Property:displayName of type String -Property:templateType of type String -Property:description of type String -Property:expert of type String -Property:icon of type String -Property:verifiers (many) of type String -Property:globalHelperArguments (many) of type String -Property:unboundTemplateParameters (many) of type unboundTemplateParameter -Property:name of type String -Property:version of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#description -Property:description of type String -Property:displayName of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#factory -Property:kind of type String -Property:name of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#unboundTemplateParameter -Property:description of type description -Property:verifiers (many) of type String -Property:constraints (many) of type value -Property:factory of type factory -Property:defaults (many) of type value -Property:name of type String -Property:expert of type String -Property:multiplicity of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#value -Property:description of type String -Property:displayName of type String -Property:data of type String -Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#valueprovider -Property:values (many) of type value -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xml deleted file mode 100644 index 7fd3b119e6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - 1 - Mary Kay - - - - - 3 - Sales - - 1 - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xsd deleted file mode 100644 index f5fd88a424..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/company.xsd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/include.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/include.xsd deleted file mode 100644 index 16089cecae..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/include.xsd +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok1.xsd deleted file mode 100644 index d24e5c39e7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok1.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok2.xsd deleted file mode 100644 index 3d90cbdec3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok2.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok3.xsd deleted file mode 100644 index 45d5db2ed4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bugs/1/ok3.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.txt deleted file mode 100644 index da1aabead7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.xsd_safe.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.xsd_safe.txt deleted file mode 100644 index 1b4c6bb7da..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-out.xsd_safe.txt +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-outxml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-outxml.txt deleted file mode 100644 index 44650e05a4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/bunique-outxml.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/buniqueread-out.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/buniqueread-out.txt deleted file mode 100644 index 44650e05a4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/buniqueread-out.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator.xsd deleted file mode 100644 index a5a26de117..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2.wsdl deleted file mode 100644 index 88b5b80b3d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2.wsdl +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2a.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2a.wsdl deleted file mode 100644 index f2f008bf6e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/calculator2a.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/carotest3.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/carotest3.txt deleted file mode 100644 index cb5e4ed9b3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/carotest3.txt +++ /dev/null @@ -1,36 +0,0 @@ -====================================== -====================================== -====================================== -I am Item 1 of string -====================================== -====================================== -I am Item 1 of string -I am the first free text -====================================== -====================================== -I am Item 1 of string -I am the first free text -I am Item 2 of string -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string - -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -department1 -====================================== -Element zero, length 1: 1 -Element one, length 2: 2 -Element two, length 3: 3 -Element three,length 4: 4 -Element four, length 5: 5 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company.xsd deleted file mode 100644 index d165367196..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xml deleted file mode 100644 index 3680df3ccf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -Jane Doe - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xsd deleted file mode 100644 index 9af4d3e721..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/company_with_nillable_SN.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyabs.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyabs.xsd deleted file mode 100644 index eb5ce1e18b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyabs.xsd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyref.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyref.xsd deleted file mode 100644 index 1f706fca8f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companyref.xsd +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - elementFormDefault="qualified"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companysubs.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companysubs.xsd deleted file mode 100644 index 3e16090350..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/companysubs.xsd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload-output.txt deleted file mode 100644 index 0ed7d5c8a8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.2#/departments.0/employees.1#/departments.0/employees.3#/departments.0/employees.4 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload2-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload2-output.txt deleted file mode 100644 index a4c1e4dd94..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload2-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.1#/departments.0/employees.1#/departments.0/employees.1#/departments.1/employees.4#/departments.1/employees.3#/departments.1/employees.2#/departments.1/employees.1#/departments.1/employees.0#/departments.1#/departments.0/employees.2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload3-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload3-output.txt deleted file mode 100644 index a4c1e4dd94..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/csload3-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.1#/departments.0/employees.1#/departments.0/employees.1#/departments.1/employees.4#/departments.1/employees.3#/departments.1/employees.2#/departments.1/employees.1#/departments.1/employees.0#/departments.1#/departments.0/employees.2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave-output.txt deleted file mode 100644 index 8fb656138c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.2#/departments.0/employees.1#/departments.0/employees.3#/departments.0/employees.4 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave2-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave2-output.txt deleted file mode 100644 index da51f8a037..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/cssave2-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.1#/departments.0/employees.1#/departments.0/employees.1#/departments.1/employees.4#/departments.1/employees.3#/departments.1/employees.2#/departments.1/employees.1#/departments.1/employees.0#/departments.1#/departments.0/employees.2 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/datetest.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/datetest.txt deleted file mode 100644 index 3da923ea55..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/datetest.txt +++ /dev/null @@ -1,4 +0,0 @@ -Name of the company is DateTest -Set start of the company is 1000 -Review number:0 was:2000 -Review number:1 was:4000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/defaults.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/defaults.txt deleted file mode 100644 index 1cdba8ea05..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/defaults.txt +++ /dev/null @@ -1,10 +0,0 @@ -Boolean default is true: 1 -Byte default is d: 100 -Character default is e: 101 -Short default is 300: 300 -Long default is 400: 400 -Expected index out of range OK -Float default is 600: 600.000 -LongDouble default is 700: 700.000 -String default is HELP: HELP -Bytes default is HELP: HELP diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.txt deleted file mode 100644 index b08b52a605..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.txt +++ /dev/null @@ -1,2 +0,0 @@ -RootURI=companyNS -RootName=company diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xml deleted file mode 100644 index 2a5d1463c7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xsd deleted file mode 100644 index 0c953a6348..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/doctest.xsd +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/employee.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/employee.xsd deleted file mode 100644 index e2eec63eea..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/employee.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs1.txt deleted file mode 100644 index 31a188344b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs1.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs2.txt deleted file mode 100644 index b2290965d3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs2.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs3.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs3.txt deleted file mode 100644 index 4ad714d46c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/emptycs3.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.3 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xml deleted file mode 100644 index 3680df3ccf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -Jane Doe - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xsd deleted file mode 100644 index 6246be5efa..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/error1.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/extension.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/extension.xsd deleted file mode 100644 index 7e6b336516..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/extension.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gCustomer.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gCustomer.xsd deleted file mode 100644 index 055d758ca4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gCustomer.xsd +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xml deleted file mode 100644 index 91a31c45f2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - -1132323800NONE12Drummers drumming12.99113French Hens3.99211Graham Charters24 Big StreetBig CityBig StateUp Your Coat234234234243Big2342.097e+001 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xsd deleted file mode 100644 index 33683b1c62..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g/gOrder.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g3.xsd deleted file mode 100644 index 4ed8b44fc2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/g3.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/getproptest.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/getproptest.txt deleted file mode 100644 index f6bea1325d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/getproptest.txt +++ /dev/null @@ -1,8 +0,0 @@ -Companys name property is: name -Companys dept property is:departments -Departments empl property is:employees -Departments empl property is:employees -Employees name property is:name -Normal exception caught -Normal exception caught -Normal exception caught diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham1.xsd deleted file mode 100644 index 9c07e4b75d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham1.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham2.xsd deleted file mode 100644 index 0148a42e41..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham2.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham3.xsd deleted file mode 100644 index 969a6f8eb0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/graham3.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup.xsd deleted file mode 100644 index 3e4a1a7d3a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup_xsd.txt deleted file mode 100644 index 7eba22a274..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupingroup_xsd.txt +++ /dev/null @@ -1,25 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup.xsd deleted file mode 100644 index 8e8a7aded6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup_xsd.txt deleted file mode 100644 index f879c8adb2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouprefingroup_xsd.txt +++ /dev/null @@ -1,29 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:first2 of type String -Property:middle2 of type String -Property:last2 of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate.xsd deleted file mode 100644 index 1e1b5c5678..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate_xsd.txt deleted file mode 100644 index 81ccaee474..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/grouptoolate_xsd.txt +++ /dev/null @@ -1,26 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix.xsd deleted file mode 100644 index fc61269d42..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix_xsd.txt deleted file mode 100644 index 81ccaee474..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwithprefix_xsd.txt +++ /dev/null @@ -1,26 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:name of type name -Type:http://www.wrox.com/name#name -Property:first of type String -Property:middle of type String -Property:last of type String -Property:title of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwrongname.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwrongname.xsd deleted file mode 100644 index 8905af53d8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/groupwrongname.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc1.txt deleted file mode 100644 index bf517ec394..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc1.txt +++ /dev/null @@ -1,22 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://example.org/Calculator#RootType -Type:http://example.org/CalculatorTypes#AddArguments -Property:a -Property:b -Type:http://example.org/CalculatorTypes#RootType diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc2.txt deleted file mode 100644 index ac4a97479f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/inc2.txt +++ /dev/null @@ -1,21 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://example.org/Calculator#AddArguments -Property:a -Property:b -Type:http://example.org/Calculator#RootType diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include.xsd deleted file mode 100644 index 904ec8e1fd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include1.xsd deleted file mode 100644 index 8c4187077c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include2.xsd deleted file mode 100644 index 5c05afdf36..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/include2.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/includeother3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/includeother3.xsd deleted file mode 100644 index c661f6871e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/includeother3.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira490.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira490.txt deleted file mode 100644 index 4527deb32a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira490.txt +++ /dev/null @@ -1,53 +0,0 @@ -Test Program starting to create types ... - -Before Resolution - -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Employee -Has Property name of type String -Has Property officeNumber of type String - -After Resolution - -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Employee -Has Property name of type String -Has Property officeNumber of type String -Mr A Trader -123 -123 -{ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705.xsd deleted file mode 100644 index 0001371677..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705_out.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705_out.txt deleted file mode 100644 index 6b5bf10cda..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/jira705_out.txt +++ /dev/null @@ -1,5 +0,0 @@ - - - IBM - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xml deleted file mode 100644 index a40accebc2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 1 2 3 4 5 6 7 8 9 - - This -is a strange - set of strings - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xsd deleted file mode 100644 index 89faa4d68b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xml.txt deleted file mode 100644 index ddf8e8ac22..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xml.txt +++ /dev/null @@ -1,70 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:listtest of type listTestType -Type:http://www.wrox.com/name#intListType -Property:values (many) of type Integer -Type:http://www.wrox.com/name#listTestType -Property:integers (many) of type intListType -Property:strings (many) of type stringListType -Type:http://www.wrox.com/name#stringListType -Property:values (many) of type String -*******************************END TYPES****************** -===== DataObject contents ===== -integers: list dataObject[0]= -===== DataObject contents ===== -values: list integer[0]=1 - -integer[1]=2 - -integer[2]=3 - -integer[3]=4 - -integer[4]=5 - -integer[5]=6 - -integer[6]=7 - -integer[7]=8 - -integer[8]=9 - -===== End DataObject ===== - -strings: list dataObject[0]= -===== DataObject contents ===== -values: list string[0]=This - -string[1]=is - -string[2]=a - -string[3]=strange - -string[4]=set - -string[5]=of - -string[6]=strings - -===== End DataObject ===== - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xsd.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xsd.txt deleted file mode 100644 index 2adeaf3a7c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/list1_xsd.txt +++ /dev/null @@ -1,28 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://www.wrox.com/name#RootType -Property:listtest of type listTestType -Type:http://www.wrox.com/name#intListType -Property:values (many) of type Integer -Type:http://www.wrox.com/name#listTestType -Property:integers (many) of type intListType -Property:strings (many) of type stringListType -Type:http://www.wrox.com/name#stringListType -Property:values (many) of type String -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/loadload-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/loadload-output.txt deleted file mode 100644 index a6df48b1be..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/loadload-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.0/opendataobjectlist.0#/departments.0/employees.0/opendataobject#/departments.0/employees.045 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/main.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/main.cpp deleted file mode 100644 index d6499fb34f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/main.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#pragma warning(disable:4786) - -#include -using namespace std; - -#include "sdotest.h" - -extern "C"{ - -#define TEST(testname)\ - value = testname;\ - if (value == 0) {\ - cout << "Test Failed: " << totaltests << " " << #testname << endl;\ - }\ - testspassed += value;\ - totaltests++; - -int main (int argc, char** argv) -{ - //Logger::setLogging(20); - - int testspassed=0; - int totaltests=0; - int value = 0; - - /* TEST ( sdotest::xhtml1() ); */ - TEST ( sdotest::scopetest() ); - TEST ( sdotest::xsdtosdo() ); - - /* groups now supported*/ - TEST ( sdotest::testany("list1.xsd",0,"list1.xml", 0) ); - TEST ( sdotest::testany("b48636.xsd",0,"b48636.xml", 0) ); - TEST ( sdotest::testany("groupwithprefix.xsd", 0, 0, 0) ); - TEST ( sdotest::testany("groupwrongname.xsd","Use of undefined group NameGroup", 0, 0) ); - - // late definition of group now supported - TEST ( sdotest::testany("grouptoolate.xsd",0 , 0, 0) ); - - // group definition within group now ignored - - TEST ( sdotest::testany("groupingroup.xsd","Use of undefined group NameGroup2",0, 0) ); - TEST ( sdotest::testany("grouprefingroup.xsd",0,0, 0) ); - TEST ( sdotest::testany("bothgroups.xsd",0,0, 0) ); - TEST ( sdotest::testany("bothgroupssamename.xsd",0,0, 0) ); - - /* general tests */ - TEST ( sdotest::pete() ); - TEST ( sdotest::stocktest() ); - TEST ( sdotest::definetest() ); - TEST ( sdotest::emptycs() ); - TEST ( sdotest::openseq() ); - TEST ( sdotest::testanytwo("b48633b.xsd","b48633.xsd","b48633.xml") ); - TEST ( sdotest::testany("b48686.xsd",0, "b48686.xml", 0) ); - TEST ( sdotest::testany("b48636.xsd","Use of undefined group NameGroup","b48636.xml", 0) ); - TEST ( sdotest::b48602() ); - TEST ( sdotest::compatiblefactory() ); - TEST ( sdotest::simple() ); - TEST ( sdotest::testOrder("employee.xsd","extension.xsd","order1.dat","order1.txt") ); - TEST ( sdotest::testOrder("extension.xsd","employee.xsd","order2.dat","order2.txt") ); - TEST ( sdotest::testOpen() ); - TEST ( sdotest::testinc2("calculator2.wsdl","inc1.dat","inc1.txt") ); - TEST ( sdotest::testinc2("calculator2a.wsdl","inc2.dat","inc2.txt") ); - TEST ( sdotest::teststyles() ); - TEST ( sdotest::badelement() ); - TEST ( sdotest::oddchars() ); - TEST ( sdotest::notns() ); - TEST ( sdotest::unsetlist() ); - TEST ( sdotest::travel() ); - /*TEST ( sdotest::testwsdl() );*/ - TEST ( sdotest::bunique() ); - TEST ( sdotest::buniqueread() ); - TEST ( sdotest::propdefaulttest() ); - TEST ( sdotest::graham5() ); - TEST ( sdotest::graham4() ); - TEST ( sdotest::detachtest() ); - TEST ( sdotest::includetest() ); - TEST ( sdotest::testLoad() ); - TEST ( sdotest::leak() ); - TEST ( sdotest::twolists() ); - TEST ( sdotest::testUtil() ); - TEST ( sdotest::clonetest() ); - TEST ( sdotest::notfound() ); - TEST ( sdotest::testErrors() ); - TEST ( sdotest::loadManyOpen() ); - TEST ( sdotest::doctest() ); - TEST ( sdotest::graham3() ); - TEST ( sdotest::graham1() ); - TEST ( sdotest::graham2() ); - TEST ( sdotest::merle1() ); - TEST ( sdotest::loadOpenNS() ); - TEST ( sdotest::saveOpen() ); - TEST ( sdotest::loadOpen() ); - TEST ( sdotest::testui() ); - TEST ( sdotest::testSCA() ); - TEST ( sdotest::testabstract() ); - TEST ( sdotest::testsubsload() ); - TEST ( sdotest::testsubs() ); - TEST ( sdotest::setnull() ); - TEST ( sdotest::bug2() ); - TEST ( sdotest::cssave2() ); - TEST ( sdotest::csload2() ); - TEST ( sdotest::cssave() ); - TEST ( sdotest::csload() ); - TEST ( sdotest::bug1() ); - TEST ( sdotest::eqhelpertest() ); - TEST ( sdotest::cohelpertest() ); - TEST ( sdotest::datetest() ); - TEST ( sdotest::carotest3() ); - TEST ( sdotest::matttest1() ); - TEST ( sdotest::adddeletetest() ); - TEST ( sdotest::carotest2() ); - TEST ( sdotest::carotest() ); - TEST ( sdotest::setmany() ); - TEST ( sdotest::noncontest() ); - TEST ( sdotest::versiontest() ); - TEST ( sdotest::defaulttest() ); - TEST ( sdotest::defaulttest_strobj() ); - TEST ( sdotest::nulltest() ); - TEST ( sdotest::usertest() ); - TEST ( sdotest::querytest() ); - TEST ( sdotest::getproptest() ); - TEST ( sdotest::rcptest() ); - TEST ( sdotest::seqtest() ); - TEST ( sdotest::changesummarytest() ); - TEST ( sdotest::conversiontest() ); - TEST ( sdotest::boolbug() ); - TEST ( sdotest::scope1() ); - TEST ( sdotest::scope2() ); - TEST ( sdotest::scope3() ); - TEST ( sdotest::maintest() ); - - /* regression tests */ - TEST ( sdotest::b48736() ); - /*TEST ( sdotest::b48601() );*/ - TEST ( sdotest::b47293() ); - TEST ( sdotest::b48300() ); - TEST ( sdotest::b47663() ); - TEST ( sdotest::b47802() ); - TEST ( sdotest::b47137() ); - TEST ( sdotest::b47137b() ); - TEST ( sdotest::b46633() ); - TEST ( sdotest::b46693() ); - /* TEST ( sdotest::b46734() ); */ - TEST ( sdotest::b46634() ); - TEST ( sdotest::b46617b() ); - TEST ( sdotest::b46617() ); - TEST ( sdotest::b46613() ); - TEST ( sdotest::b45933() ); - TEST ( sdotest::jira490() ); - TEST ( sdotest::jira705() ); - TEST ( sdotest::testXPath() ); - - cout << "Total tests:" << totaltests << " Tests passed:" << testspassed << endl; - return testspassed - totaltests; -} -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/maintest.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/maintest.txt deleted file mode 100644 index 3d2a8f793e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/maintest.txt +++ /dev/null @@ -1,188 +0,0 @@ -Test Program starting to create types ... -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Manager is sequenced?1 -Should be Company :Company -Should be 3: 3 -Alias: TheFirm -Alias: TheBigFirm -Alias: TheLittleFirm -Manager is sequenced?1 -BEFORE RESOLUTION -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Company -Has Property name of type String -Has Property address of type String -Has Property departments of type Department -Has Property employee of the month of type Employee -Has Property floatlist of type Float -Has Property pdg of type Manager -Has Property shareholder of type Person -Has Property substring of type DerivedString -Has Property subdepartments of type SubDepartment -Type Department -Has Property name of type String -Has Property id of type Integer -Has Property manager of type Manager -Has Property employees of type Employee -Type DerivedString -Type Employee -Has Property name of type String -Has Property cubelocation of type String -Type Manager -Has Property name of type String -Has Property officeid of type String -Has Property str of type String -Has Property boolean of type Boolean -Has Property byte of type Byte -Has Property character of type Character -Has Property short of type Short -Has Property long of type Integer -Has Property longlong of type Long -Has Property float of type Float -Has Property longdouble of type Double -Has Property date of type Date -Has Property string of type String -Has Property bytes of type Bytes -Type Person -Has Property haircolour of type String -Has Property name of type String -Type SubDepartment -Has Property subname of type String -AFTER RESOLUTION -Printing Types -Type BigDecimal -Type BigInteger -Type Boolean -Type Byte -Type Bytes -Type ChangeSummary -Type Character -Type DataObject -Type Date -Type Double -Type Float -Type Integer -Type Long -Type OpenDataObject -Type Short -Type String -Type URI -Type Company -Has Property name of type String -Has Property address of type String -Has Property departments of type Department -Has Property employee of the month of type Employee -Has Property floatlist of type Float -Has Property pdg of type Manager -Has Property shareholder of type Person -Has Property substring of type DerivedString -Has Property subdepartments of type SubDepartment -Type Department -Has Property name of type String -Has Property id of type Integer -Has Property manager of type Manager -Has Property employees of type Employee -Type DerivedString -Type Employee -Has Property haircolour of type String -Has Property name of type String -Has Property name of type String -Has Property cubelocation of type String -Type Manager -Has Property haircolour of type String -Has Property name of type String -Has Property name of type String -Has Property officeid of type String -Has Property str of type String -Has Property boolean of type Boolean -Has Property byte of type Byte -Has Property character of type Character -Has Property short of type Short -Has Property long of type Integer -Has Property longlong of type Long -Has Property float of type Float -Has Property longdouble of type Double -Has Property date of type Date -Has Property string of type String -Has Property bytes of type Bytes -Type Person -Has Property haircolour of type String -Has Property name of type String -Type SubDepartment -Has Property name of type String -Has Property id of type Integer -Has Property manager of type Manager -Has Property employees of type Employee -Has Property subname of type String -Manager is sequenced?1 -This is the sub string - its primitive, but not a string -acmecorp -acmecorp -Expected default boolean (false) : false -Expected boolean (true) : true -Expected default string (0) : Now able to set - - should say now able to set - - Name from deleted item: Now able to set -0xffffffffffffffff = : -1 -0x7fffffffffffffff = 9223372036854775807 -0x7fffffff = 2147483647 -0x80000000 = 2147483648 - Expected Wide - got : Wide - Expected Thin - got : Thin -Expecting string, got Wide -Expected bool true, got 1 -Expected char 23, got 23 -expected wchar 45, got 45Expected short 34, got 34 -Expected long 56 , got 56 -Expected long long 78, got 78 -Expected long double 89, got 89.000 -Expected float 90, got 90.000 -Expected time_t 200, got 200 -Wide[0]=87 -Wide[1]=105 -Wide[2]=100 -Wide[3]=101 -Thin[0]=84 -Thin[1]=104 -Thin[2]=105 -Thin[3]=110 -1.400567.700Should be Bill:Bill -Should be Bill:Bill -The employee of the month is Bill -Now able to set -pdg correctly identified -Now able to set -size of list 5 -Research And Development -Research And Development -Department: Research And Development -Department: Marketing -Department: Architecture -Department: Pyrotechnics -Department: Accounts -Normal expected exception -Normal Invalid path exception -Normal SDOPropertyNotFound exception diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xml deleted file mode 100644 index fe78c6198b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -Three member -Open bytes -List is complete - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xsd deleted file mode 100644 index 7d49ca3258..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/many.xsd +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/matttest1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/matttest1.txt deleted file mode 100644 index 5c5200ff22..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/matttest1.txt +++ /dev/null @@ -1,2 +0,0 @@ -Container of Billy should be dept1, and is :Shoe -Container of Billy should be dept2, and is :IT diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/merle1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/merle1.txt deleted file mode 100644 index f0eae645b6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/merle1.txt +++ /dev/null @@ -1,10 +0,0 @@ -I am the subscription ID string -I am the associate Tag string -I am the XML escaping string -I am the Validate string -DataObject "Shared" as XML: -SharedKeywordsStringSearchIndexString - -DataObject "Request" as XML: -RequestKeywordsRequestSearchIndex - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-core.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-core.xsd deleted file mode 100644 index acfc5c9f13..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-core.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-implementation-local-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-implementation-local-java.xsd deleted file mode 100644 index a7ef0f6ecd..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my-implementation-local-java.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my.xsd deleted file mode 100644 index e910a7db44..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/my.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/notns.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/notns.txt deleted file mode 100644 index a6f2bc0411..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/notns.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/nulltest.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/nulltest.txt deleted file mode 100644 index 01442ec949..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/nulltest.txt +++ /dev/null @@ -1,91 +0,0 @@ -Initially - all properties unset, and default values... -boolean set:0 value false -byte set:0 value 0 -character set:0 value 0 -short set:0 value 0 -long set:0 value 0 -longlong set:0 value -float set:0 value -longdouble set:0 value -date set:0 value -string set:0 value -bytes set:0 value -object set: 0 value: is empty -Should now have all properties set, and zero values... -boolean set:1 value:false -byte set:1 value:0 -character set:1 value:0 -short set:1 value:0 -long set:1 value:0 -longlong set:1 value:0 -float set:1 value:0.000e+000 -longdouble set:1 value:0.000e+000 -date set:1 value:0 -string set:1 value: -bytes set:1 value: -object set:1 dataobject -Should be back to having properties unset, and default values... -boolean set:0 value:false -byte set:0 value:0 -character set:0 value:0 -short set:0 value:0 -long set:0 value:0 -longlong set:0 value: -float set:0 value: -longdouble set:0 value: -date set:0 value: -string set:0 value: -bytes set:0 value: -object set: 0 dataobject is empty -boolean set:1 value:false -byte set:1 value:0 -character set:1 value:0 -short set:1 value:0 -long set:1 value:0 -longlong set:1 value:0 -float set:1 value:0.000e+000 -longdouble set:1 value:0.000e+000 -date set:0 value: -string set:1 value: -bytes set:1 value: -object set:1 dataobject is empty -Modified dataobject -Should all be null, and default values... -boolean isNull:1 set:1 value: -byte isNull:1 set:1 value: -character isNull:1 set:1 value: -short isNull:1 set:1 value: -long isNull:1 set:1 value: -longlong isNull:1 set:1 value: -float isNull:1 set:1 value: -longdouble isNull:1 set:1 value: -date isNull:1 set:1 value: -string isNull:1 set:1 value: -bytes isNull:1 set:1 value: -object isNull:1 set:1 value empty -Should all have values, and not be null.. -boolean isNull:0 set:1 value:true -byte isNull:0 set:1 value:1 -character isNull:0 set:1 value:1 -short isNull:0 set:1 value:1 -long isNull:0 set:1 value:1 -longlong isNull:0 set:1 value:1 -float isNull:0 set:1 value:1.000e+000 -longdouble isNull:0 set:1 value:1.000e+000 -date isNull:1 set:1 value: -string isNull:0 set:1 value:hello -bytes isNull:0 set:1 value:hello -object isNull0 set:1 value: dataobject -Should all be null, and default values... -boolean isNull:1 set:1 value: -byte isNull:1 set:1 value: -character isNull:1 set:1 value: -short isNull:1 set:1 value: -long isNull:1 set:1 value: -longlong isNull:1 set:1 value: -float isNull:1 set:1 value: -longdouble isNull:1 set:1 value: -date isNull:1 set:1 value: -string isNull:1 set:1 value: -bytes isNull:1 set:1 value: -object isNull;1 set:1 value: empty diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/oddchars.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/oddchars.txt deleted file mode 100644 index b9ed9643b3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/oddchars.txt +++ /dev/null @@ -1,22 +0,0 @@ -===== DataObject contents ===== -Flight: list dataObject[0]= -===== DataObject contents ===== -Departure:string:ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╔╩╦╠â•â•¬Â¤Ã°ÃÊËÈıÃÃŽÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýï´­±‗¾¶§÷¸°¨·¹³²■  - -Arrival:string:Pound:£ Dollar:$ Euro:Ç or â–ˆ - -flightNo:string:BA243 - -===== End DataObject ===== - -Hotel: list (empty) -Excursion:dataObject - - null or unset - -Client:dataObject - - null or unset - -Party:dataObject - - null or unset - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xml deleted file mode 100644 index 1b5d7e1b6a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -45 - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xsd deleted file mode 100644 index 336f40def7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS.xsd +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xml deleted file mode 100644 index ff2b31c610..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -45 - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xsd deleted file mode 100644 index e1498578cf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNS2.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNSout.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNSout.txt deleted file mode 100644 index 742842bd3e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openloadNSout.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.045 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openseq.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openseq.txt deleted file mode 100644 index 44091f2608..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/openseq.txt +++ /dev/null @@ -1,3 +0,0 @@ -Open Type string value: Value Of Open String -Open Sequenced string value: Value of sequenced string -Open Sequenced string value from seq: Value of sequenced string diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order1.txt deleted file mode 100644 index 4f46cbfecf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order1.txt +++ /dev/null @@ -1,19 +0,0 @@ -Type:#Address -Property:name -Property:street -Property:city -Type:#RootType -Property:employee -Type:#UKAddress -Property:value -Property:postcode -Type:#USAddress -Property:value -Property:zip -Type:#fullpersoninfo -Property:address -Property:city -Property:country -Type:#personinfo -Property:firstname -Property:lastname diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order2.txt deleted file mode 100644 index ec01027ebb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/order2.txt +++ /dev/null @@ -1,20 +0,0 @@ -Type:#Address -Property:name -Property:street -Property:city -Type:#RootType -Property:employee -Type:#UKAddress -Property:value -Property:postcode -Type:#USAddress -Property:value -Property:zip -Type:#fullpersoninfo -Property:value -Property:address -Property:city -Property:country -Type:#personinfo -Property:firstname -Property:lastname diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/partial.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/partial.xml deleted file mode 100644 index 11acb1b806..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/partial.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -#/departments.0/employees.0 - - - -45 - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xml deleted file mode 100644 index 41b3bb02b7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - -IBM -79.78 -5/24/2006 - -0.00 -N/A -N/A -N/A -900 -123.7B -79.78 -0.00 -73.45 - 89.94 -5.121 -15.58 -INTL BUSINESS MAC - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xsd deleted file mode 100644 index f61d50a942..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/pete.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/querytest.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/querytest.txt deleted file mode 100644 index 9b895282a0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/querytest.txt +++ /dev/null @@ -1,17 +0,0 @@ -Expected employee3: got Employee3 -Expected employee1: got Employee1 -Expected employee2: got Employee2 -Expected employee1: got Employee1 -Expected employee1: got Employee1 -Expected employee1: got Employee1 -Expected employee1: got Employee1 -Expected employee3: got Employee3 -Expected employee2: got Employee2 -Expected employee2: got Employee2 -Expected employee2: got Employee2 -Expected employee2: got Employee2 -Normal exception caught -Normal exception caught -Normal exception caught -Normal exception caught -Normal exception caught diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/saveopen-output.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/saveopen-output.txt deleted file mode 100644 index fa36e7113c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/saveopen-output.txt +++ /dev/null @@ -1,2 +0,0 @@ - -#/departments.0/employees.0#/departments.0/employees.1#/departments.0/employees.2#/departments.0/employees.0/opendataobjectlist.045 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-sca.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-sca.xsd deleted file mode 100644 index d0adc9bda0..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-sca.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-webservice.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-webservice.xsd deleted file mode 100644 index 60c642fbfe..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-webservice.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-ws.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-ws.xsd deleted file mode 100644 index 5ee7500578..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-binding-ws.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-core.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-core.xsd deleted file mode 100644 index cfe9d8d884..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-core.xsd +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-dll.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-dll.xsd deleted file mode 100644 index 6e1ec1d6eb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-dll.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-java.xsd deleted file mode 100644 index 3f54089755..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-java.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-local-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-local-java.xsd deleted file mode 100644 index ce4f529f3e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-implementation-local-java.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-cpp.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-cpp.xsd deleted file mode 100644 index ddbfe540b7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-cpp.xsd +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-java.xsd deleted file mode 100644 index 579f9483df..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-java.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-wsdl.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-wsdl.xsd deleted file mode 100644 index 9c15d87485..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-interface-wsdl.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-java.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-java.xsd deleted file mode 100644 index 77a6df6772..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-java.xsd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-xsd.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-xsd.xsd deleted file mode 100644 index 2820bd3dd6..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca-property-xsd.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca.xsd deleted file mode 100644 index 72cc5f497b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sca.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario1.txt deleted file mode 100644 index a0a3c7a203..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario1.txt +++ /dev/null @@ -1,10 +0,0 @@ -Created object in changed list -The object is myspace#Company -===== Modified Object Starts -Xpath:#/ -The modified objects type is myspace#Root -===== Old Property Values Begin -Property companies[0](UNSET) of type DataObject - object null or unset - -===== Old Property Values End -=====Modified Object Ends diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario2.txt deleted file mode 100644 index 9728bd6f0a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario2.txt +++ /dev/null @@ -1,8 +0,0 @@ -===== Modified Object Starts -Xpath:#/companies.0 -The modified objects type is myspace#Company -===== Old Property Values Begin -Property name of type String:acme - -===== Old Property Values End -=====Modified Object Ends diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario3.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario3.txt deleted file mode 100644 index e174f62538..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario3.txt +++ /dev/null @@ -1,22 +0,0 @@ -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:acme - -Property id of type String:123 - -===== Old Property Values End -=====Deleted Object Ends -===== Modified Object Starts -Xpath:#/ -The modified objects type is myspace#Root -===== Old Property Values Begin -Property companies[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:acme - -Property id of type String:123 - -===== Old Property Values End - -===== Old Property Values End -=====Modified Object Ends diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario4.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario4.txt deleted file mode 100644 index f678499e15..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario4.txt +++ /dev/null @@ -1,108 +0,0 @@ -Created object in changed list -The object is myspace#Employee -===== Modified Object Starts -Xpath:#/companies.0/departments.0 -The modified objects type is myspace#Department -===== Old Property Values Begin -Property employees[0] of type DataObject object still exists - -Property employees[1] of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends -===== Modified Object Starts -Xpath:#/companies.0/departments.1 -The modified objects type is myspace#Department -===== Old Property Values Begin -Property employees[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Ed Memoire - -Property id of type String:1 - -===== Old Property Values End - -Property employees[1] of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:Ed Memoire - -Property id of type String:1 - -===== Old Property Values End -=====Deleted Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:Ivor Payne - -Property id of type String:1 - -===== Old Property Values End -=====Deleted Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:Colin Poisson - -Property id of type String:2 - -===== Old Property Values End -=====Deleted Object Ends -=====Deleted Object Starts -===== Old Property Values Begin -Property name of type String:windows - -Property id of type String:1 - -Property employees[1] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Colin Poisson - -Property id of type String:2 - -===== Old Property Values End - -Property employees[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Ivor Payne - -Property id of type String:1 - -===== Old Property Values End - -===== Old Property Values End -=====Deleted Object Ends -===== Modified Object Starts -Xpath:#/companies.1 -The modified objects type is myspace#Company -===== Old Property Values Begin -Property departments[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:windows - -Property id of type String:1 - -Property employees[1] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Colin Poisson - -Property id of type String:2 - -===== Old Property Values End - -Property employees[0] of type DataObject - object deleted -===== Old Property Values Begin -Property name of type String:Ivor Payne - -Property id of type String:1 - -===== Old Property Values End - -===== Old Property Values End - -Property departments[1] of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario5.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario5.txt deleted file mode 100644 index af5bf47102..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/scenario5.txt +++ /dev/null @@ -1,8 +0,0 @@ -===== Modified Object Starts -Xpath:#/companies.0 -The modified objects type is myspace#Company -===== Old Property Values Begin -Property eotm of type DataObject object still exists - -===== Old Property Values End -=====Modified Object Ends diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.cpp deleted file mode 100644 index 4f5964966a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.cpp +++ /dev/null @@ -1,8928 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 -#include - -#pragma warning(disable:4786) - -#include -#include -using namespace std; - - - -#include "sdotest.h" - - - - - -using namespace commonj::sdo; - - - -/* USED IN RCPTEST */ - -typedef struct { - //zend_object zo; /* The standard zend_object */ - DataObjectPtr dop; /* The Hydra DataObject */ - //zend_object *df; /* The Data Factory */ -} sdo_doimpl_object; - - -int sdotest::rcptest() -{ - - try { - DataFactoryPtr mdg; - sdo_doimpl_object* ptr; - - mdg = DataFactory::getDataFactory(); - mdg = 0; - mdg = DataFactory::getDataFactory(); - mdg = NULL; - mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - - - ptr = new sdo_doimpl_object; - - ptr->dop = mdg->create((Type&)tcc); - - ptr->dop = 0; // null ; - return 1; - } - catch (SDORuntimeException e) - { - if (!silent) cout << "RefCountingPointer test failed" << endl; - return 0; - } -} - - - -int sdotest::changesummarytest() -{ - if (scenario5() == 0) return 0; - if (scenario1() == 0) return 0; - if (scenario2() == 0) return 0; - if (scenario3() == 0) return 0; - if (scenario4() == 0) return 0; - return 1; -} - - -int sdotest::scenario1() -{ - // scenario 1 - // create root type - root has cs - // create a company type. and containment ref from root, many valued. - // props on comp id, name both strings single v. - // create root object - // begin logging - // create a company obj. name=acme id=123 - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - FILE *f = fopen("scenario1.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open secnario1.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - cs->endLogging(); - - //expect cdo: - //root - isChanged - //comp - isCreated - - return comparefiles("scenario1.dat","scenario1.txt"); -} - - -int sdotest::testui() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("companyNS","MainType"); - - - /* Now add the properties to the types...*/ - - - const Type& tmain = mdg->getType("companyNS","MainType"); - const Type& tshort = mdg->getType("commonj.sdo","Short"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - - - mdg->addPropertyToType(tmain,"short",tshort,true); - mdg->addPropertyToType(tmain,"int",tint, true); - - DataObjectPtr main = mdg->create((Type&)tmain); - - DataObjectList& dol1 = main->getList("short"); - DataObjectList& dol2 = main->getList("int"); - DataObjectList& dol3 = main->getList((unsigned int)0); - DataObjectList& dol4 = main->getList(1); - - return 1; - } - - catch (SDORuntimeException e) - { - if (!silent) cout << "Unsigned integer test failed" << endl << e << endl; - return 0; - } - -} - - - -int sdotest::scenario5() -{ - // scenario 5 - // create root type - root has cs - // create a company type. and containment ref from root, many valued. - // props on comp id, name both strings single v. - // create root object - // begin logging - // create a company obj. name=acme id=123 - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Employee"); - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","eotm", - "myspace","Employee", false, false, false); - - mdg->addPropertyToType("myspace","Company","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - const Type& te = mdg->getType("myspace","Employee"); - - DataObjectPtr emp = mdg->create(te); - emp->setCString("name", "Mr Expendible"); - - DataObjectList& emps = com->getList("employees"); - - emps.append(emp); - - com->setDataObject("eotm",emp); - - cs->beginLogging(); - - com->unset("eotm"); - - FILE *f = fopen("scenario5.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open scenario5.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - cs->endLogging(); - - return comparefiles("scenario5.dat","scenario5.txt"); - - //expect com to have change record, nothing for eotm: - -} - -int sdotest::scenario2() -{ - // create root type - root has cs - // create a company type. and containment ref from root, many valued. - // 2 props on comp id, name both strings single v. - // create root object - // create a company obj. name=acme id=123 - // begin logging() - // name="megacorp" - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - com->setCString("name","megacorp"); - - FILE *f = fopen("scenario2.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open scenario2.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - cs->endLogging(); - - //expect cdo: - //root- nothing - // company- isChanged - //setting prop=name, value="acme" - - return comparefiles("scenario2.dat","scenario2.txt"); - -} - -int sdotest::scenario3() -{ - - //create root type - root has cs - //create a company type. and containment ref from root, many valued. - //2 props on comp id, name both strings single v. - //create root object - //create a company obj. name=acme id=123 - //begin logging() - //delete company - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - com->detach(); - - FILE *f = fopen("scenario3.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open scenario3.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - cs->endLogging(); - - fclose(f); - - // expect cdo - // root - changed - // company - deleted - - return comparefiles("scenario3.dat","scenario3.txt"); - -} - -int sdotest::scenario4() -{ - //create root type - root has cs - //create a company type. and containment ref from root, many valued. - //create a dept type. and containment ref from comp, many valued. - //create a emp type. and containment ref from dept, many valued. - // give name and id properties to comp,dept, emp - - //create root object - //create a company obj. name=acme id=123 - //create a company obj. name=megacorp id=124 - // give each company 2 depts - // give each dept 2 employees - - // begin logging() - // add new employee to first dept of acme - // delete employee from second dept of acme - - // change name of first employee of first dept megacorp. - // delete first dept of megacorp. - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","whatever", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addType("myspace","Department"); - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Department","id", - "commonj.sdo","String", false, false, false); - - mdg->addType("myspace","Employee"); - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Employee","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","companies", - "myspace","Company", true, false, true); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("companies"); - com->setCString("name","acme"); - com->setCString("id","123"); - - DataObjectPtr dep = com->createDataObject("departments"); - dep->setCString("name","widgets"); - dep->setCString("id","1"); - - DataObjectPtr emp = dep->createDataObject("employees"); - emp->setCString("name","John O'Watt"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Ida Know"); - emp->setCString("id","2"); - - - dep = com->createDataObject("departments"); - dep->setCString("name","gadgets"); - dep->setCString("id","2"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Ed Memoire"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Phyllis Tyne"); - emp->setCString("id","2"); - - - DataObjectPtr com2 = dor->createDataObject("companies"); - com2->setCString("name","megacorp"); - com2->setCString("id","124"); - - dep = com2->createDataObject("departments"); - dep->setCString("name","windows"); - dep->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Ivor Payne"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Colin Poisson"); - emp->setCString("id","2"); - - dep = com2->createDataObject("departments"); - dep->setCString("name","portholes"); - dep->setCString("id","2"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Graham Angreeneggs"); - emp->setCString("id","1"); - - emp = dep->createDataObject("employees"); - emp->setCString("name","Helen Highwater"); - emp->setCString("id","2"); - - DataObjectList& deps = com->getList("departments"); - DataObjectList& emps = deps[0]->getList("employees"); - DataObjectList& emps2 = deps[1]->getList("employees"); - DataObjectList& deps2 = com2->getList("departments"); - DataObjectList& emps3 = deps2[0]->getList("employees"); - DataObjectList& emps4 = deps2[1]->getList("employees"); - - // should be able to get the change summary property, but it - // should be zero. - // should be able to find out if the type is a change summary type - - if (! dor->getType().isChangeSummaryType()) - { - if (!silent) cout << "The root object DOESNT HAVE a change summary !!!" << endl; - return 0; - } - - try { - DataObjectPtr csptr = dor->getDataObject("whatever"); - - if (!csptr) { - if (!silent) cout << "CS property was zero - should be invisible!!!!" << endl; - return 0; - } - else { - if (!silent) cout << "CS property was NOT zero !!" << endl; - return 0; - } - } - catch (SDOPropertyNotFoundException e) - { - // cout << "No property shows - this is correct" << endl; - } - - - if (com->getType().isChangeSummaryType()) - { - if (!silent) cout << "The company object has a change summary !!!!" << endl; - return 0; - } - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - DataObjectList& depsout = com->getList("departments"); - - emp = depsout[0]->createDataObject("employees"); - emp->setCString("name","Irma Newby"); - emp->setCString("id","3"); - - DataObjectList& empsout = depsout[1]->getList("employees"); - empsout.remove(0); - - DataObjectList& depsout2 = com2->getList("departments"); - DataObjectList& empsout2 = depsout2[0]->getList("employees"); - empsout2[0]->setCString("name","Ive had my name changed"); - - depsout2[0]->detach(); - - FILE *f = fopen("scenario4.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open secnario4.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - cs->endLogging(); - - fclose(f); - - // expect: - // company acme, department widgets changed. - // employee 3 of dept widgets of acme (Irma Newby) created. - // employee 1 of dept gadgets or acme deleted - // no change record for employee 1 of company megacorp, dept windows - // deletion for dept windows of megacorp - // deletion for emp 1 of windows - showing original value for name (Ivor Payne) - // deletion for emp 2 of windows. - - return comparefiles("scenario4.dat","scenario4.txt"); - - -} - -int sdotest::seqtest() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - // company is sequenced. - mdg->addType("myspace","Company",true,false); - - mdg->addType("myspace","Department",true,false); - // string is many - - mdg->addPropertyToType("myspace","Company","string","commonj.sdo","String", - true); - - mdg->addPropertyToType("myspace","Company","departments","myspace","Department", - true); - - mdg->addPropertyToType("myspace","Department","name","commonj.sdo","String"); - - - const Type& tcc = mdg->getType("myspace","Company"); - - DataObjectPtr dor = mdg->create(tcc); - const Property& sprop = dor->getType().getProperty("string"); - SequencePtr sptr = dor->getSequence(); - - FILE *f = fopen("sequence.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Cannot open sequence.dat" << endl; - return 0; - } - - printseq(f, sptr); - - sptr->addCString(sprop,"I am Item 1 of string"); - - printseq(f, sptr); - - sptr->addText("I am the first free text"); - - printseq(f, sptr); - - sptr->addCString(sprop,"I am Item 2 of string"); - - printseq(f, sptr); - - sptr->setCStringValue(1,"I am free text which has been modified"); - - DataObjectPtr dep1 = dor->createDataObject("departments"); - - printseq(f, sptr); - - dep1->setCString("name","department1"); - - printseq(f, sptr); - - DataObjectList& dol = dor->getList("departments"); - - const Type& tcd = mdg->getType("myspace","Department"); - DataObjectPtr dep2 = mdg->create(tcd); - - printseq(f, sptr); - - dep2->setCString("name","department2"); - - printseq(f, sptr); - - dol.append(dep2); - - printseq(f, sptr); - - fclose(f); - - return comparefiles("sequence.dat","sequence.txt"); - - -} - - -int sdotest::boolbug() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Company"); - mdg->addPropertyToType("myspace","Company","bool","commonj.sdo","Boolean"); - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - try { - bool b = dor->getBoolean("bool"); - return 1; - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG not set exception" << endl; - return 0; - } -} - -int sdotest::scope1() -{ - try - { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - return 1; - } - catch(SDORuntimeException e) - { - return 0; - } -} - -int sdotest::scope2() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Company"); - mdg->addPropertyToType("myspace","Company","csumm","commonj.sdo","ChangeSummary"); - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } -} - -int sdotest::scope3() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Main"); - mdg->addType("myspace","Subs"); - mdg->addPropertyToType("myspace","Main","name","commonj.sdo","String"); - mdg->addPropertyToType("myspace","Main","subs","myspace","Subs", true); - mdg->addPropertyToType("myspace","Subs","name","commonj.sdo","String"); - - const Type& tcc = mdg->getType("myspace","Main"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr sub = dor->createDataObject("subs"); - sub->setCString("name", "sub1"); - - sub = dor->createDataObject("subs"); - sub->setCString("name", "sub2"); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } - -} - -int sdotest::testGetters(DataObjectPtr dor) -{ - if (!testGetter(dor,"boolean")) return 0; - if (!testGetter(dor,"byte")) return 0; - if (!testGetter(dor,"character")) return 0; - if (!testGetter(dor,"short")) return 0; - if (!testGetter(dor,"integer")) return 0; - if (!testGetter(dor,"long")) return 0; - if (!testGetter(dor,"double")) return 0; - if (!testGetter(dor,"float")) return 0; - if (!testGetter(dor,"date")) return 0; - if (!testGetter(dor,"string")) return 0; - if (!testGetter(dor,"bytes")) return 0; - if (!testGetter(dor,"dataobject")) return 0; - return 1; -} - -int sdotest::testGetter(DataObjectPtr dor, char* str) -{ - - try { - bool b = dor->getBoolean(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - char by = dor->getByte(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - wchar_t cy = dor->getCharacter(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - short s = dor->getShort(str); - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - if (!strcmp(str,"bytes")) return 1; - return 0; - - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - int i = dor->getInteger(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - long l = dor->getLong(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - int64_t ll = dor->getLong(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - float f = dor->getFloat(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - long double d = dor->getDouble(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - unsigned int len; - - try { - len = dor->getLength(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - if (len > 0) { - try { - wchar_t * buf = new wchar_t[len]; - unsigned int gotlen = dor->getString(str,buf,len); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - try { - char * cbuf = new char[len]; - unsigned int gotlen = dor->getBytes(str,cbuf,len); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - } - - try { - SDODate t = dor->getDate(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << " WRONG unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"boolean")) return 1; - if (!strcmp(str,"boolean")) return 1; - if (!strcmp(str,"string")) return 1; - if (!strcmp(str,"dataobject")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - const char * string = dor->getCString(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG - unset and undefaulted" << endl; - return 0; - } - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 1; - if (!strcmp(str,"date")) return 1; - return 0; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - - try { - DataObjectPtr dob = dor->getDataObject(str); - } - catch (SDOPropertyNotSetException pe) - { - if (!silent) cout << "WRONG unset and undefaulted" << endl; - return 0; - } - - catch (SDOInvalidConversionException ec) - { - if (!strcmp(str,"dataobject")) return 0; - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << endl; - return 0; - } - return 1; - -} - -int sdotest::conversiontest() -{ - //cout << "Conversion tests" << endl; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - mdg->addType("myspace","Container"); - mdg->addType("myspace","Contained"); - mdg->addPropertyToType("myspace","Container","boolean","commonj.sdo","Boolean"); - mdg->addPropertyToType("myspace","Container","byte","commonj.sdo","Byte"); - mdg->addPropertyToType("myspace","Container","character","commonj.sdo","Character"); - mdg->addPropertyToType("myspace","Container","short","commonj.sdo","Short"); - mdg->addPropertyToType("myspace","Container","integer","commonj.sdo","Integer"); - mdg->addPropertyToType("myspace","Container","long","commonj.sdo","Long"); - mdg->addPropertyToType("myspace","Container","float","commonj.sdo","Float"); - mdg->addPropertyToType("myspace","Container","double","commonj.sdo","Double"); - mdg->addPropertyToType("myspace","Container","string","commonj.sdo","String"); - mdg->addPropertyToType("myspace","Container","bytes","commonj.sdo","Bytes"); - mdg->addPropertyToType("myspace","Container","dataobject","myspace","Contained"); - mdg->addPropertyToType("myspace","Container","date","commonj.sdo","Date"); - mdg->addPropertyToType("myspace","Container","bigint","commonj.sdo","BigInteger"); - mdg->addPropertyToType("myspace","Container","bigdec","commonj.sdo","BigDecimal"); - - - const Type& tcc = mdg->getType("myspace","Container"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - // phase 1 - all unset....... - - // cout << "+++++++++++++++PROPERTY VALUES UNSET ++++++++++++++++++" << endl; - - if (!testGetters(dor)) return 0; - - // cout << "+++++++++++++++PROPERTY VALUES SET ++++++++++++++++++++" << endl; - - // RHEL 4 has problems processing 64 bit integer constants, so we'll do it the hard way - // This is overkill but gives the option to vary the value a bit. - - int64_t largeInt = 0xFFFF; - for (int j = 0; j < 2; j++) - { - largeInt <<= 16; - largeInt += 0xFFFF; - } - - DataObjectPtr sub = dor->createDataObject("dataobject"); - dor->setBoolean("boolean", true); - dor->setByte("byte",20); - dor->setCharacter("character", 1000); - dor->setShort("short", (short)12345678); - dor->setInteger("integer", 87654321); - dor->setLong("long", largeInt); - dor->setFloat("float", (float)12345.678); - dor->setDouble("double", 1234567.891); - dor->setDate("date", 37575); - wchar_t* chars = new wchar_t[50]; - for (int i=0;i<50;i++) {chars[i] = 0x7F20 + i ;} - dor->setString("string",chars, 50); - - char* tchars = new char[50]; - for (int ii=0;ii<50;ii++) {tchars[ii] = ii + 32;} - dor->setBytes("bytes",tchars, 50); - - - if (!testGetters(dor)) return 0; - - // cout << "+++++++++++++++END OF TEST ++++++++++++++++++++++++++++" << endl; - - return 1; -} - - -int sdotest::usertest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addType("myspace","UserTest"); - mdg->addType("myspace","AnObject"); - - const Type& tr = mdg->getType("myspace", "Root"); - const Type& tm = mdg->getType("myspace", "UserTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"unsetboolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"object", "myspace","AnObject"); - mdg->addPropertyToType(tm,"unsetobject","myspace","AnObject"); - - // many valued... - mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true); - mdg->addPropertyToType(tm,"objects", "myspace","AnObject", true); - - mdg->addPropertyToType(tr,"usertest", "myspace","UserTest"); - - DataObjectPtr root = mdg->create((Type&)tr); - DataObjectPtr test = root->createDataObject("usertest"); - DataObjectPtr do1 = test->createDataObject("object"); - DataObjectPtr do2 = test->createDataObject("objects"); - DataObjectPtr do3 = test->createDataObject("objects"); - - test->setBoolean("boolean", true); - - - void* value = (void*)0xF1F1F1F1; - - test->setUserData(value); - - if (test->getUserData() != (void*)0xf1f1f1f1) return 0; - - root->setUserData("usertest",value); - - if (root->getUserData("usertest") != (void*)0xf1f1f1f1) return 0; - - root->setUserData((unsigned int)0,(void*)0x20); - - if (root->getUserData((unsigned int)0) != (void*)0x20) return 0; - - const Property& prop = root->getType().getProperty("usertest"); - - root->setUserData(prop,(void*)0x40020); - - if (root->getUserData(prop) != (void*)0x40020) return 0;; - - test->setUserData("boolean", (void*)0x120); - - - if (test->getUserData("boolean") != (void*)0) return 0; - - test->setUserData("unsetboolean", (void*)0x340); - - if (test->getUserData("unsetboolean") != (void*)0) return 0; - - test->setUserData("object", (void*)0x120); - - if (test->getUserData("object") != (void*)0x120) return 0; - - test->setUserData("unsetobject", (void*)0x540); - - if (test->getUserData("unsetobject") != (void*)0) return 0; - - test->setUserData("objects", (void*)0x640); - - if (test->getUserData("objects") != (void*)0x640) return 0; - - test->setUserData("objects[1]", (void*)0x740); - - if (test->getUserData("objects[1]") != (void*)0x740) return 0; - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << "Exception in user test - unexpected" << endl; - return 0; - } -} - -int sdotest::versiontest() -{ - if (!silent) cout << "The SDO version is :" << SdoRuntime::getVersion() << endl; - if (!silent) cout << "The Major version is: " << SdoRuntime::getMajor() << endl; - if (!silent) cout << "The Minor version is: " << SdoRuntime::getMinor() << endl; - if (!silent) cout << "The Fix level is: " << SdoRuntime::getFix() << endl; - return 1; -} - -int sdotest::noncontest() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Employee"); - - const Type& tr = mdg->getType("myspace", "Company"); - const Type& tm = mdg->getType("myspace", "Department"); - const Type& to = mdg->getType("myspace", "Employee"); - - // many... - mdg->addPropertyToType(tr,"departments","myspace", "Department", - true); - - //mdg->addPropertyToType(to,"name","commonj.sdo", "String"); - - mdg->addPropertyToType(tm,"employees","myspace", "Employee", true); - - // single, non containment - mdg->addPropertyToType(tr,"eom", "myspace","Employee", false - , false, false); - - DataObjectPtr comp = mdg->create((Type&)tr); - - { - DataObjectPtr dept = comp->createDataObject("departments"); - DataObjectPtr emp1 = dept->createDataObject("employees"); - //emp1->setCString("name", "Will"); - DataObjectPtr emp2 = dept->createDataObject("employees"); - //emp1->setCString("name", "Bill"); - DataObjectPtr emp3 = dept->createDataObject("employees"); - //emp1->setCString("name", "Gill"); - comp->setDataObject("eom", emp3); - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent) cout << "Failed in containment" << e << endl; - return 0; - } -} - - -int sdotest::defaulttest() -{ - try{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","DefaultTest"); - mdg->addType("myspace","AnObject"); - - const Type& tm = mdg->getType("myspace", "DefaultTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - - mdg->setDefault("myspace","DefaultTest","boolean", true); - - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - - mdg->setDefault("myspace","DefaultTest","byte", (char)'d'); - - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - - mdg->setDefault("myspace","DefaultTest","character", (wchar_t)'e'); - - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - - mdg->setDefault("myspace","DefaultTest","short", (short)300); - - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - - mdg->setDefault("myspace","DefaultTest","long", (long)400); - - mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true); - - mdg->setDefault("myspace","DefaultTest","longs", (long)800); - - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - - mdg->setDefault("myspace","DefaultTest","longlong", (int64_t)500); - - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - - mdg->setDefault("myspace","DefaultTest","float", (float)600.0); - - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - - mdg->setDefault("myspace","DefaultTest","longdouble", (long double)700.0); - - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - - mdg->setDefault("myspace","DefaultTest","date", (long)900); - - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - - wchar_t* help = new wchar_t[4]; - help[0] = 'H'; - help[1] = 'E'; - help[2] = 'L'; - help[3] = 'P'; - - mdg->setDefault("myspace","DefaultTest","string", help, 4); - - delete help; - - char* help2 = new char[4]; - help2[0] = 'H'; - help2[1] = 'E'; - help2[2] = 'L'; - help2[3] = 'P'; - - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - - mdg->setDefault("myspace","DefaultTest","bytes", help2, 4); - - delete help2; - - mdg->addPropertyToType(tm,"object", "myspace","AnObject"); - - DataObjectPtr test = mdg->create((Type&)tm); - - FILE *f = fopen("defaults.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open file defaults.dat" << endl; - return 0; - } - - - fprintf(f, "Boolean default is true: %d\n",test->getBoolean("boolean")); - - fprintf(f, "Byte default is d: %d\n",test->getByte("byte")); - - fprintf(f, "Character default is e: %d\n",test->getCharacter("character")); - - fprintf(f, "Short default is 300: %d\n",test->getShort("short")); - - fprintf(f, "Long default is 400: %d\n",test->getInteger("long")); - - try { - fprintf(f, "Longs default is 800: %d\n" ,test->getInteger("longs[1]")); - } - catch (SDOIndexOutOfRangeException ex) - { - fprintf(f,"Expected index out of range OK\n"); - } - - fprintf(f,"Float default is 600: %.3f\n",test->getFloat("float")); - - fprintf(f, "LongDouble default is 700: %.3f\n",(float)test->getDouble("longdouble")); - - fprintf(f, "String default is HELP: "); - unsigned int lenw = test->getLength("string"); - if (lenw > 0) { - char* tw = new char[lenw]; - test->getBytes("string",tw,lenw); - for (int i=0;igetLength("bytes"); - if (len > 0) { - char* tc = new char[len]; - test->getBytes("bytes",tc,len); - for (int i=0;iaddType(ns1, testName); - mdg->addType(ns1, objectName); - - const Type& tm = mdg->getType(ns1, testName); - const Type& to = mdg->getType(ns1, objectName); - - mdg->addPropertyToType(tm, "boolean", propName, "Boolean"); - - mdg->setDefault(ns1, testName, "boolean", true); - - mdg->addPropertyToType(tm, "byte", propName, "Byte"); - - mdg->setDefault(ns1, testName, "byte", (char)'d'); - - mdg->addPropertyToType(tm, "character", propName, "Character"); - - mdg->setDefault(ns1, testName, "character", (wchar_t)'e'); - - mdg->addPropertyToType(tm, "short", propName, "Short"); - - mdg->setDefault(ns1, testName, "short", (short)300); - - mdg->addPropertyToType(tm, "long", propName, "Integer"); - - mdg->setDefault(ns1, testName, "long", (long)400); - - mdg->addPropertyToType(tm, "longs", propName, "Integer", true); - - mdg->setDefault(ns1, testName, "longs", (long)800); - - mdg->addPropertyToType(tm, "longlong", propName, "Long"); - - mdg->setDefault(ns1, testName, "longlong", (int64_t)500); - - mdg->addPropertyToType(tm, "float", propName, "Float"); - - mdg->setDefault(ns1, testName, "float", (float)600.0); - - mdg->addPropertyToType(tm, "longdouble", propName, "Double"); - - mdg->setDefault(ns1, testName, "longdouble", (long double)700.0); - - mdg->addPropertyToType(tm, "date", propName, "Date"); - - mdg->setDefault(ns1, testName, "date", (long)900); - - mdg->addPropertyToType(tm, "string", propName, "String"); - - wchar_t* help = new wchar_t[4]; - help[0] = 'H'; - help[1] = 'E'; - help[2] = 'L'; - help[3] = 'P'; - - mdg->setDefault(ns1, testName, "string", help, 4); - - delete help; - - char* help2 = new char[4]; - help2[0] = 'H'; - help2[1] = 'E'; - help2[2] = 'L'; - help2[3] = 'P'; - - mdg->addPropertyToType(tm, "bytes", propName, "Bytes"); - - mdg->setDefault(ns1, testName, "bytes", help2, 4); - - delete help2; - - mdg->addPropertyToType(tm, "object", ns1, objectName); - - DataObjectPtr test = mdg->create((Type&)tm); - - FILE *f = fopen("defaults.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open file defaults.dat" << endl; - return 0; - } - - - fprintf(f, "Boolean default is true: %d\n",test->getBoolean("boolean")); - - fprintf(f, "Byte default is d: %d\n",test->getByte("byte")); - - fprintf(f, "Character default is e: %d\n",test->getCharacter("character")); - - fprintf(f, "Short default is 300: %d\n",test->getShort("short")); - - fprintf(f, "Long default is 400: %d\n",test->getInteger("long")); - - try { - fprintf(f, "Longs default is 800: %d\n" ,test->getInteger("longs[1]")); - } - catch (SDOIndexOutOfRangeException ex) - { - fprintf(f,"Expected index out of range OK\n"); - } - - fprintf(f,"Float default is 600: %.3f\n",test->getFloat("float")); - - fprintf(f, "LongDouble default is 700: %.3f\n",(float)test->getDouble("longdouble")); - - fprintf(f, "String default is HELP: "); - unsigned int lenw = test->getLength("string"); - if (lenw > 0) { - char* tw = new char[lenw]; - test->getBytes("string",tw,lenw); - for (int i=0;igetLength("bytes"); - if (len > 0) { - char* tc = new char[len]; - test->getBytes("bytes",tc,len); - for (int i=0;i 0) - { - wchar_t * buf = new wchar_t[l+1]; - l = pstring.getStringDefault(buf,l); - fprintf(f, "String default length is %d\n", l); - for (int i=0;i 0) - { - char * buf = new char[l+1]; - l = pbytes.getBytesDefault(buf,l); - fprintf(f, "Bytes default length is %d\n",l); - for (int i=0;iaddType("myspace","DefaultTest"); - mdg->addType("myspace","AnObject"); - - const Type& tm = mdg->getType("myspace", "DefaultTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true); - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - mdg->addPropertyToType(tm,"object" , "myspace","AnObject"); - - //cout << "Testing unset defaults....." << endl; - - FILE *f; - - f = fopen("showdefault1.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open showdefault1.dat" << endl; - return 0; - } - showdefault(f, tm); - - fclose (f); - if (!comparefiles("showdefault1.dat","showdefault1.txt")) - { - return 0; - } - - //now set all the defaults.... - - mdg->setDefault("myspace","DefaultTest","boolean", true); - mdg->setDefault("myspace","DefaultTest","byte", (char)'d'); - mdg->setDefault("myspace","DefaultTest","character", (wchar_t)'e'); - mdg->setDefault("myspace","DefaultTest","short", (short)300); - mdg->setDefault("myspace","DefaultTest","long", (long)400); - mdg->setDefault("myspace","DefaultTest","longs", (long)800); - mdg->setDefault("myspace","DefaultTest","longlong", (int64_t)500); - mdg->setDefault("myspace","DefaultTest","float", (float)600.0); - mdg->setDefault("myspace","DefaultTest","longdouble", (long double)700.0); - mdg->setDefault("myspace","DefaultTest","date", (long)900); - - - wchar_t* help = new wchar_t[4]; - help[0] = 'H'; - help[1] = 'E'; - help[2] = 'L'; - help[3] = 'P'; - - mdg->setDefault("myspace","DefaultTest","string", help, 4); - - delete help; - - char* help2 = new char[4]; - help2[0] = 'H'; - help2[1] = 'E'; - help2[2] = 'L'; - help2[3] = 'P'; - - - mdg->setDefault("myspace","DefaultTest","bytes", help2, 4); - - delete help2; - - // and have another go at getting them.... - - f = fopen("showdefault2.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open showdefault2.dat" << endl; - return 0; - } - showdefault(f, tm); - - fclose (f); - if (!comparefiles("showdefault2.dat","showdefault2.txt")) - { - return 0; - } - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } - -} - -int sdotest::nulltest() -{ - - FILE *f = 0; - - try { - - int i; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","NullTest",true, false); // sequenced - mdg->addType("myspace","AnObject"); - - const Type& tm = mdg->getType("myspace", "NullTest"); - const Type& to = mdg->getType("myspace", "AnObject"); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - mdg->addPropertyToType(tm,"object", "myspace","AnObject"); - - - mdg->addPropertyToType(tm,"cs", "commonj.sdo","ChangeSummary"); - - DataObjectPtr test = mdg->create((Type&)tm); - DataObjectPtr ob = mdg->create((Type&)to); - DataObjectPtr ob2 = mdg->create((Type&)to); - DataObjectPtr ob3 = mdg->create((Type&)to); - - - f = fopen("nulltest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open file nulltest.dat" << endl; - return 0; - } - - // first check all props are unset - - ChangeSummaryPtr cs = test->getChangeSummary(); - - cs->beginLogging(); - - PropertyList pl = test->getInstanceProperties(); - - fprintf(f, "Initially - all properties unset, and default values...\n"); - for (i=0;iisSet(pl[i])); - const char *xx = test->getCString(pl[i]); - if (xx != 0) - { - fprintf(f, "%s\n",xx); - } - else - { - fprintf(f, " is empty \n"); - } - } - else { - fprintf(f,"%s set: %d value:", pl[i].getName(),test->isSet(pl[i])); - DataObjectPtr xy = test->getDataObject(pl[i]); - if (xy != 0) - { - fprintf(f, " is not empty\n"); - } - else - { - fprintf(f, " is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << " WRONG - got not set exception" << endl; - return 0; - } - } - test->setBoolean("boolean", false); - test->setByte("byte",0); - test->setCharacter("character",0); - test->setShort("short",0); - test->setInteger("long",0); - test->setLong("longlong",0 ); - test->setFloat("float",0); - test->setDouble("longdouble",0 ); - test->setDate("date",0 ); - test->setString("string",0,0); - test->setBytes("bytes","",0) ; - test->setDataObject("object",0) ; - - - - fprintf(f, "Should now have all properties set, and zero values...\n"); - for (i=0;iisSet(pl[i]),test->getCString(pl[i])); - } - else { - fprintf(f,"%s set:%d dataobject\n", pl[i].getName(),test->isSet(pl[i])); - } - - } - - for (i=0;iunset(pl[i]); - } - fprintf(f, "Should be back to having properties unset, and default values...\n"); - for (i=0;iisSet(pl[i])); - const char *xx = test->getCString(pl[i]); - if (xx != 0) - { - fprintf(f, "%s\n", xx); - } - else - { - fprintf(f, " is empty \n"); - } - } - else { - fprintf(f, "%s set: %d dataobject", pl[i].getName(),test->isSet(pl[i])); - DataObjectPtr dp = test->getDataObject(pl[i]); - if (dp != 0) - { - fprintf(f, " is not empty\n"); - } - else - { - fprintf(f, " is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG - not set exception" << endl; - return 0; - } - } - - SequencePtr s = test->getSequence(); - - s->addBoolean(test->getType().getProperty("boolean")/*"boolean"*/, false); - s->addByte(1/*"byte"*/,0); - s->addCharacter(2/*"character"*/,0); - s->addShort(3/*"short"*/,0); - s->addInteger(4/*"long"*/,0); - s->addLong(5/*"longlong"*/,0 ); - s->addFloat(6/*"float"*/,0); - s->addDouble(7/*"longdouble"*/,0 ); - // bug ...s->setDate(8/*"date"*/,0 ); - s->addString(9/*"string"*/,0,0); - s->addBytes(10/*"bytes"*/,"",0) ; - s->addDataObject(11/*"object"*/,0) ; - - for (i=0;iisSet(pl[i])); - const char* xx = test->getCString(pl[i]); - if ( xx != 0) - { - fprintf(f, "%s\n", xx); - } - else - { - fprintf(f, " is empty \n"); - } - } - else { - fprintf(f, "%s set:%d dataobject", pl[i].getName(),test->isSet(pl[i])); - DataObjectPtr db = test->getDataObject(pl[i]); - if (db != 0) - { - fprintf(f, "\n"); - } - else - { - fprintf(f, " is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG - not set exception " << endl; - return 0; - } - } - ChangedDataObjectList& cl = cs->getChangedDataObjects(); - for ( i =0; i< cl.size() ; i++) - { - if (cs->isCreated(cl[i])) { - fprintf(f, "Created dataobject\n"); - } - if (cs->isDeleted(cl[i])) { - fprintf(f, "Deleted dataobject\n"); - } - if (cs->isModified(cl[i])) { - fprintf(f, "Modified dataobject\n"); - } - } - - // now unset all the properties... - for (i=0;iunset(pl[i]); - } - - for (i=0;isetNull(i); - } - } - - fprintf(f, "Should all be null, and default values...\n"); - for (i=0;iisNull(i),test->isSet(pl[i])); - if (test->getCString(pl[i]) == 0) fprintf(f, "\n"); - else fprintf(f, "%s\n", test->getCString(pl[i])); - } - else { - fprintf(f, "%s isNull:%d set:%d value",pl[i].getName(), - test->isNull(i),test->isSet(pl[i])); - if (test->getDataObject(pl[i]) == 0) fprintf(f, " empty\n"); - else fprintf(f, " dataobject\n"); - } - } - - s->addBoolean(test->getType().getProperty("boolean")/*"boolean"*/, true); - s->addByte(1/*"byte"*/,1); - s->addCharacter(2/*"character"*/,1); - s->addShort(3/*"short"*/,1); - s->addInteger(4/*"long"*/,1); - s->addLong(5/*"longlong"*/,1 ); - s->addFloat(6/*"float"*/,1.0); - s->addDouble(7/*"longdouble"*/,1.0 ); - // bug ...s->setDate(8/*"date"*/,0 ); - wchar_t* chs = new wchar_t[5]; - chs[0] = 'h'; - chs[1] = 'e'; - chs[2] = 'l'; - chs[3] = 'l'; - chs[4] = 'o'; - s->addString(9/*"string"*/,chs,5); - delete chs; - s->addBytes(10/*"bytes"*/,"hello",5) ; - s->addDataObject(11/*"object"*/,ob) ; - - fprintf(f, "Should all have values, and not be null..\n"); - for (i=0;iisNull(i),test->isSet(pl[i])); - if (test->getCString(pl[i]) == 0) fprintf(f, "\n"); - else fprintf(f, "%s\n", test->getCString(pl[i])); - - } - else { - fprintf(f, "%s isNull%d set:%d value:", pl[i].getName(), - test->isNull(i),test->isSet(pl[i])); - if (test->getDataObject(pl[i]) == 0) fprintf(f, " empty\n"); - else fprintf(f, " dataobject\n"); - } - } - - for (i=0;isetNull(pl[i]); - } - } - - fprintf(f, "Should all be null, and default values...\n"); - for (i=0;iisNull(i),test->isSet(pl[i])); - if (test->getCString(pl[i]) == 0) fprintf(f, "\n"); - else fprintf(f, "%s\n",test->getCString(pl[i])); - - } - else { - fprintf(f, "%s isNull;%d set:%d value:", pl[i].getName(), - test->isNull(i),test->isSet(pl[i])); - if (test->getDataObject(pl[i]) == 0) fprintf(f," empty\n"); - else fprintf(f, " dataobject\n"); - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << " WRONG - not set exception" << endl; - return 0; - } - } - - cs->endLogging(); - fclose(f); - - int rr = comparefiles("nulltest.dat","nulltest.txt"); - - if (rr == 0) - { - if (!silent) cout << "Nulltest compare failed - probably because of differences is formats for doubles/floats" << endl; - // accept the test. - return 1; - - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent) cout << "Nulltest failed " << e << endl; - if (f) fclose(f); - return 0; - } -} - -int sdotest::maintest() -{ - - int i; - - FILE *f; - - try{ - - f = fopen("maintest.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Failed to open maintest.dat" << endl; - } - - fprintf(f,"Test Program starting to create types ...\n"); - - /* First create a DataFactory , then add some types and props...*/ - - /* This is dms creation of metadata */ - - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - // manager is a sequenced type... - mdg->addType("myspace","Manager", true, false); - - mdg->addType("myspace","Employee"); - - // tests of base types - - // note - base type of a seq type must be seq... - mdg->addType("myspace","Person", true, false); - - mdg->addType("myspace","DerivedString"); - mdg->addType("myspace","SubDepartment"); - - /* Now add the properties to the types...*/ - - const Type& tc = mdg->getType("myspace","Company"); - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& ti = mdg->getType("commonj.sdo","Integer"); - const Type& tf = mdg->getType("commonj.sdo","Float"); - const Type& tm = mdg->getType("myspace","Manager"); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - const Type& tp = mdg->getType("myspace","Person"); - const Type& tds= mdg->getType("myspace","DerivedString"); - const Type& tsd= mdg->getType("myspace","SubDepartment"); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - - - - - /* By type, with a type */ - mdg->addPropertyToType(tc,"name",ts); - - /* by name/uri with a type */ - mdg->addPropertyToType("myspace","Company","address",ts); - - /* by type with name/uri */ - mdg->addPropertyToType(tc,"departments", "myspace","Department", - true); - - - // add a reference to employee of the month - mdg->addPropertyToType(tc,"employee of the month", "myspace","Employee", - false, false, false); - - - - /* A list of floats */ - - mdg->addPropertyToType(tc,"floatlist", tf,true); - - mdg->addPropertyToType(tc,"pdg", tm); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - mdg->addPropertyToType(td,"name", ts); - - mdg->addPropertyToType(td,"id", ti); - - mdg->addPropertyToType(td,"manager", tm); - - mdg->addPropertyToType(tm,"name", ts); - - - mdg->addPropertyToType(te,"name",ts); - mdg->addPropertyToType(td,"employees",te,true,false,true); - - - - // emps and managers are both people (in theory). - mdg->setBaseType(te,tp); - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - mdg->setBaseType(tm,tp); - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - mdg->addPropertyToType(tp,"haircolour", ts); - mdg->addPropertyToType(tp,"name", ts); - mdg->addPropertyToType(tm,"officeid", ts); - mdg->addPropertyToType(te,"cubelocation", ts); - - mdg->addPropertyToType(tc,"shareholder", tp); - - //derived string - derived from string - cannot have properties!!! - mdg->setBaseType(tds,ts); - - // subdept derived from dept - mdg->setBaseType(tsd,td); - mdg->addPropertyToType(tsd,"subname",ts); - - mdg->addPropertyToType(tc, "substring",tds); - - /* by type with name/uri */ - mdg->addPropertyToType(tc,"subdepartments", "myspace","SubDepartment", - true); - - /* This is the data structure */ - - - - /* company - ----shareholder (Person) - ----substring (DerivedString) - * ----name (String) - * ----pdg (Manager) - (inherits haircolour from person, - has name as duplicate property - should use person.name - has officeid) - * ----name(String) - ----haircolour(String) - ----officeid(String) - * - * ----depts[] (Department) - * ----name (String) - * ----id (Integer) - * ----manager (Manager). - * ----name(String) - ----haircolour(String) from Person - * ----employees[] (Employee) - * ----name(String) - ----haircolour(String) - from Person - ----cubelocation(String) - --subdepartments[] (SubDepartment) - ----name (String) from Department - ----id (String) from Department - ----manager (Manager) from Department - ----employees (from department) - */ - - /* Now add a primitive type test to the manager */ - mdg->addPropertyToType(tm,"str",ts); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean"); - mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte"); - mdg->addPropertyToType(tm,"character", "commonj.sdo","Character"); - mdg->addPropertyToType(tm,"short", "commonj.sdo","Short"); - mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer"); - mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long"); - mdg->addPropertyToType(tm,"float", "commonj.sdo","Float"); - mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double"); - mdg->addPropertyToType(tm,"date", "commonj.sdo","Date"); - // dead mdg->addPropertyToType(tm,"charptr", "commonj.sdo","Bytes"); - mdg->addPropertyToType(tm,"string", "commonj.sdo","String"); - mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes"); - - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - // create a few aliases - - mdg->setAlias("myspace","Company","TheFirm"); - mdg->setAlias("myspace","Company","departments","TheDepartments"); - mdg->setAlias("myspace","Company","TheBigFirm"); - mdg->setAlias("myspace","Company","TheLittleFirm"); - - const Type& tlf = mdg->getType("myspace","TheBigFirm"); - - fprintf(f, "Should be Company :%s\n", tlf.getName()); - - fprintf(f, "Should be 3: %d\n", tlf.getAliasCount()); - - for (int ai = 0; ai < tlf.getAliasCount(); ai++) - { - fprintf(f, "Alias: %s\n",tlf.getAlias(ai)); - } - - - // Change summary test begins - mdg->addPropertyToType(tc,"csumm","commonj.sdo","ChangeSummary"); - // should log an error - but not fail - mdg->addPropertyToType(td,"csumm","commonj.sdo","ChangeSummary"); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - fprintf(f, "BEFORE RESOLUTION\n"); - printDataStructure(f, mdg); - - /* Now create some objects in the dg */ - -// DataObjectPtr dor; - - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - fprintf(f, "AFTER RESOLUTION\n"); - printDataStructure(f, mdg); - - fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType()); - - dor->setCString("substring","This is the sub string - its primitive, but not a string"); - - const char* subby = dor->getCString("substring"); - - fprintf(f, "%s\n", subby); - - dor->setCString("name","acmecorp"); - const char* chnam = dor->getCString("name"); - fprintf(f, "%s\n", chnam); - - dor->unset("name"); - - dor->setCString("name","acmecorp"); - - // Set up the two departments before logging starts - - DataObjectPtr dep1 = dor->createDataObject("departments"); - dep1->setCString("name","Developement"); - - DataObjectPtr dep2= dor->createDataObject("departments"); - dep2->setCString("name","Marketing"); - - // add a couple of floats to the floatlist - DataObjectList& dolist = dor->getList("floatlist"); - dolist.append((float)1.4); - dolist.append((float)1.5); - - //TODO - change summaries should live on the DataObject - // interface - can this be done? - - ChangeSummaryPtr cs = dor->getChangeSummary(); - cs->beginLogging(); - - const char* sname = dor->getCString("name"); - - fprintf(f, "%s\n", sname); - - // This should put a created entry in the cs. - - // This should be equivalent to the alternative below......... - const Type& tcd = mdg->getType("myspace","Manager"); - DataObjectPtr pdg = mdg->create((Type&)tcd); - - // This set should put the entry into the change summary. - // both in the creations and in the changes. - dor->setDataObject("pdg",pdg); - - - // try getting the boolean as a string - should be defaulted to false: - const char *bol; - try{ - bol = pdg->getCString("boolean"); - if (bol != 0) - { - fprintf(f, "Expected default boolean (false) : %s\n",bol); - } - else - { - fprintf(f, " is empty \n"); - } - } - catch (SDOPropertyNotSetException) - { - if (!silent)cout << "WRONG handled notset exception " << endl; - fclose(f); - return 0; - } - - pdg->setBoolean("boolean", true); - bol = pdg->getCString("boolean"); - fprintf(f, "Expected boolean (true) : %s\n",bol); - - // and the widechars? - const char* wdc; - try { - wdc = pdg->getCString("string"); - if (wdc != 0) - { - fprintf(f, "Expected default string (0) : ",wdc); - } - else - { - fprintf(f, " is empty \n"); - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG handled notset exception" <getSequence(); - - - // The alternative............................................. - // Here the create should put the entry into the change summary - //DataObject* pdg = dor->createDataObject("pdg"); - - // This should do nothing to the cs, as its in a created object - pdg->setCString("name","Jacques LePlace"); - - // This should modify the property, and add an item to the sequence. - sq->addCString("name", "Jacques LePlagne"); - - - // The creation entry should be removed from the change summary - // The entry should no longer exist and the pointer is invalid - pdg->detach(); - - pdg = dor->getDataObject("pdg"); - - if (pdg != 0) - { - fprintf(f, " A deleted data object should be zero and was not\n"); - } - - pdg = mdg->create((Type&)tcd); - - // A new creation in the change summary - dor->setDataObject("pdg",pdg); - - // No modification as the object is created - pdg->setCString("name", "Mr Horace Walker"); - - sq = pdg->getSequence(); - - try { - // element 0 is the first setting - which we just deleted! - sq->setCStringValue(0,"Unable to set"); - } - catch (SDOIndexOutOfRangeException) - { - // thats OK - sq->addCString("name","Now able to set"); - } - - - sq->addText(" - should say now able to set\n"); - - for (int ii=0;iisize();ii++) - { - fprintf(f, "%s\n", sq->getCStringValue(ii)); - } - - try { - const char* n = pdg->getCString("name"); - fprintf(f, " Name from deleted item: %s\n",n); - } - catch (SDOPropertyNotFoundException e) - { - // thats ok - fprintf(f, "Correctly caught prop not found\n"); - } - - - // This should put a change in the cs. - dor->setCString("name","mega-new-acmecorp"); - - - // At this point, we should know that pdg was empty and is now - // a created object. And that the old string for company name - // was "acmecorp" - - // cs->DebugPrint(); - - - /* Now set up the primitive type test on PDG */ - - pdg->setCString("string","Hello I am a string"); - pdg->setBoolean("boolean",true); - pdg->setByte("byte",23); - pdg->setCharacter("character",45); - pdg->setShort("short",34); - pdg->setLong("long", 56); - pdg->setDouble("longdouble",89.0); - pdg->setFloat("float",90.0); - pdg->setDate("date",(time_t)200); - - // RHEL 4 has problems processing 64 bit integer constants, so we'll do it the hard way - // This is overkill but gives the option to vary the value a bit. - - int64_t largeInt1 = 0xFFFF; - int64_t largeInt2 = 0x7FFF; - for (int j = 0; j < 3; j++) - { - largeInt1 <<= 16; - largeInt1 += 0xFFFF; - largeInt2 <<= 16; - largeInt2 += 0xFFFF; - } - - pdg->setLong("longlong", largeInt1); - - // try reading the longlong as a string - const char *lls = pdg->getCString("longlong"); - fprintf(f, "0xffffffffffffffff = : %s\n", lls); - - pdg->setLong("longlong", largeInt2); - - lls = pdg->getCString("longlong"); - fprintf(f, "0x7fffffffffffffff = %s\n",lls); - - pdg->setLong("longlong",0x7FFFFFFF); - lls = pdg->getCString("longlong"); - fprintf(f, "0x7fffffff = %s\n",lls); - - pdg->setLong("longlong",0x80000000); - lls = pdg->getCString("longlong"); - fprintf(f, "0x80000000 = %s\n",lls); - - pdg->setLong("longlong",78); - - - wchar_t* wide = new wchar_t[4]; - wide[0] = 'W'; - wide[1] = 'i'; - wide[2] = 'd'; - wide[3] = 'e'; - - pdg->setString("string",wide,4); - - // and as a string? - wdc = pdg->getCString("string"); - fprintf(f, " Expected Wide - got : %s\n",wdc); - - delete wide; - - char* thin = new char[4]; - thin[0] = 'T'; - thin[1] = 'h'; - thin[2] = 'i'; - thin[3] = 'n'; - - pdg->setBytes("bytes",thin,4); - - const char* dc = pdg->getCString("bytes"); - fprintf(f, " Expected Thin - got : %s\n",dc); - - delete thin; - - const char* ps = pdg->getCString("string"); - fprintf(f, "Expecting string, got %s\n", ps); - - bool pb = pdg->getBoolean("boolean"); - fprintf(f, "Expected bool true, got %d\n",pb); - - char pc = pdg->getByte("byte"); - fprintf(f, "Expected char 23, got %d\n",pc); - - wchar_t pw = pdg->getCharacter("character"); - fprintf(f, "expected wchar 45, got %d",pw); - - short pss = pdg->getShort("short"); - fprintf(f, "Expected short 34, got %d\n",pss); - - long pl = pdg->getLong("long"); - fprintf(f, "Expected long 56 , got %ld\n",pl); - - int64_t pi = pdg->getLong("longlong"); - fprintf(f, "Expected long long 78, got %ld\n",(long)pi); - - long double ld = pdg->getDouble("longdouble"); - fprintf(f, "Expected long double 89, got %.3f\n",(float)ld); - - float pf = pdg->getFloat("float"); - fprintf(f, "Expected float 90, got %.3f\n",pf); - - SDODate pt = pdg->getDate("date"); - fprintf(f, "Expected time_t 200, got %d\n",pt.getTime()); - - - wchar_t* result; - // get the length to allocate: - unsigned int widelen = pdg->getString("string",0,0); - if (widelen > 0) { - result = new wchar_t[widelen]; - widelen = pdg->getString("string",result,widelen); - for ( i=0;igetBytes("bytes",0,0); - if (thinlen > 0) { - thinresult = new char[thinlen]; - thinlen = pdg->getBytes("bytes",thinresult,thinlen); - for ( i=0;icreateDataObject("departments"); - dep3->setCString("name","Architecture"); - - // The second should do no logging in the change summary - - DataObjectPtr dep4= dor->createDataObject("departments"); - dep4->setCString("name","Pyrotechnics"); - - - // create another one using tha alias - DataObjectPtr dep5= dor->createDataObject("TheDepartments"); - dep5->setCString("name","Accounts"); - - DataObjectPtr emp1 = dep1->createDataObject("employees"); - emp1->setCString("name","Eric"); - - - DataObjectPtr emp2 = dep1->createDataObject("employees"); - emp2->setCString("name","Bill"); - - // now lets make eric employee of the month - dor->setDataObject("employee of the month",emp1); - - // no - actually it was bill - dor->setDataObject("employee of the month",emp2); - - - - // Now add to the list of floats, hopefully the two old - // values will get change summarised. - - dolist = dor->getList("floatlist"); - float f1 = dolist.getFloat(0); - - fprintf(f, "%.3f",f1); - - dolist.setFloat(0,(float)567.7); - - f1 = dolist.getFloat(0); - - fprintf(f, "%.3f",f1); - - dolist.insert(0,(float)34.56); - - - DataObjectPtr ddd = dor->getDataObject("departments[1]/employees[2]"); - - const char* ch = ddd->getCString("name"); - - fprintf(f, "Should be Bill:%s\n",ch); - - - DataObjectPtr ddd2 = dor->getDataObject("TheDepartments[1]/employees[2]"); - - const char* ch2 = ddd2->getCString("name"); - - fprintf(f, "Should be Bill:%s\n",ch2); - - - DataObjectPtr dempofm = dor->getDataObject("employee of the month"); - - const char* chh = dempofm->getCString("name"); - - fprintf(f, "The employee of the month is %s\n",chh); - - // Suppose we delete bill - - DataObjectList& dlo = dor->getList("departments[1]/employees"); - DataObjectPtr fred = dlo.remove(1); - - const char* chh2 = fred->getCString("name"); - - dempofm = dor->getDataObject("employee of the month"); - - // uncertain bahaviour - should the reference be zeroed - // becuase the item is removed from a list or not? - // Right now it doesnt get done, as the assumption is that - // the object will be put somewhere else, or dropped. - // fprintf(f, "Emp of month is now zero : %p",dempofm); - - - /* "The client would create a data mediator and get graph which - would return the root data object " */ - - const char* boss = dor->getCString("pdg/name"); - - fprintf(f, "%s\n", boss); - - DataObjectPtr mypdg = dor->getDataObject("pdg"); - - Type::Types t = mypdg->getTypeEnum(); - - if (t != Type::OtherTypes) { - fprintf(f, "pdg correctly identified\n"); - } - - const char* boss2 = mypdg->getCString("name"); - - fprintf(f, "%s\n", boss2); - - /* getPrimitiveArrayListVectorThingy() */ - - DataObjectList& deps = dor->getList("departments"); - - fprintf(f, "size of list %d\n",deps.size()); - - DataObjectPtr dout = deps[0]; - - dout->setCString("name","Research And Development"); - - const char* snew = dout->getCString("name"); - - fprintf(f, "%s\n", snew); - - string snew2 = dor->getCString("departments[1 ] /name"); - - fprintf(f, "%s\n", snew2.c_str()); - - for (int lx = 0; lx < deps.size(); lx++) - { - fprintf(f, "Department: %s\n",deps[lx]->getCString("name")); - } - - cs->endLogging(); - - - try { - // should fail - if localtype not set - dor->setCString("departments","department label"); - const char* slabel = dor->getCString("departments"); - fprintf(f, "String in list type:%s\n", slabel); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal expected exception\n"); - } - - try - { - const char* snew3 = dor->getCString(" ]awep50wi4,0qw9q]45]# q2345 -t -v3lt6o -56o 56=-o7nl ewv/;sdl f[vxddglh]px dfju/ g#k./jh#.k./"); - fprintf(f, "%s\n", snew3); - return 0; - } - catch (SDOPropertyNotFoundException e) - { - fprintf(f, "Normal Invalid path exception\n"); - } - - try - { - - // catch a and a property not found - const Property& pp = dor->getType().getProperty("notaproperty"); - return 0; - } - catch (SDOPropertyNotFoundException e) - { - fprintf(f, "Normal SDOPropertyNotFound exception\n"); - } - fclose(f); - return comparefiles("maintest.dat","maintest.txt"); - - } - - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << " in "; - if (!silent) cout << e.getFileName() << " at line "; - if (!silent) cout << e.getLineNumber() << endl; - if (!silent) cout << e.getFunctionName() << " "; - if (!silent) cout << e.getSeverity() << " "; - if (!silent) cout << e.getMessageText() << endl; - return 0; - } -} - -int sdotest::jira705() -{ - - char* retval = NULL; - - try - { - DataFactoryPtr dataFactoryPtr = DataFactory::getDataFactory(); - XSDHelperPtr xsdHelperPtr = HelperProvider::getXSDHelper((DataFactory *)dataFactoryPtr); - XMLHelperPtr xmlHelperPtr = HelperProvider::getXMLHelper((DataFactory *)dataFactoryPtr); - xsdHelperPtr->defineFile("jira705.xsd"); - - DataObjectPtr dataObjectPtr = dataFactoryPtr->create("http://ConvertedStockQuote", "getQuote"); - - dataObjectPtr->setCString("ticker1", "IBM"); - dataObjectPtr->setNull("ticker2"); - - XMLDocumentPtr xmlDocumentPtr = xmlHelperPtr->createDocument(dataObjectPtr, 0, "getQuote"); - - retval = xmlHelperPtr->save(xmlDocumentPtr, 2); - - } - catch (SDORuntimeException e) - { - if (!silent) cout << "jira705 test failed" << endl; - return 0; - } - - FILE *outfile = fopen("jira705_out.xml","w+"); - if (outfile == 0) - { - if (!silent) cout << "Unable to open jira705_out.xml" << endl; - return 0; - } - - fprintf(outfile, "%s", retval); - - fclose(outfile); - - return comparefiles("jira705_out.xml", "jira705_out.txt"); - -} - -int sdotest::jira490() -{ - - FILE *f; - - f = fopen("jira490.dat", "w+"); - if (f == 0) - { - if (!silent) cout << "Failed to open jira490.dat" << endl; - } - - fprintf(f,"Test Program starting to create types ...\n"); - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Employee"); - - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& te = mdg->getType("myspace","Employee"); - - mdg->addPropertyToType(te,"name",ts); - mdg->addPropertyToType(te,"officeNumber",ts); - - fprintf(f, "\nBefore Resolution\n\n"); - printDataStructure(f, mdg); - - /* Now create some objects in the dg */ - - DataObjectPtr dor = mdg->create((Type&) te); - - fprintf(f, "\nAfter Resolution\n\n"); - printDataStructure(f, mdg); - - dor->setCString("name", "Mr A Trader"); - dor->setCString("officeNumber", "123"); - - const char* chnam = dor->getCString("name"); - fprintf(f, "%s\n", chnam); - - const char* offnum = dor->getCString("officeNumber"); - fprintf(f, "%s\n", offnum); - - char c = dor->getByte("officeNumber"); - fprintf(f, "%d\n", c); - fprintf(f, "%c\n", c); - - fclose(f); - - return comparefiles("jira490.dat", "jira490.txt"); - -} - -int sdotest::getproptest() -{ - // should be able to get a property by xpath... - - FILE *f; - - f = fopen("getproptest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open getproptest.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - // manager is a sequenced type... - mdg->addType("myspace","Manager", true, false); - mdg->addType("myspace","Employee"); - - - /* Now add the properties to the types...*/ - - const Type& tc = mdg->getType("myspace","Company"); - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& ti = mdg->getType("commonj.sdo","Integer"); - const Type& tf = mdg->getType("commonj.sdo","Float"); - const Type& tm = mdg->getType("myspace","Manager"); - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - - mdg->addPropertyToType(tc,"name",ts); - - mdg->addPropertyToType(tc,"address",ts); - - mdg->addPropertyToType(tc,"departments", td,true); - - // add a reference to employee of the month - mdg->addPropertyToType(tc,"employee of the month", te, false, false, false); - - /* A list of floats */ - mdg->addPropertyToType(tc,"floatlist", tf,true); - mdg->addPropertyToType(tc,"director", tm); - - mdg->addPropertyToType(td,"name", ts); - mdg->addPropertyToType(td,"id", ti); - - mdg->addPropertyToType(td,"manager", tm); - mdg->addPropertyToType(tm,"name", ts); - - mdg->addPropertyToType(te,"name",ts); - mdg->addPropertyToType(td,"employees",te,true,false,true); - - //company/departments/employees. - // company - name, address, floatlist - // department name, id, manager - // employee name - - - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - - const Property& p = dor->getType().getProperty("name"); - fprintf(f, "Companys name property is: %s\n",p.getName()); - - const Property& p1 = dor->getType().getProperty("departments"); - fprintf(f, "Companys dept property is:%s\n",p1.getName()); - - // now try some xpaths... - - try { - - const Property& p2 = dor->getType().getProperty("departments/employees"); - fprintf(f,"Departments empl property is:%s\n",p2.getName()); - - const Property& p3 = dor->getType().getProperty("departments[456]/employees[123]"); - fprintf(f,"Departments empl property is:%s\n", p3.getName()); - - const Property& p4 = dor->getType().getProperty("departments.34/employees.123/name"); - fprintf(f,"Employees name property is:%s\n", p4.getName()); - - } - catch (SDORuntimeException e) - { - if (!silent) cout <<"Exceptions - xpath didnt work" << endl; - return 0; - } - try { - const Property& p5 = dor->getType().getProperty("departments.34/[]/name"); - fprintf(f,"Employees name property is:%s\n",p5.getName()); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f,"Normal exception caught\n"); - } - - try { - const Property& p6 = dor->getType().getProperty("deptartments"); - fprintf(f,"Deptartments property is:%s\n",p6.getName()); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f,"Normal exception caught\n"); - } - - try { - const Property& p7 = dor->getType().getProperty("../company"); - fprintf(f,"Company property is:%s\n",p7.getName()); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f,"Normal exception caught\n"); - } - fclose (f); - return comparefiles("getproptest.dat","getproptest.txt"); - -} - -int sdotest::querytest() -{ - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - FILE *f = fopen("querytest.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open querytest.dat" << endl; - return 0; - } - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - // manager is a sequenced type... - mdg->addType("myspace","Manager", true, false); - mdg->addType("myspace","Employee"); - - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool= mdg->getType("commonj.sdo","Boolean"); - const Type& tbyte= mdg->getType("commonj.sdo","Byte"); - const Type& tchar= mdg->getType("commonj.sdo","Character"); - const Type& tint= mdg->getType("commonj.sdo","Integer"); - const Type& tlong= mdg->getType("commonj.sdo","Long"); - const Type& tfloat= mdg->getType("commonj.sdo","Float"); - const Type& tbytes = mdg->getType("commonj.sdo","Bytes"); - const Type& tdouble= mdg->getType("commonj.sdo","Double"); - - const Type& tc = mdg->getType("myspace","Company"); - const Type& tm = mdg->getType("myspace","Manager"); - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - - mdg->addPropertyToType(tc,"name",tstring); - - mdg->addPropertyToType(tc,"departments", td,true); - - // add a reference to employee of the month - mdg->addPropertyToType(tc,"employee of the month", te, false, false, false); - - mdg->addPropertyToType(tc,"director", tm); - - mdg->addPropertyToType(td,"name", tstring); - - mdg->addPropertyToType(td,"manager", tm); - - mdg->addPropertyToType(tm,"name", tstring); - - - mdg->addPropertyToType(td,"employees",te,true,false,true); - - mdg->addPropertyToType(te,"bool",tbool); - mdg->addPropertyToType(te,"byte",tbyte); - mdg->addPropertyToType(te,"char",tchar); - mdg->addPropertyToType(te,"int",tint); - mdg->addPropertyToType(te,"float",tfloat); - mdg->addPropertyToType(te,"long",tlong); - mdg->addPropertyToType(te,"double",tdouble); - mdg->addPropertyToType(te,"bytes",tbytes); - mdg->addPropertyToType(te,"string",tstring); - mdg->addPropertyToType(te,"name",tstring); - - //company/departments/employees. - // company - name, address, floatlist - // department name, id, manager - // employee name - - const Type& tcc = mdg->getType("myspace","Company"); - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr dept = dor->createDataObject("departments"); - - DataObjectPtr emp1 = dept->createDataObject("employees"); - DataObjectPtr emp2 = dept->createDataObject("employees"); - DataObjectPtr emp3 = dept->createDataObject("employees"); - - emp1->setCString("name","Employee1"); - emp2->setCString("name","Employee2"); - emp3->setCString("name","Employee3"); - - - emp1->setBoolean("bool",true); - emp1->setByte("byte",'1'); - emp1->setCharacter("char",'1'); - emp1->setInteger("int",1); - emp1->setFloat("float",1.0); - emp1->setLong("long",1); - emp1->setDouble("double",1.0); - - char* bytes = new char[6]; - bytes[0] = 'h'; - bytes[1] = 'e'; - bytes[2] = 'l'; - bytes[3] = 'l'; - bytes[4] = 'o'; - - emp1->setBytes("bytes",bytes,5); - - wchar_t* mbytes = new wchar_t[6]; - mbytes[0] = 'h'; - mbytes[1] = 'e'; - mbytes[2] = 'l'; - mbytes[3] = 'l'; - mbytes[4] = 'o'; - - emp1->setString("string",mbytes,5); - - - emp2->setBoolean("bool",true); - emp2->setByte("byte",'2'); - emp2->setCharacter("char",'2'); - emp2->setInteger("int",200); - emp2->setFloat("float",200.0); - emp2->setLong("long",200); - emp2->setDouble("double",200.0); - - char* bytes2 = new char[6]; - bytes2[0] = 'h'; - bytes2[1] = 'e'; - bytes2[2] = 'l'; - bytes2[3] = 'p'; - bytes2[4] = '!'; - - emp2->setBytes("bytes",bytes2,5); - - wchar_t* mbytes2 = new wchar_t[6]; - mbytes2[0] = 'h'; - mbytes2[1] = 'e'; - mbytes2[2] = 'l'; - mbytes2[3] = 'p'; - mbytes2[4] = '!'; - - emp2->setString("string",mbytes2,5); - - emp3->setBoolean("bool",false); - emp3->setByte("byte",'4'); - emp3->setCharacter("char",'4'); - emp3->setInteger("int",400); - emp3->setFloat("float",400.0); - emp3->setLong("long",400); - emp3->setDouble("double",400.0); - - char* bytes3 = new char[6]; - bytes3[0] = 'w'; - bytes3[1] = 'o'; - bytes3[2] = 'm'; - bytes3[3] = 'p'; - bytes3[4] = '!'; - - emp3->setBytes("bytes",bytes3,5); - - wchar_t* mbytes3 = new wchar_t[6]; - mbytes3[0] = 'w'; - mbytes3[1] = 'o'; - mbytes3[2] = 'm'; - mbytes3[3] = 'p'; - mbytes3[4] = '!'; - - emp3->setString("string",mbytes3,5); - - - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bool=false]"); - fprintf(f, "Expected employee3: got %s\n",dob1->getCString("name")); - - DataObjectPtr dob2 = dor->getDataObject("departments[1]/employees[bool=true]"); - fprintf(f, "Expected employee1: got %s\n",dob2->getCString("name")); - - DataObjectPtr dob3 = dor->getDataObject("departments[1]/employees[byte=2]"); - fprintf(f, "Expected employee2: got %s\n",dob3->getCString("name")); - - DataObjectPtr dob4 = dor->getDataObject("departments[1]/employees[byte=1]"); - fprintf(f, "Expected employee1: got %s\n",dob4->getCString("name")); - - DataObjectPtr dob5 = dor->getDataObject("departments[1]/employees[bytes=hello]"); - fprintf(f, "Expected employee1: got %s\n",dob5->getCString("name")); - - DataObjectPtr dob5a = dor->getDataObject("departments[1]/employees[bytes=\"hello\"]"); - fprintf(f, "Expected employee1: got %s\n",dob5a->getCString("name")); - - DataObjectPtr dob5b = dor->getDataObject("departments[1]/employees[bytes='hello']"); - fprintf(f, "Expected employee1: got %s\n",dob5b->getCString("name")); - - DataObjectPtr dob6 = dor->getDataObject("departments[1]/employees[bytes=womp!]"); - fprintf(f, "Expected employee3: got %s\n",dob6->getCString("name")); - - DataObjectPtr dob7 = dor->getDataObject("departments[1]/employees[double=200.0]"); - fprintf(f, "Expected employee2: got %s\n",dob7->getCString("name")); - - DataObjectPtr dob8 = dor->getDataObject("departments[1]/employees[string=help!]"); - fprintf(f, "Expected employee2: got %s\n",dob8->getCString("name")); - - DataObjectPtr dob8a = dor->getDataObject("departments[1]/employees[string=\"help!\"]"); - fprintf(f, "Expected employee2: got %s\n",dob8a->getCString("name")); - - DataObjectPtr dob8b = dor->getDataObject("departments[1]/employees[string= 'help!']"); - fprintf(f, "Expected employee2: got %s\n",dob8b->getCString("name")); - } - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bool=doughnut]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[4]/employees[bool=true]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bytes=whoomp!]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[1]/blmployees[bool=true]"); - return 0; - } - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - try { - DataObjectPtr dob1 = dor->getDataObject("departments[teapot]/employees[bool=true]"); - return 0; - } - - catch (SDORuntimeException e) - { - fprintf(f, "Normal exception caught\n"); - } - - delete bytes; - delete bytes2; - delete bytes3; - delete mbytes; - delete mbytes2; - delete mbytes3; - - fclose (f); - return comparefiles("querytest.dat","querytest.txt"); -} - -int sdotest::setmany() -{ - - FILE *f; - f = fopen("setmany.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open setmany.dat" << endl; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","School"); - mdg->addType("myspace","Class"); - mdg->addType("myspace","Teacher"); - mdg->addType("myspace","Child"); - mdg->addType("myspace","Address"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& ts = mdg->getType("myspace","School"); - const Type& tc = mdg->getType("myspace","Class"); - const Type& tch = mdg->getType("myspace","Child"); - const Type& tt = mdg->getType("myspace","Teacher"); - const Type& ta = mdg->getType("myspace","Address"); - - mdg->addPropertyToType(tc,"name",tstring); - mdg->addPropertyToType(ts,"name",tstring); - mdg->addPropertyToType(tch,"name",tstring); - mdg->addPropertyToType(tt,"name",tstring); - - mdg->addPropertyToType(tc,"number",tint); - mdg->addPropertyToType(ts,"number",tint); - mdg->addPropertyToType(tch,"number",tint); - mdg->addPropertyToType(tt,"number",tint); - - mdg->addPropertyToType(ts,"classes", tc,true); - mdg->addPropertyToType(tc,"children", tch,true); - mdg->addPropertyToType(tc,"teacher", tt); - - mdg->addPropertyToType(tch,"address", ta); - mdg->addPropertyToType(ts,"address", ta); - mdg->addPropertyToType(tt,"address", ta); - - mdg->addPropertyToType(ta,"lines", tstring, true); - - DataObjectPtr school = mdg->create((Type&)ts); - - DataObjectPtr class1 = school->createDataObject("classes"); - DataObjectPtr class2 = school->createDataObject("classes"); - - DataObjectPtr teach1 = class1->createDataObject("teacher"); - - DataObjectPtr kid1 = class1->createDataObject("children"); - DataObjectPtr kid2 = class1->createDataObject("children"); - DataObjectPtr kid3 = class1->createDataObject("children"); - - DataObjectPtr teach2 = class2->createDataObject("teacher"); - - DataObjectPtr kid4 = class2->createDataObject("children"); - DataObjectPtr kid5 = class2->createDataObject("children"); - DataObjectPtr kid6 = class2->createDataObject("children"); - - school->setCString("name","King Norberts"); - school->createDataObject("address"); - school->setCString("address/lines.0","The Place"); - school->setCString("address/lines.1","1 The Avenue"); - school->setCString("address/lines.2","Murchester"); - school->setCString("address/lines.3","England"); - - class1->setCString("name","Primary"); - class2->setCString("name","Secondary"); - - class1->setCString("teacher/name","Mr Philbert Chloroform"); - class2->setCString("teacher/name","Mr Brian Onasis"); - - kid1->setCString("name", "Witherspoon Jnr"); - kid2->setCString("name", "Snape"); - kid3->setCString("name", "Thannet"); - kid4->setCString("name", "Grimbling"); - kid5->setCString("name", "Snagget Minor"); - kid6->setCString("name", "Van Den Bograt"); - - kid1->setInteger("number", 1); - kid2->setInteger("number", 2); - kid3->setInteger("number", 3); - kid4->setInteger("number", 4); - kid5->setInteger("number", 5); - kid6->setInteger("number", 6); - - fprintf(f," School :%s\n", school->getCString("name")); - - fprintf(f," Address1:%s\n",school->getCString("address/lines.0")); - fprintf(f," Address2:%s\n",school->getCString("address/lines.1")); - fprintf(f," Address3:%s\n",school->getCString("address/lines.2")); - fprintf(f," Address4:%s\n",school->getCString("address/lines.3")); - - fprintf(f," Class :%s\n",class1->getCString("name")); - fprintf(f," Teacher :%s\n",class1->getCString("teacher/name")); - fprintf(f," Pupil1 :%s\n",class1->getCString("children.0/name")); - fprintf(f," Pupil2 :%s\n",class1->getCString("children[number=2]/name")); - fprintf(f," Pupil3 :%s\n",class1->getCString("children[3]/name")); - - fprintf(f," Class :%s\n",class2->getCString("name")); - fprintf(f," Teacher :%s\n",class2->getCString("teacher/name")); - fprintf(f," Pupil1 :%s\n",class2->getCString("children[1]/name")); - fprintf(f," Pupil2 :%s\n",class2->getCString("children.1/name")); - fprintf(f," Pupil3 :%s\n",class2->getCString("children[number=6]/name")); - - try { - fprintf(f," Pupil3 :%s\n",class2->getCString("children[4]/name")); - return 0; - } - catch (SDOPathNotFoundException e) - { - fprintf(f,"Expected path not found exception caught\n"); - } - if (XpathHelper::isIndexed("abc[2]")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/[2]")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/wobble[2]")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/wobble.2")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - if (XpathHelper::isIndexed("wibble/wobble.2")) { - fprintf(f, "Indexed as expected\n"); - } - else { - fprintf(f, "Bad - not indexed\n"); - } - - try { - fprintf(f," Address5 :%s\n",school->getCString("address/lines[5]")); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - fprintf(f,"Normal index out of range caught\n"); - } - - try { - school->setCString("address/lines[6]","PostCode"); - fprintf(f, "Debatable behaviour - appended\n"); - fprintf(f," Address4 :%s\n",school->getCString("address/lines[5]")); - } - catch (SDORuntimeException e) - { - if (!silent)cout <<"Unexpected exception"<< endl; - return 0; - } - - fclose(f); - return comparefiles("setmany.dat","setmany.txt"); -} - -int sdotest::carotest2() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - const Type& troot = mdg->getType("myspace","root"); - - DataObjectPtr root = mdg->create((Type&)troot); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } -} - -int sdotest::adddeletetest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","bill"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","root","bill", - "myspace","bill"); - - const Type& troot = mdg->getType("myspace","root"); - - DataObjectPtr root = mdg->create((Type&)troot); - - ChangeSummaryPtr cs = root->getChangeSummary(); - cs->beginLogging(); - DataObjectPtr dob = root->createDataObject("bill"); - root->unset("bill"); - return 1; - } - catch (SDORuntimeException e) - { - return 0; - } -} - -int sdotest::carotest() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - mdg->addType("myspace","department"); - mdg->addType("myspace","employee"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","employee","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","root","companies", - "myspace","company", true, false, true); - - mdg->addPropertyToType("myspace","company","departments", - "myspace","department", true, false, true); - - mdg->addPropertyToType("myspace","company","eotm", - "myspace","employee", false, false, false); - - mdg->addPropertyToType("myspace","department","employees", - "myspace","employee", true, false, true); - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - ChangeSummaryPtr cs = root->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr comp = root->createDataObject("companies"); - - comp->setCString("name","Acme"); - - //cout << "name of the company is " << comp->getCString("name") << endl; - try { - root->unset("companies[0]"); - return 1; - } - catch (SDOUnsupportedOperationException e) - { - if (!silent)cout << "Abnormal unsupported operation for unset of many valued item" << endl; - return 0; - } -} - - -int sdotest::bug2() -{ - - FILE *f; - - f = fopen("bug2.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open bug2.dat" << endl; - return 0; - } - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","root","companies", - "myspace","company", true, false, true); - - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - - ChangeSummaryPtr cs = root->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr comp = root->createDataObject("companies"); - - comp->setCString("name","Acme"); - - dumpproperties(f,root); - - DataObjectList& dl = root->getList("companies"); - dl.remove(0); - - dumpproperties(f,root); - - - fprintf(f, "Change summary should have no entries...\n"); - - dumpchangesummary(f,cs); - - dumpproperties(f,root); - - fprintf(f, "Change summary should have no entries...\n"); - - dumpchangesummary(f,cs); - - fclose(f); - return comparefiles("bug2.dat","bug2.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent) cout << e.getEClassName() << " in "; - if (!silent) cout << e.getFileName() << " at line "; - if (!silent) cout << e.getLineNumber() << endl; - if (!silent) cout << e.getFunctionName() << " "; - if (!silent) cout << e.getMessageText() << endl; - return 0; - } -} - - -int sdotest::dumpproperties(FILE *f, DataObjectPtr root) -{ - PropertyList pl = root->getInstanceProperties(); - for (int i=0;igetList(pl[i]); - if (pl[i].getType().isDataType()) - { - char buf[10]; - for (int j=0;jgetCString(pl[i])); - } - else - { - fprintf(f,"Object Property%s\n:",pl[i].getName()); - DataObjectPtr d = root->getDataObject(pl[i]); - if (d != 0) - { - dumpproperties(f, d); - } - else - { - fprintf(f," Value was not set or null\n"); - } - fprintf(f,"End of Object Property %s\n",pl[i].getName()); - } - } - } - return 1; -} - - -int sdotest::datetest() -{ - - try { - - FILE *f = fopen("datetest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open datetest.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","company","startupdate", - "commonj.sdo","Date", false, false, false); - - mdg->addPropertyToType("myspace","company","reviewdates", - "commonj.sdo","Date", true, false, false); - - - mdg->addPropertyToType("myspace","root","company", - "myspace","company", false, false, true); - - - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - ChangeSummaryPtr cs = root->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr comp = root->createDataObject("company"); - - - comp->setCString("name","DateTest"); - - fprintf(f,"Name of the company is %s\n",comp->getCString("name")); - - comp->setDate("startupdate",SDODate( 1000 )); - - fprintf(f,"Set start of the company is %d\n",comp->getDate("startupdate").getTime()); - - DataObjectList& dol = comp->getList("reviewdates"); - - dol.append(SDODate(2000)); - dol.append(SDODate(4000)); - - for (int i=0;i < dol.size(); i++) - { - fprintf(f,"Review number:%d was:%d\n", i,dol.getDate(i).getTime()); - - // ascTime gives different values on windows and linux, - // so comparison of the output is not a valid test. - - //fprintf(f,"Formatted:%d was:%s\n",i,dol.getDate(i).ascTime()); - } - - cs->endLogging(); - - fclose(f); - - return comparefiles("datetest.dat","datetest.txt"); - } - - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } - -} - -int sdotest::matttest1() -{ - - try { - FILE *f = fopen("matttest1.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open matttest1.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","root"); - mdg->addType("myspace","company"); - mdg->addType("myspace","department"); - mdg->addType("myspace","employee"); - - mdg->addPropertyToType("myspace","root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addPropertyToType("myspace","company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","employee","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","root","companies", - "myspace","company", true, false, true); - - mdg->addPropertyToType("myspace","company","departments", - "myspace","department", true, false, true); - - mdg->addPropertyToType("myspace","company","eotm", - "myspace","employee", false, false, false); - - mdg->addPropertyToType("myspace","department","employees", - "myspace","employee", true, false, true); - - const Type& troot = mdg->getType("myspace","root"); - - - DataObjectPtr root = mdg->create((Type&)troot); - - DataObjectPtr comp = root->createDataObject("companies"); - - comp->setCString("name","Acme"); - - DataObjectPtr dept1 = comp->createDataObject("departments"); - - dept1->setCString("name","Shoe"); - - DataObjectPtr dept2 = comp->createDataObject("departments"); - - dept2->setCString("name","IT"); - - DataObjectPtr sue = dept1->createDataObject("employees"); - - sue->setCString("name","Sue"); - - DataObjectPtr billy = dept2->createDataObject("employees"); - - billy->setCString("name","Billy"); - - // Want to swap Sue and Billy so, while holding them in variables, should be - //able to unset from department then reinsert - - // method 1 - clear the lists... - dept1->unset("employees"); - dept2->unset("employees"); - - DataObjectPtr cont = billy->getContainer(); - - if (cont != 0) - { - if (!silent)cout << "Container of Billy should be zero, but is :" << cont->getCString("name") << endl; - return 0; - } - - DataObjectList& li1 = dept1->getList("employees"); - DataObjectList& li2 = dept2->getList("employees"); - li1.append(billy); - li2.append(sue); - - DataObjectPtr cont2 = billy->getContainer(); - - if (cont2 != 0) - { - fprintf(f,"Container of Billy should be dept1, and is :%s\n", cont2->getCString("name")); - } - else { - if (!silent)cout << "Problem - Billy is not contained." << endl; - return 0; - } - - li1.remove(0); - li2.remove(0); - - DataObjectPtr cont3 = billy->getContainer(); - - if (cont3 != 0) - { - if (!silent)cout << "Container of Billy should be zero, but is :" << cont3->getCString("name") << endl; - return 0; - } - - li1.append(sue); - li2.append(billy); - - DataObjectPtr cont4 = billy->getContainer(); - - if (cont4 != 0) - { - fprintf(f,"Container of Billy should be dept2, and is :%s\n", cont4->getCString("name")); - } - else { - if (!silent)cout << "Problem - Billy is not contained." << endl; - return 0; - } - - fclose(f); - - return comparefiles("matttest1.dat","matttest1.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << e.getEClassName() << " in "; - if (!silent)cout << e.getFileName() << " at line "; - if (!silent)cout << e.getLineNumber() << endl; - if (!silent)cout << e.getFunctionName() << " "; - if (!silent)cout << e.getMessageText() << endl; - return 0; - } -} - -int sdotest::carotest3() -{ - // sequence new APIs - // data object list, new getLength(unsigned int) - - - FILE *f = fopen("carotest3.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open carotest3.dat" << endl; - return 0; - } - DataFactoryPtr mdg = DataFactory::getDataFactory(); - // company is sequenced. - mdg->addType("myspace","Company",true,false); - - mdg->addType("myspace","Department",true,false); - // string is many - - mdg->addPropertyToType("myspace","Company","string","commonj.sdo","String", - true); - - mdg->addPropertyToType("myspace","Company","departments","myspace","Department", - true); - - mdg->addPropertyToType("myspace","Company","strings","commonj.sdo","String", - true); - - mdg->addPropertyToType("myspace","Company","integers","commonj.sdo","Integer", - true); - - - mdg->addPropertyToType("myspace","Department","name","commonj.sdo","String"); - - - const Type& tcc = mdg->getType("myspace","Company"); - - DataObjectPtr dor = mdg->create(tcc); - const Property& sprop = dor->getType().getProperty("string"); - - SequencePtr sptr = dor->getSequence(); - - printseq(f,sptr); - - sptr->addCString(sprop,"I am Item 1 of string"); - - printseq(f,sptr); - - sptr->addText("I am the first free text"); - - printseq(f,sptr); - - sptr->addCString(sprop,"I am Item 2 of string"); - - printseq(f,sptr); - - sptr->setText(1,"I am free text which has been modified"); - - printseq(f,sptr); - - DataObjectPtr dep1 = dor->createDataObject("departments"); - - printseq(f,sptr); - - dep1->setCString("name","department1"); - - printseq(f,sptr); - - DataObjectList& dol = dor->getList("departments"); - - unsigned int ii = dol.getLength(0); - - if (ii != 0) - { - if (!silent)cout << "Length of a data object should be zero:" << ii << endl; - return 0; - } - - DataObjectList& strl = dor->getList("strings"); - - wchar_t * buf = new wchar_t[5]; - buf[0] = 'a'; - buf[1] = 'b'; - buf[2] = 'c'; - buf[3] = 'd'; - buf[4] = 'e'; - - strl.append(buf,1); - strl.append(buf,2); - strl.append(buf,3); - strl.append(buf,4); - strl.append(buf,5); - - fprintf(f,"Element zero, length 1: %d\n",strl.getLength(0)); - fprintf(f,"Element one, length 2: %d\n",strl.getLength(1)); - fprintf(f,"Element two, length 3: %d\n",strl.getLength(2)); - fprintf(f,"Element three,length 4: %d\n",strl.getLength(3)); - fprintf(f,"Element four, length 5: %d\n",strl.getLength(4)); - - try { - int xx = strl.getLength(5); - if (!silent)cout << "problem - element 5 should not exist" << endl; - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - if (!silent)cout << "Normal out of range exception in test" << endl; - } - - DataObjectList& numl = dor->getList("integers"); - - try { - int xx2 = numl.getLength(0); - if (!silent)cout << "problem - element 0 should not exist" << endl; - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - if (!silent)cout << "Normal out of range exception in test" << endl; - } - fclose(f); - return comparefiles("carotest3.dat","carotest3.txt"); -} - - -int sdotest::eqhelpertest() -{ - - // copy and equality helpers - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Assembly"); - mdg->addType("myspace","SubAssembly"); - mdg->addType("myspace","Part"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& tassy = mdg->getType("myspace","Assembly"); - const Type& tsubassy = mdg->getType("myspace","SubAssembly"); - const Type& tpart = mdg->getType("myspace","Part"); - - - mdg->addPropertyToType(tassy,"name",tstring); - mdg->addPropertyToType(tsubassy,"name",tstring); - mdg->addPropertyToType(tpart,"name",tstring); - - mdg->addPropertyToType(tassy,"number",tint); - mdg->addPropertyToType(tsubassy,"number",tint); - mdg->addPropertyToType(tpart,"number",tint); - - mdg->addPropertyToType(tassy,"subassemblies", tsubassy,true); - mdg->addPropertyToType(tsubassy,"parts", tpart,true); - - - // assy 1 - - DataObjectPtr assy1 = mdg->create((Type&)tassy); - - DataObjectPtr subassy1 = assy1->createDataObject("subassemblies"); - DataObjectPtr subassy2 = assy1->createDataObject("subassemblies"); - - DataObjectPtr part1 = subassy1->createDataObject("parts"); - DataObjectPtr part2 = subassy1->createDataObject("parts"); - DataObjectPtr part3 = subassy1->createDataObject("parts"); - - DataObjectPtr part4 = subassy2->createDataObject("parts"); - DataObjectPtr part5 = subassy2->createDataObject("parts"); - DataObjectPtr part6 = subassy2->createDataObject("parts"); - - - assy1->setCString("name","MicroFrame"); - assy1->setInteger("number",32768); - - subassy1->setCString("name","Legs"); - subassy2->setCString("name","Body"); - subassy1->setInteger("number",1); - subassy2->setInteger("number",2); - - part1->setCString("name","Leg1"); - part2->setCString("name","Leg2"); - part3->setCString("name","Leg3"); - part1->setInteger("number",10001); - part2->setInteger("number",10002); - part3->setInteger("number",10003); - - - part4->setCString("name","MainStrut"); - part5->setCString("name","Brace1"); - part6->setCString("name","Brace2"); - part4->setInteger("number",20001); - part5->setInteger("number",20002); - part6->setInteger("number",20003); - - // assy2 - shallow equal to assy, but not deep equal - - DataObjectPtr assy2 = mdg->create((Type&)tassy); - - DataObjectPtr subassy3 = assy2->createDataObject("subassemblies"); - DataObjectPtr subassy4 = assy2->createDataObject("subassemblies"); - - DataObjectPtr part7 = subassy3->createDataObject("parts"); - DataObjectPtr part8 = subassy3->createDataObject("parts"); - DataObjectPtr part9 = subassy3->createDataObject("parts"); - - DataObjectPtr part10 = subassy4->createDataObject("parts"); - DataObjectPtr part11 = subassy4->createDataObject("parts"); - DataObjectPtr part12 = subassy4->createDataObject("parts"); - - - assy2->setCString("name","MicroFrame"); - assy2->setInteger("number",32768); - - subassy3->setCString("name","Legs"); - subassy4->setCString("name","Body"); - subassy3->setInteger("number",1); - subassy4->setInteger("number",2); - - part7->setCString("name","Leg1"); - part8->setCString("name","Leg2"); - part9->setCString("name","Leg3"); - part7->setInteger("number",10001); - part8->setInteger("number",10002); - part9->setInteger("number",10003); - - - part10->setCString("name","MainStrut"); - part11->setCString("name","Brace1"); - part12->setCString("name","OddBrace2"); - part10->setInteger("number",20001); - part11->setInteger("number",20002); - part12->setInteger("number",20003); - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent) cout << "EQUALITY HELPER TEST - failure at first test" << endl; - return 0; - } - if (EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at second test" << endl; - return 0; - } - - // Now alter assy2 to be deep equal... - - - part12->setCString("name","Brace2"); - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at third test" << endl; - return 0; - } - if (!EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at fourth test" << endl; - return 0; - } - - // now add a part, so its not deep equal again - DataObjectPtr part13 = subassy4->createDataObject("parts"); - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at fifth test" << endl; - return 0; - } - if (EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at sixth test" << endl; - return 0; - } - - // now remove that part again... - DataObjectList& dl = subassy4->getList("parts"); - dl.remove(3); - - // should be deep equal again... - - if (!EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at seventh test" << endl; - return 0; - } - if (!EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at eighth test" << endl; - return 0; - } - // now make them not shallow equal - assy2->setInteger("number",32767); - - if (EqualityHelper::equalShallow(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at nineth test" << endl; - return 0; - } - if (EqualityHelper::equal(assy1, assy2)) - { - if (!silent)cout << "EQUALITY HELPER TEST - failure at tenth test" << endl; - return 0; - } - return 1; -} - -int sdotest::cohelpertest() -{ - - // copy and equality helpers - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Assembly"); - mdg->addType("myspace","SubAssembly"); - mdg->addType("myspace","Part"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& tassy = mdg->getType("myspace","Assembly"); - const Type& tsubassy = mdg->getType("myspace","SubAssembly"); - const Type& tpart = mdg->getType("myspace","Part"); - - - mdg->addPropertyToType(tassy,"name",tstring); - mdg->addPropertyToType(tsubassy,"name",tstring); - mdg->addPropertyToType(tpart,"name",tstring); - - mdg->addPropertyToType(tassy,"number",tint); - mdg->addPropertyToType(tsubassy,"number",tint); - mdg->addPropertyToType(tpart,"number",tint); - - mdg->addPropertyToType(tassy,"subassemblies", tsubassy,true); - mdg->addPropertyToType(tsubassy,"parts", tpart,true); - - - // assy 1 - - DataObjectPtr assy1 = mdg->create((Type&)tassy); - - DataObjectPtr subassy1 = assy1->createDataObject("subassemblies"); - DataObjectPtr subassy2 = assy1->createDataObject("subassemblies"); - - DataObjectPtr part1 = subassy1->createDataObject("parts"); - DataObjectPtr part2 = subassy1->createDataObject("parts"); - DataObjectPtr part3 = subassy1->createDataObject("parts"); - - DataObjectPtr part4 = subassy2->createDataObject("parts"); - DataObjectPtr part5 = subassy2->createDataObject("parts"); - DataObjectPtr part6 = subassy2->createDataObject("parts"); - - - assy1->setCString("name","MicroFrame"); - assy1->setInteger("number",32768); - - subassy1->setCString("name","Legs"); - subassy2->setCString("name","Body"); - subassy1->setInteger("number",1); - subassy2->setInteger("number",2); - - part1->setCString("name","Leg1"); - part2->setCString("name","Leg2"); - part3->setCString("name","Leg3"); - part1->setInteger("number",10001); - part2->setInteger("number",10002); - part3->setInteger("number",10003); - - - part4->setCString("name","MainStrut"); - part5->setCString("name","Brace1"); - part6->setCString("name","Brace2"); - part4->setInteger("number",20001); - part5->setInteger("number",20002); - part6->setInteger("number",20003); - - // first lets shallow copy assy1: - - DataObjectPtr assy2 = CopyHelper::copyShallow(assy1); - - if (strcmp(assy2->getCString("name"),"MicroFrame")) - { - if (!silent)cout << "COPYHELPER shallow copy failed(1)" << endl; - return 0; - } - else if (assy2->getInteger("number") != 32768) - { - if (!silent)cout << "COPYHELPER shallow copy 1 failed(2)" << endl; - return 0; - } - else if (assy2->getList("subassemblies").size() != 0) - { - if (!silent)cout << "COPYHELPER shallow copy 1 failed(3)" << endl; - return 0; - } - else if (assy2->getContainer() != 0) - { - if (!silent)cout << "COPYHELPER shallow copy failed(4)" << endl; - return 0; - } - - // now deep copy it - - DataObjectPtr assy3 = CopyHelper::copy(assy1); - - if (!EqualityHelper::equal(assy1, assy3)) - { - if (!silent)cout << "COPYHELPER deep copy failed(1)" << endl; - return 0; - } - else if (assy3->getContainer() != 0) - { - if (!silent)cout << "COPYHELPER deep copy failed(2)" << endl; - return 0; - } - return 1; -} - - -int sdotest::cssave() -{ - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - //mdg->addType("companyNS","CompanyType"); - //mdg->addType("companyNS","EmployeeType"); - //mdg->addType("companyNS","DepartmentType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - //mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - //mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - //mdg->addPropertyToType(tcomp,"departments",tdept, true); - //mdg->addPropertyToType(tcomp,"cs",tcs); - - //mdg->addPropertyToType(tdept,"name",tstring); - //mdg->addPropertyToType(tdept,"location",tstring); - //mdg->addPropertyToType(tdept,"number",tstring); - //mdg->addPropertyToType(tdept,"employees",temp,true); - - //mdg->addPropertyToType(temp, "name",tstring); - //mdg->addPropertyToType(temp, "SN", tstring); - //mdg->addPropertyToType(temp, "manager", tbool); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","John Jones"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Mary Smith"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Jane Doe"); - emp3->setCString("SN","E0003"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - - comp->setDataObject("employeeOfTheMonth",emp2); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - DataObjectPtr emp4 = mdg->create(temp); - emp4->setCString("name","Al Smith"); - emp4->setCString("SN","E0004"); - emp4->setBoolean("manager",true); - - // first change - create employee 4 - dol2.append(emp4); - - dol2.remove(1); // element 1 is Mary - - DataObjectPtr emp5 = mdg->create(temp); - emp5->setCString("name","Bill Withers"); - emp5->setCString("SN","E0005"); - - dol2.append(emp5); - - - comp->setCString("name","MegaCorp"); - comp->setDataObject("employeeOfTheMonth",emp4); - - // silly test - add mary back again - dol2.append(emp2); - - - - - cs->endLogging(); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"cssave-output.xml"); - return comparefiles("cssave-output.xml","cssave-output.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "CSSAVE FAILED" << e << endl; - return 0; - } -} - -int sdotest::cssave2() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Eastleigh Borough Council"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Waste Disposal"); - dept->setCString("location","Botley"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - DataObjectPtr emp4 = mdg->create(temp); - DataObjectPtr emp5 = mdg->create(temp); - - emp1->setCString("name","Alphonse Dodet"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Bridget Jones"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Colin Thorne"); - emp3->setCString("SN","E0003"); - - emp4->setCString("name","Donald Trump"); - emp4->setCString("SN","E0004"); - - emp5->setCString("name","Eddy the eagle"); - emp5->setCString("SN","E0005"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - dol2.append(emp4); - dol2.append(emp5); - - //comp->setDataObject("employeeOfTheMonth",emp2); - - DataObjectPtr dept2 = mdg->create((Type&)tdept); - dol.append(dept2); - - dept2->setCString("name","Tax Collection"); - dept2->setCString("location","Winchester"); - dept2->setCString("number","666"); - - DataObjectPtr empb1 = mdg->create(temp); - DataObjectPtr empb2 = mdg->create(temp); - DataObjectPtr empb3 = mdg->create(temp); - DataObjectPtr empb4 = mdg->create(temp); - DataObjectPtr empb5 = mdg->create(temp); - - empb1->setCString("name","Arch Meanie"); - empb1->setCString("SN","D0001"); - - empb2->setCString("name","Boris the Spider"); - empb2->setCString("SN","D0002"); - empb2->setBoolean("manager",true); - - empb3->setCString("name","Cash Hoarder"); - empb3->setCString("SN","D0003"); - - empb4->setCString("name","Dean Giyatoss"); - empb4->setCString("SN","D0004"); - - empb5->setCString("name","Ebenezer Scrooge"); - empb5->setCString("SN","D0005"); - - DataObjectList& dol3 = dept2->getList("employees"); - dol3.append(empb1); - dol3.append(empb2); - dol3.append(empb3); - dol3.append(empb4); - dol3.append(empb5); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - // start by deleting a few employees from dept 1 - - dol2.remove(1); // B - dol2.remove(1); // C - dol2.remove(1); // D - - // Now delete the tax collectors as a whole - - dol.remove(1); - - // now perhaps add back one of the employees - - dol2.append(emp3); // C - - comp->setCString("name","MegaCorp"); - - try { - comp->setDataObject("employeeOfTheMonth",emp4); - if (!silent)cout << "emp4 was not in the tree" << endl; - return 0; - } - catch (SDORuntimeException e) - { - } - - comp->setDataObject("employeeOfTheMonth",emp5); - - cs->endLogging(); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"cssave2-output.xml"); - return comparefiles("cssave2-output.xml","cssave2-output.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "CSSAVE FAILED" << e << endl; - return 0; - } -} - - - - - -int sdotest::b45933() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("companyNS","CompanyType"); - mdg->addType("companyNS","WombatType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& twom = mdg->getType("companyNS","WombatType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - mdg->addPropertyToType(tcomp,"bools",tbool, true); - mdg->addPropertyToType(tcomp,"woms",twom, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Bug45933"); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - DataObjectList& dol = comp->getList("bools"); - dol.append(false); - dol.remove(0); - DataObjectPtr awom = mdg->create((Type&)twom); - DataObjectList& dol2 = comp->getList("woms"); - dol2.append(awom); - dol2.remove(0); - - cs->endLogging(); - - //dumpchangesummary(cs); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"bug45933-output.xml"); - return comparefiles("bug45933-output.xml","bug45933-output.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "BUG45933 FAILED" << endl << e << endl; - return 0; - } -} - -int sdotest::b46617() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - //XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - //xsh->defineFile("b46617.xsd"); - mdg->addType("companyNS","CompanyType"); - mdg->addType("companyNS","DepartmentType"); - mdg->addType("companyNS","EmployeeType"); - - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - mdg->addPropertyToType(tcomp,"name",tstring); - mdg->addPropertyToType(tcomp,"departments",tdept,true,false,true); - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp,false,false,false); - mdg->addPropertyToType(tcomp,"CEO",temp,false,false,true); - - mdg->addPropertyToType(tdept,"employees",temp,true,false,true); - mdg->addPropertyToType(tdept,"name",tstring,false,false,true); - mdg->addPropertyToType(tdept,"location",tstring,false,false,true); - mdg->addPropertyToType(tdept,"number",tstring,false,false,true); - - mdg->addPropertyToType(temp,"name",tstring,false,false,true); - mdg->addPropertyToType(temp,"SN",tstring,false,false,true); - mdg->addPropertyToType(temp,"manager",tbool,false,false,true); - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Eastleigh Borough Council"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Waste Disposal"); - dept->setCString("location","Botley"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","Alphonse Dodet"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Bridget Jones"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl Marx"); - emp3->setCString("SN","E0003"); - - comp->setDataObject("CEO",emp2); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - //dol2.append(emp2); - dol2.append(emp3); - - comp->setDataObject("employeeOfTheMonth",emp2); - - XSDHelperPtr xmd = HelperProvider::getXSDHelper(mdg); - xmd->generateFile(mdg->getTypes(), - "b46617.xsd","companyNS"); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"b46617.xml"); - - // now try loading the xml, using the same schema, and see if we get the - // same answer - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617.xml", "companyNS"); - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - - if (strcmp(newdob->getDataObject("employeeOfTheMonth")->getCString("name"), - "Bridget Jones")) - { - if (!silent)cout << "Employee of the month name has changed" << endl; - return 0; - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46617 failed" << e << endl; - return 0; - } -} - -int sdotest::b46617b() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("b46617b.xsd"); - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617b.xml", "companyNS"); - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - if (strcmp(newdob->getDataObject("employeeOfTheMonth")->getCString("name"), - "Fred Smith")) - { - if (!silent)cout << "Employee of the month name has changed" << endl; - return 0; - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46617b failed" << e << endl; - return 0; - } -} - -int sdotest::notfound() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - try { - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("not_present.xsd"); - } - catch (SDOFileNotFoundException e) - { - //cout << "NotFound threw correct exception " << endl; - } - - catch (SDORuntimeException e) - { - if (!silent)cout << "NOTFOUND THREW THE WRONG EXCEPTION" << e << endl; - return 0; - } - - try { - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("not-present.xml", "companyNS"); - - } - catch (SDOFileNotFoundException ee) - { - //cout << "NotFound threw the correct exception" << endl; - } - - catch (SDORuntimeException e) - { - if (!silent)cout << "NOTFOUND THREW THE WRONG EXCEPTION" << e << endl; - return 0; - } - return 1; -} - -int sdotest::csload() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cssave-output.xml", "companyNS"); - //myXMLDocument->setRootElementName("company"); - //myXMLHelper->save(myXMLDocument,"csload-output.xml"); - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "csload-output.xml"); - - return comparefiles("csload-output.xml","csload-output.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "CSLOAD FAILED" << e << endl; - return 0; - } - -} - -int sdotest::testsubsload() -{ - try - { - FILE *f = fopen("testsubsload.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testsubsload.dat" << endl; - return 0; - } - - fprintf(f,"TEST: TestSubsLoad ==========================================\n"); - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("companysubs.xsd"); - - //cout << "TYPES LOADED FROM COMPANYSUBS XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - // so now we should be able to put book or a magazine into - // the publication under company... - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& book = mdg->getType("companyNS","BookType"); - const Type& mag = mdg->getType("companyNS","MagazineType"); - const Type& pub = mdg->getType("companyNS","PublicationType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Puflet Publishing"); - - - DataObjectPtr book1 = mdg->create(book); - book1->setCString("author","Mr P B Writer"); - // inherted from publication - book1->setCString("title","Nowhere Man"); - - DataObjectPtr mag1 = mdg->create(mag); - mag1->setCString("editor","Mr B Picky"); - // inherited from publication - mag1->setCString("title","Bionicle Weekly"); - - DataObjectPtr pub1 = mdg->create(pub); - pub1->setCString("title","Noddy In Toyland"); - - - // publication should accept any of them... - - comp->setDataObject("Publication",pub1); - const Type& tpub1 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub1.getName()); - - comp->setDataObject("Publication",book1); - const Type& tpub2 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub2.getName()); - - comp->setDataObject("Publication",mag1); - const Type& tpub3 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub3.getName()); - - // should be able to address publication as book or magazine - - comp->setDataObject("Book",book1); - const Type& tpub4 = comp->getDataObject("Book")->getType(); - fprintf(f, "Book is of type %s\n",tpub4.getName()); - - comp->setDataObject("Magazine",mag1); - const Type& tpub5 = comp->getDataObject("Magazine")->getType(); - fprintf(f,"Magazine is of type %s\n",tpub5.getName()); - fprintf(f,"END TEST: TestSubsLoad ======================================\n"); - fclose(f); - return comparefiles("testsubsload.dat","testsubsload.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in TeseSubsLoad" << e << endl; - return 0; - } -} - -int sdotest::testSCA() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("sca.xsd"); - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in TeseSCA" << e << endl; - return 0; - } -} - -int sdotest::testabstract() -{ - try - { - - FILE *f = fopen("testabstract.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testabstract.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("companyabs.xsd"); - - //cout << "TYPES LOADED FROM COMPANYABS XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - // so now we should be able to put book or a magazine into - // the publication under company... - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& book = mdg->getType("companyNS","BookType"); - const Type& mag = mdg->getType("companyNS","MagazineType"); - const Type& pub = mdg->getType("companyNS","PublicationType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Puflet Publishing"); - - // should be allowed... - DataObjectPtr book1 = mdg->create(book); - book1->setCString("author","Mr P B Writer"); - // inherted from publication - book1->setCString("title","Nowhere Man"); - - DataObjectPtr mag1 = mdg->create(mag); - mag1->setCString("editor","Mr B Picky"); - // inherited from publication - mag1->setCString("title","Bionicle Weekly"); - - try { - DataObjectPtr pub1 = mdg->create(pub); - pub1->setCString("title","Noddy In Toyland"); - } - catch (SDOUnsupportedOperationException e) - { - fprintf(f,"Normal unsupportedoperation for creation of abstract type\n"); - } - - - // publication should accept books and magazines... - - comp->setDataObject("Publication",book1); - const Type& tpub2 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub2.getName()); - - comp->setDataObject("Publication",mag1); - const Type& tpub3 = comp->getDataObject("Publication")->getType(); - fprintf(f,"Publication is of type %s\n",tpub3.getName()); - - // should be able to address publication as book or magazine - - comp->setDataObject("Book",book1); - const Type& tpub4 = comp->getDataObject("Book")->getType(); - fprintf(f,"Book is of type %s\n",tpub4.getName()); - - comp->setDataObject("Magazine",mag1); - const Type& tpub5 = comp->getDataObject("Magazine")->getType(); - fprintf(f,"Magazine is of type %s\n",tpub5.getName()); - - fclose(f); - return comparefiles("testabstract.dat","testabstract.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in TestAbstract" << e << endl; - return 0; - } -} - -int sdotest::testOpen() -{ - try - { - - FILE *f = fopen("testopen.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testopen.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("companyNS","CompanyType"); - // employee will be an open type... - mdg->addType("companyNS","EmployeeType", /*seq*/false, - /*open*/true, - /*abs */ false, - /*data*/ false); - - mdg->addType("companyNS","DepartmentType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - mdg->addPropertyToType(tcomp,"departments",tdept, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - mdg->addPropertyToType(tdept,"name",tstring); - mdg->addPropertyToType(tdept,"location",tstring); - mdg->addPropertyToType(tdept,"number",tstring); - mdg->addPropertyToType(tdept,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - mdg->addPropertyToType(temp, "SN", tstring); - mdg->addPropertyToType(temp, "manager", tbool); - - - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","Albert"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Boris"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl"); - emp3->setCString("SN","E0003"); - - // now we should be able to add extra properties to employees, - // and get them back again... - - try { - emp1->setNull("openstring"); - return 0; - } - catch (SDOUnsupportedOperationException e) - { - fprintf(f,"Normal exception for setting null on undefined prop\n"); - } - - emp1->setCString("openstring","Value Of Open String"); - emp1->setBoolean("openboolean",true); - - const char* c = emp1->getCString("openstring"); - - fprintf(f,"Open Type string value: %s\n",c); - - bool b = emp1->getBoolean("openboolean"); - - fprintf(f,"Open Type boolean value: %d\n", b); - - // unknown list type at present.. - DataObjectList& dl = emp1->getList("opentypelist"); - - int i = 45; - dl.append((short)i); // now the list must be primitive - - // we should now have instance properties - PropertyList pl = emp1->getType().getProperties(); - - for (i=0;igetInstanceProperties(); - - for (i=0;isetNull("openstring"); - - emp1->setCString("openstring","New Value Of Open String"); - - - // now unset them and see them disappear - what happens to the indices? - - emp1->unset("openstring"); - - PropertyList plk = emp1->getInstanceProperties(); - - for (i=0;iunset("openboolean"); - - dl.remove(0); // so is this list gone, or empty - I vote for still there. - - PropertyList pll = emp1->getInstanceProperties(); - for (i=0;iunset("opentypelist"); - - // now I vote for gone... - - PropertyList plm = emp1->getInstanceProperties(); - for (i=0;iaddType("companyNS","CompanyType"); - // employee will be an open type... - mdg->addType("companyNS","EmployeeType", /*seq*/false, - /*open*/true, - /*abs */ false, - /*data*/ false); - - mdg->addType("companyNS","DepartmentType"); - - mdg->addType("companyNS","OpenType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - const Type& topen = mdg->getType("companyNS","OpenType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - mdg->addPropertyToType(tcomp,"departments",tdept, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - mdg->addPropertyToType(tdept,"name",tstring); - mdg->addPropertyToType(tdept,"location",tstring); - mdg->addPropertyToType(tdept,"number",tstring); - mdg->addPropertyToType(tdept,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - mdg->addPropertyToType(temp, "SN", tstring); - mdg->addPropertyToType(temp, "manager", tbool); - - mdg->setAlias("companyNS","CompanyType","TheFirm"); - mdg->setAlias("companyNS","CompanyType","departments","TheDepartments"); - mdg->setAlias("companyNS","CompanyType","departments","MYDepartments"); - mdg->setAlias("companyNS","CompanyType","TheBigFirm"); - - mdg->addPropertyToType(topen,"name",tstring); - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectList& emps = dept->getList("employees"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emps.append(emp1); - emps.append(emp2); - emps.append(emp3); - - emp1->setCString("name","Albert"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Boris"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl"); - emp3->setCString("SN","E0003"); - - // now we should be able to add extra properties to employees, - // and get them back again... - - - emp1->setCString("openstring","Value Of Open String"); - emp1->setBoolean("openboolean",true); - - const char* c = emp1->getCString("openstring"); - - //cout << "Open Type string value: " << c << endl; - - bool b = emp1->getBoolean("openboolean"); - - //cout << "Open Type boolean value: " << b << endl; - - // unknown list type at present.. - DataObjectList& dl = emp1->getList("openintlist"); - - int i = 45; - dl.append((short)i); // now the list must be primitive and short!! - - // unknown list type at present.. - DataObjectList& dl2 = emp1->getList("opendataobjectlist"); - - DataObjectPtr myopen = mdg->create("companyNS","OpenType"); - myopen->setCString("name","MyOpenName"); - dl2.append(myopen); // now the list must be of data objects - - - // now a single valued data object - should have an xsi:type - emp1->setDataObject("opendataobject", myopen); - - - cs->endLogging(); - - //dumpchangesummary(cs); - - XSDHelperPtr xdh = HelperProvider::getXSDHelper(mdg); - - xdh->generateFile(mdg->getTypes(), - "saveopen-output.xsd","companyNS"); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"saveopen-output.xml"); - - return comparefiles("saveopen-output.xml","saveopen-output.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in SaveOpen" << e << endl; - return 0; - } -} - -int sdotest::loadOpen() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("saveopen-output.xsd"); - - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - //int i; - //TypeList tl = mdg->getTypes(); - //for (i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("partial.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and Bytes, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp = myXMLDocument->getRootDataObject(); - DataObjectList& dl = comp->getList("departments"); - DataObjectPtr dept = dl[0]; - DataObjectList& dl2 = dept->getList("employees"); - DataObjectPtr emp = dl2[0]; - - if (strcmp(emp->getProperty("openboolean").getType().getName(), - "Boolean")) - { - if (!silent)cout << "OpenLoad failure - bool property not boolean" << endl; - return 0; - - } - if (emp->getBoolean("openboolean") != true) - { - if (!silent)cout << "OpenLoad failure - bool property not true" << endl; - return 0; - } - - if (strcmp(emp->getProperty("openstring").getType().getName(), - "Bytes")) - { - if (!silent)cout << "OpenLoad failure - bytes property not bytes" << endl; - return 0; - - } - if (strcmp(emp->getCString("openstring"),"Value Of Open String")) - { - if (!silent)cout << "OpenLoad failure - string value is" << - emp->getCString("openstring") << endl; - return 0; - } - - - DataObjectList& dl3 = emp->getList("openintlist"); - - if (strcmp(emp->getProperty("openintlist").getType().getName(), - "Short")) - { - if (!silent)cout << "OpenLoad failure - IntegerList not Short " << - emp->getProperty("openintlist").getType().getName() << endl; - return 0; - } - - if (dl3.getInteger(0) != 45) - { - if (!silent)cout << "OpenLoad failure - Integer value is" << - dl.getInteger(0) << endl; - return 0; - } - - if (strcmp(emp->getProperty("opendataobjectlist").getType().getName(), - "OpenType")) - { - if (!silent)cout << "OpenLoad failure - OpenTypeList not OpenType" << endl; - return 0; - } - - DataObjectList& dl4 = emp->getList("opendataobjectlist"); - - if (strcmp(dl4[0]->getCString("name"),"MyOpenName")) - { - if (!silent)cout << "OpenLoad failure - list element name is " << - dl4[0]->getCString("name") << endl; - return 0; - } - - if (strcmp(emp->getProperty("opendataobject").getType().getName(), - "OpenType")) - { - if (!silent)cout << "OpenLoad failure - OpenType not OpenType" << endl; - return 0; - } - - DataObjectPtr dob2 = emp->getDataObject("opendataobject"); - - if (strcmp(dob2->getCString("name"),"MyOpenName")) - { - if (!silent)cout << "OpenLoad failure - open value name is " << - dob2->getCString("name") << endl; - return 0; - } - - - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "loadload-output.xml"); - return comparefiles("loadload-output.xml","loadload-output.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "LoadOpen FAILED" << e << endl; - return 0; - } - -} - -int sdotest::loadOpenNS() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("openloadNS.xsd"); - xsh->defineFile("openloadNS2.xsd"); - - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - //int i; - //TypeList tl = mdg->getTypes(); - //for (i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("openloadNS.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and Bytes, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp = myXMLDocument->getRootDataObject(); - DataObjectList& dl = comp->getList("departments"); - DataObjectPtr dept = dl[0]; - DataObjectList& dl2 = dept->getList("employees"); - DataObjectPtr emp = dl2[0]; - - if (strcmp(emp->getProperty("openboolean").getType().getName(), - "Boolean")) - { - if (!silent)cout << "OpenLoadNS failure - bool property not boolean" << endl; - return 0; - - } - if (emp->getBoolean("openboolean") != true) - { - if (!silent)cout << "OpenLoadNS failure - bool property not true" << endl; - return 0; - } - - if (strcmp(emp->getProperty("openstring").getType().getName(), - "Bytes")) - { - if (!silent)cout << "OpenLoadNS failure - bytes property not bytes" << endl; - return 0; - - } - if (strcmp(emp->getCString("openstring"),"Value Of Open String")) - { - if (!silent)cout << "OpenLoadNS failure - string value is" << - emp->getCString("openstring") << endl; - return 0; - } - - - DataObjectList& dl3 = emp->getList("openintlist"); - - if (strcmp(emp->getProperty("openintlist").getType().getName(), - "Short")) - { - if (!silent)cout << "OpenLoadNS failure - IntegerList not Short " << - emp->getProperty("openintlist").getType().getName() << endl; - return 0; - } - - if (dl3.getInteger(0) != 45) - { - if (!silent)cout << "OpenLoadNS failure - Integer value is" << - dl.getInteger(0) << endl; - return 0; - } - - - - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "openloadNSout.xml"); - - if (!comparefiles("openloadNSout.xml","openloadNSout.txt"))return 0; - - - // now try exactly the same, but with NS which doesnt exist - XMLDocumentPtr myXMLDocument2 = myXMLHelper->loadFile("openloadNS2.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and Bytes, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp2 = myXMLDocument2->getRootDataObject(); - DataObjectList& dld = comp2->getList("departments"); - DataObjectPtr dept2 = dld[0]; - DataObjectList& dl22 = dept2->getList("employees"); - DataObjectPtr emp2 = dl22[0]; - - if (strcmp(emp2->getProperty("openboolean").getType().getName(), - "Bytes")) - { - if (!silent)cout << "OpenLoadNS2 failure - bool property not bytes" << endl; - return 0; - - } - if (emp2->getBoolean("openboolean") != true) - { - if (!silent)cout << "OpenLoadNS2 failure - bool property not true" << endl; - return 0; - } - - if (strcmp(emp2->getProperty("openstring").getType().getName(), - "Bytes")) - { - if (!silent)cout << "OpenLoadNS2 failure - bytes property not bytes" << endl; - return 0; - - } - if (strcmp(emp2->getCString("openstring"),"Value Of Open String")) - { - if (!silent)cout << "OpenLoadNS failure - string value is" << - emp2->getCString("openstring") << endl; - return 0; - } - - - DataObjectList& dl32 = emp2->getList("openintlist"); - - if (strcmp(emp2->getProperty("openintlist").getType().getName(), - "OpenDataObject")) - { - if (!silent)cout << "OpenLoadNS2 failure - IntegerList not OpenDataObject " << - emp2->getProperty("openintlist").getType().getName() << endl; - return 0; - } - - if (atoi(dl32.getDataObject(0)->getSequence()->getCStringValue(0)) != 45) - { - if (!silent)cout << "OpenLoadNS2 failure - Integer value is" << - dl32.getInteger(0) << endl; - return 0; - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "LoadOpenNS FAILED" << e << endl; - return 0; - } - -} - -int sdotest::loadManyOpen() -{ - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("many.xsd"); - - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - //int i; - //TypeList tl = mdg->getTypes(); - //for (i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("many.xml", "companyNS"); - - - - // so, we now expect that the openboolean and openstring props will - // be of type boolean and Bytes, and the openlist will be a list of integers. - // The dataobjectlist an dataobject will be of the correct OpenType - - // we need a test for data objects, and that we are writing out xsi:type - // correctly. - DataObjectPtr comp = myXMLDocument->getRootDataObject(); - DataObjectList& dl = comp->getList("departments"); - DataObjectPtr dept = dl[0]; - DataObjectList& dl2 = dept->getList("employees"); - DataObjectPtr emp = dl2[0]; - - - DataObjectList& dl3 = emp->getList("openlist"); - - // change to match spec - now an open data object - // the list should contain a single data object with a sequence of three text elements - - if (strcmp(emp->getProperty("openlist").getType().getName(), - "OpenDataObject")) - { - if (!silent)cout << "OpenManyLoad failure - BytesList not OpenDataObject " << - emp->getProperty("openlist").getType().getName() << endl; - return 0; - } - - if (dl3.size() != 3) - { - if (!silent)cout << "OpenManyLoad failure - size is " << - dl3.size() << endl; - return 0; - } - - SequencePtr sq = dl3[0]->getSequence(); - if (strcmp(sq->getCStringValue(0),"Three member")) return 0; - - SequencePtr sq2 = dl3[1]->getSequence(); - if (strcmp(sq2->getCStringValue(0),"Open bytes")) return 0; - - SequencePtr sq3 = dl3[2]->getSequence(); - if (strcmp(sq3->getCStringValue(0),"List is complete")) return 0; - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "LoadOpen FAILED" << e << endl; - return 0; - } - -} - -int sdotest::csload2() -{ - //cout << "TEST: CSLoad2 ===============================================" << endl; - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - //cout << "TYPES LOADED FROM COMPANY XSD" << endl; - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cssave2-output.xml", "companyNS"); - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "csload2-output.xml"); - - if (!comparefiles("csload2-output.xml","csload2-output.txt")) return 0; - - XMLDocumentPtr myXMLDocument2 = myXMLHelper->loadFile("csload2-output.xml", "companyNS"); - myXMLHelper->save(myXMLDocument2->getRootDataObject(), - 0, "company", "csload3-output.xml"); - - return comparefiles("csload3-output.xml","csload3-output.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in CsLoad2" << e << endl; - return 0; - } -} - -int sdotest::bug1() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - try { - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("bugs/1/company.xsd"); - - //TypeList tl = mdg->getTypes(); - //for (int i=0;i< tl.size(); i++) - //{ - // cout << tl[i].getURI() << ":" << tl[i].getName() << endl; - //} - - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("bugs/1/company.xml", - "http://www.mycompanyinc.com"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in Bug1" << e << endl; - return 0; - } - return 1; -} - -int sdotest::setnull() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("NullNS","NullMainType"); - mdg->addType("NullNS","NullSubType"); - - /* Now add the properties to the types...*/ - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tint = mdg->getType("commonj.sdo","Integer"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tmain = mdg->getType("NullNS","NullMainType"); - const Type& tsub = mdg->getType("NullNS","NullSubType"); - - - mdg->addPropertyToType(tmain,"name",tstring); - mdg->addPropertyToType(tmain,"subs",tsub, true); // many - mdg->addPropertyToType(tmain,"asub",tsub, false); // single - mdg->addPropertyToType(tmain,"bsub",tsub, false); // single - - mdg->addPropertyToType(tmain,"cs",tcs); // change summary - - mdg->addPropertyToType(tsub,"name",tstring); - mdg->addPropertyToType(tsub,"number",tint); - mdg->addPropertyToType(tsub,"bool",tbool); - - - // create a graph, then save it - - DataObjectPtr main1 = mdg->create((Type&)tmain); - main1->setCString("name","MainObject"); - - // asub is initially set - DataObjectPtr sub0 = main1->createDataObject("asub"); - // bsub is not set. - - DataObjectPtr sub1 = mdg->create((Type&)tsub); - DataObjectPtr sub2 = mdg->create((Type&)tsub); - DataObjectPtr sub3 = mdg->create((Type&)tsub); - - DataObjectList& dol = main1->getList("subs"); - - dol.append(sub1); - dol.append(sub2); - dol.append(sub3); - - // sub1 has all values set initially - - sub1->setCString("name","All Initially set"); - sub1->setInteger("number",100); - sub1->setBoolean("bool",false); - - // sub2 has no values set at all - - - // sub3 has all values set to null - sub3->setNull("name"); - sub3->setNull("number"); - sub3->setNull("bool"); - - - // report - - if (main1->isNull("asub")) return 0; - - if (!main1->isSet("asub")) return 0; - - if (main1->isNull("bsub")) return 0; - - if (main1->isSet("bsub")) return 0; - -// dol0 is set, not null - - if (dol[0]->isNull("name")) return 0; - - if (dol[0]->isNull("number")) return 0; - - if (dol[0]->isNull("bool")) return 0; - - if (!dol[0]->isSet("name")) return 0; - - if (!dol[0]->isSet("number")) return 0; - - if (!dol[0]->isSet("bool")) return 0; - -// dol1 is all unset , so no nulls - - if (dol[1]->isNull("name")) return 0; - - if (dol[1]->isNull("number")) return 0; - - if (dol[1]->isNull("bool")) return 0; - - if (dol[1]->isSet("name")) return 0; - - if (dol[1]->isSet("number")) return 0; - - if (dol[1]->isSet("bool")) return 0; - -// dol2 is all nulls, so all set - - if (!dol[2]->isNull("name")) return 0; - - if (!dol[2]->isNull("number")) return 0; - - if (!dol[2]->isNull("bool")) return 0; - - if (!dol[2]->isSet("name")) return 0; - - if (!dol[2]->isSet("number")) return 0; - - if (!dol[2]->isSet("bool")) return 0; - - ChangeSummaryPtr cs = main1->getChangeSummary(); - - cs->beginLogging(); - - main1->setNull("asub"); - main1->setNull("bsub"); - - dol[0]->setNull("name"); - dol[0]->setNull("number"); - dol[0]->setNull("bool"); - - dol[1]->setNull("bool"); - - dol[2]->setCString("name","NewName"); - dol[2]->setInteger("number",100); - dol[2]->setBoolean("bool",true); - - - cs->endLogging(); - - // what would we expect from the change summary? - - //cout << "==============Expected in Change Summary=================" << endl; - //cout << "change to main1 - object asub set to null, oldvalue asub (set)" << endl; - //cout << "change to main1 - object bsub set to null, oldvalue null (unset)" << endl; - //cout << "change to sub1 - name asub set to null, oldvalue \"All Initially Set\" (set)" << endl; - //cout << "change to sub1 - number asub set to null, oldvalue 100 (set)" << endl; - //cout << "change to sub1 - bool asub set to null, oldvalue false (set)" << endl; - //cout << "change to sub2 - bool asub set to null, oldvalue false (unset)" << endl; - //cout << "change to sub3 - name asub set to \"NewName\", oldvalue null, set" << endl; - //cout << "change to sub3 - number asub set to 100, oldvalue null, set" << endl; - //cout << "change to sub3 - bool asub set to true, oldvalue null, set" << endl; - //cout << "==============End Expected in Change Summary=============" << endl; - - FILE* f = fopen("setnull.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open setnull.dat" << endl; - return 0; - } - - dumpchangesummary(f, cs); - - fclose(f); - - if (!comparefiles("setnull.dat","setnull.txt")) return 0; - - // report - - if (!main1->isNull("asub")) return 0; - - if (!main1->isSet("asub")) return 0; - - if (!main1->isNull("bsub")) return 0; - - if (!main1->isSet("bsub")) return 0; - -// dol0 is set to null - - if (!dol[0]->isNull("name")) return 0; - - if (!dol[0]->isNull("number")) return 0; - - if (!dol[0]->isNull("bool")) return 0; - - if (!dol[0]->isSet("name")) return 0; - - if (!dol[0]->isSet("number")) return 0; - - if (!dol[0]->isSet("bool")) return 0; - -// dol1 is all unset except bool which is null - - if (dol[1]->isNull("name")) return 0; - - if (dol[1]->isNull("number")) return 0; - - if (!dol[1]->isNull("bool")) return 0; - - if (dol[1]->isSet("name")) return 0; - - if (dol[1]->isSet("number")) return 0; - - if (!dol[1]->isSet("bool")) return 0; - -// dol2 is all set non-null, so all set - - if (dol[2]->isNull("name")) return 0; - - if (dol[2]->isNull("number")) return 0; - - if (dol[2]->isNull("bool")) return 0; - - if (!dol[2]->isSet("name")) return 0; - - if (!dol[2]->isSet("number")) return 0; - - if (!dol[2]->isSet("bool")) return 0; - - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in setnull" << e << endl; - return 0; - } -} - - -int sdotest::testsubs() -{ - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("companyNS","MainType"); - - mdg->addType("companyNS","SubType"); - mdg->addType("companyNS","SuperType"); - mdg->addType("companyNS","SubstituteType"); - mdg->addType("companyNS","UnrelatedType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tmain = mdg->getType("companyNS","MainType"); - const Type& sub = mdg->getType("companyNS","SubType"); - const Type& super = mdg->getType("companyNS","SuperType"); - const Type& subst = mdg->getType("companyNS","SubstituteType"); - const Type& unrel = mdg->getType("companyNS","UnrelatedType"); - - - mdg->addPropertyToType(tmain,"name",tstring); - mdg->addPropertyToType(tmain,"sub",super, false); - mdg->addPropertyToType(tmain,"subs",super, true); - - - mdg->setPropertySubstitute(tmain, "sub","wilbur", subst); - mdg->setPropertySubstitute(tmain, "subs","wilburs", subst); - - mdg->setBaseType(sub,super); - - //now sub and subs should accept all the three types - - DataObjectPtr main = mdg->create((Type&)tmain); - main->setCString("name","SubstituteTest"); - - DataObjectList& dol = main->getList("subs"); - - DataObjectPtr sub1 = mdg->create(sub); - DataObjectPtr super1 = mdg->create(super); - DataObjectPtr subst1 = mdg->create(subst); - DataObjectPtr unrel1 = mdg->create(unrel); - - dol.append(sub1); - dol.append(super1); - dol.append(subst1); - try - { - dol.append(unrel1); - return 0; - } - catch (SDOInvalidConversionException e) - { - //cout << "Normal failure to append wrong type" << endl; - } - - dol.remove(0); - dol.remove(0); - dol.remove(0); - - DataObjectList& dol2 = main->getList("wilburs"); - - dol2.append(sub1); - dol2.append(super1); - dol2.append(subst1); - try - { - dol2.append(unrel1); - return 0; - } - catch (SDOInvalidConversionException e) - { - //cout << "Normal failure to append wrong type" << endl; - } - - main->setDataObject("sub",sub1); - main->setDataObject("sub",super1); - main->setDataObject("sub",subst1); - - main->setDataObject("wilbur",sub1); - main->setDataObject("wilbur",super1); - main->setDataObject("wilbur",subst1); - - try - { - main->setDataObject("sub", unrel1); - return 0; - } - catch (SDOInvalidConversionException e) - { - //cout << "Normal failure to set wrong type" << endl; - } - return 1; - } - - catch (SDORuntimeException e) - { - if (!silent)cout << "Substitute test failed" << endl << e << endl; - return 0; - } -} - - -int sdotest::merle1() -{ - - try { - - // Dynamic setup of the metadata - - FILE *f = fopen("merle1.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open merle1.dat" << endl; - return 0; - } - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("axis.xsd"); - - // or dynamically create, but that would get attributes for the strings, not elements - //mdg->addType("axis","ItemSearch",true); // sequenced - //mdg->addType("axis","ItemSearchRequest",true); // sequenced - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tsearch = mdg->getType("axis","ItemSearch"); - const Type& treq = mdg->getType("axis","ItemSearchRequest"); - - //mdg->addPropertyToType(tsearch,"SubscriptionId",tstring); - //mdg->addPropertyToType(tsearch,"AssociateTag",tstring); - //mdg->addPropertyToType(tsearch,"XMLEscaping",tstring); - //mdg->addPropertyToType(tsearch,"Validate",tstring); - //mdg->addPropertyToType(tsearch,"Shared",treq, false, false, true); - //mdg->addPropertyToType(tsearch,"Request",treq, true, false, true); - - //mdg->addPropertyToType(treq,"Keywords",tstring); - //mdg->addPropertyToType(treq,"SearchIndex",tstring); - - // dynamic creation of the data - - DataObjectPtr search = mdg->create((Type&)tsearch); - - search->setCString("SubscriptionId","I am the subscription ID string"); - search->setCString("AssociateTag","I am the associate Tag string"); - search->setCString("XMLEscaping","I am the XML escaping string"); - search->setCString("Validate","I am the Validate string"); - - DataObjectPtr shared = search->createDataObject("Shared"); - shared->setCString("Keywords","SharedKeywordsString"); - shared->setCString("SearchIndex","SearchIndexString"); - - DataObjectList& requests = search->getList("Request"); - DataObjectPtr request1 = mdg->create(treq); - requests.append(request1); - request1->setCString("Keywords","RequestKeywords"); - request1->setCString("SearchIndex","RequestSearchIndex"); - - // Read the data and put it into XML: - - PropertyList properties = search->getInstanceProperties(); - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - for (int i=0;i%s\n",prop.getName(), search->getCString(prop), - prop.getName()); - break; - - case Type::DataObjectType: - if (prop.isMany()) - { - // many valued property, such as Requests , so get the list - DataObjectList& rq = search->getList(prop); - for (int j=0;jcreateDocument(dob, - "axis", prop.getName()); - doc->setXMLDeclaration(false); - char* dobXML = myXMLHelper->save(doc); - fprintf(f,"DataObject \"%s\" as XML:\n",prop.getName()); - fprintf(f,"%s\n", dobXML); - } // if dob - } // for - } // if many - else - { - DataObjectPtr dob = search->getDataObject(prop); - if (dob != 0) - { - XMLDocumentPtr doc = myXMLHelper->createDocument(dob, - "axis", prop.getName()); - doc->setXMLDeclaration(false); - char* dobXML = myXMLHelper->save(doc); - fprintf(f,"DataObject \"%s\" as XML:\n",prop.getName()); - fprintf(f, "%s\n", dobXML); - } // if - } // else - break; - - default: - break; - - } // switch - } // for - fclose(f); - return comparefiles("merle1.dat","merle1.txt"); - } // try - catch (SDORuntimeException e) - { - if (!silent)cout << "Merle 1 failed" << endl << e << endl; - return 0; - } -} - - -int sdotest::graham3() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("graham3.xsd"); - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Graham1 failed " << e << endl; - return 0; - } -} - -int sdotest::graham1() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("graham1.xsd"); - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Graham1 failed " << e << endl; - return 0; - } -} -int sdotest::graham2() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("graham2.xsd"); - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Graham2 failed " << e << endl; - return 0; - } -} - - -int sdotest::b46613() -{ - try { - - // Dynamic setup of the metadata - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->create("rubbish","MyObject"); - - return 0; - - } - catch (SDOTypeNotFoundException e) - { - //cout << "b46613 gave the correct exception" << endl; - return 1; - } -} - -int sdotest::doctest() -{ - try { - - FILE *f = fopen("doctest.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open doctest.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("doctest.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("doctest.xml", - "companyNS"); - fprintf(f,"RootURI=%s\n",myXMLDocument->getRootElementURI()); - fprintf(f,"RootName=%s\n",myXMLDocument->getRootElementName()); - fclose(f); - return comparefiles("doctest.dat","doctest.txt"); - } - catch (SDOTypeNotFoundException e) - { - if (!silent)cout << "doctest failed" << endl; - return 0; - } - -} - - -int sdotest::b46634() -{ - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company_with_nillable_SN.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("company_with_nillable_SN.xml", - "companyNS"); - - DataObjectPtr dob = myXMLDocument->getRootDataObject(); - DataObjectList& dol = dob->getList("departments"); - DataObjectPtr dept = dol[0]; - DataObjectList& dol2 = dept->getList("employees"); - DataObjectPtr emp = dol2[0]; - - if (!emp->isSet("SN")) - { - if (!silent)cout << "B46634 WRONG - isSet should be true" << endl; - return 0; - } - if (!emp->isNull("SN")) - { - if (!silent)cout << "B46634 WRONG - isNull should be true" << endl; - return 0; - } - - // now write out the nill value and check its still nil - myXMLHelper->save(myXMLDocument->getRootDataObject(), - 0, "company", "b46634_out.xml"); - return comparefiles("b46634_out.xml","b46634_out.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46634 failed" << endl; - return 0; - } - -} - -int sdotest::testErrors() -{ - try { - - int i,j; - - FILE *f = fopen("testerrors.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open testerrors.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("error1.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - fprintf(f,"XSD reported some errors:\n"); - for (j=0;jgetErrorMessage(j); - if (m != 0) fprintf(f,"%s\n", m); - } - } - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("error1.xml", - "companyNS"); - - if ((i = myXMLHelper->getErrorCount()) > 0) - { - fprintf(f,"XML reported some errors:\n"); - for (j=0;jgetErrorMessage(j); - if (m != 0) fprintf(f,"%s\n",m); - } - } - - fclose(f); - return comparefiles("testerrors.dat","testerrors.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "testErrors failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::b46734() -{ - try { - - int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("wsdl.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - xsh->defineFile("wsdl-soap.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL SOAP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - xsh->defineFile("wsdl-http.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL HTTP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("StockQuoteService.wsdl" - ); - - if ((i = myXMLHelper->getErrorCount()) > 0) - { - if (!silent) - { - cout << "XML reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0)cout << m; - cout << endl; - } - } - return 0; - } - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46734 failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::b46693() -{ - try { - - int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b46693.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "b46693 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0)cout << m; - cout << endl; - } - } - return 0; - } - - // XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - // XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46693.xsd" - // ); - - // if ((i = myXMLHelper->getErrorCount()) > 0) - // { - // cout << "b46693 reported some errors:" << endl; - // for (j=0;jgetErrorMessage(j); - // if (m != 0)cout << m; - // cout << endl; - // } - // } - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46693 failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::clonetest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("companyNS","CompanyType"); - mdg->addType("companyNS","DepartmentType"); - mdg->addType("companyNS","EmployeeType"); - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - mdg->addPropertyToType(tcomp,"name",tstring); - mdg->addPropertyToType(tcomp,"departments",tdept,true,false,true); - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp,false,false,false); - mdg->addPropertyToType(tcomp,"CEO",temp,false,false,true); - - mdg->addPropertyToType(tdept,"employees",temp,true,false,true); - mdg->addPropertyToType(tdept,"name",tstring,false,false,true); - mdg->addPropertyToType(tdept,"location",tstring,false,false,true); - mdg->addPropertyToType(tdept,"number",tstring,false,false,true); - - mdg->addPropertyToType(temp,"name",tstring,false,false,true); - mdg->addPropertyToType(temp,"SN",tstring,false,false,true); - mdg->addPropertyToType(temp,"manager",tbool,false,false,true); - - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","The Company"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","The Department"); - dept->setCString("location","Botley"); - dept->setCString("number","123"); - - - // now clone the data factory, and add more types - - DataFactoryPtr df2 = mdg->clone(); - - df2->addType("otherNS","DataSet"); - - df2->addPropertyToType("companyNS","DepartmentType","dataset", - "otherNS","DataSet", false, false, true); - - const Type& tstring2 = df2->getType("commonj.sdo","String"); - const Type& tbool2 = df2->getType("commonj.sdo","Boolean"); - const Type& tcs2 = df2->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp2 = df2->getType("companyNS","CompanyType"); - const Type& tdept2 = df2->getType("companyNS","DepartmentType"); - const Type& temp2 = df2->getType("companyNS","EmployeeType"); - - DataObjectPtr comp2 = df2->create((Type&)tcomp2); - comp->setCString("name","The Company"); - - DataObjectPtr dept2 = df2->create((Type&)tdept2); - - DataObjectList& dol2 = comp2->getList("departments"); - dol2.append(dept2); - - dept2->setCString("name","The Other Department"); - dept2->setCString("location","Not Botley"); - dept2->setCString("number","321"); - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "clone failed " << e << endl; - return 0; - } - - -} - -int sdotest::testUtil() -{ - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("companyNS","CompanyType"); - // employee will be an open type... - mdg->addType("companyNS","EmployeeType", /*seq*/false, - /*open*/true, - /*abs */ false, - /*data*/ false); - - mdg->addType("companyNS","DepartmentType"); - - mdg->addType("companyNS","OpenType"); - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - const Type& topen = mdg->getType("companyNS","OpenType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - // not containment... - mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false); - mdg->addPropertyToType(tcomp,"departments",tdept, true); - mdg->addPropertyToType(tcomp,"cs",tcs); - - mdg->addPropertyToType(tdept,"name",tstring); - mdg->addPropertyToType(tdept,"location",tstring); - mdg->addPropertyToType(tdept,"number",tstring); - mdg->addPropertyToType(tdept,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - mdg->addPropertyToType(temp, "SN", tstring); - mdg->addPropertyToType(temp, "manager", tbool); - - mdg->addPropertyToType(topen,"name",tstring); - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectList& emps = dept->getList("employees"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emps.append(emp1); - emps.append(emp2); - emps.append(emp3); - - emp1->setCString("name","Albert"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Boris"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Carl"); - emp3->setCString("SN","E0003"); - - emp1->setCString("openstring","Value Of Open String"); - emp1->setBoolean("openboolean",true); - - const char* c = emp1->getCString("openstring"); - - bool b = emp1->getBoolean("openboolean"); - - // unknown list type at present.. - DataObjectList& dl = emp1->getList("openintlist"); - - int i = 45; - dl.append((short)i); // now the list must be primitive and short!! - - // unknown list type at present.. - DataObjectList& dl2 = emp1->getList("opendataobjectlist"); - - DataObjectPtr myopen = mdg->create("companyNS","OpenType"); - myopen->setCString("name","MyOpenName"); - dl2.append(myopen); // now the list must be of data objects - - emp1->setDataObject("opendataobject", myopen); - - filebuf fb; - fb.open ("testutils.dat",ios::out); - ostream os(&fb); - SDOUtils::printDataObject(os, comp); - fb.close(); - return comparefiles("testutils.dat","testutils.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ERROR in UTILS test" << e << endl; - return 0; - } - -} - -int sdotest::printset(FILE *f, ChangeSummaryPtr cs) -{ - ChangedDataObjectList& cdl = cs->getChangedDataObjects(); - - // here there should be a creation of Ed, and a change to dept, which has a - // bool previously unset, and a int list previuously unset and an employees list - // previously unset - - for (int i=0;i< cdl.size();i++) - { - if (cs->isModified(cdl[i])) - { - - fprintf(f,"A modified of type %s#%s\n",cdl[i]->getType().getURI() - ,cdl[i]->getType().getName()); - - SettingList& sl = cs->getOldValues(cdl[i]); - if (sl.size() == 0) - { - fprintf(f,"No Settings found\n"); - } - else - { - for (int j=0;j< sl.size(); j++) - { - fprintf(f,"Property %s",sl[j].getProperty().getName()); - // this could be a many-valued property, and could be one which is - // a data object or a data type... - if (sl[j].getProperty().isMany()) - { - fprintf(f,"[%s]",sl[j].getIndex()); - } - if (!sl[j].isSet()) - { - fprintf(f," was unset before the change\n"); - } - else - { - fprintf(f," was set before the change !!\n"); - } - } - } - } - } - return 1; -} - - -int sdotest::b46633() -{ - try { - - FILE *f = fopen("b46633.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open b46633.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addPropertyToType("myspace","Root","cs", - "commonj.sdo","ChangeSummary", false, false, false); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Manager"); - mdg->addType("myspace","Employee"); - - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Root","company", - "myspace","Company", false, false, true); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Department","ints", - "commonj.sdo","Integer", true, false, false); - - - mdg->addPropertyToType("myspace","Department","bool", - "commonj.sdo","Boolean", false, false, false); - - mdg->addPropertyToType("myspace","Department","manager", - "myspace","Manager", false, false, true); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Manager","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - ChangeSummaryPtr cs = dor->getChangeSummary(); - - DataObjectPtr com = dor->createDataObject("company"); - com->setCString("name","IBM"); - - DataObjectPtr dept = com->createDataObject("departments"); - dept->setCString("name","JTC"); - - // employees initally unset - - cs->beginLogging(); - - DataObjectPtr emp = dept->createDataObject("employees"); - emp->setCString("name","Ed"); - - - - DataObjectList& dl = dept->getList("ints"); - dl.append((long)400); - - dept->setBoolean("bool", true); - - printset(f,cs); - - cs->endLogging(); - - // unset them all , restart logging, and get the same results - - dept->unset("bool"); - dept->unset("ints"); - dept->unset("employees"); - - cs->beginLogging(); - - DataObjectPtr emp2 = dept->createDataObject("employees"); - emp2->setCString("name","Ed2"); - - dl.append((long)600); - - dept->setBoolean("bool", true); - - printset(f, cs); - - cs->endLogging(); - - fclose(f); - - return comparefiles("b46633.dat","b46633.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "b46633 failed " << e << endl; - return 0; - } - -} - - - -int sdotest::testLoad() -{ - try - { - int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - FILE* f = fopen("company_with_nillable_SN.xsd","r+"); - char* buffer = new char[4000]; - j = 0; - while ((i = fgetc(f)) != EOF) - { - buffer[j++] = (char)i; - } - buffer[j] = 0; - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->define(buffer); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) { - cout << "XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - FILE* f2 = fopen("company_with_nillable_SN.xml","r+"); - j = 0; - while ((i = fgetc(f2)) != EOF) - { - buffer[j++] = (char)i; - } - buffer[j] = 0; - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->load(buffer); - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in testDAS " << e << endl; - return 0; - } -} - -int sdotest::includetest() -{ - try - { - int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("include.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - xsh->defineFile("../test/test/includeother.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in include test" << e << endl; - return 0; - } -} - -int sdotest::detachtest() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Manager"); - mdg->addType("myspace","Employee"); - - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Root","company", - "myspace","Company", false, false, true); - - mdg->addPropertyToType("myspace","Company","departments", - "myspace","Department", true, false, true); - - - mdg->addPropertyToType("myspace","Department","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Department","manager", - "myspace","Manager", false, false, true); - - mdg->addPropertyToType("myspace","Department","employees", - "myspace","Employee", true, false, true); - - mdg->addPropertyToType("myspace","Manager","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Employee","name", - "commonj.sdo","String", false, false, false); - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectPtr com = dor->createDataObject("company"); - com->setCString("name","IBM"); - - DataObjectPtr dept = com->createDataObject("departments"); - - dept->setCString("name","JTC"); - - - DataObjectPtr emp = dept->createDataObject("employees"); - emp->setCString("name","Ed"); - - DataObjectPtr emp2 = dept->createDataObject("employees"); - emp2->setCString("name","Tom"); - - DataObjectList& dol = dept->getList("employees"); - - DataObjectPtr e = dol[0]; - e->detach(); - - DataObjectPtr cont = emp->getContainer(); - - if (cont != 0) - { - if (!silent)cout << "EMP STILL ATTACHED - problem" << endl; - return 0; - } - - DataObjectPtr cont2 = dol[0]->getContainer(); - - if (cont2 == 0) - { - if (!silent)cout << "SECOND DETACHED - problem" << endl; - return 0; - } - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "detach failed " << e << endl; - return 0; - } - -} - - -int sdotest::leak() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - - if (dor->isSet("ints")) return 0; - - DataObjectList& dl = dor->getList("ints"); - - if (dor->isSet("ints")) return 0; - - dl.append((long)400); - - if (!dor->isSet("ints")) return 0; - - dl.remove(0); - - if (dor->isSet("ints")) return 0; - - dl.append((long)400); - - if (!dor->isSet("ints")) return 0; - - dor->unset("ints"); - - if (dor->isSet("ints")) return 0; - - dl.append((long)600); - - if (!dor->isSet("ints")) return 0; - - return 1; - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "leak failed " << e << endl; - return 0; - } - -} - -int sdotest::twolists() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - mdg->addPropertyToType("myspace","Root","ints2", - "commonj.sdo","Integer", true, false, false); - - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectList& dl2 = dor->getList("ints2"); - dl2.append((long)400); - - - DataObjectList& dl = dor->getList("ints"); - dl.append((long)400); - return 1; - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "twolists failed " << e << endl; - return 0; - } - -} - - -int sdotest::graham4() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addType("myspace","ListItem"); - - - mdg->addPropertyToType("myspace","ListItem","name", - "commonj.sdo","String", false, false, false); - - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - mdg->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - - // first try with no elements in lists - - try { - DataObjectPtr pitem = dor->getDataObject("items[name=\"hello\"]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - try { - int inty = dor->getInteger("ints[1]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - // now populate them - - DataObjectPtr myitem = dor->createDataObject("items"); - myitem->setCString("name","not hello"); - - try { - DataObjectPtr pitem2 = dor->getDataObject("items[name=\"hello\"]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - DataObjectList& dl = dor->getList("ints"); - dl.append((long)100); - - try { - int inty2 = dor->getInteger("ints[2]"); - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal exception in Graham4" << endl; - } - - try - { - DataObjectPtr pitem2 = dor->getDataObject("items[name=\"not hello\"]"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "ABNORMAL exception in Graham4" << endl; - return 0; - } - - try { - int inty2 = dor->getInteger("ints[1]"); - //cout << "Integer is " << inty2 << endl; - return 1; - } - catch (SDOIndexOutOfRangeException e) - { - - if (!silent)cout << "ABNORMAL exception in Graham4" << endl; - return 0; - } - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "twolists failed " << e << endl; - return 0; - } - -} - - -int sdotest::graham5() -{ - try - { - int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("Order.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - return 1; - } - catch (SDORuntimeException r) - { - if (!silent)cout << "Graham5 failed " << r << endl; - return 0; - } -} - -int sdotest::graham6() -{ - try - { - int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("g/Order.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->loadFile("g/order.xml", "orderNS"); - - char* str = xmh->save(doc); - FILE* f = fopen("g/string-output.xml","w+"); - if (f != 0) - { - fputs(str,f); - fclose(f); - } - - xmh->save(doc,"g/graham6-output.xml"); - - // now get the root and try that - DataObjectPtr dob = doc->getRootDataObject(); - char* str2 = xmh->save(dob,"orderNS","order"); - FILE* f2 = fopen("g/string-output-2.xml","w+"); - if (f2 != 0) - { - fputs(str2,f2); - fclose(f2); - } - - xmh->save(dob,"orderNS","order", "g/graham6-output-2.xml"); - - if (!comparefiles("g/string-output.xml","g/string-output.txt"))return 0; - if (!comparefiles("g/graham6-output.xml","g/graham6-output.txt")) return 0; - if (!comparefiles("g/string-output-2.xml","g/string-output-2.txt")) return 0; - return 1; - - } - catch (SDORuntimeException r) - { - if (!silent)cout << "Graham6 failed " << r << endl; - return 0; - } -} - -int sdotest::b47137() -{ - - try - { - FILE *f = fopen("b47137.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open b47137.dat" << endl; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b47137.xsd"); - - DataObjectPtr dob = mdg->create("","guid"); - - const Type& t = dob->getType(); - - PropertyList pl = t.getProperties(); - - for (int i=0;isetCString("value","Hello"); - dob->setBoolean("isPermaLink",true); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(dob,"","fluid","b47137_out.xml"); - - // now try to read back the file .. - - XMLDocumentPtr doc = xmh->loadFile("b47137_out.xml", ""); - - DataObjectPtr dob2 = doc->getRootDataObject(); - - const Type& t2 = dob2->getType(); - - PropertyList pl2 = t2.getProperties(); - - for (int j=0;jgetCString(pl2[j])); - } - - fclose(f); - return comparefiles("b47137.dat","b47137.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "B47137 failed " << e << endl; - return 0; - } -} - -int sdotest::b47137b() -{ - int i,j; - try - { - - FILE *f = fopen("b47137b.dat","w+"); - if (f == 0) - { - if (!silent) cout << "Unable to open b47137b.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b47137b.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "INCLUDE XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - for (int k=0;kcreate("companyNS","CompanyType"); - - const Type& t = dob->getType(); - - PropertyList pl = t.getProperties(); - - for (int i=0;icreateDataObject("guid"); - - dobguid->setCString("value","Wilbur"); - dobguid->setBoolean("isPermaLink",true); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(dob,"","company","b47137b_out.xml"); - - // now try to read back the file .. - - XMLDocumentPtr doc = xmh->loadFile("b47137b_out.xml", ""); - - DataObjectPtr dob2 = doc->getRootDataObject(); - - const Type& t2 = dob2->getType(); - - PropertyList pl2 = t2.getProperties(); - - for (int j=0;jgetDataObject("guid"); - if (dobguid2 != 0) - { - fprintf(f,"guid Value:%s\n",dobguid2->getCString("value")); - fprintf(f,"guid isPermaLink:",dobguid2->getCString("isPermaLink")); - } - else - { - fprintf(f,"GUID is empty\n"); - } - } - } - fclose(f); - return comparefiles("b47137b.dat","b47137b.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "B47137b failed " << e << endl; - return 0; - } -} - -int sdotest::b47293() -{ - int i,j,k; - try - { - FILE *f = fopen("b47293.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open b47293.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("47293Catalog.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "47293 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - for ( k=0;kgenerateFile(tl,"47293Catalog-out.xsd","catalogNS",0); - - DataFactoryPtr mdg2 = DataFactory::getDataFactory(); - - XSDHelperPtr xsh2 = HelperProvider::getXSDHelper(mdg2); - - xsh2->defineFile("47293Catalog-out.xsd"); - - if ((i = xsh2->getErrorCount()) > 0) - { - if (!silent) - { - cout << "47293-out XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl2 = mdg2->getTypes(); - for (k=0;kaddType("myspace","Root"); - mdg->addType("myspace","ListItem"); - - mdg->addPropertyToType("myspace","Root","ints", - "commonj.sdo","Integer", true, false, false); - - mdg->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - - const Type& tcc = mdg->getType("myspace","Root"); - const Type& tcl = mdg->getType("myspace","ListItem"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - DataObjectList& dol1 = dor->getList("ints"); - - DataObjectList& dol2 = dor->getList("items"); - - - dol1.append((long)34); - dol1.append((long)56); - - DataObjectPtr li1 = mdg->create(tcl); - DataObjectPtr li2 = mdg->create(tcl); - - dol2.append(li1); - dol2.append(li2); - - dor->unset("ints[1]"); // should work - dor->unset("items.0"); // should work - - try { - - dor->unset("ints[2]"); // should not work - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - //cout << "Normal index oor in 47802" << endl; - } - - try { - dor->unset("items.1"); // should not work - return 0; - } - catch (SDOIndexOutOfRangeException e) - { - // cout << "Normal index oor in 47802" << endl; - } - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in b47802" << e << endl; - return 0; - } -} - - -int sdotest::b47663() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - DataFactoryPtr mdg2 = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - mdg->addType("myspace","ListItem"); - mdg->addType("myspace","Item"); - - mdg->addPropertyToType("myspace","Root","itemref", - "myspace","Item", false, false, false); - - mdg->addPropertyToType("myspace","Root","itemcont", - "myspace","Item", false, false, true); - - mdg->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - mdg2->addType("myspace","Root"); - mdg2->addType("myspace","ListItem"); - mdg2->addType("myspace","Item"); - - mdg2->addPropertyToType("myspace","Root","itemref", - "myspace","Item", false, false, false); - - mdg2->addPropertyToType("myspace","Root","itemcont", - "myspace","Item", false, false, true); - - mdg2->addPropertyToType("myspace","Root","items", - "myspace","ListItem", true, false, true); - - - - const Type& tcc = mdg->getType("myspace","Root"); - const Type& tcl = mdg->getType("myspace","ListItem"); - const Type& tci = mdg->getType("myspace","Item"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - DataObjectPtr it1 = mdg->create((Type&)tci); - DataObjectList& dol1 = dor->getList("items"); - DataObjectPtr li11 = mdg->create(tcl); - DataObjectPtr li12 = mdg->create(tcl); - - - const Type& tcc2 = mdg2->getType("myspace","Root"); - const Type& tcl2 = mdg2->getType("myspace","ListItem"); - const Type& tci2 = mdg2->getType("myspace","Item"); - DataObjectPtr dor2 = mdg2->create((Type&)tcc2); - DataObjectPtr it2 = mdg2->create((Type&)tci2); - DataObjectList& dol2 = dor2->getList("items"); - DataObjectPtr li21 = mdg2->create(tcl2); - DataObjectPtr li22 = mdg2->create(tcl2); - - - try - { - // append from wrong factory to list - dol1.append(li21); - //cout << "ERROR - 47764 should not append from wrong factory" << endl; - //cout << "Updated test case: Correctly used data object from compatible factory" << - // endl; - } - catch (SDOInvalidConversionException e) - { - if (!silent)cout << "ERROR: Incorrect invalid conversion exception" << e << endl; - return 0; - } - - try - { - // add object from wrong factory to reference. - dor2->setDataObject("itemref",it1); - return 0; - } - catch (SDOUnsupportedOperationException e) - { - // expected ,as a reference cannot be outside the graph - } - - try - { - // add object from wrong factory to reference. - dor2->setDataObject("itemcont",it1); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Add contained object from second factory not OK" << endl; - return 0; - } - - - dol2.append(li22); // OK - - try - { - dol2.insert(0,li11); - //cout << "Updated test case: Correctly used data object from compatible factory" << - // endl; - //cout << "ERROR - 47764 should not insert from wrong factory" << endl; - } - catch (SDOInvalidConversionException e) - { - if (!silent)cout << "Incorrect invalid conversion exception" << e << endl; - return 0; - } - - try - { - dol2.setDataObject(0,li12); - //cout << "Updated test case: Correctly used data object from compatible factory" << - // endl; - // cout << "ERROR - 47764 should not set in list from wrong factory" << endl; - } - catch (SDOInvalidConversionException e) - { - if (!silent)cout << "Incorrect invalid conversion exception" << e << endl; - return 0; - } - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in b47663" << e << endl; - return 0; - } -} - - -int sdotest::bunique() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("test","Root"); - mdg->addType("test","Duplicate"); - mdg->addType("nottest","Duplicate"); - mdg->addType("test","Unique"); - mdg->addType("test","Object"); - - mdg->addPropertyToType("test","Root","duplicate", - "test","Duplicate", false, false, true); - - mdg->addPropertyToType("test","Root","duplicate2", - "nottest","Duplicate", false, false, true); - - mdg->addPropertyToType("test","Root","unique", - "test","Unique", false, false, true); - - mdg->addPropertyToType("test","Root","duplicatelist", - "test","Duplicate", true, false, true); - - mdg->addPropertyToType("test","Root","duplicatelist2", - "nottest","Duplicate", true, false, true); - - mdg->addPropertyToType("test","Root","uniquelist", - "test","Unique", true, false, true); - - mdg->addPropertyToType("test","Duplicate","id", - "commonj.sdo","Integer", false, false, false); - - mdg->addPropertyToType("nottest","Duplicate","id", - "commonj.sdo","Integer", false, false, false); - - mdg->addPropertyToType("test","Unique","id", - "commonj.sdo","Integer", false, false, false); - - mdg->addPropertyToType("test","Duplicate","ob", - "test","Object", false, false, true); - - mdg->addPropertyToType("nottest","Duplicate","ob", - "test","Object", false, false, true); - - mdg->addPropertyToType("test","Unique","ob", - "test","Object", false, false, true); - - const Type& troot = mdg->getType("test","Root"); - const Type& tdup1 = mdg->getType("test","Duplicate"); - const Type& tdup2 = mdg->getType("nottest","Duplicate"); - const Type& tuniq = mdg->getType("test","Unique"); - const Type& tob = mdg->getType("test","Object"); - - DataObjectPtr rooty = mdg->create(troot); - - DataObjectPtr dup1 = mdg->create(tdup1); - dup1->setInteger("id",1); - DataObjectPtr dup2 = mdg->create(tdup1); - dup2->setInteger("id",2); - DataObjectPtr dup3 = mdg->create(tdup2); - dup3->setInteger("id",3); - DataObjectPtr dup4 = mdg->create(tdup2); - dup4->setInteger("id",4); - DataObjectPtr uni1 = mdg->create(tuniq); - uni1->setInteger("id",5); - DataObjectPtr uni2 = mdg->create(tuniq); - uni2->setInteger("id",6); - - DataObjectPtr ob1 = mdg->create(tob); - dup1->setDataObject("ob",ob1); - DataObjectPtr ob2 = mdg->create(tob); - dup2->setDataObject("ob",ob2); - DataObjectPtr ob3 = mdg->create(tob); - uni1->setDataObject("ob",ob3); - - DataObjectList& dl1 = rooty->getList("duplicatelist"); - DataObjectList& dl2 = rooty->getList("duplicatelist2"); - DataObjectList& dl3 = rooty->getList("uniquelist"); - - rooty->setDataObject("duplicate",dup1); - dl1.append(dup2); - - rooty->setDataObject("duplicate2",dup3); - dl2.append(dup4); - - rooty->setDataObject("unique",uni1); - - dl3.append(uni2); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - TypeList tl = mdg->getTypes(); - - xsh->generateFile(tl,"bunique-out.xsd","test"); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(rooty,"","rooty","bunique-out.xml"); - - if (!comparefiles("bunique-out.xsd","bunique-out.txt")) return 0; - if (!comparefiles("bunique-out.xml","bunique-outxml.txt")) return 0; - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in bunique" << e << endl; - return 0; - } -} - -int sdotest::buniqueread() -{ - try { - - int i,j,k; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("bunique-out.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "47293 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - } - - TypeList tl = mdg->getTypes(); - for ( k=0;kloadFile("bunique-out.xml", "rooty"); - - DataObjectPtr rooty = doc->getRootDataObject(); - - xsh->generateFile(tl,"buniqueread-out.xsd","test"); - - xmh->save(rooty,"","rooty","buniqueread-out.xml"); - - return comparefiles("buniqueread-out.xml","buniqueread-out.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in buniqueread" << e << endl; - return 0; - } -} - - -int sdotest::testwsdl() -{ - try { - - int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("wsdl.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - - } - return 0; - } - xsh->defineFile("wsdl-soap.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL SOAP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - - } - return 0; - } - xsh->defineFile("wsdl-http.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL HTTP XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - for (i=0;icreate("http://schemas.xmlsoap.org/wsdl/","tDefinitions"); - - - DataObjectPtr mess = mdg->create("http://schemas.xmlsoap.org/wsdl/","tMessage"); - mess->setCString("name","testRequest"); - - DataObjectPtr part = mdg->create("http://schemas.xmlsoap.org/wsdl/","tPart"); - part->setCString("name","name"); - part->setCString("type","http://www.w3.org/2001/XMLSchema-instance#string"); - - DataObjectPtr part2 = mdg->create("http://schemas.xmlsoap.org/wsdl/","tPart"); - part2->setCString("name","name"); - part2->setCString("type","http://I want/this/added/to/the/urls#string"); - - - DataObjectList& dol = root->getList("message"); - - dol.append(mess); - - DataObjectList& dol2 = mess->getList("part"); - - dol2.append(part); - dol2.append(part2); - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(root,"","definitions","testwsdl.xml"); - - return comparefiles("testwsdl.xml","testwsdl.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "testwsdl failed" << endl << e << endl; - return 0; - } - -} - - - -int sdotest::travel() -{ - try { - - int i,j; - - FILE *f = fopen("travel.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open travel.dat" << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("TravelBookingSchema.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "WSDL XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - fprintf(f, "*******************************TYPES**********************\n"); - - for (i=0;iloadFile("TravelBookingUsingSchema.xml"); - - DataObjectPtr rooty = doc->getRootDataObject(); - - fprintf(f, "*******************************DATA**********************\n"); - printDataObject(f, rooty); - fprintf(f,"***************************END DATA**********************\n"); - - fclose(f); - return comparefiles("travel.dat","travel.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "travel failed" << endl << e << endl; - return 0; - } - -} - - -int sdotest::oddchars() -{ - try { - - int i,j; - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("OddChars.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "ODDCHARS XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("OddChars.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "OddChars reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - DataObjectPtr rooty = doc->getRootDataObject(); - - FILE *f = fopen ("oddchars.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open oddchars.dat" << endl; - return 0; - } - printDataObject(f, rooty); - - fclose(f); - return comparefiles("oddchars.dat","oddchars.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "oddchars failed" << endl << e << endl; - return 0; - } - -} - -int sdotest::unsetlist() -{ - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("test","Root"); - mdg->addType("test","ListItem"); - - mdg->addPropertyToType("test","Root","list", - "test","ListItem", true, false, true); - - const Type& troot = mdg->getType("test","Root"); - const Type& tlist = mdg->getType("test","ListItem"); - - DataObjectPtr rooty = mdg->create(troot); - - DataObjectList& dl = rooty->getList("list"); - - - DataObjectPtr li1 = mdg->create(tlist); - DataObjectPtr li2 = mdg->create(tlist); - DataObjectPtr li3 = mdg->create(tlist); - - - dl.append(li1); - dl.append(li2); - dl.append(li3); - - rooty->unset("list[3]"); - - dl.append(li3); - - rooty->unset("list.2"); - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Problem in unsetlist" << e << endl; - return 0; - } -} - - -int sdotest::notns() -{ - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - - mdg->addType("","Root"); - mdg->addType("","ListItem"); - - mdg->addPropertyToType("","Root","list", - "","ListItem", true, false, true); - - const Type& troot = mdg->getType("","Root"); - const Type& tlist = mdg->getType("","ListItem"); - - DataObjectPtr rooty = mdg->create(troot); - - DataObjectList& dl = rooty->getList("list"); - - - DataObjectPtr li1 = mdg->create(tlist); - DataObjectPtr li2 = mdg->create(tlist); - DataObjectPtr li3 = mdg->create(tlist); - - - dl.append(li1); - dl.append(li2); - dl.append(li3); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - xmh->save(rooty,"","root","notns.xml"); - - return comparefiles("notns.xml","notns.txt"); - - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "notns" << endl << e << endl; - return 0; - } - -} - -int sdotest::badelement() -{ - try { - - int i,j; - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("BadElement.xsd"); - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: BADELEMENT XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("BadElement.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - FILE *f = fopen("badelement.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open badelement.dat" << endl; - return 0; - } - fprintf(f,"BADELEMENT correctly found errors:\n"); - for (j=0;jgetErrorMessage(j); - if (m != 0) fprintf(f,"%s\n", m); - } - fclose (f); - return comparefiles("badelement.dat","badelement.txt"); - } - else - { - if (!silent)cout << "Expected errors, got none" << endl; - return 0; - } - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "badelement" << endl << e << endl; - return 0; - } - -} - - -int sdotest::testastyle(FILE *f, const char* style) -{ - - int i,j; - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile(style); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: TESTSTYLES XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - fprintf(f,"*****STYLE %s\n",style); - - for (i=0;icreateDocument(); // with no name, URI - uses first in schema - - DataObjectPtr root = doc->getRootDataObject(); - - fprintf(f,"Root is:%s#%s\n",root->getType().getURI(), - root->getType().getName()); - - - XMLDocumentPtr doc1 = xmh->createDocument("library"); // with no URI - uses first in schema - - DataObjectPtr root1 = doc1->getRootDataObject(); - - fprintf(f,"Root is:%s#%s\n",root1->getType().getURI(), - root1->getType().getName()); - - XMLDocumentPtr doc2 = xmh->createDocument("library","libraryNS"); // with URI - - DataObjectPtr root2 = doc2->getRootDataObject(); - - fprintf(f, "Root is:%s#%s\n",root2->getType().getURI(), - root2->getType().getName()); - return 1; - - -} - -int sdotest::teststyles() -{ - try - { - - FILE *f = fopen("teststyles.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open teststyles.dat" << endl; - return 0; - } - testastyle(f,"Style1.xsd"); - testastyle(f,"Style2.xsd"); - testastyle(f,"Style3.xsd"); - //testastyle("Style4.xsd"); = groups not supported yet. - fclose(f); - return comparefiles("teststyles.dat","teststyles.txt"); - } - catch (SDORuntimeException e) - { - if (!silent)cout << "teststyles" << endl << e << endl; - return 0; - } - -} - - -int sdotest::testinc2(const char* inc, const char* name1, const char* name2) -{ - - - int i,j; - - try { - - FILE *f = fopen(name1,"w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open " << name1 << endl; - return 0; - } - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile(inc); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: TestInc2 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - //cout << "***** CALCULATOR ***************************************" << endl; - - for (i=0;idefineFile(x1); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Order XSD1 reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f); - return 0; - } - - xsh->defineFile(x2); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Order XSD2 reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f); - return 0; - } - - TypeList tl = mdg->getTypes(); - - //cout << "***** TESTORDER ****************************************" << endl; - - for (i=0;idefineFile("simple.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Order simple.xsd reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - - TypeList tl = mdg->getTypes(); - - //cout << "***** SIMPLE ****************************************" << endl; - - for (i=0;iloadFile("simple.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "Simple found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - DataObjectPtr dob = doc->getRootDataObject(); - - printDataObject(f, dob); - - fclose(f); - return comparefiles("simple.dat","simple.txt"); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAny" << e << endl; - return 0; - } -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.h deleted file mode 100644 index dd134c9d4f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "commonj/sdo/SDO.h" -using namespace commonj::sdo; - - -// test - -class sdotest { - public: - - static bool silent; - static bool ramping; - - /* utilities */ - - static int printseq(FILE *f, SequencePtr sptr); - static void printDataStructure(FILE *f,DataFactory* dd); - static void printDataObject(FILE *f, DataObjectPtr dol); - static void printValue(FILE *f, DataObjectPtr dob, const Property& prop); - static void printList(FILE *f, DataObjectPtr dob, const Property& prop); - static void printOldValues(FILE *f, ChangeSummaryPtr cs, DataObjectPtr dob); - static void dumpchangesummary(FILE *f, ChangeSummaryPtr cs); - static int comparefiles(char* fn1, char*fn2); - static int dumpproperties(FILE *f, DataObjectPtr root); - static int printset(FILE *f, ChangeSummaryPtr cs); - - static int xsdtosdo(); - - static void changeSummaryHeader(ChangeSummaryPtr cs); - static void changeSummaryFooter(); - static void changeSummaryChange(int level, ChangeSummaryPtr cs, DataObjectPtr dob); - static void changeSummaryDeletedObject(int indent, const char* name, ChangeSummaryPtr cs, DataObjectPtr dob); - static void changeSummaryElements(int indent, ChangeSummaryPtr cs, DataObjectPtr dob); - static void changeSummarySetting(Setting& s); - static bool changeSummaryAttributes(ChangeSummaryPtr cs, DataObjectPtr dol); - static char* convert(const char* uri); - - /* work in progress - generation of structures */ - - static void generate(DataFactoryPtr fac); - - /* tests */ - static int xhtml1(); - static int definetest(); - static int stocktest(); - - static int scopetest(); - static DataObjectPtr scopetest2(); - - - static int pete(); - static int testgenerate(const char* xsd, const char* output); - static int emptycs(); - static int compatiblefactory(); - static int transferto(DataObjectPtr d, DataFactoryPtr f, bool expecterror); - static int openseq(); - static int testanytwo(const char* xsd, - const char* xsd2, const char* xml); - static int testany(const char* xsd, - const char* acceptedxsderror, - const char* xml, - const char* acceptedxmlerror); - static int testOrder(const char* x1, const char* x2, - const char* name1, const char* name2); - static int simple(); - static int testinc2(const char* inc, const char* name1, - const char* name2); - static int testastyle(FILE *f, const char* style); - static int teststyles(); - static int badelement(); - static int oddchars(); - static int notns(); - static int unsetlist(); - static int travel(); - static int testwsdl(); - static int bunique(); - static int buniqueread(); - static int propdefaulttest(); - static int showdefault(FILE *f, const Type& tm); - static int graham6(); - static int graham5(); - static int graham4(); - static int leak(); - static int twolists(); - static int detachtest(); - static int includetest(); - static int testLoad(); - static int clonetest(); - static int testUtil(); - static int testErrors(); - static int doctest(); - static int notfound(); - static int serializeChangeSummary(ChangeSummaryPtr cs); - static int cssave(); - static int csload(); - static int cssave2(); - static int csload2(); - static int bug1(); - static int bug2(); - static int setnull(); - static int testsubsload(); - static int testabstract(); - static int testsubs(); - static int testSCA(); - static int testOpen(); - static int saveOpen(); - static int loadOpen(); - static int testui(); - static int merle1(); - static int graham1(); - static int graham2(); - static int graham3(); - static int loadManyOpen(); - static int loadOpenNS(); - - - static int eqhelpertest(); - static int cohelpertest(); - static int datetest(); - static int matttest1(); - static int adddeletetest(); - static int carotest3(); - static int carotest2(); - static int carotest(); - static int setmany(); - static int noncontest(); - static int versiontest(); - static int defaulttest(); - static int defaulttest_strobj(); - static int querytest(); - static int getproptest(); - static int nulltest(); - static int usertest(); - static int rcptest(); - static int boolbug(); - static int scope1(); - static int scope2(); - static int scope3(); - static int conversiontest(); - static int changesummarytest(); - static int scenario1(); - static int scenario2(); - static int scenario3(); - static int scenario4(); - static int scenario5(); - static int seqtest(); - static int printDataObject(DataObjectPtr dol); - static int printValue(DataObjectPtr dob, const Property& prop); - static int printList(DataObjectPtr dob, const Property& prop); - static int printOldValues(ChangeSummaryPtr cs, DataObjectPtr dob); - static int testGetters(DataObjectPtr dor); - static int testGetter(DataObjectPtr dor, char* str); - static int maintest(); - static int jira490(); - static int jira705(); - - static int b48602(); - static int b48736(); - static int b48686(); - static int b48601(); - static int b48300(); - static int b47663(); - static int b47764(); - static int b47802(); - static int b47293(); - static int b47137(); - static int b47137b(); - static int b46633(); - static int b46734(); - static int b46693(); - static int b46634(); - static int b46613(); - static int b46617(); - static int b46617b(); - static int b45933(); - static int testXPath(); -}; diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest2.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest2.cpp deleted file mode 100644 index 374400b474..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sdotest2.cpp +++ /dev/null @@ -1,1474 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#pragma warning(disable:4786) - -#include -#include -using namespace std; - - - -#include "sdotest.h" - - - -using namespace commonj::sdo; - -DataObjectPtr sdotest::scopetest2() -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - mdg->addType("myspace","Root"); - - mdg->addType("myspace","Company"); - - mdg->addPropertyToType("myspace","Company","name", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Company","id", - "commonj.sdo","String", false, false, false); - - mdg->addPropertyToType("myspace","Root","company", - "myspace","Company", false, false, true); - - const Type& tcc = mdg->getType("myspace","Root"); - - DataObjectPtr dop = mdg->create((Type&)tcc); - - DataObjectPtr co = dop->createDataObject("company"); - - return dop; -} - -int sdotest::scopetest() -{ - DataObjectPtr dob; - dob = scopetest2(); - - // fails on close? - return 1; -} - -int sdotest::xsdtosdo() -{ -const char* value; - -value = SDOUtils::XSDToSDO("string"); -if (!silent)cout << "XSDToSDO(string)=" << value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::XSDToSDO("int"); -if (!silent)cout << "XSDToSDO(int)="<< value << endl; -if (strcmp(value,"Integer")) return 0; - -value = SDOUtils::XSDToSDO("notinlist"); -if (!silent)cout << "XSDToSDO(notinlist)="<< value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::XSDToSDO(""); -if (!silent)cout << "XSDToSDO(\"\")="<< value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::XSDToSDO(0); -if (!silent)cout << "XSDToSDO(0)="<< value << endl; -if (strcmp(value,"String")) return 0; - -value = SDOUtils::SDOToXSD("String"); -if (!silent)cout << "SDOToXSD(String)="<< value << endl; -if (strcmp(value,"string")) return 0; - -value = SDOUtils::SDOToXSD("Long"); -if (!silent)cout << "SDOToXSD(Long)="<< value << endl; -if (strcmp(value,"unsignedLong")) return 0; - -value = SDOUtils::SDOToXSD("notinlist"); -if (!silent)cout << "SDOToXSD(notinlist)="<< value << endl; -if (strcmp(value,"string")) return 0; - -value = SDOUtils::SDOToXSD(""); -if (!silent)cout << "SDOToXSD(\"\")="<< value << endl; -if (strcmp(value,"string")) return 0; - -value = SDOUtils::SDOToXSD(0); -if (!silent)cout << "SDOToXSD(0)="<< value << endl; -if (strcmp(value,"string")) return 0; - -return 1; - -} - -int sdotest::compatiblefactory() -{ - DataFactoryPtr f1 = DataFactory::getDataFactory(); - - f1->addType("Namespace","Project"); - f1->addType("Namespace","WorkPackage"); - f1->addType("Namespace","LineItem"); - f1->addType("Namespace","StringHolder"); - - f1->addType("Namespace","Root"); - f1->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - f1->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f1->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - f1->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f1->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f1->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f1->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f1->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f1->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f1->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // project - // id (string) - // string (StringHolder) - // workpackages (WorkPackage) - - // workpackage - // name (string) - // string (StringHolder) - // lineitems (LineItem) - - // lineitem - // itemname (string) - - - // factories 1 and 2 are compatible - - DataFactoryPtr f2 = DataFactory::getDataFactory(); - - f2->addType("Namespace","Project"); - f2->addType("Namespace","WorkPackage"); - f2->addType("Namespace","LineItem"); - f2->addType("Namespace","StringHolder"); - - f2->addType("Namespace","Root"); - f2->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f2->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f2->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - f2->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f2->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f2->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f2->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f2->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f2->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f2->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 3 has no project type - - DataFactoryPtr f3 = DataFactory::getDataFactory(); - - f3->addType("Namespace","WorkPackage"); - f3->addType("Namespace","LineItem"); - f3->addType("Namespace","StringHolder"); - - f3->addType("Namespace","Root"); - f3->addPropertyToType("Namespace","Root","project", - "Namespace","WorkPackage", false, false, true); - - - f3->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f3->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f3->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f3->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f3->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - - f3->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 4 looks compatible - but stringholder is missing - - DataFactoryPtr f4 = DataFactory::getDataFactory(); - - f4->addType("Namespace","Project"); - f4->addType("Namespace","WorkPackage"); - f4->addType("Namespace","LineItem"); - - f4->addType("Namespace","Root"); - f4->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f4->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - - f4->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f4->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f4->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f4->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 5 looks compatible, but the lists are not lists - - DataFactoryPtr f5 = DataFactory::getDataFactory(); - - f5->addType("Namespace","Project"); - f5->addType("Namespace","WorkPackage"); - f5->addType("Namespace","LineItem"); - f5->addType("Namespace","StringHolder"); - - f5->addType("Namespace","Root"); - f5->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f5->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f5->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - f5->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f5->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f5->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f5->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","String", false, false, false); - - f5->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f5->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", false, false, true); - - f5->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", false, false, true); - - // factory 6 looks OK, but the lineitems have no itemname field - - DataFactoryPtr f6 = DataFactory::getDataFactory(); - - f6->addType("Namespace","Project"); - f6->addType("Namespace","WorkPackage"); - f6->addType("Namespace","LineItem"); - f6->addType("Namespace","StringHolder"); - - f6->addType("Namespace","Root"); - f6->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - - f6->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, false); - - f6->addPropertyToType("Namespace","Project","id", - "commonj.sdo","String", false, false, false); - - f6->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f6->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f6->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f6->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f6->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f6->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // factory 7 looks OK, but the identifiers are ints - - - DataFactoryPtr f7 = DataFactory::getDataFactory(); - - f7->addType("Namespace","Project"); - f7->addType("Namespace","WorkPackage"); - f7->addType("Namespace","LineItem"); - f7->addType("Namespace","StringHolder"); - - f7->addType("Namespace","Root"); - f7->addPropertyToType("Namespace","Root","project", - "Namespace","Project", false, false, true); - - f7->addPropertyToType("Namespace","StringHolder","value", - "commonj.sdo","String", false, false, true); - - f7->addPropertyToType("Namespace","Project","id", - "commonj.sdo","Integer", false, false, false); - - f7->addPropertyToType("Namespace","Project","string", - "Namespace","StringHolder", false, false, true); - - f7->addPropertyToType("Namespace","WorkPackage","name", - "commonj.sdo","String", false, false, false); - - - f7->addPropertyToType("Namespace","WorkPackage","string", - "Namespace","StringHolder", false, false, true); - - f7->addPropertyToType("Namespace","LineItem","itemname", - "commonj.sdo","Integer", false, false, false); - - f7->addPropertyToType("Namespace","LineItem","string", - "Namespace","StringHolder", false, false, true); - - f7->addPropertyToType("Namespace","Project","packages", - "Namespace","WorkPackage", true, false, true); - - f7->addPropertyToType("Namespace","WorkPackage","lineitems", - "Namespace","LineItem", true, false, true); - - - // create a tree from Root in factory 1 - - DataObjectPtr root = f1->create("Namespace","Root"); - DataObjectPtr project = root->createDataObject("project"); - project->setCString("id","The TTP Project"); - DataObjectPtr str = project->createDataObject("string"); - str->setCString("value","The Recursive Acronym Project"); - DataObjectPtr wp1 = project->createDataObject("packages"); - DataObjectPtr wp2 = project->createDataObject("packages"); - wp1->setCString("name","Work Package 1"); - wp2->setCString("name","Work Package 2"); - DataObjectPtr li1 = wp1->createDataObject("lineitems"); - DataObjectPtr li2 = wp1->createDataObject("lineitems"); - DataObjectPtr li3 = wp2->createDataObject("lineitems"); - DataObjectPtr li4 = wp2->createDataObject("lineitems"); - li1->setCString("itemname","LineItem 1"); - li2->setCString("itemname","LineItem 2"); - li3->setCString("itemname","LineItem 3"); - li4->setCString("itemname","LineItem 4"); - DataObjectPtr str1 = li1->createDataObject("string"); - DataObjectPtr str2 = li2->createDataObject("string"); - DataObjectPtr str3 = li3->createDataObject("string"); - DataObjectPtr str4 = li4->createDataObject("string"); - str1->setCString("value","String1"); - str2->setCString("value","String2"); - str3->setCString("value","String3"); - str4->setCString("value","String4"); - - -// cout << "DATA OBJECTS FROM FACTORY 1" << endl; -// printDataObject(root); - - if (!transferto(root,f2, false)) return 0; - if (!transferto(root,f3, true)) return 0; - if (!transferto(root,f4, true)) return 0; - if (!transferto(root,f5, true)) return 0; - if (!transferto(root,f6, true)) return 0; - if (!transferto(root,f7, true)) return 0; - - // finally, lets move one which has a parent and cant be moved. - - try { - DataObjectPtr project = root->getDataObject("project"); - - DataObjectPtr root2 = f2->create("Namespace","Root"); - - root2->setDataObject("project", project); - return 0; - } - catch (SDORuntimeException e) - { - //cout << "Compatibility test correctly returned an error :" ; - //cout << e.getMessageText() << endl; - return 1; - } - -} - -int sdotest::transferto(DataObjectPtr root, DataFactoryPtr f2, bool expecterror) -{ - try { - - // transfer the tree to factory 2... - DataObjectPtr rproject = root->getDataObject("project"); - - DataObjectPtr project = CopyHelper::copy(rproject); - - DataObjectPtr root2 = f2->create("Namespace","Root"); - - root2->setDataObject("project", project); - - //cout << "DATA OBJECTS TRANSFERRED" << endl; - - //printDataObject(root2); - - if (expecterror) - { - return 0; - } - return 1; - } - catch (SDORuntimeException e) - { - if (expecterror){ - //cout << "Compatibility test correctly returned an error :" ; - //cout << e.getMessageText() << endl; - return 1; - } - else - { - if (!silent)cout << "Compatibility test failed whilst transferring " << e << endl; - return 0; - } - } -} - - -int sdotest::b48602() -{ - - - int i,j; - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("b48602.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: b48602 XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - return 0; - } - catch (SDOTypeNotFoundException e) - { - return 1; - } - catch (SDORuntimeException e) - { - return 1; - } - -} - -int sdotest::testany(const char* xsd, - const char* acceptedxsderror, - const char* xml, - const char* acceptedxmlerror) -{ - - - int i,j,rc; - - try { - - char *c; - - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - if (xsd) - { - char * name1 = new char[strlen(xsd)+5]; - char * name3 = new char[strlen(xsd)+5]; - strcpy(name1,xsd); - while ((c = strchr(name1,'.')) != 0)*c = '_'; - strcpy(name3,name1); - strcat(name1,".dat"); - strcat(name3,".txt"); - - - FILE *f1 = fopen(name1,"w+"); - if (f1 == 0) - { - if (!silent)cout << "Unable to open " << name1 << endl; - delete name1; - delete name3; - return 0; - } - - xsh->defineFile(xsd); - - if ((i = xsh->getErrorCount()) > 0) - { - if (acceptedxsderror != 0) - { - for (j=0;jgetErrorMessage(j))) - { - fclose(f1); - delete name1; - delete name3; - return 1; - } - } - } - if (!silent) - { - cout << "PROBLEM: Testany XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f1); - delete name1; - delete name3; - return 0; - } - - - TypeList tl = mdg->getTypes(); - - fprintf(f1, "***** TYPES BEFORE RESOLVE **********************************\n"); - - for (i=0;iloadFile(xml); - - if ((i = xmh->getErrorCount()) > 0) - { - if (acceptedxmlerror != 0) - { - for (j=0;jgetErrorMessage(j))) - { - fclose(f2); - delete name2; - delete name4; - return 1; - } - } - } - if (!silent) - { - cout << "TestAny XML found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - fclose(f2); - delete name2; - delete name4; - return 0; - } - - else { - TypeList tl = mdg->getTypes(); - - fprintf(f2, "***** TYPES AFTER RESOLVE*********************************\n"); - - for (i=0;igetRootDataObject(); - printDataObject(f2, dob); - - fclose(f2); - - rc = comparefiles(name2,name4); - - delete name2; - delete name4; - - return rc; - } - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAny" << e << endl; - return 0; - } -} - - - -int sdotest::testanytwo(const char* xsd, const char* xsd2, - const char* xml) -{ - - - int i,j; - - try { - - char * name1 = new char[strlen(xsd)+5]; - char * name2 = new char[strlen(xml)+5]; - char * name3 = new char[strlen(xsd)+5]; - char * name4 = new char[strlen(xml)+5]; - strcpy(name1,xsd); - strcpy(name2,xml); - char *c; - while ((c = strchr(name1,'.')) != 0)*c = '_'; - while ((c = strchr(name2,'.')) != 0)*c = '_'; - strcpy(name3,name1); - strcpy(name4,name2); - - strcat(name1,".dat"); - strcat(name2,".dat"); - strcat(name3,".txt"); - strcat(name4,".txt"); - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - if (xsd) - { - xsh->defineFile(xsd); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Testany XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - - } - - if (xsd2) - { - xsh->defineFile(xsd2); - - if ((i = xsh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "PROBLEM: Testany XSD2 reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - } - - if (xsd) - { - - - FILE *f1 = fopen(name1,"w+"); - if (f1 == 0) - { - if (!silent)cout << "Unable to open " << name1 << endl; - return 0; - } - - TypeList tl = mdg->getTypes(); - - fprintf(f1,"***** TESTANY ******************************************\n"); - - for (i=0;iloadFile(xml); - - if ((i = xmh->getErrorCount()) > 0) - { - if (!silent) - { - cout << "TestAny XML found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - else - { - DataObjectPtr dob = doc->getRootDataObject(); - printDataObject(f2, dob); - } - - fclose(f2); - return comparefiles(name2,name4); - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAnyTwo" << e << endl; - return 0; - } -} - -int sdotest::openseq() - -{ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - FILE *f = fopen("openseq.dat","w+"); - if (f == 0) - { - if (!silent)cout << "Unable to open openseq.dat" << endl; - return 0; - } - - - mdg->addType("companyNS","CompanyType"); - // employee will be an open sequenced type... - mdg->addType("companyNS","EmployeeType", /*seq*/true, - /*open*/true, - /*abs */ false, - /*data*/ false); - - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - mdg->addPropertyToType(tcomp,"name",tstring); - - mdg->addPropertyToType(tcomp,"employees",temp,true); - - mdg->addPropertyToType(temp, "name",tstring); - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr emp = mdg->create(temp); - - emp->setCString("name","Albert"); - - emp->setCString("openstring","Value Of Open String"); - - /* now do the same with the employee seq...*/ - - SequencePtr seq = emp->getSequence(); - - seq->addCString("opensequencedstring","Value of sequenced string"); - - const char* c = emp->getCString("openstring"); - - fprintf(f, "Open Type string value: %s\n",c); - - c = emp->getCString("opensequencedstring"); - - fprintf(f, "Open Sequenced string value: %s\n",c); - - c = seq->getCStringValue(0); - - fprintf(f, "Open Sequenced string value from seq: %s\n",c); - - //cout << "END TEST: OpenSeq ======================================" << endl; - fclose(f); - return comparefiles("openseq.dat","openseq.txt"); -} - -int sdotest::b48601() -{ - return testany("48601.xsd", - "Schema contains a union which is not yet implemented",0,0); -} - -int sdotest::b48686() -{ - return testany("48686.xsd",0,"48686.xml",0); -} - -int sdotest::b48736() -{ - return testany("48736.xsd",0,"48736.xml",0); -} - - -int sdotest::testgenerate(const char* xsd, const char* output) -{ - - int i,j; - - try { - - char * name1 = new char[strlen(output) + 5]; - char * name2 = new char[strlen(output) + 5]; - char * c; - strcpy(name1,output); - while ((c = strchr(name1,'.')) != 0)*c='_'; - strcpy(name2,name1); - strcat(name1,".dat"); - strcat(name2,".txt"); - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - if (xsd) - { - xsh->defineFile(xsd); - - if ((i = xsh->getErrorCount()) > 0) - { - - if (!silent) - { - cout << "PROBLEM: generation XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - return 0; - } - else - { - mdg->generateInterface(name1,"Test"); - return comparefiles(name1,name2); - } - } - return 0; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestGenerate" << e << endl; - return 0; - } -} - - -int sdotest::emptycs() -{ -try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - // create a graph, then save it - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","John Jones"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Mary Smith"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Jane Doe"); - emp3->setCString("SN","E0003"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - - comp->setDataObject("employeeOfTheMonth",emp2); - - // right now, there is no change summary, and logging is - // off - we expect an empty change summary element - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - - xmh->save(doc,"emptycs1.xml"); - - if (!comparefiles("emptycs1.xml","emptycs1.txt"))return 0; - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - cs->beginLogging(); - - xmh->save(doc,"emptycs2.xml"); - - if (!comparefiles("emptycs2.xml","emptycs2.txt"))return 0; - - // now we expect and empty change summary with logging true - - DataObjectPtr emp4 = mdg->create(temp); - emp4->setCString("name","Al Smith"); - emp4->setCString("SN","E0004"); - emp4->setBoolean("manager",true); - - // first change - create employee 4 - dol2.append(emp4); - - cs->endLogging(); - - //serializeChangeSummary(cs); - - xmh->save(doc,"emptycs3.xml"); - - if (!comparefiles("emptycs3.xml","emptycs3.txt"))return 0; - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "empty change summary save failed" << e << endl; - return 0; - } -} - - -int sdotest::definetest() -{ - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - TypeDefinitions* ts = new TypeDefinitions(); - if (ts) delete ts; - ts = new TypeDefinitions(); - - - TypeDefinition* td = new TypeDefinition(); - - td->setName("MySmallObject"); - td->setUri("MyNameSpace"); - td->setIsDataType(false); - - TypeDefinition* td2 = new TypeDefinition(); - td2->setName("MyOtherObject"); - td2->setUri("MyNameSpace"); - td2->setIsDataType(false); - - - PropertyDefinition* pd = new PropertyDefinition(); - pd->setName("MyIntegerProperty"); - pd->setType("commonj.sdo","Integer"); - - PropertyDefinition* pd2 = new PropertyDefinition(); - pd2->setName("MyObjectProperty"); - pd2->setType("MyNameSpace","MyOtherObject"); - pd2->setIsMany(true); - - td->addPropertyDefinition(*pd); - - td->addPropertyDefinition(*pd2); - - ts->addTypeDefinition(*td); - ts->addTypeDefinition(*td2); - - // should have an object of type MySmallObject, containing - // a single integer called MyIntegerProperty, and a list of - // objects called MyObjectProperty - of type MyOtherObject - - xsh->defineTypes(*ts); - - delete td; - delete td2; - delete ts; - delete pd; - delete pd2; - - DataObjectPtr dob = mdg->create("MyNameSpace","MySmallObject"); - dob->setInteger("MyIntegerProperty",43); - - dob->createDataObject("MyObjectProperty"); - dob->createDataObject("MyObjectProperty"); - DataObjectList& dl = dob->getList("MyObjectProperty"); - - if (dl.size() != 2) - { - if (!silent) cout << "Define test list size is wrong" << endl; - return 0; - } - int value = dob->getInteger("MyIntegerProperty"); - if (value != 43) - { - if (!silent) cout << "Define test integer value is wrong" << endl; - return 0; - } - - return 1; - } - catch (SDORuntimeException e) - { - if (!silent)cout << "define test failed" << endl << e << endl; - return 0; - } - -} - - -int sdotest::stocktest() -{ - return sdotest::testany("stock.wsdl",0,"stock.xml",0); -} - - -/****************************************************** -int sdotest::stocktest() -{ - int i,j; - - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("stock.wsdl"); - - if ((i = xsh->getErrorCount()) > 0) - { - cout << "PROBLEM: Testany XSD reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - TypeList tl = mdg->getTypes(); - - printf("***** TYPES BEFORE RESOLVE **********************************\n"); - - for (i=0;iloadFile("stock.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - cout << "TestAny XML found errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - - DataObjectPtr dob = doc->getRootDataObject(); - printDataObject(stdout, dob); - - return 1; - - } - catch (SDORuntimeException e) - { - if (!silent)cout << "Exception in TestAny" << e << endl; - return 0; - } -} -**************************************************/ - - -int sdotest::pete() -{ - - - int i,j; - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("pete.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("pete.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - TypeList tl = mdg->getTypes(); - - //printf("***** TYPES **********************************************\n"); - - for (i=0;igetRootDataObject(); - float f = dob->getFloat("Stock[1]/Last"); - //printf("Float is %2.3f \r\n",f); - return 1; - - } - catch (SDORuntimeException e) - { - cout << "Exception in Pete" << e << endl; - return 0; - } -} - -int sdotest::xhtml1() -{ - - - int i,j; - - try { - - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("Atom1.0.xsd"); - - if ((i = xsh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr doc = xmh->loadFile("xhtml_in.xml"); - - if ((i = xmh->getErrorCount()) > 0) - { - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - return 0; - } - - - //DataObjectPtr dob = doc->getRootDataObject(); - - //ofstream myout("myfile"); - - //if (dob)SDOUtils::printDataObject(myout , dob); - - xmh->save(doc,"xhtml_out.xml"); - - return comparefiles("xhtml_out.xml" ,"xhtml_out.txt"); - - - } - catch (SDORuntimeException e) - { - cout << "Exception in xhtml1" << e << endl; - return 0; - } -} - -int sdotest::testXPath() -{ - - - try { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("company.xsd"); - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617b.xml", "companyNS"); - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - DataObjectPtr dop = newdob->getDataObject("departments[name='Shoe']/employees[name='Sarah Jones']"); - string x = "departments[name='Shoe']/employees[name='Sarah Jones']"; - dop = newdob->getDataObject(x); - - return 1; - - } - catch (SDORuntimeException e) - { - cout << "Exception in testXPath" << e << endl; - return 0; - } -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sequence.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sequence.txt deleted file mode 100644 index 1a616a3d16..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/sequence.txt +++ /dev/null @@ -1,45 +0,0 @@ -====================================== -====================================== -====================================== -I am Item 1 of string -====================================== -====================================== -I am Item 1 of string -I am the first free text -====================================== -====================================== -I am Item 1 of string -I am the first free text -I am Item 2 of string -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string - -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -department1 -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -department1 -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -department1 -====================================== -====================================== -I am Item 1 of string -I am free text which has been modified -I am Item 2 of string -department1 -department2 -====================================== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setmany.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setmany.txt deleted file mode 100644 index 083ebf6b62..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setmany.txt +++ /dev/null @@ -1,24 +0,0 @@ - School :King Norberts - Address1:The Place - Address2:1 The Avenue - Address3:Murchester - Address4:England - Class :Primary - Teacher :Mr Philbert Chloroform - Pupil1 :Witherspoon Jnr - Pupil2 :Snape - Pupil3 :Thannet - Class :Secondary - Teacher :Mr Brian Onasis - Pupil1 :Grimbling - Pupil2 :Snagget Minor - Pupil3 :Van Den Bograt -Expected path not found exception caught -Indexed as expected -Indexed as expected -Indexed as expected -Indexed as expected -Indexed as expected -Normal index out of range caught -Debatable behaviour - appended - Address4 :PostCode diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setnull.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setnull.txt deleted file mode 100644 index f6fe0633e1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/setnull.txt +++ /dev/null @@ -1,42 +0,0 @@ -===== Modified Object Starts -Xpath:#/ -The modified objects type is NullNS#NullMainType -===== Old Property Values Begin -Property asub of type DataObject object still exists - -Property bsub(UNSET) of type DataObject - object null or unset - -===== Old Property Values End -=====Modified Object Ends -===== Modified Object Starts -Xpath:#/subs.0 -The modified objects type is NullNS#NullSubType -===== Old Property Values Begin -Property name of type String:All Initially set - -Property number of type Integer:100 - -Property bool of type Boolean:0 - -===== Old Property Values End -=====Modified Object Ends -===== Modified Object Starts -Xpath:#/subs.1 -The modified objects type is NullNS#NullSubType -===== Old Property Values Begin -Property bool(UNSET) of type Boolean:0 - -===== Old Property Values End -=====Modified Object Ends -===== Modified Object Starts -Xpath:#/subs.2 -The modified objects type is NullNS#NullSubType -===== Old Property Values Begin -Property name(ISNULL) of type String: - -Property number(ISNULL) of type Integer:0 - -Property bool(ISNULL) of type Boolean:0 - -===== Old Property Values End -=====Modified Object Ends diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault1.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault1.txt deleted file mode 100644 index f49e95dd58..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault1.txt +++ /dev/null @@ -1,15 +0,0 @@ -Boolean default is : 0 -Boolean default as a string is false -Byte default is : 0 -Byte default as a string is 0 -Character default is : 0 -Character default as a string is 0 -Short default is : 0 -Integer default is : 0 -Integer many default is : 0 -Long default is : 0 -Float default is : 0.000 -Double default is : 0.000 -Date default is : 0 -String default is zero length -Bytes default is zero length diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault2.txt deleted file mode 100644 index a7bd1cba92..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/showdefault2.txt +++ /dev/null @@ -1,18 +0,0 @@ -Boolean default is : 1 -Boolean default as a string is true -Byte default is : 100 -Byte default as a string is 100 -Character default is : 101 -Character default as a string is 101 -Short default is : 300 -Integer default is : 400 -Integer many default is : 800 -Long default is : 500 -Float default is : 600.000 -Double default is : 700.000 -Date default is : 900 -String default length is 4 -HELP -String default as a string is HELP -Bytes default length is 4 -HELP diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.txt deleted file mode 100644 index 0b143e19a9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.txt +++ /dev/null @@ -1,8 +0,0 @@ -Type:#RootType -Property:person -Type of property:String -IsMany?0 -===== DataObject contents ===== -person:string:someone - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xml deleted file mode 100644 index 4896d30619..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - -someone diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xsd deleted file mode 100644 index f31d6e21d2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/simple.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.wsdl b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.wsdl deleted file mode 100644 index d465f1beb2..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.wsdl +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Enter symbols, seperated by space, Quotes delayed in 20 minutes. - - - - - Enter one symbol, quote delayed in 20 minutes. - - - - - Get Dow, Nasdaq, S&P500 index. - - - - - Enter symbols, seperated by space, Real-Time ECN quote. - - - - - - - Enter symbols, seperated by space, Quotes delayed in 20 minutes. - - - - - Enter one symbol, quote delayed in 20 minutes. - - - - - Get Dow, Nasdaq, S&P500 index. - - - - - Enter symbols, seperated by space, Real-Time ECN quote. - - - - - - - Enter symbols, seperated by space, Quotes delayed in 20 minutes. - - - - - Enter one symbol, quote delayed in 20 minutes. - - - - - Get Dow, Nasdaq, S&P500 index. - - - - - Enter symbols, seperated by space, Real-Time ECN quote. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.xml deleted file mode 100644 index 435fc549ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -IBM -<big><b>82.72</b></big> - -<img width="10" height="14" border="0" src="http://us.i1.yimg.com/us.yimg.com/i/us/fi/03rd/down_r.gif" alt="Down">&nbsp;<b style="color:#cc0000;">0.17 (0.21%)</b> -82.89 -82.49 -N/A -N/A -95.94 -82.40 - 82.80 -72.50 - 89.94 -1,568,200 -5,301,380 -128.25B -16.15 -5.12 -1.20 (1.40%) - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_wsdl.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_wsdl.txt deleted file mode 100644 index 47a11b4d3b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_wsdl.txt +++ /dev/null @@ -1,47 +0,0 @@ -***** TYPES BEFORE RESOLVE ********************************** -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://ws.invesbot.com/#GetECNQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetECNQuotesResponse -Property:GetECNQuotesResult of type GetECNQuotesResult -Type:http://ws.invesbot.com/#GetECNQuotesResult -Type:http://ws.invesbot.com/#GetMarketIndex -Type:http://ws.invesbot.com/#GetMarketIndexResponse -Property:GetMarketIndexResult of type GetMarketIndexResult -Type:http://ws.invesbot.com/#GetMarketIndexResult -Type:http://ws.invesbot.com/#GetQuote -Property:symbol of type String -Type:http://ws.invesbot.com/#GetQuoteResponse -Property:GetQuoteResult of type GetQuoteResult -Type:http://ws.invesbot.com/#GetQuoteResult -Type:http://ws.invesbot.com/#GetQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetQuotesResponse -Property:GetQuotesResult of type GetQuotesResult -Type:http://ws.invesbot.com/#GetQuotesResult -Type:http://ws.invesbot.com/#RootType -Property:GetQuotes of type GetQuotes -Property:GetQuotesResponse of type GetQuotesResponse -Property:GetQuote of type GetQuote -Property:GetQuoteResponse of type GetQuoteResponse -Property:GetMarketIndex of type GetMarketIndex -Property:GetMarketIndexResponse of type GetMarketIndexResponse -Property:GetECNQuotes of type GetECNQuotes -Property:GetECNQuotesResponse of type GetECNQuotesResponse -*******************************END TYPES****************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_xml.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_xml.txt deleted file mode 100644 index 6aa493dfa3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/stock_xml.txt +++ /dev/null @@ -1,127 +0,0 @@ -***** TYPES AFTER RESOLVE********************************* -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#OpenDataObject -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://ws.invesbot.com/#GetECNQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetECNQuotesResponse -Property:GetECNQuotesResult of type GetECNQuotesResult -Type:http://ws.invesbot.com/#GetECNQuotesResult -Type:http://ws.invesbot.com/#GetMarketIndex -Type:http://ws.invesbot.com/#GetMarketIndexResponse -Property:GetMarketIndexResult of type GetMarketIndexResult -Type:http://ws.invesbot.com/#GetMarketIndexResult -Type:http://ws.invesbot.com/#GetQuote -Property:symbol of type String -Type:http://ws.invesbot.com/#GetQuoteResponse -Property:GetQuoteResult of type GetQuoteResult -Type:http://ws.invesbot.com/#GetQuoteResult -Type:http://ws.invesbot.com/#GetQuotes -Property:symbols of type String -Type:http://ws.invesbot.com/#GetQuotesResponse -Property:GetQuotesResult of type GetQuotesResult -Type:http://ws.invesbot.com/#GetQuotesResult -Type:http://ws.invesbot.com/#RootType -Property:GetQuotes of type GetQuotes -Property:GetQuotesResponse of type GetQuotesResponse -Property:GetQuote of type GetQuote -Property:GetQuoteResponse of type GetQuoteResponse -Property:GetMarketIndex of type GetMarketIndex -Property:GetMarketIndexResponse of type GetMarketIndexResponse -Property:GetECNQuotes of type GetECNQuotes -Property:GetECNQuotesResponse of type GetECNQuotesResponse -*******************************END TYPES****************** -===== DataObject contents ===== -GetQuotesResult:dataObject -===== Sequenced DataObject contents ===== -Setting of DO property StockQuotes[0]= -===== Sequenced DataObject contents ===== -Setting of DO property StockQuote[0]= -===== Sequenced DataObject contents ===== -Setting of DO property Symbol[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:IBM -===== End Sequenced DataObject contents = -Setting of DO property Price[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.72 -===== End Sequenced DataObject contents = -Setting of DO property Time[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:11:41AM ET -===== End Sequenced DataObject contents = -Setting of DO property Change[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:Down 0.17 (0.21%) -===== End Sequenced DataObject contents = -Setting of DO property PrevClose[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.89 -===== End Sequenced DataObject contents = -Setting of DO property Open[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.49 -===== End Sequenced DataObject contents = -Setting of DO property Bid[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:N/A -===== End Sequenced DataObject contents = -Setting of DO property Ask[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:N/A -===== End Sequenced DataObject contents = -Setting of DO property YearTarget[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:95.94 -===== End Sequenced DataObject contents = -Setting of DO property DayRange[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:82.40 - 82.80 -===== End Sequenced DataObject contents = -Setting of DO property YearRange[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:72.50 - 89.94 -===== End Sequenced DataObject contents = -Setting of DO property Volume[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:1,568,200 -===== End Sequenced DataObject contents = -Setting of DO property AvgVol[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:5,301,380 -===== End Sequenced DataObject contents = -Setting of DO property MarketCap[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:128.25B -===== End Sequenced DataObject contents = -Setting of DO property PE[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:16.15 -===== End Sequenced DataObject contents = -Setting of DO property EPS[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:5.12 -===== End Sequenced DataObject contents = -Setting of DO property DivYield[0]= -===== Sequenced DataObject contents ===== -TEXT ELEMENT:1.20 (1.40%) -===== End Sequenced DataObject contents = -===== End Sequenced DataObject contents = -===== End Sequenced DataObject contents = -===== End Sequenced DataObject contents = - -===== End DataObject ===== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/include3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/include3.xsd deleted file mode 100644 index c661f6871e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/include3.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother.xsd deleted file mode 100644 index 3332ed6b53..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother1.xsd deleted file mode 100644 index 3023ffaca5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother2.xsd deleted file mode 100644 index 5c05afdf36..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/t2/includeother2.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/include3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/include3.xsd deleted file mode 100644 index 8b7ca5822b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/include3.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother.xsd deleted file mode 100644 index 21f3ff25cb..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother1.xsd deleted file mode 100644 index 3023ffaca5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother1.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother2.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother2.xsd deleted file mode 100644 index 5c05afdf36..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test/includeother2.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test2/includeother3.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test2/includeother3.xsd deleted file mode 100644 index 8b7ca5822b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/test2/includeother3.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testabstract.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testabstract.txt deleted file mode 100644 index 80c1d03afe..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testabstract.txt +++ /dev/null @@ -1,5 +0,0 @@ -Normal unsupportedoperation for creation of abstract type -Publication is of type BookType -Publication is of type MagazineType -Book is of type BookType -Magazine is of type MagazineType diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testerrors.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testerrors.txt deleted file mode 100644 index 62254aeaf9..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testerrors.txt +++ /dev/null @@ -1,7 +0,0 @@ -XSD reported some errors: -Opening and ending tag mismatch: complexType line 44 and schema - -Premature end of data in tag schema line 22 - -XML reported some errors: -Parser found unknown element company diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testinc2.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testinc2.txt deleted file mode 100644 index 837559562e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testinc2.txt +++ /dev/null @@ -1,21 +0,0 @@ -Type:commonj.sdo#BigDecimal -Type:commonj.sdo#BigInteger -Type:commonj.sdo#Boolean -Type:commonj.sdo#Byte -Type:commonj.sdo#Bytes -Type:commonj.sdo#ChangeSummary -Type:commonj.sdo#Character -Type:commonj.sdo#DataObject -Type:commonj.sdo#Date -Type:commonj.sdo#Double -Type:commonj.sdo#Float -Type:commonj.sdo#Integer -Type:commonj.sdo#Long -Type:commonj.sdo#Short -Type:commonj.sdo#String -Type:commonj.sdo#URI -Type:http://example.org/Calculator#RootType -Type:http://example.org/CalculatorTypes#AddArguments -Property:a -Property:b -Type:http://example.org/CalculatorTypes#RootType diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen.txt deleted file mode 100644 index 7d7b816e6d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen.txt +++ /dev/null @@ -1,24 +0,0 @@ -Normal exception for setting null on undefined prop -Open Type string value: Value Of Open String -Open Type boolean value: 1 -EMP1 type property: name ( many? 0) of type String -EMP1 type property: SN ( many? 0) of type String -EMP1 type property: manager ( many? 0) of type Boolean -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean -EMP1 inst property: openstring (many? 0) of type Bytes -EMP1 inst property: openboolean (many? 0) of type Boolean -EMP1 inst property: opentypelist (many? 1) of type Short -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean -EMP1 inst property: openboolean (many? 0) of type Boolean -EMP1 inst property: opentypelist (many? 1) of type Short -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean -EMP1 inst property: opentypelist (many? 1) of type Short -EMP1 inst property: name (many? 0) of type String -EMP1 inst property: SN (many? 0) of type String -EMP1 inst property: manager (many? 0) of type Boolean diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen3.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen3.xml deleted file mode 100644 index b16a75802e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testopen3.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testorder.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testorder.txt deleted file mode 100644 index 4f46cbfecf..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testorder.txt +++ /dev/null @@ -1,19 +0,0 @@ -Type:#Address -Property:name -Property:street -Property:city -Type:#RootType -Property:employee -Type:#UKAddress -Property:value -Property:postcode -Type:#USAddress -Property:value -Property:zip -Type:#fullpersoninfo -Property:address -Property:city -Property:country -Type:#personinfo -Property:firstname -Property:lastname diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/teststyles.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/teststyles.txt deleted file mode 100644 index 52de3ffc6a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/teststyles.txt +++ /dev/null @@ -1,93 +0,0 @@ -*****STYLE Style1.xsd -Type: commonj.sdo#BigDecimal -Type: commonj.sdo#BigInteger -Type: commonj.sdo#Boolean -Type: commonj.sdo#Byte -Type: commonj.sdo#Bytes -Type: commonj.sdo#ChangeSummary -Type: commonj.sdo#Character -Type: commonj.sdo#DataObject -Type: commonj.sdo#Date -Type: commonj.sdo#Double -Type: commonj.sdo#Float -Type: commonj.sdo#Integer -Type: commonj.sdo#Long -Type: commonj.sdo#OpenDataObject -Type: commonj.sdo#Short -Type: commonj.sdo#String -Type: commonj.sdo#URI -Type: libraryNS#RootType -Type: libraryNS#author -Type: libraryNS#available -Type: libraryNS#book -Type: libraryNS#character -Type: libraryNS#isbn -Type: libraryNS#library -Property:book -Type: libraryNS#title -************* -Root is:libraryNS#character -Root is:libraryNS#library -Root is:libraryNS#library -*****STYLE Style2.xsd -Type: commonj.sdo#BigDecimal -Type: commonj.sdo#BigInteger -Type: commonj.sdo#Boolean -Type: commonj.sdo#Byte -Type: commonj.sdo#Bytes -Type: commonj.sdo#ChangeSummary -Type: commonj.sdo#Character -Type: commonj.sdo#DataObject -Type: commonj.sdo#Date -Type: commonj.sdo#Double -Type: commonj.sdo#Float -Type: commonj.sdo#Integer -Type: commonj.sdo#Long -Type: commonj.sdo#OpenDataObject -Type: commonj.sdo#Short -Type: commonj.sdo#String -Type: commonj.sdo#URI -Type: libraryNS#RootType -Type: libraryNS#author -Type: libraryNS#available -Type: libraryNS#book -Type: libraryNS#character -Type: libraryNS#isbn -Type: libraryNS#library -Property:book -Type: libraryNS#title -************* -Root is:libraryNS#character -Root is:libraryNS#library -Root is:libraryNS#library -*****STYLE Style3.xsd -Type: commonj.sdo#BigDecimal -Type: commonj.sdo#BigInteger -Type: commonj.sdo#Boolean -Type: commonj.sdo#Byte -Type: commonj.sdo#Bytes -Type: commonj.sdo#ChangeSummary -Type: commonj.sdo#Character -Type: commonj.sdo#DataObject -Type: commonj.sdo#Date -Type: commonj.sdo#Double -Type: commonj.sdo#Float -Type: commonj.sdo#Integer -Type: commonj.sdo#Long -Type: commonj.sdo#OpenDataObject -Type: commonj.sdo#Short -Type: commonj.sdo#String -Type: commonj.sdo#URI -Type: libraryNS#RootType -Type: libraryNS#author -Type: libraryNS#available -Type: libraryNS#bookType -Type: libraryNS#character -Type: libraryNS#isbn -Type: libraryNS#library -Property:book -Type: libraryNS#title -************* -Root is:libraryNS#character -Root is:libraryNS#library -Root is:libraryNS#library diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testsubsload.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testsubsload.txt deleted file mode 100644 index 43c16114c3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testsubsload.txt +++ /dev/null @@ -1,7 +0,0 @@ -TEST: TestSubsLoad ========================================== -Publication is of type PublicationType -Publication is of type BookType -Publication is of type MagazineType -Book is of type BookType -Magazine is of type MagazineType -END TEST: TestSubsLoad ====================================== diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testutils.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testutils.txt deleted file mode 100644 index dd86813b90..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testutils.txt +++ /dev/null @@ -1,100 +0,0 @@ ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO -DataObject type: companyNS#CompanyType - Property: name - Property Type: commonj.sdo#String - Property Value: ACME - Property: employeeOfTheMonth - Property Type: companyNS#EmployeeType - Property Value: not set - Property: departments - Property Type: companyNS#DepartmentType - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#DepartmentType - Property: name - Property Type: commonj.sdo#String - Property Value: Advanced Technologies - Property: location - Property Type: commonj.sdo#String - Property Value: NY - Property: number - Property Type: commonj.sdo#String - Property Value: 123 - Property: employees - Property Type: companyNS#EmployeeType - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#EmployeeType - Property: name - Property Type: commonj.sdo#String - Property Value: Albert - Property: SN - Property Type: commonj.sdo#String - Property Value: E0001 - Property: manager - Property Type: commonj.sdo#Boolean - Property Value: not set - Property: openstring - Property Type: commonj.sdo#Bytes - Property Value: Value Of Open String - Property: openboolean - Property Type: commonj.sdo#Boolean - Property Value: true - Property: openintlist - Property Type: commonj.sdo#Short - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: commonj.sdo#Short -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Property: opendataobjectlist - Property Type: companyNS#OpenType - Value 0 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#OpenType - Property: name - Property Type: commonj.sdo#String - Property Value: MyOpenName -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Property: opendataobject - Property Type: companyNS#OpenType ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#OpenType - Property: name - Property Type: commonj.sdo#String - Property Value: MyOpenName -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Value 1 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#EmployeeType - Property: name - Property Type: commonj.sdo#String - Property Value: Boris - Property: SN - Property Type: commonj.sdo#String - Property Value: E0002 - Property: manager - Property Type: commonj.sdo#Boolean - Property Value: true -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - - Value 2 ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO - DataObject type: companyNS#EmployeeType - Property: name - Property Type: commonj.sdo#String - Property Value: Carl - Property: SN - Property Type: commonj.sdo#String - Property Value: E0003 - Property: manager - Property Type: commonj.sdo#Boolean - Property Value: not set -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.txt deleted file mode 100644 index 025b797d96..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.txt +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.xml deleted file mode 100644 index 47f983d51e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/testwsdl.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/travel.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/travel.txt deleted file mode 100644 index 5311a919f8..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/travel.txt +++ /dev/null @@ -1,146 +0,0 @@ -*******************************TYPES********************** -TYPE:#Client -TYPE:#Excursion -TYPE:#Flight -TYPE:#Holiday -TYPE:#Hotel -TYPE:#Party -TYPE:#Person -TYPE:#Room -TYPE:#RootType -TYPE:commonj.sdo#BigDecimal -TYPE:commonj.sdo#BigInteger -TYPE:commonj.sdo#Boolean -TYPE:commonj.sdo#Byte -TYPE:commonj.sdo#Bytes -TYPE:commonj.sdo#ChangeSummary -TYPE:commonj.sdo#Character -TYPE:commonj.sdo#DataObject -TYPE:commonj.sdo#Date -TYPE:commonj.sdo#Double -TYPE:commonj.sdo#Float -TYPE:commonj.sdo#Integer -TYPE:commonj.sdo#Long -TYPE:commonj.sdo#OpenDataObject -TYPE:commonj.sdo#Short -TYPE:commonj.sdo#String -TYPE:commonj.sdo#URI -*******************************END TYPES****************** -*******************************DATA********************** -===== DataObject contents ===== -Flight: list dataObject[0]= -===== DataObject contents ===== -Departure:string:LHR - -Arrival:string:SNG - -flightNo:string:BA243 - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -Departure:string:SNG - -Arrival:string:LHR - -flightNo:string:SG561 - -===== End DataObject ===== - -Hotel: list dataObject[0]= -===== DataObject contents ===== -Name:string:Excelsior - -Phone:string:222-3333 - -Room:dataObject -===== DataObject contents ===== -value:string:303 - -booked:boolean:1 - -===== End DataObject ===== - -cardsAccepted:boolean:1 - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -Name:string:Seedy Lodge - -Phone:string:888-9999 - -Room:dataObject -===== DataObject contents ===== -value:string:14 - -booked:boolean:1 - -===== End DataObject ===== - -cardsAccepted:boolean:0 - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -Name:string:Hilton - -Phone:string:444-5555 - -Room:dataObject -===== DataObject contents ===== -value:string:456 - -booked:boolean:0 - -===== End DataObject ===== - -cardsAccepted:boolean:1 - -===== End DataObject ===== - -Excursion:dataObject -===== DataObject contents ===== -Title:string:Bird Baths of Singapore - -Cost:string:50 - -===== End DataObject ===== - -Client:dataObject -===== DataObject contents ===== -Name:string:Steve - -Address:string:134 Shirley Road - -CreditCard:string:1234-8908-6543-900 - -===== End DataObject ===== - -Party:dataObject -===== DataObject contents ===== -Person: list dataObject[0]= -===== DataObject contents ===== -Name:string:John - -===== End DataObject ===== - -dataObject[1]= -===== DataObject contents ===== -Name:string:Jane - -===== End DataObject ===== - -dataObject[2]= -===== DataObject contents ===== -Name:string:Bill - -===== End DataObject ===== - -===== End DataObject ===== - -===== End DataObject ===== -***************************END DATA********************** diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/userdata.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/userdata.txt deleted file mode 100644 index e24caba194..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/userdata.txt +++ /dev/null @@ -1,10 +0,0 @@ -Expected 0xF1F1F1F1 F1F1F1F1 -Expected 0xF1F1F1F1 F1F1F1F1 -Expected 0x20 00000020 -Expected 0x40020 00040020 -Expected 0 00000000 -Expected 0 00000000 -Expected 120 00000120 -Expected 0 00000000 -Expected 640 00000640 -Expected 0x740 00000740 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/utils.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/utils.cpp deleted file mode 100644 index ac6103a5da..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/utils.cpp +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 - -#pragma warning(disable:4786) - -#include -using namespace std; - -#include "sdotest.h" - -bool sdotest::silent = true; -bool sdotest::ramping = false; - -void sdotest::printOldValues(FILE *f, ChangeSummaryPtr cs, DataObjectPtr dol) -{ - fprintf(f,"===== Old Property Values Begin\n"); - SettingList& sl = cs->getOldValues(dol); - if (sl.size() == 0) - { - fprintf(f,"No Settings found\n"); - } - else - { - for (int j=0;j< sl.size(); j++) - { - fprintf(f,"Property %s",sl[j].getProperty().getName()); - // this could be a many-valued property, and could be one which is - // a data object or a data type... - if (sl[j].getProperty().isMany()) - { - fprintf(f,"[%d]",sl[j].getIndex()); - } - if (!sl[j].isSet()) - { - fprintf(f,"(UNSET)"); - } - if (sl[j].isNull()) - { - fprintf(f,"(ISNULL)"); - } - - fprintf(f," of type "); - switch (sl[j].getProperty().getTypeEnum()) - { - case Type::BooleanType: - fprintf(f,"Boolean:%d\n",sl[j].getBooleanValue()); - break; - case Type::ByteType: - fprintf(f,"Byte:%d\n",sl[j].getByteValue()); - break; - case Type::CharacterType: - fprintf(f,"Character:%d\n",sl[j].getCharacterValue()); - break; - case Type::IntegerType: - fprintf(f,"Integer:%d\n",sl[j].getIntegerValue()); - break; - case Type::ShortType: - fprintf(f,"Short:%d\n",sl[j].getShortValue()); - break; - case Type::DoubleType: - fprintf(f,"Double:%.3f\n",(float)sl[j].getDoubleValue()); - break; - case Type::FloatType: - fprintf(f,"Float:%.3f\n",sl[j].getFloatValue()); - break; - case Type::LongType: - fprintf(f,"Long:%ld\n",sl[j].getIntegerValue()); - break; - case Type::DateType: - fprintf(f,"Date:%d\n",sl[j].getDateValue().getTime()); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - fprintf(f,"String:%s\n",sl[j].getCStringValue()); - break; - case Type::BytesType: - fprintf(f,"Bytes:%s\n",sl[j].getCStringValue()); - break; - case Type::OtherTypes: - case Type::DataObjectType: - case Type::ChangeSummaryType: - { - fprintf(f,"DataObject "); - DataObjectPtr dob = sl[j].getDataObjectValue(); - if (!dob) - { - fprintf(f," - object null or unset\n"); - } - else - { - DataObjectPtr mydo = sl[j].getDataObjectValue(); - if (cs->isDeleted(mydo)) - { - fprintf(f," - object deleted \n"); - printOldValues(f, cs,mydo); - } - else - { - fprintf(f," object still exists \n"); - } - } - } - break; - default: - { - fprintf(f,"Unknown object type\n"); - } - break; - } - fprintf(f,"\n"); - } - } - fprintf(f,"===== Old Property Values End \n"); - return; -} - - -void sdotest::printDataStructure(FILE *f , DataFactory* dd) -{ - TypeList tt = dd->getTypes(); - fprintf(f,"Printing Types\n"); - for (int i = 0; i < tt.size(); ++i) - { - fprintf(f,"Type %s\n",tt[i].getName()); - PropertyList pl = tt[i].getProperties(); - for (int j = 0; j < pl.size() ; j++) - { - fprintf(f,"Has Property %s of type %s\n", - pl[j].getName(),pl[j].getType().getName()); - } - } -} - - -void sdotest::printValue(FILE *f, DataObjectPtr dp, const Property& p) -{ - switch (p.getTypeEnum()) - { - case Type::BooleanType: - fprintf(f,"boolean:%d\n",dp->getBoolean(p)); - break; - case Type::ByteType: - fprintf(f,"Byte:%d\n",dp->getByte(p)); - break; - case Type::CharacterType: - fprintf(f,"character:%d\n",dp->getCharacter(p)); - break; - case Type::IntegerType: - fprintf(f,"integer:%d\n",dp->getInteger(p)); - break; - case Type::ShortType: - fprintf(f,"short:%d\n",dp->getShort(p)); - break; - case Type::DoubleType: - fprintf(f,"double:%.3f\n",(float)dp->getDouble(p)); - break; - case Type::FloatType: - fprintf(f,"float:%.3f\n", dp->getFloat(p)); - break; - case Type::LongType: - fprintf(f,"long:%ld\n",dp->getInteger(p)); - break; - case Type::DateType: - fprintf(f,"date:%d\n",dp->getDate(p).getTime()); - break; - case Type::BigDecimalType: - case Type::BigIntegerType: - case Type::StringType: - case Type::UriType: - fprintf(f,"string:%s\n", dp->getCString(p)); - break; - case Type::BytesType: - fprintf(f,"bytes:%s\n",dp->getCString(p)); - break; - case Type::OpenDataObjectType: - case Type::DataObjectType: - { - fprintf(f,"dataObject\n" ); - DataObjectPtr dob = dp->getDataObject(p); - if (!dob) - { - fprintf(f," - null or unset\n"); - } - else - { - printDataObject(f, dob); - } - } - break; - case Type::OtherTypes: - case Type::ChangeSummaryType: - default: - { - fprintf(f,"Unknown object type"); - } - break; - } - fprintf(f,"\n"); -} - -void sdotest::printList(FILE *f, DataObjectPtr dp, const Property& p) -{ - DataObjectList& dobl = dp->getList(p); - fprintf(f," list "); - - if (dobl.size() ==0) { - fprintf(f,"(empty)\n"); - return; - } - - for (int i=0;igetType().isSequencedType()) - { - fprintf(f,"===== Sequenced DataObject contents =====\n"); - SequencePtr sq = dol->getSequence(); - if (sq != 0) - { - for (unsigned int k=0;ksize();k++) - { - if (sq->isText(k)) - { - fprintf(f,"TEXT ELEMENT:%s\n",sq->getCStringValue(k)); - } - else - { - const Property& p = sq->getProperty(k); - if (p.isMany()) - { - unsigned int index = sq->getListIndex(k); - DataObjectList& dl = dol->getList(p); - if (p.getType().isDataType()) - { - fprintf(f,"Setting of property %s[%d]=%s\n", - p.getName(),index,dl.getCString(index)); - } - else - { - fprintf(f,"Setting of DO property %s[%d]=\n", - p.getName(),index); - printDataObject(f,dl.getDataObject(index)); - } - } - else - { - if (p.getType().isDataType()) - { - fprintf(f,"Setting of property %s=%s\n", - p.getName(),dol->getCString(p)); - } - else - { - fprintf(f,"Setting of DO property %s=\n", - p.getName()); - printDataObject(f,dol->getDataObject(p)); - } - } - } - } - } - fprintf(f,"===== End Sequenced DataObject contents =\n"); - } - else - { - fprintf(f,"===== DataObject contents =====\n"); - PropertyList pl = dol->getInstanceProperties(); - - for (int j=0;j< pl.size(); j++) - { - fprintf(f,"%s:",pl[j].getName()); - // this could be a many-valued property, and could be one which is - // a data object or a data type... - if (pl[j].isMany()) - { - printList(f, dol,pl[j]); - } - else { - printValue(f, dol,pl[j]); - } - } - fprintf(f,"===== End DataObject =====\n"); - } -} - - - -void sdotest::dumpchangesummary(FILE *f, ChangeSummaryPtr cs) -{ - - ChangedDataObjectList& cdol = cs->getChangedDataObjects(); - - // the changed data object list contains only the objects whose properties have - // been changed. - // a changed and subsequently deleted object will not appear, but necessarily its - // container will appear, so we can rebuild it. - - for (int i=0;i< cdol.size();i++) - { - if (cs->isCreated(cdol[i])) - { - fprintf(f,"Created object in changed list\n"); - // So its in the created list, it must exist in the tree... - fprintf(f,"The object is %s#%s\n", - cdol[i]->getType().getURI(), - cdol[i]->getType().getName()); - } - if (cs->isModified(cdol[i])) - { - fprintf(f,"===== Modified Object Starts\n"); - // get to a DAS data object... - DataObject* temp = cdol[i]; - fprintf(f,"Xpath:%s\n",((DataObject*)temp)->objectToXPath()); - - if (cs->isDeleted(cdol[i])) - { - fprintf(f,"PROBLEM: DELETED OBJECT IN CHANGED LIST: \n"); - // As the item is in the deleted list - its still present.. - fprintf(f,"The type is %s#%s\n", - cdol[i]->getType().getURI(), - cdol[i]->getType().getName()); - } - else { - fprintf(f,"The modified objects type is %s#%s\n", - cdol[i]->getType().getURI(), - cdol[i]->getType().getName()); - - printOldValues(f, cs, cdol[i]); - } - fprintf(f,"=====Modified Object Ends \n"); - } - if (cs->isDeleted(cdol[i])) - { - fprintf(f,"=====Deleted Object Starts \n"); - printOldValues(f, cs, cdol[i]); - fprintf(f,"=====Deleted Object Ends \n"); - } - } -} - - -int sdotest::comparefiles(char* fn1, char*fn2) -{ - FILE *f1, *f2; - f1 = fopen(fn1,"r+"); - if (f1 == 0) - { - if (!silent) cout << "Cannot open file:" << fn1 << endl; - return 0; - } - f2 = fopen(fn2,"r+"); - if (f2 == 0) - { - if (!silent) cout << "Cannot open file:" << fn2 << endl; - if (ramping) - { - cout << "Creating it" << endl; - f2 = fopen(fn2,"w+"); - if (f2 == 0) - { - cout << "Cannot ramp up - failed on " << fn2 << endl; - return 0; - } - int c; - do - { - c = fgetc(f1); - if (!feof(f1)) fputc(c,f2); - else break; - } while (1); - fclose(f1); - fclose(f2); - return 1; - } - else - { - fclose(f1); - return 0; - } - } - - while (!feof(f1)) - { - if (fgetc(f1) != fgetc(f2)) - { - fclose(f1); - fclose(f2); - return 0; - } - } - fclose (f1); - - if (!feof(f2)) - { - fclose(f2); - return 0; - } - - fclose(f2); - return 1; -} - - -int sdotest::printseq(FILE *f, SequencePtr sptr) -{ - fprintf(f, "======================================\n"); - for (int i=0;i< sptr->size();i++) - { - try { - if (!sptr->isText(i)) - { - const Property& prp = sptr->getProperty(i); - if (!strcmp(prp.getType().getName(),"Department")) - { - DataObjectPtr pdep = sptr->getDataObjectValue(i); - if (pdep != 0) - { - const char * cs = pdep->getCString("name"); - if (cs != 0) - { - fprintf(f, "%s\n",cs); - } - else - { - fprintf(f," is empty \n"); - } - } - } - else - { - const char* stx = sptr->getCStringValue(i); - if (stx != 0) - { - fprintf(f,"%s\n",stx); - } - else - { - fprintf(f," is empty \n"); - } - } - } - else - { - const char* st = sptr->getCStringValue(i); - if (st != 0) - { - fprintf(f,"%s\n", st); - } - else - { - fprintf(f," is empty \n"); - } - } - } - catch (SDOPropertyNotSetException) - { - if (!silent) cout << "WRONG - got a property not set exception!!!" << endl; - return 0; - } - } - fprintf(f, "======================================\n"); - return 1; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml1.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml1.xsd deleted file mode 100644 index 54d78e0366..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml1.xsd +++ /dev/null @@ -1,2245 +0,0 @@ - - - - - - XHTML 1.0 (Second Edition) Strict in XML Schema - - This is the same as HTML 4 Strict except for - changes due to the differences between XML and SGML. - - Namespace = http://www.w3.org/1999/xhtml - - For further information, see: http://www.w3.org/TR/xhtml1 - - Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio), - All Rights Reserved. - - The DTD version is identified by the PUBLIC and SYSTEM identifiers: - - PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" - - $Id: xhtml1-strict.xsd,v 1.2 2002/08/28 08:05:44 mimasa Exp $ - - - - - - - - ================ Character mnemonic entities ========================= - - XHTML entity sets are identified by the PUBLIC and SYSTEM identifiers: - - PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" - SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent" - - PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" - SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent" - - PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" - SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent" - - - - - - ================== Imported Names ==================================== - - - - - - - media type, as per [RFC2045] - - - - - - - - - comma-separated list of media types, as per [RFC2045] - - - - - - - - - a character encoding, as per [RFC2045] - - - - - - - - - a space separated list of character encodings, as per [RFC2045] - - - - - - - - - a language code, as per [RFC3066] - - - - - - - - - a single character, as per section 2.2 of [XML] - - - - - - - - - - - one or more digits - - - - - - - - - - - tabindex attribute specifies the position of the current element - in the tabbing order for the current document. This value must be - a number between 0 and 32767. User agents should ignore leading zeros. - - - - - - - - - - - - space-separated list of link types - - - - - - - - - single or comma-separated list of media descriptors - - - - - - - - - - - a Uniform Resource Identifier, see [RFC2396] - - - - - - - - - a space separated list of Uniform Resource Identifiers - - - - - - - - - date and time information. ISO date format - - - - - - - - - script expression - - - - - - - - - style sheet data - - - - - - - - - used for titles etc. - - - - - - - - - nn for pixels or nn% for percentage length - - - - - - - - - - - pixel, percentage, or relative - - - - - - - - - - - integer representing length in pixels - - - - - - - - these are used for image maps - - - - - - - - - - - - - - - - comma separated list of lengths - - - - - - - - - - =================== Generic Attributes =============================== - - - - - - - core attributes common to most elements - id document-wide unique id - class space separated list of classes - style associated style info - title advisory title/amplification - - - - - - - - - - - - internationalization attributes - lang language code (backwards compatible) - xml:lang language code (as per XML 1.0 spec) - dir direction for weak/neutral text - - - - - - - - - - - - - - - - - - attributes for common UI events - onclick a pointer button was clicked - ondblclick a pointer button was double clicked - onmousedown a pointer button was pressed down - onmouseup a pointer button was released - onmousemove a pointer was moved onto the element - onmouseout a pointer was moved away from the element - onkeypress a key was pressed and released - onkeydown a key was pressed down - onkeyup a key was released - - - - - - - - - - - - - - - - - - attributes for elements that can get the focus - accesskey accessibility key character - tabindex position in tabbing order - onfocus the element got the focus - onblur the element lost the focus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =================== Text Elements ==================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - these can only occur at block level - - - - - - - - - - - - - - - - - - - - - - "Inline" covers inline or "text-level" elements - - - - - - - - - - - ================== Block level elements ============================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Flow" mixes block and inline and is used for list items etc. - - - - - - - - - - - - - ================== Content models for exclusions ===================== - - - - - - - a elements use "Inline" excluding a - - - - - - - - - - - - - - - pre uses "Inline" excluding big, small, sup or sup - - - - - - - - - - - - - - - - form uses "Block" excluding form - - - - - - - - - - - - button uses "Flow" but excludes a, form and form controls - - - - - - - - - - - - - - - - - - - ================ Document Structure ================================== - - - - - - - - - - - - - - - - - ================ Document Head ======================================= - - - - - - - - - - - - - - - - - - - content model is "head.misc" combined with a single - title and an optional base element in any order - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The title element is not considered part of the flow of text. - It should be displayed, for example as the page header or - window title. Exactly one title is required per document. - - - - - - - - - - - - document base URI - - - - - - - - - - - - generic metainformation - - - - - - - - - - - - - - - - Relationship values can be used in principle: - - a) for document specific toolbars/menus when used - with the link element in document head e.g. - start, contents, previous, next, index, end, help - b) to link to a separate style sheet (rel="stylesheet") - c) to make a link to a script (rel="script") - d) by stylesheets to control how collections of - html nodes are rendered into printed documents - e) to make a link to a printable version of this document - e.g. a PostScript or PDF version (rel="alternate" media="print") - - - - - - - - - - - - - - - - - - style info, which may include CDATA sections - - - - - - - - - - - - - - - - script statements, which may include CDATA sections - - - - - - - - - - - - - - - - - - - - - - alternate content container for non script-based rendering - - - - - - - - - - - - - - =================== Document Body ==================================== - - - - - - - - - - - - - - - - - - - generic language/style container - - - - - - - - - - - - - - =================== Paragraphs ======================================= - - - - - - - - - - - - - - - - =================== Headings ========================================= - - There are six levels of headings from h1 (the most important) - to h6 (the least important). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =================== Lists ============================================ - - - - - - - Unordered list - - - - - - - - - - - - - - Ordered (numbered) list - - - - - - - - - - - - - - list item - - - - - - - - - - - - - - definition lists - dt for term, dd for its definition - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =================== Address ========================================== - - - - - - - information on author - - - - - - - - - - - - - - =================== Horizontal Rule ================================== - - - - - - - - - - - - =================== Preformatted Text ================================ - - - - - - - content is "Inline" excluding "img|object|big|small|sub|sup" - - - - - - - - - - - - - - - =================== Block-like Quotes ================================ - - - - - - - - - - - - - - - - - =================== Inserted/Deleted Text ============================ - - ins/del are allowed in block and inline content, but its - inappropriate to include block content within an ins element - occurring in inline content. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ================== The Anchor Element ================================ - - - - - - - content is "Inline" except that anchors shouldn't be nested - - - - - - - - - - - - - - - - - - - - - - - - ===================== Inline Elements ================================ - - - - - - - generic language/style container - - - - - - - - - - - - - - - I18N BiDi over-ride - - - - - - - - - - - - - - - - - - - - - - - - - - forced line break - - - - - - - - - - - emphasis - - - - - - - - - - - - - - - strong emphasis - - - - - - - - - - - - - - - definitional - - - - - - - - - - - - - - - program code - - - - - - - - - - - - - - - sample - - - - - - - - - - - - - - - something user would type - - - - - - - - - - - - - - - variable - - - - - - - - - - - - - - - citation - - - - - - - - - - - - - - - abbreviation - - - - - - - - - - - - - - - acronym - - - - - - - - - - - - - - - inlined quote - - - - - - - - - - - - - - - - subscript - - - - - - - - - - - - - - - superscript - - - - - - - - - - - - - - - fixed pitch font - - - - - - - - - - - - - - - italic font - - - - - - - - - - - - - - - bold font - - - - - - - - - - - - - - - bigger font - - - - - - - - - - - - - - - smaller font - - - - - - - - - - - - - - ==================== Object ====================================== - - object is used to embed objects as part of HTML pages. - param elements should precede other content. Parameters - can also be expressed as attribute/value pairs on the - object element itself when brevity is desired. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - param is used to supply a named property value. - In XML it would seem natural to follow RDF and support an - abbreviated syntax where the param elements are replaced - by attribute value pairs on the object start tag. - - - - - - - - - - - - - - - - - - - - - - =================== Images =========================================== - - To avoid accessibility problems for people who aren't - able to see the image, you should provide a text - description using the alt and longdesc attributes. - In addition, avoid the use of server-side image maps. - Note that in this DTD there is no name attribute. That - is only available in the transitional and frameset DTD. - - - - - - - - - - - - - - - usemap points to a map element which may be in this document - or an external document, although the latter is not widely supported - - - - - - - - - - - - - - - - ================== Client-side image maps ============================ - - These can be placed in the same document or grouped in a - separate document although this isn't yet widely supported - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ================ Forms =============================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Each label must not contain more than ONE field - Label elements shouldn't be nested. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - form control - - - - - - - - - - the name attribute is required for all but submit & reset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - option selector - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - option group - - - - - - - - - - - - - - - - - - - - - - selectable choice - - - - - - - - - - - - - - - - - - - - - - - - - - - multi-line text field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The fieldset element is used to group form fields. - Only one legend element should occur in the content - and if present should only be preceded by whitespace. - - NOTE: this content model is different from the XHTML 1.0 DTD, - closer to the intended content model in HTML4 DTD - - - - - - - - - - - - - - - - - - - - fieldset label - - - - - - - - - - - - - - - - Content is "Flow" excluding a, form and form controls - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ======================= Tables ======================================= - - Derived from IETF HTML table standard, see [RFC1942] - - - - - - - The border attribute sets the thickness of the frame around the - table. The default units are screen pixels. - - The frame attribute specifies which parts of the frame around - the table should be rendered. The values are not the same as - CALS to avoid a name clash with the valign attribute. - - - - - - - - - - - - - - - - - - - The rules attribute defines which rules to draw between cells: - - If rules is absent then assume: - "none" if border is absent or border="0" otherwise "all" - - - - - - - - - - - - - - - horizontal alignment attributes for cell contents - - char alignment char, e.g. char=':' - charoff offset for alignment char - - - - - - - - - - - - - - - - - - - - - vertical alignment attributes for cell contents - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Use thead to duplicate headers when breaking table - across page boundaries, or for static headers when - tbody sections are rendered in scrolling panel. - - Use tfoot to duplicate footers when breaking table - across page boundaries, or for static footers when - tbody sections are rendered in scrolling panel. - - Use multiple tbody sections when rules are needed - between groups of table rows. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - colgroup groups a set of col elements. It allows you to group - several semantically related columns together. - - - - - - - - - - - - - - - - - - col elements define the alignment properties for cells in - one or more columns. - - The width attribute specifies the width of the columns, e.g. - - width=64 width in screen pixels - width=0.5* relative width of 0.5 - - The span attribute causes the attributes of one - col element to apply to more than one column. - - - - - - - - - - - - - - - - - - - - - - - - - - - Scope is simpler than headers attribute for common tables - - - - - - - - - - - - - th is for headers, td for data and for cells acting as both - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_in.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_in.xml deleted file mode 100644 index e897ece9c1..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_in.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - dive into mark - - A <em>lot</em> of effort - went into making this effortless - - 2005-07-31T12:29:29Z - tag:example.org,2003:3 - - - Copyright (c) 2003, Mark Pilgrim - - Example Toolkit - - - Atom draft-07 snapshot - - - tag:example.org,2003:3.2397 - 2005-07-31T12:29:29Z - 2003-12-13T08:29:29-04:00 - - Mark Pilgrim - http://example.org/ - f8dy@example.com - - - Sam Ruby - - - Joe Gregorio - - -
      -

      [Update: The Atom draft is finished.]

      -

      Hello

      -
      -
      -
      -
      \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_out.txt b/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_out.txt deleted file mode 100644 index d485768c7e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/runtime/core/test/xhtml_out.txt +++ /dev/null @@ -1,41 +0,0 @@ - - - dive into mark - - A <em>lot</em> of effort - went into making this effortless - - 2005-07-31T12:29:29Z - tag:example.org,2003:3 - - - Copyright (c) 2003, Mark Pilgrim - - Example Toolkit - - - Atom draft-07 snapshot - - - tag:example.org,2003:3.2397 - 2005-07-31T12:29:29Z - 2003-12-13T08:29:29-04:00 - - Mark Pilgrim - http://example.org/ - f8dy@example.com - - - Sam Ruby - - - Joe Gregorio - - enhttp://diveintomark.org/ - - [Update: The Atom draft is finished.] - Hello - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/AUTHORS b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/COPYING b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/COPYING deleted file mode 100755 index 6b0b1270ff..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/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-1.0-incubating-M2-RC3/sdo/samples/ChangeLog b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/GettingStarted.html b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/GettingStarted.html deleted file mode 100644 index 0a2d269083..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/GettingStarted.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - Tuscany SDO C++ Samples - Getting Started - - - -
      -
      -
      -

      Tuscany Samples - Getting Started - SDO C++ Milestone release 2

      - -

      Tuscany SDO C++ includes some simple technology samples that demonstrate some of the basic sceanrios for C++ SDO. - This page describes the samples and what is needed to install and run them. -

      -
        -
      • The ObjectCreation sample demonstrates building the metadata programmatically, followed by use - of the metadata to instantiate objects in a graph. -
      • -
      • The XSDLoading sample shows how to load metadata from an XSD, and how to check for errors during - parsing. The parser gathers all non-fatal errors into one list, so all errors can be checked at one - time after parsing. Elements which contained errors will have been omitted from the resulting metadata. -
      • -
      • The ChangeSummarySave sample modifies a data graph of employees, and saves the modified graph with - its change summary. The output in ChangeSummarySave-output.xml shows the summary and its relationship - by references to the data graph. -
      • -
      • The Substitutes sample shows how to use substitites in XSD to achieve a property which will accept a - range of types. -
      • -
      • The Query sample shows how to use XPath to navigate within a graph to the required element. Note - that exceptions such as "path not found" may well be thrown if the XPath specified does not lead to - a real object in the graph. -
      • -
      -

      The SDO samples are built together into a single executable called sdo_misc.exe on Windows and sdo_misc on Linux -

      -
      - - - - -
      -

      Building the samples on Linux

      -

      If using the binary distribution the samples are built and installed in - <tuscany_sdo_install_dir>/samples - go directly to Running the samples on Linux.

      -
        -
      1. The following environment variables are required: -
          -
        • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
        • AXIS2C_HOME=<path to axis2c version 0.94>
        • -
      2. - -
      3. Build the source with the following command sequence: -
          -
        • cd <tuscany_sdo_install_dir>/samples
        • -
        • ./configure --prefix=<tuscany_sdo_install_dir>/deploy --enable-static=no
        • -
        • make
        • -
        • make install
        • -
        - NOTE: If you don't provide a --prefix configure option, it will by default install into - /usr/local/tuscany/sdo/samples/misc
      4. -
      -
      - - - -
      -

      Running the samples on Linux

      -
        -
      1. Ensure that <tuscany_sdo_install_dir>/lib is included in the LD_LIBRARY_PATH environment variable -
      2. -
      3. Run the sample with the following commands: -
          -
        • cd <tuscany_sdo_install_dir>/samples/misc/deploy
        • -
        • ./bin/sdo_misc
        • -
        -
      4. -
      -
      - -
      -

      Building the samples on Windows

      -

      If using the binary distribution the samples are built and installed in - <tuscany_sdo_install_dir>/samples - go directly to Running the samples on Windows.

      -
        -
      1. The following environment variables are required: -
          -
        • TUSCANY_SDOCPP=<path to installed Tuscany SDO> -
        • AXIS2C_HOME=<path to axis2c version 0.94>
        • -
      2. - -
      3. You must have set up the environment for Microsoft Visual C++ tools. - The build command will call vcvars32 to set the environment. Ensure the - directory containing this is on your path. This will be where you - installed the compiler. -
      4. -
      5. Build the source, either via the Visual Studio 6 or 7 projects under - <tuscany_sdo_install_dir>\samples\ides or via the command-line build file - found at <tuscany_sdo_install_dir>\samples\build.bat - which will build and deploy the samples. -
      6. -
      -
      - -
      -

      Building the samples on Windows with Apache STDCXX

      -

      STDCXX is an implementation of the C++ Standard Library provided by Apache. - The website is at http://incubator.apache.org/stdcxx/. -

      -

      You must begin by downloading and building STDCXX as described here -

      -

      STDCXX is supported only when used with Microsoft Visual Studio C++ V7.1. Launch the - MSVC++ 7.1 studio by opening the file - <tuscany_sdo_install_dir>samples\ides\devstudio7\projects\misc\misc.sln -

      -

      The sdo_misc project includes build configurations that - use STDCXX. There are several ways to access the build configurations, and all - are equally effective. As an example, open the Property pages for sdo_misc by - right clicking on sdo_misc in the Solution Explorer pane and selecting - Properties. The Configuration property in the top left corner of the pane is a - drop down box offering four options: Debug, Release, stdcxx-Debug, - stdcxx-Release. Choose the one you want and then launch the build. -

      -

      All components that are linked (by the linker) must all use the same C++ - Standard library. Therefore, if either sdo_misc or sdo_runtime are built with - STDCXX then both must be. -

      -
      - -
      -

      Running the samples on Windows

      -
        -
      1. Ensure that <tuscany_sdo_install_dir>\bin is included in the PATH environment variable -
      2. -
      3. Run the sample with the following commands: -
          -
        • cd <tuscany_sdo_install_dir>/samples/misc/deploy
        • -
        • bin\sdo_misc
        • -
        -
      4. -
      -
      - - -
      -

      Getting Help

      - -

      First place to look is at the Tuscany FAQ at - http://incubator.apache.org/tuscany/faq.html

      - -

      Any problem with this release can be reported to the Tuscany - mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.

      - - -

       

      - -

       

      - -

       

      -
      - -

      Thank you for your interest in Tuscany.

      -The - Tuscany Development Team - -

      - -
      - - - - - -
      - -

      Thank you for your interest in Tuscany.

      -The - Tuscany Development Team -
      -
      -
      -
      - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/INSTALL b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/INSTALL deleted file mode 100644 index f3710f30e4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -Please read the GettingStarted.html document for information on -building, installing and running Tuscany SDO for C++ Samples \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/LICENSE b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/LICENSE deleted file mode 100755 index f433b1a53f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/LICENSE +++ /dev/null @@ -1,177 +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 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/Makefile.am deleted file mode 100644 index 4e5bab506c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -SUBDIRS = misc - -EXTRA_DIST = GettingStarted.html diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NEWS b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NOTICE b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NOTICE deleted file mode 100644 index bfb81409ad..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/README b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/README deleted file mode 100644 index f3710f30e4..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/README +++ /dev/null @@ -1,2 +0,0 @@ -Please read the GettingStarted.html document for information on -building, installing and running Tuscany SDO for C++ Samples \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/autogen.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/autogen.sh deleted file mode 100755 index af38864985..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/autogen.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -for i in "libtoolize --force" 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-1.0-incubating-M2-RC3/sdo/samples/build.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.bat deleted file mode 100644 index 72600e83a3..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -@setlocal - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -goto end -) -echo using TUSCANY_SDOCPP: %TUSCANY_SDOCPP% - -call vcvars32 -cd ides\devstudio6\projects\misc -build.cmd - -@endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.sh deleted file mode 100755 index 850bd6ee4c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/build.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -if [ x$TUSCANY_SDOCPP = x ]; then -echo "TUSCANY_SDOCPP not set" -exit; -fi -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ x$AXIS2C_HOME = x ]; then -echo "AXIS2C_HOME not set" -exit; -fi -echo "Using Axis2C installed at $AXIS2C_HOME" - -./configure --prefix=${TUSCANY_SDOCPP} --enable-static=no -make -make install - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/configure.ac b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/configure.ac deleted file mode 100644 index 9b2d92a07d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/configure.ac +++ /dev/null @@ -1,47 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -dnl run autogen.sh to generate the configure script. - -AC_PREREQ(2.59) -AC_INIT(tuscany_sdo_samples, 1.0-incubator-M2) -AC_CANONICAL_SYSTEM -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AC_PREFIX_DEFAULT(/usr/local/tuscany/sdo/samples) - -# 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 - -# Check for dynamic library suffixes -AC_MSG_CHECKING([checking for dynamic library suffix]) -AC_CHECK_HEADER([sys/appleapiopts.h], - [AC_SUBST([libsuffix],[".dylib"]) AC_MSG_RESULT([using .dylib])], - [AC_SUBST([libsuffix],[".so"]) AC_MSG_RESULT([using .so])] -) - -AC_CONFIG_FILES([Makefile - misc/Makefile - ]) -AC_OUTPUT - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/build.cmd b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/build.cmd deleted file mode 100644 index 1fad2ace06..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/build.cmd +++ /dev/null @@ -1,26 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -setlocal -if not exist ..\..\..\..\misc\deploy mkdir ..\..\..\..\misc\deploy -if not exist ..\..\..\..\misc\deploy\bin mkdir ..\..\..\..\misc\deploy\bin -call vcvars32 -cd sdo_misc -nmake -f sdo_misc.mak CFG="sdo_misc - Win32 Release" -cd .. -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.dsw b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.dsw deleted file mode 100644 index 816b3b2f93..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "sdo_misc"=.\sdo_misc\sdo_misc.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.ncb b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.ncb deleted file mode 100644 index 67b2fcb95b..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.ncb and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.opt b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.opt deleted file mode 100644 index eeb2b8a757..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/misc.opt and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.dsp b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.dsp deleted file mode 100644 index 5ef0b2382e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.dsp +++ /dev/null @@ -1,152 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sdo_misc" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sdo_misc - 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 "sdo_misc.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 "sdo_misc.mak" CFG="sdo_misc - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_misc - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sdo_misc - 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)" == "sdo_misc - 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 /I "$(TUSCANY_SDOCPP)\include" /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_sdo.lib /nologo /subsystem:console /machine:I386 /libpath:"$(TUSCANY_SDOCPP)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\..\..\misc\deploy.bat ..\..\..\..\..\misc Release -# End Special Build Tool - -!ELSEIF "$(CFG)" == "sdo_misc - 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 "$(TUSCANY_SDOCPP)\include" /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_sdo.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=..\..\..\..\..\misc\deploy.bat ..\..\..\..\..\misc Debug -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "sdo_misc - Win32 Release" -# Name "sdo_misc - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\misc\ChangeSummarySave.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\ObjectCreation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\Query.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\samples.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\Substitutes.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\XSDLoading.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\misc\samples.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" -# Begin Source File - -SOURCE=..\..\..\..\..\misc\ChangeSummarySave.xsd -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\companysubs.xsd -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\XSDLoading.xml -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\misc\XSDLoading.xsd -# End Source File -# End Group -# End Target -# End Project diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.mak b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.mak deleted file mode 100644 index 7ebb95941a..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio6/projects/misc/sdo_misc/sdo_misc.mak +++ /dev/null @@ -1,262 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on sdo_misc.dsp -!IF "$(CFG)" == "" -CFG=sdo_misc - Win32 Debug -!MESSAGE No configuration specified. Defaulting to sdo_misc - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "sdo_misc - Win32 Release" && "$(CFG)" != "sdo_misc - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "sdo_misc.mak" CFG="sdo_misc - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sdo_misc - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sdo_misc - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "sdo_misc - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\sdo_misc.exe" - - -CLEAN : - -@erase "$(INTDIR)\ChangeSummarySave.obj" - -@erase "$(INTDIR)\ObjectCreation.obj" - -@erase "$(INTDIR)\Query.obj" - -@erase "$(INTDIR)\samples.obj" - -@erase "$(INTDIR)\Substitutes.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\XSDLoading.obj" - -@erase "$(OUTDIR)\sdo_misc.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /GX /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_misc.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\sdo_misc.pdb" /machine:I386 /out:"$(OUTDIR)\sdo_misc.exe" /libpath:"$(TUSCANY_SDOCPP)\lib" -LINK32_OBJS= \ - "$(INTDIR)\ChangeSummarySave.obj" \ - "$(INTDIR)\ObjectCreation.obj" \ - "$(INTDIR)\Query.obj" \ - "$(INTDIR)\samples.obj" \ - "$(INTDIR)\Substitutes.obj" \ - "$(INTDIR)\XSDLoading.obj" - -"$(OUTDIR)\sdo_misc.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\sdo_misc.exe" - ..\..\..\..\..\misc\deploy.bat ..\..\..\..\..\misc Release - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "sdo_misc - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\sdo_misc.exe" - - -CLEAN : - -@erase "$(INTDIR)\ChangeSummarySave.obj" - -@erase "$(INTDIR)\ObjectCreation.obj" - -@erase "$(INTDIR)\Query.obj" - -@erase "$(INTDIR)\samples.obj" - -@erase "$(INTDIR)\Substitutes.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\XSDLoading.obj" - -@erase "$(OUTDIR)\sdo_misc.exe" - -@erase "$(OUTDIR)\sdo_misc.ilk" - -@erase "$(OUTDIR)\sdo_misc.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdo_misc.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=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 /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\sdo_misc.pdb" /debug /machine:I386 /out:"$(OUTDIR)\sdo_misc.exe" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" -LINK32_OBJS= \ - "$(INTDIR)\ChangeSummarySave.obj" \ - "$(INTDIR)\ObjectCreation.obj" \ - "$(INTDIR)\Query.obj" \ - "$(INTDIR)\samples.obj" \ - "$(INTDIR)\Substitutes.obj" \ - "$(INTDIR)\XSDLoading.obj" - -"$(OUTDIR)\sdo_misc.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -SOURCE="$(InputPath)" -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -ALL : $(DS_POSTBUILD_DEP) - -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -$(DS_POSTBUILD_DEP) : "$(OUTDIR)\sdo_misc.exe" - ..\..\..\..\..\misc\deploy.bat ..\..\..\..\..\misc Debug - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ENDIF - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("sdo_misc.dep") -!INCLUDE "sdo_misc.dep" -!ELSE -!MESSAGE Warning: cannot find "sdo_misc.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "sdo_misc - Win32 Release" || "$(CFG)" == "sdo_misc - Win32 Debug" -SOURCE=..\..\..\..\..\misc\ChangeSummarySave.cpp - -"$(INTDIR)\ChangeSummarySave.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\misc\ObjectCreation.cpp - -"$(INTDIR)\ObjectCreation.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\misc\Query.cpp - -"$(INTDIR)\Query.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\misc\samples.cpp - -"$(INTDIR)\samples.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\misc\Substitutes.cpp - -"$(INTDIR)\Substitutes.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\..\..\..\misc\XSDLoading.cpp - -"$(INTDIR)\XSDLoading.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.sln b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.sln deleted file mode 100644 index d7de879890..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.sln +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdo_misc", "sdo_misc\sdo_misc.vcproj", "{0B4E79E7-D66A-4501-9941-580C3E00A382}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - stdcxx-Debug = stdcxx-Debug - stdcxx-Release = stdcxx-Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {0B4E79E7-D66A-4501-9941-580C3E00A382}.Debug.ActiveCfg = Debug|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.Debug.Build.0 = Debug|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.Release.ActiveCfg = Release|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.Release.Build.0 = Release|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.stdcxx-Debug.ActiveCfg = stdcxx-Debug|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.stdcxx-Debug.Build.0 = stdcxx-Debug|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.stdcxx-Release.ActiveCfg = stdcxx-Release|Win32 - {0B4E79E7-D66A-4501-9941-580C3E00A382}.stdcxx-Release.Build.0 = stdcxx-Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.suo b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.suo deleted file mode 100644 index 59edb30889..0000000000 Binary files a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/misc.suo and /dev/null differ diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/sdo_misc/sdo_misc.vcproj b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/sdo_misc/sdo_misc.vcproj deleted file mode 100644 index fd5ee10f8b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/ides/devstudio7/projects/misc/sdo_misc/sdo_misc.vcproj +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.cpp deleted file mode 100644 index 5a27683807..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "samples.h" -using namespace std; - -void ChangeSummarySave::sample() -{ - cout << " ********** ChangeSummarySave sample********" << endl; - - try { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("ChangeSummarySave.xsd"); - - /** - * Load the schema from ChangeSummarySave.xsd - */ - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool = mdg->getType("commonj.sdo","Boolean"); - const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& tdept = mdg->getType("companyNS","DepartmentType"); - const Type& temp = mdg->getType("companyNS","EmployeeType"); - - - /** - * create a graph, set the change summary logging, modify the - * data, then save it to a file - */ - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","ACME"); - - DataObjectPtr dept = mdg->create((Type&)tdept); - DataObjectList& dol = comp->getList("departments"); - dol.append(dept); - - dept->setCString("name","Advanced Technologies"); - dept->setCString("location","NY"); - dept->setCString("number","123"); - - DataObjectPtr emp1 = mdg->create(temp); - DataObjectPtr emp2 = mdg->create(temp); - DataObjectPtr emp3 = mdg->create(temp); - - emp1->setCString("name","John Jones"); - emp1->setCString("SN","E0001"); - - emp2->setCString("name","Mary Smith"); - emp2->setCString("SN","E0002"); - emp2->setBoolean("manager",true); - - emp3->setCString("name","Jane Doe"); - emp3->setCString("SN","E0003"); - - DataObjectList& dol2 = dept->getList("employees"); - dol2.append(emp1); - dol2.append(emp2); - dol2.append(emp3); - - - /** - * Set the employee of the month - which is a reference, not - * a containment value - */ - - comp->setDataObject("employeeOfTheMonth",emp2); - - /** - * The XSD defined the company type as having a change summary, - * so we can get it... - */ - - ChangeSummaryPtr cs = comp->getChangeSummary(); - - /** - * And ask it to start logging... - */ - - cs->beginLogging(); - - /** - * With logging on, create a new employee - */ - - DataObjectPtr emp4 = mdg->create(temp); - emp4->setCString("name","Al Smith"); - emp4->setCString("SN","E0004"); - emp4->setBoolean("manager",true); - - /** - * The first recorded change happens now, as the employee is - * added into the data graph. Emp4 (Al Smith) will appear in the - * change summary as a creation. There will also be a change - * record for the list "employees" of this department, holding the - * values before Al was added. - */ - dol2.append(emp4); - - /** - * The second change is to remove element 1 from the - * same list - Thats Mary Smith. - * Mary will appear as a deletion, but there will be no extra - * change record for "employees", as its already been changed. - * Mary was employee of the month, so that reference gets - * emptied, and a change record is set up for it, recording - * Mary as the old value. - */ - - dol2.remove(1); // element 1 is Mary - - DataObjectPtr emp5 = mdg->create(temp); - emp5->setCString("name","Bill Withers"); - emp5->setCString("SN","E0005"); - - - /** - * The third change is to append Bill to the same list. - * Bill appears as a creation, but there is no change recorded to - * the employees list. - */ - - dol2.append(emp5); - - - /** - * The company name is changed. A change record is set up for - * the property "name" of this company. It stores the old value - * "ACME" - */ - - comp->setCString("name","MegaCorp"); - - /** - * The company employee of the month is changed. The old - * value has already been changed from Mary to NULL, so no change - * record is created here at all - */ - - comp->setDataObject("employeeOfTheMonth",emp4); - - - /** - * Stop logging changes - */ - - cs->endLogging(); - - - XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg); - XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company"); - xmh->save(doc,"ChangeSummarySave-output.xml"); - - /** - * Have a look in the file and see if you can recognise the changes - * above - */ - - } - catch (SDORuntimeException e) - { - cout << "Exception in ChangeSummarySave" << endl; - cout << e; - } - cout << " ********** Sample ends ********************" << endl; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.xsd deleted file mode 100644 index b626d6a45b..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ChangeSummarySave.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Makefile.am b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Makefile.am deleted file mode 100644 index c16feffd5d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -deploydir=$(prefix)/samples/misc/deploy/ -prgbindir=$(deploydir)/bin - -prgbin_PROGRAMS = sdo_misc -prgbin_SCRIPTS = -EXTRA_DIST = *.xsd *.xml -deploy_DATA = *.xsd *.xml - -AM_CPPFLAGS = $(CPPFLAGS) -sdo_misc_SOURCES = samples.cpp \ -ChangeSummarySave.cpp \ -ObjectCreation.cpp \ -Query.cpp \ -Substitutes.cpp \ -XSDLoading.cpp - - -noinst_HEADERS = *.h - -sdo_misc_LDADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -lxml2 - - -INCLUDES = -I$(top_builddir)/misc \ - -I${TUSCANY_SDOCPP}/include diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ObjectCreation.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ObjectCreation.cpp deleted file mode 100644 index 0db919cc69..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/ObjectCreation.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "samples.h" -using namespace std; - -void ObjectCreation::sample() -{ - - - cout << " ********** Sample ObjectCreation **********" << endl; - - try { - - - /** - * Get a data factory. With it we can either create metadata - * or load it from an XSD. - */ - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - /** - * Add some Types to the data factory.. - * The booleans at on addType are: - * "isSequenced", "isOpen" "isAbstract" and "isDataType" - */ - - mdg->addType("myspace","Company"); - - mdg->addType("myspace","Department"); - - /** - * Manager is going to be a sequenced type... - */ - - mdg->addType("myspace","Manager", true, false); - - mdg->addType("myspace","Employee"); - - - /** - * We will make employee and manager sub-types of 'person' - */ - - mdg->addType("myspace","Person", true, false); - - - /** - * having all the types defined, we can now define the tree - * by giving properties to the types. - */ - - /** - * We could use the API passing in name and URI for each - * Type , or get the Types back and use them directly. - * Here we get back the types to use... - */ - - const Type& tc = mdg->getType("myspace","Company"); - const Type& ts = mdg->getType("commonj.sdo","String"); - const Type& ti = mdg->getType("commonj.sdo","Integer"); - const Type& tm = mdg->getType("myspace","Manager"); - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - const Type& tp = mdg->getType("myspace","Person"); - - - /** - * Example 1 - add a property of type String to type company - */ - - mdg->addPropertyToType(tc,"name",ts); - - /** - * Example 2 - add using the name of the company instead of the - * type... - */ - - mdg->addPropertyToType("myspace","Company","address",ts); - - /** - * Example 3 - add a many valued property - */ - - mdg->addPropertyToType(tc,"departments", "myspace","Department", - true); - - - /** - * Example 4 - add a reference property - */ - - mdg->addPropertyToType(tc,"employee of the month", "myspace", - "Employee",false, false, false); - - - /** - * Add other department properties... - */ - - mdg->addPropertyToType(td,"name", ts); - mdg->addPropertyToType(td,"id", ti); - mdg->addPropertyToType(td,"manager", tm); - mdg->addPropertyToType(td,"employees",te,true,false,true); - - /** - * Add a name to the person - */ - - mdg->addPropertyToType(tp,"name", ts); - - - - /** - * Make employees and mamagers both substypes of person - */ - - mdg->setBaseType(te,tp); - mdg->setBaseType(tm,tp); - - /** - * And give them different properties of their own. - */ - - mdg->addPropertyToType(tm,"officeid", ts); - mdg->addPropertyToType(te,"cubelocation", ts); - - - - /** - * The data structure looks like this: - - * Company - * ----name (String) - * ----address *String) - * ----departments (Department, many valued) - * ----employee of the month ( Employee - reference) - - * Person - * ----name (String) - - * Employee - * ----name (String - inherited from Person) - * ----cubelocation (String) - - * Manager - * ----name (String - inherited from Person) - * ----officeid (String) - - * Department - * ----name (String) - * ----id (Integer) - * ---- manager (Manager) - * ---- employees (Employee - many valued) - - - /** - * create an object of type Company using the DataFactory - */ - - DataObjectPtr dor = mdg->create((Type&)tc); - - /** - * Set the company name to Acme - */ - - dor->setCString("name","Acme"); - - /** - * Set up the two departments - using the - * DataObject createDataObject API - */ - - DataObjectPtr dep1 = dor->createDataObject("departments"); - dep1->setCString("name","Development"); - dep1->setInteger("id",100); - - DataObjectPtr man1 = dep1->createDataObject("manager"); - man1->setCString("name","Herve Jones"); - - DataObjectPtr dep2= dor->createDataObject("departments"); - dep2->setCString("name","Marketing"); - dep2->setInteger("id",200); - - DataObjectPtr man2 = dep2->createDataObject("manager"); - man1->setCString("name","August Phan"); - - /** - * Give the departments some employees - */ - - DataObjectPtr emp1 = dep1->createDataObject("employees"); - emp1->setCString("name","Fred Appleby"); - emp1->setCString("cubelocation","100-A"); - - DataObjectPtr emp2 = dep1->createDataObject("employees"); - emp2->setCString("name","Jane Bloggs"); - emp2->setCString("cubelocation","100-B"); - - DataObjectPtr emp3 = dep2->createDataObject("employees"); - emp3->setCString("name","Robin Corbet"); - emp3->setCString("cubelocation","200-A"); - - DataObjectPtr emp4 = dep2->createDataObject("employees"); - emp4->setCString("name","Martha Denby"); - emp4->setCString("cubelocation","200-B"); - - cout << "Company Name:" << dor->getCString("name") << endl; - - DataObjectList& depts = dor->getList("departments"); - for (int i=0;igetCString("name") << endl; - - DataObjectList& emps = depts[i]->getList("employees"); - - for (int j=0;jgetCString("name") << endl; - } - } - } - catch (SDORuntimeException e) - { - cout << "Exception in ObjectCreation" <addType("myspace","Company"); - mdg->addType("myspace","Department"); - mdg->addType("myspace","Employee"); - - - /* Now add the properties to the types...*/ - - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tbool= mdg->getType("commonj.sdo","Boolean"); - const Type& tint= mdg->getType("commonj.sdo","Integer"); - - const Type& tc = mdg->getType("myspace","Company"); - const Type& td = mdg->getType("myspace","Department"); - const Type& te = mdg->getType("myspace","Employee"); - - /** - * The company - */ - - mdg->addPropertyToType(tc,"name",tstring); // single string name - mdg->addPropertyToType(tc,"departments", - td,true); // many departments - mdg->addPropertyToType(tc,"employee of the month" - , te, false, false, false); // reference to employee - - /** - * The department - */ - - mdg->addPropertyToType(td,"name", tstring); // single string name - mdg->addPropertyToType(td,"employees",te, - true,false,true); // many employees - - - /** - * The employee - */ - - mdg->addPropertyToType(te,"isFullTime",tbool); - mdg->addPropertyToType(te,"employeeNumber",tint); - mdg->addPropertyToType(te,"name",tstring); - - - const Type& tcc = mdg->getType("myspace","Company"); - - DataObjectPtr dor = mdg->create((Type&)tcc); - - // The departments - - DataObjectPtr dept = dor->createDataObject("departments"); - dept->setCString("name","Shipping"); - - DataObjectPtr dept2 = dor->createDataObject("departments"); - dept2->setCString("name","Buying"); - - // The employees - - DataObjectPtr emp1 = dept->createDataObject("employees"); - DataObjectPtr emp2 = dept->createDataObject("employees"); - DataObjectPtr emp3 = dept->createDataObject("employees"); - DataObjectPtr emp4 = dept2->createDataObject("employees"); - - - emp1->setBoolean("isFullTime",true); - emp1->setInteger("employeeNumber",65443); - emp1->setCString("name","Norman"); - - - emp2->setBoolean("isFullTime",false); - emp2->setInteger("employeeNumber",64778); - emp2->setCString("name","Carl"); - - emp3->setBoolean("isFullTime",true); - emp3->setInteger("employeeNumber",61990); - emp3->setCString("name","Amanda"); - - emp4->setBoolean("isFullTime",true); - emp4->setInteger("employeeNumber",56789); - emp4->setCString("name","Donna"); - - dor->setDataObject("employee of the month",emp4); // Donna is referenced. - - - try { - - // access the first employee of the first department who is not full time - - DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[isFullTime=false]"); - cout << "Carl should be the first part timer: " << dob1->getCString("name") << " is." <getDataObject("departments[1]/employees[2]"); - cout << "Carl should be employees[2]:" << dob2->getCString("name") << " is." << endl; - - // use the dot notation to get the same employee - - DataObjectPtr dob3 = dor->getDataObject("departments.0/employees.1"); - cout << "Carl should be employees.1:" << dob3->getCString("name") << " is." << endl; - - // get the reference... - - DataObjectPtr dob4 = dor->getDataObject("employee of the month"); - cout << "Donna should be employee of the month:" << dob4->getCString("name") << " is." << endl; - - // And by employee number... - - DataObjectPtr dob5 = dor->getDataObject("departments[2]/employees[employeeNumber=56789]"); - cout << "Donna should be employee 56789:" << dob5->getCString("name") << " is." << endl; - - // If the query yields no value because the element doesnt exist... - - try - { - DataObjectPtr dob6 = dor->getDataObject("departments[1]/employees[employeeNumber=56789]"); - cout << "Did not get the expected exception" << endl; - } - catch (SDORuntimeException e) - { - cout << "Expected an IndexOutOfRangeException and got " << e.getEClassName() << endl; - } - - // If the query yields no value because the path is invalid... - - - try - { - DataObjectPtr dob7 = dor->getDataObject("departments[fish]/employees[0]"); - cout << "Did not get the expected exception" << endl; - } - catch (SDORuntimeException e) - { - cout << "Expected an PathNotFoundException and got " << e.getEClassName() << endl; - } - } - catch (SDORuntimeException e) - { - cout << "Unexpected error in Query " << e << endl; - } - - - cout << " ********** End Query Sample **************" << endl; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Substitutes.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Substitutes.cpp deleted file mode 100644 index 816caee2d5..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/Substitutes.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "samples.h" -using namespace std; - -void Substitutes::sample() -{ - cout << " ********** Substitutes sample *************" << endl; - try - { - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - xsh->defineFile("companysubs.xsd"); - - /** - * The companysubs xsd defines some types including a - * type which allows substitutions. The PublicationType is - * the base of BookType and MagazineType, and the substitutions - * are enabled so that properties can be either. - */ - - const Type& tstring = mdg->getType("commonj.sdo","String"); - const Type& tcomp = mdg->getType("companyNS","CompanyType"); - const Type& book = mdg->getType("companyNS","BookType"); - const Type& mag = mdg->getType("companyNS","MagazineType"); - const Type& pub = mdg->getType("companyNS","PublicationType"); - - - /** - * Create some data to work with - */ - - DataObjectPtr comp = mdg->create((Type&)tcomp); - comp->setCString("name","Puflet Publishing"); - - - DataObjectPtr book1 = mdg->create(book); - book1->setCString("author","Mr P B Writer"); - - /** - * book has a title property because it inherits from Publication - */ - book1->setCString("title","Nowhere Man"); - - - DataObjectPtr mag1 = mdg->create(mag); - - /** - * Magazine has an eidtor, and a title inherited from publication - */ - - mag1->setCString("editor","Mr B Picky"); - // inherited from publication - mag1->setCString("title","Bionicle Weekly"); - - - DataObjectPtr pub1 = mdg->create(pub); - pub1->setCString("title","Noddy In Toyland"); - - - /** - * The property "Publication" is defined as substitutable, so - * any of the book, magazine or publication should be - * acceptable values. When the type is queried, the type - * returned should correspond to the current type of the - * property... - */ - - comp->setDataObject("Publication",pub1); - const Type& tpub1 = comp->getDataObject("Publication")->getType(); - cout << "Publication is now of type " << tpub1.getName() << endl; - - comp->setDataObject("Publication",book1); - const Type& tpub2 = comp->getDataObject("Publication")->getType(); - cout << "Publication now is of type " << tpub2.getName() << endl; - - comp->setDataObject("Publication",mag1); - const Type& tpub3 = comp->getDataObject("Publication")->getType(); - cout << "Publication now is of type " << tpub3.getName() << endl; - - /** - * As the substitutes have names, they act as a sort of - * alias, so we can address Publication as Book or Magazine too - */ - - comp->setDataObject("Book",book1); - const Type& tpub4 = comp->getDataObject("Book")->getType(); - cout << "Book is of type " << tpub4.getName() << endl; - - comp->setDataObject("Magazine",mag1); - const Type& tpub5 = comp->getDataObject("Magazine")->getType(); - cout << "Magazine is of type " << tpub5.getName() << endl; - - } - catch (SDORuntimeException e) - { - cout << "Exception in Substitutes"<< endl; - cout<< e; - } - cout << " ********** Sample ends ********************" << endl; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.cpp deleted file mode 100644 index 8462f80f21..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "samples.h" -using namespace std; - -void XSDLoading::sample() -{ - int i,j; - - cout << " ********** XSDLoading Sample **************" << endl; - try - { - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - /** - * Get an XSD helper to load XSD information into the - * data factory - */ - - XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg); - myXSDHelper->defineFile("XSDLoading.xsd"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements were not - * understood - */ - - if ((i = myXSDHelper->getErrorCount()) > 0) - { - cout << "XSD Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - /** - * Use the same data factory to load XML corresponding to - * data objects adhering to the previously loaded schema - */ - - XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg); - - XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("XSDLoading.xml", "companyNS"); - - /** - * Check if there were any errors. The parse may still - * succeed, but errors indicate some elements did not match - * the schema, or were malformed. - * - */ - - if ((i = myXMLHelper->getErrorCount()) > 0) - { - cout << "XML Loading reported some errors:" << endl; - for (j=0;jgetErrorMessage(j); - if (m != 0) cout << m; - cout << endl; - } - } - - DataObjectPtr newdob = myXMLDocument->getRootDataObject(); - - cout << "Company Name:" << newdob->getCString("name") << endl; - - DataObjectList& depts = newdob->getList("departments"); - for (int i=0;igetCString("name") << endl; - - DataObjectList& emps = depts[i]->getList("employees"); - - for (int j=0;jgetCString("name") << endl; - } - } - - } - catch (SDORuntimeException e) - { - cout << "Exception in XSD Loading test" << endl; - cout << e; - } - cout << " ********** Sample ends ********************" << endl; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xml b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xml deleted file mode 100644 index 29ac158654..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -Jane Doe - - - - \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xsd deleted file mode 100644 index 4b7270354c..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/XSDLoading.xsd +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/companysubs.xsd b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/companysubs.xsd deleted file mode 100644 index 5b7e52ed9e..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/companysubs.xsd +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/deploy.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/deploy.bat deleted file mode 100644 index fb2bec5a1f..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/deploy.bat +++ /dev/null @@ -1,52 +0,0 @@ -@echo off - -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - - -setlocal - -if . == .%1 ( -echo sample root not specified -goto usage -) -set deploydir=%TUSCANY_SDOCPP%\samples\misc\deploy -set srcdir=%1 - -if . == .%2 ( -echo input directory not specified -goto usage -) -set inpath=%2 -echo %inpath% - -if not exist %TUSCANY_SDOCPP%\samples mkdir %TUSCANY_SDOCPP%\samples -if not exist %TUSCANY_SDOCPP%\samples\misc mkdir %TUSCANY_SDOCPP%\samples\misc -if not exist %TUSCANY_SDOCPP%\samples\misc\deploy mkdir %TUSCANY_SDOCPP%\samples\misc\deploy -if not exist %TUSCANY_SDOCPP%\samples\misc\deploy\bin mkdir %TUSCANY_SDOCPP%\samples\misc\deploy\bin -copy %srcdir%\*.xsd %deploydir% -copy %srcdir%\*.xml %deploydir% - -copy %inpath%\sdo_misc.exe %deploydir%\bin -if exist %inpath%\sdo_misc.pdb copy %inpath%\sdo_misc.pdb %deploydir%\bin - -goto end -:usage -echo Usage: deploy -:end - -endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.cpp b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.cpp deleted file mode 100644 index 4d1ee57c61..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 "samples.h" - -/** - * C main to run the sample - */ - -int main (int argc, char** argv) -{ - ObjectCreation::sample(); - XSDLoading::sample(); - ChangeSummarySave::sample(); - Substitutes::sample(); - Query::sample(); - return 0; -} diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.h b/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.h deleted file mode 100644 index f39cc910f7..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/samples/misc/samples.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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$ */ - -#pragma warning(disable:4786) - -#include "commonj/sdo/SDO.h" - - -using namespace commonj::sdo; - - - -class ObjectCreation { - public: - static void sample(); -}; - -class XSDLoading { - public: - static void sample(); -}; - -class ChangeSummarySave { - public: - static void sample(); -}; - -class Substitutes { - public: - static void sample(); -}; - -class Query { - public: - static void sample(); -}; \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.bat b/tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.bat deleted file mode 100644 index 63ff4e6442..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.bat +++ /dev/null @@ -1,45 +0,0 @@ -@echo off -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. - -@setlocal - -if "%AXIS2C_HOME%" == "" ( -echo "AXIS2C_HOME not set" -goto end -) -echo using Axis2C: %AXIS2C_HOME%" - -if not .%1 == . ( -cd %1 -) - -if "%TUSCANY_SDOCPP%" == "" ( -echo "TUSCANY_SDOCPP not set" -set TUSCANY_SDOCPP=%cd%\deploy -) -echo using TUSCANY_SDOCPP: %TUSCANY_SDOCPP% - -set PATH=%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH% - - -set SCATESTPATH=%cd%\projects\tuscany_sdo\sdo_test\Release -cd runtime\core\test -%SCATESTPATH%\sdo_test - -:end -@endlocal diff --git a/tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.sh b/tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.sh deleted file mode 100755 index e55a02395d..0000000000 --- a/tags/cpp-1.0-incubating-M2-RC3/sdo/sdotest.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT 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 SDO4CPP_HOME="$APFULLDIR" -if [ x$TUSCANY_SDOCPP = x ]; then -export TUSCANY_SDOCPP="$SDO4CPP_HOME" -fi - -echo "Using SDO installed at $TUSCANY_SDOCPP" - -if [ `uname -s` = Darwin ] -then - export DYLD_LIBRARY_PATH=$TUSCANY_SDOCPP/lib:$DYLD_LIBRARY_PATH -else - export LD_LIBRARY_PATH=$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH -fi -cd runtime/core/test -./tuscany_sdo_test -- cgit v1.2.3