aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/branch.cpp
blob: ccb17de0bd2bfa603b9f4631b5788f66b2cb0be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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");
    }
}