aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/iteratorstatement.cpp
blob: a68234b417eb159e5cb8307a9454c1acf9c0a518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "diagram/iteratorstatement.h"

using namespace samb;

IteratorStatement::IteratorStatement(Statement::Type t, const QString &condition, Statement::pointer next) :
    Statement(t, condition, next),
    _inner("")
{

    switch (t) {
    case Statement::Type::WHILE:
    case Statement::Type::UNTIL:
        break;

    default:
        throw std::invalid_argument("IteratorStatement can only be of type WHILE or UNTIL");
    }
}