aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/Statement.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/diagram/Statement.hpp')
-rw-r--r--src/diagram/Statement.hpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/diagram/Statement.hpp b/src/diagram/Statement.hpp
new file mode 100644
index 0000000..a90e88d
--- /dev/null
+++ b/src/diagram/Statement.hpp
@@ -0,0 +1,60 @@
+/*
+ * Statement.h
+ *
+ * Created on: Nov 23, 2017
+ * Author: naopross
+ */
+
+#ifndef SRC_STATEMENT_H_
+#define SRC_STATEMENT_H_
+
+#include <string>
+
+namespace samb {
+
+
+/* Possible types of statement, according to the NS diagram paper
+ *
+ * PROCESS,
+ * DECISION,
+ * SWITCH,
+ * WHILE,
+ * UNTIL,
+ * SCOPE,
+ * PARALLEL,
+ */
+
+/* this class should behave like a std::list, or a std::map storing the data
+ * with a tree structure, BUT it is not a tree because allows 2 notes to point
+ * at a single node
+ *
+ * Normal Tree: Statements:
+ * A - B - C - D A - B - C - D - G
+ * \ \ /
+ * E - F E - F
+ *
+ * Because a statement contains branching elmeents. (if / switch)
+ */
+class Statement {
+private:
+ Statement *next;
+ Statement *prev;
+
+public:
+ const enum Type {
+ PROCESS,
+ DECISION,
+ SWITCH,
+ WHILE,
+ UNTIL,
+ SCOPE,
+ PARALLEL,
+ } m_type;
+
+ Statement(Type type, Statement *prev): m_type(type), m_prev(prev);
+ virtual ~Statement();
+};
+
+} /* namespace samb */
+
+#endif /* SRC_STATEMENT_H_ */