aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/IteratorStatement.cpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-11-28 15:05:02 +0100
committerNao Pross <naopross@thearcway.org>2017-11-28 15:05:02 +0100
commit12e86e71ca36a58d7e2ed64f0454b65ed6f7eb56 (patch)
tree466f7d2756b0619921e2d9d061862c8443649ed3 /src/diagram/IteratorStatement.cpp
parentUpdate header ifdefs to match and clean up comments (diff)
downloadOrbitingYeti-12e86e71ca36a58d7e2ed64f0454b65ed6f7eb56.tar.gz
OrbitingYeti-12e86e71ca36a58d7e2ed64f0454b65ed6f7eb56.zip
New data structure for Structogram and Statements
Diffstat (limited to 'src/diagram/IteratorStatement.cpp')
-rw-r--r--src/diagram/IteratorStatement.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/diagram/IteratorStatement.cpp b/src/diagram/IteratorStatement.cpp
new file mode 100644
index 0000000..efb5236
--- /dev/null
+++ b/src/diagram/IteratorStatement.cpp
@@ -0,0 +1,25 @@
+/*
+ * IteratorStatement.cpp
+ *
+ * Created on: Nov 28, 2017
+ * Author: naopross
+ */
+
+#include "IteratorStatement.hpp"
+
+namespace samb {
+
+IteratorStatement::IteratorStatement(Statement::Type t, const std::string& condition, Statement::pointer next)
+ : Statement(t, condition, next), m_inner("") {
+
+ switch (t) {
+ case Statement::Type::WHILE:
+ case Statement::Type::UNTIL:
+ break;
+
+ default:
+ throw std::invalid_argument("IteratorStatement can only be of type WHILE or UNTIL");
+ }
+}
+
+} /* namespace samb */