summaryrefslogtreecommitdiffstats
path: root/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp')
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp74
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h57
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp105
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h72
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp74
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h72
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp193
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h116
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp198
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h162
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp163
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h123
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp106
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h93
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp82
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h150
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp62
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h121
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp59
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h99
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp52
-rw-r--r--tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h81
22 files changed, 0 insertions, 2314 deletions
diff --git a/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp
deleted file mode 100644
index b418a52425..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h
deleted file mode 100644
index d6c872629d..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp
deleted file mode 100644
index 5ddf4b1113..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h
deleted file mode 100644
index 8548a208e9..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp
deleted file mode 100644
index d470949746..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h
deleted file mode 100644
index 62c3b9854b..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp
deleted file mode 100644
index 56511fc9e6..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h
deleted file mode 100644
index 77a20d08b8..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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<void*> 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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp
deleted file mode 100644
index 3d7df2d44d..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h
deleted file mode 100644
index eeeb9cdb82..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp
deleted file mode 100644
index 76d6bbc5f6..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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<void*> 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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h
deleted file mode 100644
index 6d9b76feeb..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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 <vector>
-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<void*> 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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp
deleted file mode 100644
index 009e0ed765..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h b/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h
deleted file mode 100644
index c11af16848..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC2/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 <vector>
-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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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 <map>
-using std::map;
-#include <string>
-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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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 <map>
-using std::map;
-#include <string>
-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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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 <string>
-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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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-RC2/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h b/tags/cpp-1.0-incubating-M2-RC2/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-RC2/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 <string>
-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