You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/08/29 22:03:20 UTC

svn commit: r438185 [1/3] - in /incubator/tuscany/cpp/sca/runtime: core/src/osoa/ core/src/tuscany/sca/ core/src/tuscany/sca/core/ core/src/tuscany/sca/cpp/ core/src/tuscany/sca/extension/ core/src/tuscany/sca/model/ core/src/tuscany/sca/util/ extensio...

Author: robbinspg
Date: Tue Aug 29 13:03:17 2006
New Revision: 438185

URL: http://svn.apache.org/viewvc?rev=438185&view=rev
Log:
Move osoa/sca tree to cpp extension

NOTE: this breaks Linux build for the next few hours

Added:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h   (with props)
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceRuntimeException.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceRuntimeException.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/export.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/sca.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPExtension.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPImplementationExtension.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPInterfaceExtension.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceProxy.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CPPServiceWrapper.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/ComponentContextImpl.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/CompositeContextImpl.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPImplementation.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPInterface.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPReferenceBinding.h   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.cpp   (with props)
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/model/CPPServiceBinding.h   (with props)
Removed:
    incubator/tuscany/cpp/sca/runtime/core/src/osoa/
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentContextImpl.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ComponentContextImpl.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeContextImpl.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/CompositeContextImpl.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/DefaultServiceProxy.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/DefaultServiceProxy.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/cpp/
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPExtension.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPExtension.h
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPImplementationExtension.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPImplementationExtension.h
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPInterfaceExtension.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPInterfaceExtension.h
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPServiceProxy.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPServiceProxy.h
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPServiceWrapper.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/CPPServiceWrapper.h
    incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/model/
Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/Operation.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/LogWriter.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Logger.h
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/Operation.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/Operation.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/Operation.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/Operation.h Tue Aug 29 13:03:17 2006
@@ -19,7 +19,7 @@
 
 #ifndef tuscany_sca_core_operation_h
 #define tuscany_sca_core_operation_h
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include "commonj/sdo/SDO.h"
 using commonj::sdo::DataObjectPtr;
 #include <string>

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp Tue Aug 29 13:03:17 2006
@@ -215,7 +215,7 @@
                         extension();
                     }
                 }
-                catch (ServiceRuntimeException &)
+                catch (TuscanyRuntimeException &)
                 {
                     LOGERROR_1(0, "SCARuntime::loadExtensions failed to load extension library: %s", files[i].getFileName().c_str());
                 }

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_core_scaruntime_h
 #define tuscany_sca_core_scaruntime_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 
 #include "tuscany/sca/extension/InterfaceExtension.h"
 #include "tuscany/sca/extension/ImplementationExtension.h"

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp Tue Aug 29 13:03:17 2006
@@ -21,8 +21,6 @@
 #include "tuscany/sca/util/Logging.h"
 #include "tuscany/sca/util/Exceptions.h"
 
