You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/11/24 08:53:54 UTC
svn commit: r478795 - in /incubator/tuscany/cpp/sca/runtime: core/src/
core/src/tuscany/sca/core/ extensions/cpp/src/
extensions/cpp/src/tuscany/sca/cpp/
Author: jsdelfino
Date: Thu Nov 23 23:53:53 2006
New Revision: 478795
URL: http://svn.apache.org/viewvc?view=rev&rev=478795
Log:
Moved TuscanyRuntime from core to the cpp extension
Added:
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp (with props)
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.h (with props)
Removed:
incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp
incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h
Modified:
incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am
incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/Makefile.am
Modified: incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am?view=diff&rev=478795&r1=478794&r2=478795
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am Thu Nov 23 23:53:53 2006
@@ -32,7 +32,6 @@
tuscany/sca/core/SCARuntime.cpp \
tuscany/sca/core/ServiceProxy.cpp \
tuscany/sca/core/ServiceWrapper.cpp \
-tuscany/sca/core/TuscanyRuntime.cpp \
tuscany/sca/extension/ImplementationExtension.cpp \
tuscany/sca/extension/InterfaceExtension.cpp \
tuscany/sca/extension/ReferenceBindingExtension.cpp \
Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/Makefile.am?view=diff&rev=478795&r1=478794&r2=478795
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/Makefile.am Thu Nov 23 23:53:53 2006
@@ -33,6 +33,7 @@
tuscany/sca/cpp/CPPInterfaceExtension.cpp \
tuscany/sca/cpp/CPPServiceProxy.cpp \
tuscany/sca/cpp/CPPServiceWrapper.cpp \
+tuscany/sca/cpp/TuscanyRuntime.cpp \
tuscany/sca/cpp/model/CPPImplementation.cpp \
tuscany/sca/cpp/model/CPPInterface.cpp \
tuscany/sca/cpp/model/CPPReferenceBinding.cpp \
Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp?view=auto&rev=478795
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp Thu Nov 23 23:53:53 2006
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR 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/TuscanyRuntime.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace cpp
+ {
+
+ // ===================================================================
+ // Constructor for the TuscanyRuntime class.
+ // ===================================================================
+ TuscanyRuntime::TuscanyRuntime(const string& componentName, const string& root, const string& path)
+ {
+ logentry();
+ setSystemRoot(root);
+ setSystemPath(path);
+ setDefaultComponentName(componentName);
+ }
+
+ // ===================================================================
+ // Destructor for the TuscanyRuntime class.
+ // ===================================================================
+ TuscanyRuntime::~TuscanyRuntime()
+ {
+ logentry();
+ }
+
+ // ==========================================================
+ // Set the system configuration root path
+ // ==========================================================
+ void TuscanyRuntime::setSystemRoot(const string& root)
+ {
+ logentry();
+ systemRoot = root;
+ loginfo("System root: %s", root.c_str());
+ }
+
+ // ==========================================================
+ // Set the search path for composites
+ // ==========================================================
+ void TuscanyRuntime::setSystemPath(const string& path)
+ {
+ logentry();
+ systemPath = path;
+ loginfo("System path: %s", path.c_str());
+ }
+
+ // ==========================================================
+ // Set the default component name
+ // ==========================================================
+ void TuscanyRuntime::setDefaultComponentName(const string& componentName)
+ {
+ logentry();
+ defaultComponentName = componentName;
+ loginfo("Default component name: %s", componentName.c_str());
+ }
+
+ // ===================================================================
+ // Start the runtime.
+ // ===================================================================
+ void TuscanyRuntime::start()
+ {
+ logentry();
+ SCARuntime::setSystemRoot(systemRoot);
+ SCARuntime::setSystemPath(systemPath);
+ SCARuntime::setDefaultComponentName(defaultComponentName);
+ SCARuntime::getInstance();
+ }
+
+ // ===================================================================
+ // Stop the runtime.
+ // ===================================================================
+ void TuscanyRuntime::stop()
+ {
+ logentry();
+ SCARuntime::releaseInstance();
+ }
+
+ } // End namespace cpp
+ } // End namespace sca
+} // End namespace tuscany
Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.h?view=auto&rev=478795
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.h (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.h Thu Nov 23 23:53:53 2006
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR 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_tuscanyruntime_h
+#define tuscany_sca_cpp_tuscanyruntime_h
+
+#include "tuscany/sca/export.h"
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace cpp
+ {
+
+ /**
+ * A singleton which represents the executing SCA runtime.
+ */
+ class SCA_API TuscanyRuntime
+ {
+ public:
+ /**
+ * Default constructor
+ */
+ TuscanyRuntime(const string& defaultComponentName = "",
+ const string& root = "", const string& path = "");
+
+ /**
+ * Destructor
+ */
+ virtual ~TuscanyRuntime();
+
+
+ /**
+ * Set the system root configuration path
+ * @param root The path to the system configuration.
+ */
+ void setSystemRoot(const string& root);
+
+ /**
+ * Set the system composite search path
+ * @param root The search path for composites.
+ */
+ void setSystemPath(const string& path);
+
+ /**
+ * Set the default component for the system
+ * @param componentName The name of the default component.
+ */
+ void setDefaultComponentName(const string& componentName);
+
+ /**
+ * start the runtime
+ */
+ void start();
+
+ /**
+ * stop the runtime
+ */
+ void stop();
+
+
+ private:
+ string systemRoot;
+ string systemPath;
+ string defaultComponentName;
+ };
+
+ } // End namespace cpp
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_cpp_tuscanyruntime_h
Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/runtime/extensions/cpp/src/tuscany/sca/cpp/TuscanyRuntime.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