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

#include "IteratorStatement.hpp"

namespace samb {

IteratorStatement::IteratorStatement(Statement::Type t, const std::string& condition, Statement::pointer next)
	: Statement(t, condition, next), m_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");
	}
}

} /* namespace samb */