diff options
Diffstat (limited to 'src/diagram/branch.cpp')
-rw-r--r-- | src/diagram/branch.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/diagram/branch.cpp b/src/diagram/branch.cpp new file mode 100644 index 0000000..ccb17de --- /dev/null +++ b/src/diagram/branch.cpp @@ -0,0 +1,16 @@ +#include "diagram/branch.h" + +using namespace samb; + +Branch::Branch(Type t, const QString &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"); + } +} |