summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Karlitschek2012-09-26 08:28:51 (EDT)
committerPeter Karlitschek2012-09-26 08:28:51 (EDT)
commit563d71a5db3323080b62b36df23a11b77357a8a9 (patch)
tree9c2dc0d7ea0faeabc65c6187a37d8c5de6a296fd
parent0118d2fdeceec08236f7dc34a953d55e15228bb6 (diff)
downloadorg.eclipse.etrice-563d71a5db3323080b62b36df23a11b77357a8a9.zip
org.eclipse.etrice-563d71a5db3323080b62b36df23a11b77357a8a9.tar.gz
org.eclipse.etrice-563d71a5db3323080b62b36df23a11b77357a8a9.tar.bz2
c++ runtime first compiling version!refs/changes/35/8135/1
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/.cproject8
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h6
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp2
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp2
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h6
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h3
8 files changed, 15 insertions, 16 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/.cproject b/runtime/org.eclipse.etrice.runtime.cpp/.cproject
index 36d6f4e..ef22199 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/.cproject
+++ b/runtime/org.eclipse.etrice.runtime.cpp/.cproject
@@ -9,7 +9,7 @@
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.cpp"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.cpp/Debug"/>
- <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.cpp" srcPrefixMapping="" srcRootPath=""/>
+ <entry flags="RESOLVED" kind="libraryFile" name="etriceRuntimeCpp" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
@@ -19,7 +19,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
+ <configuration artifactExtension="a" artifactName="etriceRuntimeCpp" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.debug.1964804313" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.debug.1363258846" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.debug"/>
@@ -115,6 +115,8 @@
<resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.cpp"/>
</configuration>
</storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176;cdt.managedbuild.config.gnu.mingw.lib.debug.878140176.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug.1516705340;cdt.managedbuild.tool.gnu.cpp.compiler.input.834970834">
@@ -130,6 +132,4 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h
index 0095f8c..e48f552 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h
@@ -21,7 +21,7 @@ public:
Address getAddress() const {
return m_address;
}
- virtual ~AbstractMessageReceiver();
+ virtual ~AbstractMessageReceiver() {};
protected:
AbstractMessageReceiver(IRTObject* parent, Address address, std::string name)
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h
index 16fbe75..50dff0f 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h
@@ -19,9 +19,9 @@ public:
IMessageReceiver();
virtual ~IMessageReceiver();
- virtual void receive(Message* msg);
- virtual Address getAddress();
- virtual bool isMsgService() { return false;};
+ virtual void receive(Message* msg) = 0;
+ virtual Address getAddress() const = 0;
+ virtual bool isMsgService() const { return false;};
};
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp
index 901694c..6ea54ed 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp
@@ -160,7 +160,7 @@ void RTSystemServicesProtocolConjPort::stopDebugging() {
//TODO: data type of addr and peerAddress
RTSystemServicesProtocolConjPortRepl::
-RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId, const std::vector<Address>& addr, const std::vector<Address> peerAddress)
+RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId, const std::vector<Address>& addr, const std::vector<Address>& peerAddress)
: m_replication(addr.size()),
m_ports()
{
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h
index 0658393..ef1bf8d 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h
@@ -130,7 +130,7 @@ public:
public:
//TODO: data type of addr and peerAddress
RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
- const std::vector<Address>& addr, const std::vector<Address> peerAddress);
+ const std::vector<Address>& addr, const std::vector<Address>& peerAddress);
int getReplication() const { return m_replication; } ;
RTSystemServicesProtocolConjPort& get(int i) { return m_ports.at(i); };
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp
index dbd5682..95814c9 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp
@@ -28,7 +28,7 @@ ActorClassBase::~ActorClassBase() {
m_RTSystemPort = 0;
}
-bool ActorClassBase::handleSystemEvent(InterfaceItemBase ifitem, int evt, void* generic_data) {
+bool ActorClassBase::handleSystemEvent(const InterfaceItemBase& ifitem, int evt, void* generic_data) {
if (ifitem.getLocalId() != 0) {
return false;
}
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h
index 7beaa54..2a7de72 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h
@@ -25,7 +25,7 @@ public:
std::string toString();
std::string getClassName() const { return m_className; }
void setClassName(std::string className) { m_className = className; }
- Address getAddress() const {
+ virtual Address getAddress() const {
// TODO: Actor should have its own address for services and debugging
return Address(0,0,0);
}
@@ -44,7 +44,7 @@ public:
void startUser() { }
void stopUser() { }
void destroyUser() { }
- void receive(Message msg) { }
+ virtual void receive(Message* msg) { }
int getState() const { return m_state; }
MessageService* getMsgsvc() const { return m_ownMsgsvc; }
@@ -61,7 +61,7 @@ protected:
int m_state;
RTSystemServicesProtocolPort* m_RTSystemPort;
- bool handleSystemEvent(InterfaceItemBase ifitem, int evt, void* generic_data);
+ virtual bool handleSystemEvent(const InterfaceItemBase& ifitem, int evt, void* generic_data);
private:
std::string m_className;
Address m_ownAddr;
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h
index a06aaee..52ebb93 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h
@@ -8,7 +8,6 @@
#ifndef IEVENTRECEIVER_H_
#define IEVENTRECEIVER_H_
-#include "platforms/generic/etDatatypes.h"
#include "common/messaging/IRTObject.h"
namespace etRuntime {
@@ -19,7 +18,7 @@ public:
IEventReceiver();
virtual ~IEventReceiver();
- virtual void receiveEvent(const InterfaceItemBase& ifitem, etInt16 evt, void* data) = 0;
+ virtual void receiveEvent(const InterfaceItemBase& ifitem, int evt, void* data) = 0;
};