-using namespace osoa::sca;
-
 namespace tuscany
 {
     namespace sca

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_core_serviceproxy_h
 #define tuscany_sca_core_serviceproxy_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include "tuscany/sca/model/Component.h"
 #include "tuscany/sca/model/Reference.h"
 #include "tuscany/sca/core/ServiceWrapper.h"

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_core_servicewrapper_h
 #define tuscany_sca_core_servicewrapper_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include "tuscany/sca/core/Operation.h"
 #include "tuscany/sca/model/Service.h"
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_core_tuscanyruntime_h
 #define tuscany_sca_core_tuscanyruntime_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include <string>
 using std::string;
 

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h Tue Aug 29 13:03:17 2006
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 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 <sys/time.h>
+#include <inttypes.h> 
+#include <stdlib.h>
+#define SCA_API 
+#endif
+
+#endif // tuscany_sca_export_h

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/export.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ImplementationExtension.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_extension_implementationextension_h
 #define tuscany_sca_extension_implementationextension_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include <string>
 using std::string;
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/InterfaceExtension.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_extension_interfaceextension_h
 #define tuscany_sca_extension_interfaceextension_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include <string>
 using std::string;
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ReferenceBindingExtension.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,8 @@
 #ifndef tuscany_sca_extension_referencebindingextension_h
 #define tuscany_sca_extension_referencebindingextension_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
+
 #include <string>
 using std::string;
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/extension/ServiceBindingExtension.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_extension_servicebindingextension_h
 #define tuscany_sca_extension_servicebindingextension_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include <string>
 using std::string;
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Component.h Tue Aug 29 13:03:17 2006
@@ -58,7 +58,7 @@
                  * @param composite The composite containing the component.
                  * @param name The name of the component.
                  */
-                Component(Composite *composite, const std::string& name, ComponentType *type);
+                SCA_API Component(Composite *composite, const std::string& name, ComponentType *type);
 
                 /**
                  * Destructor.
@@ -69,25 +69,25 @@
                  * Returns the name of this component.
                  * @return the name of this component
                  */
-                const string& getName() const { return name; }
+                SCA_API const string& getName() const { return name; }
             
                 /**
                  * Returns the composite containing this component.
                  * @return The composite containing this component.
                  */
-                Composite* getComposite() const { return composite; }
+                SCA_API Composite* getComposite() const { return composite; }
             
                 /**
                  * Returns the type of this component.
                  * @return The type of this component.
                  */
-                ComponentType* getType() const { return type; }
+                SCA_API ComponentType* getType() const { return type; }
                 
                 /**
                  * Add a new service to this component.
                  * @param service The service to add.
                  */
-                void addService(Service* service);
+                SCA_API void addService(Service* service);
 
                 /**
                  * Find an existing service on this component.
@@ -96,34 +96,34 @@
                  * only one service it will be returned.
                  * @return The found service, or 0 if not found.
                  */
-                Service* findService(const string& serviceName);
+                SCA_API Service* findService(const string& serviceName);
 
                 /**
                  * Add a new reference to this component.
                  * @param reference The reference to add.
                  */
-                void addReference(Reference* reference);
+                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.
                  */
-                Reference* findReference(const string& referenceName);
+                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<std::string, Service*> SERVICE_MAP;
-                SERVICE_MAP getServices() const { return services; }; 
+                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<std::string, Reference*> REFERENCE_MAP;
-                REFERENCE_MAP getReferences() const { return references; }; 
+                SCA_API const REFERENCE_MAP& getReferences() const { return references; }; 
                 
                 /**
                  * Set the value of a property defined on this component. The values
@@ -131,14 +131,14 @@
                  * @param name The name of the property.
                  * @param value The value of the property.
                  */
-                void setProperty(const string& name, commonj::sdo::DataObjectPtr value);
+                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.
                  */
-                DataObjectPtr getProperties();
+                SCA_API DataObjectPtr getProperties();
 
             private:
                 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/Composite.h Tue Aug 29 13:03:17 2006
@@ -62,30 +62,30 @@
                  * @param name the name of the composite.
                  * @param root the root of the composite in the file system.
                  */
-                Composite(const string& name, const string& root);
+                SCA_API Composite(const string& name, const string& root);
 
                 /**
                  * Destructor.
                  */
-                virtual ~Composite();
+                SCA_API virtual ~Composite();
 
                 /**
                  * Returns the root directory of the composite.
                  * @return The root of the composite in the file system.
                  */
-                const string& getRoot() const { return root; }
+                SCA_API const string& getRoot() const { return root; }
                 
                 /**
                  * Add a new component to the composite.
                  * @param component The component to add.
                  */
-                void addComponent(Component* component);
+                SCA_API void addComponent(Component* component);
 
                 /**
                  * Add/include a composite in this composite.
                  * @param composite The composite included in this composite.
                  */
-                void addInclude(Composite* composite);
+                SCA_API void addInclude(Composite* composite);
 
                 /**
                  * Add a wire to the model.
@@ -94,14 +94,14 @@
                  * @param target The target location. Either the target component and
                  * service (optional), or an external service.
                  */
-                void addWire(const string& source, const string& target);
+                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.
                  */
-                Component* findComponent(const string& componentName);
+                SCA_API Component* findComponent(const string& componentName);
 
                 /**
                  * Find a component and service by name.
@@ -110,42 +110,42 @@
                  * if there is only one service on the component.
                  * @return The Service that was found, or 0 if not found.
                  */
-                Service* findComponentService(const string& componentServiceName);
+                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.
                  */
-                void addWSDLDefinition(commonj::sdo::DataObjectPtr wsdlModel);
+                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.
                  */
-                WSDLDefinition* findWSDLDefinition(const string& wsdlNamespace);
+                SCA_API WSDLDefinition* findWSDLDefinition(const string& wsdlNamespace);
 
                 /**
                  * Return a cached SDO XSDHelper.
                  */
-                commonj::sdo::XSDHelperPtr getXSDHelper(void);
+                SCA_API commonj::sdo::XSDHelperPtr getXSDHelper(void);
 
                 /**
                  * Return a cached SDO XMLHelper.
                  */
-                commonj::sdo::XMLHelperPtr getXMLHelper(void);
+                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.
                  */
-                commonj::sdo::DataFactoryPtr getDataFactory(void);
+                SCA_API commonj::sdo::DataFactoryPtr getDataFactory(void);
 
                 /**
                  * Work through the list of wires and connect the source and target uris.
                  */
-                void resolveWires();
+                SCA_API void resolveWires();
  
             private:
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp Tue Aug 29 13:03:17 2006
@@ -17,7 +17,7 @@
 
 /* $Rev$ $Date: 2005/12/22 11:33:21 $ */
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include "tuscany/sca/util/Utils.h"
 #include "tuscany/sca/util/Exceptions.h"
 #include "tuscany/sca/util/Logging.h"
@@ -733,10 +733,10 @@
                     }                    
 
                     Files wsdlFiles(compositeRootDir, "*.wsdl", true);
