Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h')
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h
new file mode 100644
index 000000000..d99acda28
--- /dev/null
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h
@@ -0,0 +1,44 @@
+/*
+ * MessageSeQueue.h
+ *
+ * Created on: 22.08.2012
+ * Author: karlitsc
+ */
+
+#ifndef MESSAGESEQUEUE_H_
+#define MESSAGESEQUEUE_H_
+
+#include "common/messaging/RTObject.h"
+#include <string>
+#include "common/messaging/Message.h"
+
+namespace etRuntime {
+
+class MessageSeQueue: public RTObject {
+public:
+ MessageSeQueue(IRTObject* parent, std::string name);
+ virtual ~MessageSeQueue();
+
+ void push(Message* msg);
+ Message* pop();
+
+ long getSize() const {return m_size; }
+ Message* getFirst() const {return m_first; }
+ Message* getLast() const { return m_last; }
+ boolean isNotEmpty() const { return m_last != 0; }
+ long getHightWaterMark() const { return m_highWaterMark; }
+
+private:
+ Message* m_first;
+ Message* m_last;
+ long m_highWaterMark;
+ long m_size;
+
+ MessageSeQueue();
+ MessageSeQueue(const MessageSeQueue& right);
+ MessageSeQueue& operator=(const MessageSeQueue& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGESEQUEUE_H_ */

Back to the top