diff options
author | Peter Karlitschek | 2012-08-24 09:50:30 +0000 |
---|---|---|
committer | Peter Karlitschek | 2012-08-24 09:50:30 +0000 |
commit | a7b552130d968124bbb54c5a80b2fb0fec431e91 (patch) | |
tree | e539c41534d09c9b99e5caacd30c29fd425e5c5c /runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h | |
parent | 679e0c2c17c0044448910fcf16359fd9d38693da (diff) | |
download | org.eclipse.etrice-a7b552130d968124bbb54c5a80b2fb0fec431e91.tar.gz org.eclipse.etrice-a7b552130d968124bbb54c5a80b2fb0fec431e91.tar.xz org.eclipse.etrice-a7b552130d968124bbb54c5a80b2fb0fec431e91.zip |
cpp runtime continued
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h')
-rw-r--r-- | runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h new file mode 100644 index 000000000..a18c71868 --- /dev/null +++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h @@ -0,0 +1,41 @@ +/*
+ * MessageDispatcher.h
+ *
+ * Created on: 22.08.2012
+ * Author: karlitsc
+ */
+
+#ifndef MESSAGEDISPATCHER_H_
+#define MESSAGEDISPATCHER_H_
+
+#include "common/messaging/IMessageReceiver.h"
+#include "common/messaging/IRTObject.h"
+#include "common/messaging/RTObject.h"
+#include <map>
+#include <string>
+
+namespace etRuntime {
+
+class MessageDispatcher : public RTObject, public IMessageReceiver {
+public:
+ virtual ~MessageDispatcher();
+ MessageDispatcher(IRTObject* parent, Address addr, std::string name);
+ void addMessageReceiver(IMessageReceiver& receiver);
+ void receive(Message* msg);
+ Address getAddress() { return m_address; };
+
+private:
+ std::map<int, IMessageReceiver*> m_local_map;
+ std::map<int, IMessageReceiver*> m_thread_map;
+ std::map<int, IMessageReceiver*> m_node_map;
+ Address m_address;
+
+ MessageDispatcher();
+ MessageDispatcher(const MessageDispatcher& right);
+ MessageDispatcher& operator=(const MessageDispatcher& right);
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGEDISPATCHER_H_ */
+
+
|