-                    for (unsigned int i=0; i < wsdlFiles.size(); i++)
+                    for (unsigned int wi=0; wi < wsdlFiles.size(); wi++)
                     {
                         // Load a wsdl file -> get the types, then the contents of the wsdl
-                        string wsdlName = compositeRootDir + "/" + wsdlFiles[i].getFileName();
+                        string wsdlName = compositeRootDir + "/" + wsdlFiles[wi].getFileName();
                         loadXMLSchema(composite, wsdlName.c_str());
                         
                         // Load the contents of the wsdl files

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_model_modelloader_h
 #define tuscany_sca_model_modelloader_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include "commonj/sdo/SDO.h"
 
 #include "tuscany/sca/core/SCARuntime.h"
@@ -33,7 +33,8 @@
 #include <map>
 using std::map;
 
-using namespace commonj::sdo;
+using commonj::sdo::DataObjectPtr;
+using commonj::sdo::XSDHelperPtr;
 using namespace tuscany::sca;
 
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.h Tue Aug 29 13:03:17 2006
@@ -22,7 +22,7 @@
 
 #include "tuscany/sca/model/WSDLOperation.h"
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include <string>
 using std::string;
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h Tue Aug 29 13:03:17 2006
@@ -19,13 +19,13 @@
 
 #ifndef tuscany_sca_model_wsdloperation_h
 #define tuscany_sca_model_wsdloperation_h
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include <string>
 using std::string;
 
 
 #include "commonj/sdo/SDO.h"
-using namespace commonj::sdo;
+using commonj::sdo::DataObjectPtr;
 
 namespace tuscany
 {

Added: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp Tue Aug 29 13:03:17 2006
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 "tuscany/sca/util/Exceptions.h"
+using namespace std;
+
+namespace tuscany
+{
+    namespace sca
+    {
+        
+        // ========================================================================
+        // Constructor
+        // ========================================================================
+        TuscanyRuntimeException :: TuscanyRuntimeException(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 TuscanyRuntimeException constuctor
+        
+        // ========================================================================
+        // Constructor
+        // ========================================================================
+        TuscanyRuntimeException ::  TuscanyRuntimeException(const TuscanyRuntimeException& 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<c.location_set;i++)
+            {
+                locations[i].file = new char[strlen(c.locations[i].file) + 1];
+                strcpy(locations[i].file,c.locations[i].file);
+                locations[i].line = c.locations[i].line;
+                locations[i].function = new char[strlen(c.locations[i].function) + 1];
+                strcpy(locations[i].function, c.locations[i].function);
+            }
+        }
+        
+        // ========================================================================
+        // Destructor
+        // ========================================================================
+        TuscanyRuntimeException :: ~TuscanyRuntimeException()
+        {
+            if (class_name) delete class_name;
+            if (message_text) delete message_text;
+            for (int i=0;i<location_set;i++)
+            {
+                if (locations[i].file) delete locations[i].file;
+                if (locations[i].function) delete locations[i].function;
+            }
+            
+        } // end TuscanyRuntimeException destructor
+        
+        // ========================================================================
+        // Return class name of this exception
+        // ========================================================================
+        const char* TuscanyRuntimeException :: getEClassName() const
+        {
+            return class_name;
+        } // end getClassName()
+        
+        // ========================================================================
+        // Return severity
+        // ========================================================================
+        TuscanyRuntimeException::severity_level TuscanyRuntimeException :: getSeverity() const
+        {
+            return severity;
+        } // end getSeverity()
+        
+        // ========================================================================
+        // Return message text associated with exception
+        // ========================================================================
+        const char* TuscanyRuntimeException :: getMessageText() const
+        {
+            return message_text;
+        } // end getMessageText()
+        
+        // ========================================================================
+        // Return file name where exception was raised
+        // ========================================================================
+        const char* TuscanyRuntimeException :: getFileName() const
+        {
+            return locations[0].file;
+        } // end getFileName()
+        
+        // ========================================================================
+        // Return line number where exception was raised
+        // ========================================================================
+        unsigned long TuscanyRuntimeException :: getLineNumber() const
+        {
+            return locations[0].line;
+        } // end getLineNumber()
+        
+        // ========================================================================
+        // Return function name where exception was raised
+        // ========================================================================
+        const char* TuscanyRuntimeException :: getFunctionName() const
+        {
+            return locations[0].function;
+        } // end getFunctionName()
+        
+        
+        // ========================================================================
+        // set severity of exception
+        // ========================================================================
+        void TuscanyRuntimeException :: setSeverity(severity_level sev)
+        {
+            severity = sev;
+        } // end setSeverity(severity_level sev) const
+        
+        // ========================================================================
+        // set message text associated with exception
+        // ========================================================================
+        void TuscanyRuntimeException :: setMessageText(const char* msg_text)
+        {
+            if (message_text != 0) delete message_text;
+            message_text = new char[strlen(msg_text) + 1];
+            strcpy(message_text,msg_text);
+        } // end setMessageText(const string &msg_text) const
+        
+        // ========================================================================
+        // set location of most recent throw/handling of the exception
+        // ========================================================================
+        void TuscanyRuntimeException :: setLocation(const char* file,    
+            unsigned long line,       
+            const char* function)
+        {
+            if (location_set < num_locations)
+            {
+                locations[location_set].file = new char[strlen(file) + 1];
+                strcpy(locations[location_set].file,file);
+                locations[location_set].line = line;
+                locations[location_set].function = new char[strlen(function) + 1];
+                strcpy(locations[location_set].function,function);
+                
+                location_set++;
+            }
+        } // end setLocation()
+        
+        
+        // ========================================================================
+        // print self
+        // ========================================================================
+        ostream& TuscanyRuntimeException :: PrintSelf(ostream &os) const
+        { 
+            
+            os << "Exception object :" << endl;
+            os << " class:           " << class_name << endl;
+            os << " description:     " << message_text << endl;
+            if (location_set != 0)
+            {
+                os << " file name:       " << locations[0].file << endl;
+                char lineNumber[100];
+                sprintf(lineNumber, "%lu",locations[0].line);
+                os << " line number:     " << lineNumber << endl;
+                os << " function:        " << locations[0].function << endl;
+                os << " location history:" << endl;
+                
+                int i=1;
+                while (i < location_set)
+                {
+                    os << "  " <<  i << ")" << endl;
+                    os << "   file:          " << locations[i].file << endl;
+                    os << "   line:          " << locations[i].line << endl;
+                    os << "   function:      " << locations[i].function << endl;
+                    i++;
+                }
+            }
+            return os;
+        } // end ostream operator <<
+        
+        // ========================================================================
+        // ostream operator <<
+        // ========================================================================
+        SCA_API ostream& operator<< (ostream &os, const TuscanyRuntimeException &except)
+        {
+            return except.PrintSelf(os);
+        } // end ostream operator <<
+        
+        
+    } // End namespace sca
+} // End namespace tuscany

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Exceptions.h Tue Aug 29 13:03:17 2006
@@ -1,47 +1,186 @@
 /*
- *
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
-/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
-
 #ifndef tuscany_sca_util_exceptions_h
 #define tuscany_sca_util_exceptions_h
 
-#include "osoa/sca/ServiceRuntimeException.h"
-using osoa::sca::ServiceRuntimeException;
+
+#include "tuscany/sca/export.h"
+
+#include <ostream>
+
 
 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 ServiceRuntimeException
+        class SCA_API SystemConfigurationException: public TuscanyRuntimeException
         {
         public:
             SystemConfigurationException(const char* msg)
-                : ServiceRuntimeException("SystemConfigurationException", Severe,
+                : TuscanyRuntimeException("SystemConfigurationException", Severe,
                 msg)
             {
             }
         private:
         };
-
         
     } // End namespace sca
 } // End namespace tuscany

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp Tue Aug 29 13:03:17 2006
@@ -69,7 +69,7 @@
         {
             if (size() <= index)
             {
-                throw ServiceRuntimeException("Files::operator[] index out of bounds");
+                throw TuscanyRuntimeException("Files::operator[] index out of bounds");
             }
             
             FILES::iterator iter = files.begin();

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp Tue Aug 29 13:03:17 2006
@@ -24,7 +24,6 @@
 #include "tuscany/sca/util/Utils.h"
 #include "tuscany/sca/util/Exceptions.h"
 #include "tuscany/sca/util/Logging.h"
-using namespace osoa::sca;
 
 namespace tuscany
 {
@@ -111,7 +110,7 @@
             {
                 LOGERROR_1(1, "Library::load: Unable to load library %s", name.c_str());
                 msg = "Unable to load library: " + name;
-                throw ServiceRuntimeException(msg.c_str());
+                throw TuscanyRuntimeException(msg.c_str());
             }    
         }
         

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.h Tue Aug 29 13:03:17 2006
@@ -19,7 +19,7 @@
 
 #ifndef tuscany_sca_util_library_h
 #define tuscany_sca_util_library_h
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 
 #if defined(WIN32)  || defined (_WINDOWS)
 #include <windows.h> 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/LogWriter.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/LogWriter.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/LogWriter.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/LogWriter.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_util_logwriter_h
 #define tuscany_sca_util_logwriter_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 
 namespace tuscany
 {

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Logger.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Logger.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Logger.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Logger.h Tue Aug 29 13:03:17 2006
@@ -20,7 +20,7 @@
 #ifndef tuscany_sca_util_logger_h
 #define tuscany_sca_util_logger_h
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 #include "tuscany/sca/util/LogWriter.h"
 namespace tuscany
 {

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h?rev=438185&r1=438184&r2=438185&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h Tue Aug 29 13:03:17 2006
@@ -23,7 +23,7 @@
 using std::string;
 #include "commonj/sdo/SDO.h"
 
-#include "osoa/sca/export.h"
+#include "tuscany/sca/export.h"
 
 namespace tuscany
 {

Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp Tue Aug 29 13:03:17 2006
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/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 char* referenceName)
+        {
+            LOGENTRY(1, "ComponentContext::getService");
+            void* service = impl->getService(referenceName);
+            LOGEXIT(1, "ComponentContext::getService");
+            return service;
+        }
+        
+        // ===========
+        // getServices
+        // ===========
+        ServiceList ComponentContext::getServices(const char* referenceName)
+        {
+            return impl->getServices(referenceName);
+        }
+        
+        // ============
+        // getProperties
+        // =============
+        DataObjectPtr ComponentContext::getProperties()
+        {
+            LOGENTRY(1, "ComponentContext::getProperties");
+            DataObjectPtr properties = impl->getProperties();
+            LOGEXIT(1, "ComponentContext::getProperties");
+            return properties;
+        }
+
+        // ============
+        // getDataFactory
+        // =============
+        DataFactoryPtr ComponentContext::getDataFactory()
+        {
+            LOGENTRY(1, "ComponentContext::getDataFactory");
+            DataFactoryPtr dataFactory = impl->getDataFactory();
+            LOGEXIT(1, "ComponentContext::getDataFactory");
+            return dataFactory;
+        }
+
+        
+    } // End namespace sca
+} // End namespace osoa

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h Tue Aug 29 13:03:17 2006
@@ -0,0 +1,111 @@
+/*
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR 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 "osoa/sca/ServiceList.h"
+#include "commonj/sdo/SDO.h"
+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 char* referenceName);
+
+            /** 
+             * Resolve a reference name into a list of configured services.
+             * @param referenceName The reference to be resolved. This must match
+             * the name of a reference configured in the component type file for
+             * this component.
+             */
+            virtual ServiceList getServices(const char* referenceName);
+
+            /** 
+             * Get the configured properties for the component.
+             * @return A data object representing all the properties that
+             * are configured for this component.
+             */
+            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

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ComponentContext.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp Tue Aug 29 13:03:17 2006
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/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 char* 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

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h Tue Aug 29 13:03:17 2006
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 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 char* 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

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/CompositeContext.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp Tue Aug 29 13:03:17 2006
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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/ServiceList.h"
+
+#include "osoa/sca/ServiceRuntimeException.h"
+
+namespace osoa
+{
+    namespace sca
+    {
+        // ===========
+        // Constructor
+        // ===========
+        ServiceList::ServiceList(unsigned int numTargets)
+            : maxServices(numTargets), numServices(0)
+        {
+            services = new void*[numTargets];
+        }
+        
+        // ==========================================
+        // Copy comstructor: create new service array
+        // ==========================================
+        ServiceList::ServiceList(const ServiceList& sl)
+            : maxServices(sl.maxServices), numServices(sl.numServices)
+        {
+            services = new void*[maxServices];
+            for (unsigned int i=0; i<numServices; i++)
+            {
+                services[i] = sl.services[i];
+            }
+        }
+        
+        // ===================================
+        // operator=: create new service array
+        // ===================================
+        ServiceList& ServiceList::operator=(const ServiceList& sl)
+        {
+            if (this != &sl)
+            {
+                maxServices = sl.maxServices;
+                numServices = sl.numServices;
+                
+                services = new void*[maxServices];
+                for (unsigned int i=0; i<numServices; i++)
+                {
+                    services[i] = sl.services[i];
+                }
+            }
+            return *this;
+        }
+        
+        // ==========
+        // Destructor
+        // ==========
+        ServiceList::~ServiceList()
+        {
+            delete [] services;
+        }
+
+        // =================================
+        // operator[]: return service at pos
+        // =================================
+        void* ServiceList::operator[] (unsigned int pos)
+        {
+            if (pos < numServices)
+            {
+                return services[pos];
+            }
+            else
+            {
+                throw ServiceRuntimeException("ServiceList: index out of bounds");
+            }
+        }
+
+        // ====================================
+        // addService: add service to the array
+        // ====================================
+        void ServiceList::addService(void* service)
+        {
+            if (numServices < maxServices)
+            {
+                services[numServices] = service;
+                numServices++;
+            }
+        }
+        
+    } // End namespace sca
+} // End namespace osoa

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.cpp
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h?rev=438185&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h Tue Aug 29 13:03:17 2006
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT 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 osoa_sca_servicelist_h
+#define osoa_sca_servicelist_h
+
+#include "osoa/sca/export.h"
+
+namespace tuscany
+{
+    namespace sca
+    {
+
+        namespace cpp
+        {
+            class ComponentContextImpl;
+        }
+    }
+}
+
+namespace osoa
+{
+    namespace sca
+    {
+
+        /**
+         * Holds a list of services that can be accessed from an SCA
+         * component. Each entry can be cast to the business interface
+         * of the target component. All the entries will be of the
+         * same type.
+         */
+        class SCA_CPP_API ServiceList  
+        {
+        
+        public:
+            /**
+             * Return the number of services in the list.
+             * @return Number of services.
+             */
+            unsigned int size() {return numServices;}
+
+            /**
+             * Return the service at this position.
+             */
+            void* operator[] (unsigned int pos);
+
+            ServiceList(const ServiceList& serviceList);
+            ServiceList& operator=(const ServiceList& serviceList);
+            virtual ~ServiceList();
+            
+        private:
+        
+            //TODO Should remove this dependency on the implementation
+            friend class tuscany::sca::cpp::ComponentContextImpl;
+
+            /**
+             * Create a new service list with the known number of 
+             * target services. Once created, the service list can only
+             * have services added to it up to the number of targets
+             * specified on this constructor.
+             * @param numTargets Number of target services to be held in this list.
+             */
+            ServiceList(unsigned int numTargets);
+
+            /**
+             * Add a service to this list.
+             */
+            void addService(void* service);
+
+            unsigned int maxServices;
+            unsigned int numServices;
+
+            /** 
+             * Pointer to an array of services. 
+             */
+            void** services;
+                        
+        };
+    } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_servicelist_h

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/osoa/sca/ServiceList.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org