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.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/diagram/branchstatement.cpp b/src/diagram/branchstatement.cpp
new file mode 100644
index 0000000..2835f35
--- /dev/null
+++ b/src/diagram/branchstatement.cpp
@@ -0,0 +1,14 @@
+#include "diagram/BranchStatement.hpp"
+
+using 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");
+ }
+}