aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/Statement.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-12-18 23:01:33 +0100
committerNao Pross <naopross@thearcway.org>2017-12-18 23:01:33 +0100
commit62bd9aa4da85ef87c4d9a9bb7911f8a4e0ac9986 (patch)
treeb7187831bb1908ad2d34eadf831bf63bfd3343b1 /src/diagram/Statement.hpp
parentAdd mainwindow.ui (diff)
downloadOrbitingYeti-62bd9aa4da85ef87c4d9a9bb7911f8a4e0ac9986.tar.gz
OrbitingYeti-62bd9aa4da85ef87c4d9a9bb7911f8a4e0ac9986.zip
Moved to QtCreator project with QMake
Diffstat (limited to 'src/diagram/Statement.hpp')
-rw-r--r--src/diagram/Statement.hpp67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/diagram/Statement.hpp b/src/diagram/Statement.hpp
deleted file mode 100644
index ab8c5b7..0000000
--- a/src/diagram/Statement.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Statement.h
- *
- * Created on: Nov 23, 2017
- * Author: naopross
- */
-
-#ifndef SRC_DIAGRAM_STATEMENT_H_
-#define SRC_DIAGRAM_STATEMENT_H_
-
-#include <string>
-#include <memory>
-
-namespace samb {
-
-/* Possible types of statement, according to the NS diagram paper
- *
- * PROCESS : a statement that does something
- * SCOPE : simple scope to isolate variables
- * DECISION : splits the program in 2 branches based on a condition
- * SWITCH : splits the program in n branches depending on a value
- * WHILE : check first loop
- * UNTIL : check last loop
- * PARALLEL : parallel operations
- */
-
-/* This struct is a statement (link) of the iterable object Scope
- * (linked list), that is also a common interface for the various types of
- * statements.
- */
-class Statement {
-public:
- using pointer = std::shared_ptr<Statement>;
-
- enum Type {
- PROCESS,
- SCOPE,
- DECISION,
- SWITCH,
- WHILE,
- UNTIL,
- PARALLEL,
- };
-
- const Type type;
-
- Statement(Type t, const std::string& text);
- Statement(Type t, const std::string& text, pointer next);
- virtual ~Statement();
-
- bool operator==(const Statement& other) const;
-
- /* accessors */
- void next(pointer next) { m_next = next; }
- pointer next() const { return m_next; }
-
- void text(const std::string& text) { m_text = text; }
- const std::string& text() const { return m_text; }
-
-private:
- std::string m_text;
- pointer m_next;
-};
-
-} /* namespace samb */
-
-#endif /* SRC_DIAGRAM_STATEMENT_H_ */