aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/BranchStatement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/diagram/BranchStatement.cpp')
-rw-r--r--src/diagram/BranchStatement.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/diagram/BranchStatement.cpp b/src/diagram/BranchStatement.cpp
new file mode 100644
index 0000000..d960ef9
--- /dev/null
+++ b/src/diagram/BranchStatement.cpp
@@ -0,0 +1,23 @@
+/*
+ * BranchStatement.cpp
+ *
+ * Created on: Nov 28, 2017
+ * Author: naopross
+ */
+
+#include "BranchStatement.hpp"
+
+namespace samb {
+
+BranchStatement::BranchStatement(Type t, const std::string& condition, pointer next): Statement(t, condition, next) {
+ switch (t) {
+ case Statement::Type::DECISION:
+ case Statement::Type::SWITCH:
+ break;
+
+ default:
+ throw std::invalid_argument("BranchStatement can only be of type DECISION or SWITCH");
+ }
+}
+
+} /* namespace samb */