aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/BranchStatement.cpp
blob: 6345c1bc2fa72036bf5f9a0fe7b33a24c7249252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * BranchStatement.cpp
 *
 *  Created on: Nov 28, 2017
 *      Author: naopross
 */

#include "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");
    }
}