aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/BranchStatement.hpp
blob: dacf0604962735c8223fed75bb3e65b259a0a952 (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
26
27
28
29
30
31
32
/*
 * BranchStatement.hpp
 *
 *  Created on: Nov 28, 2017
 *      Author: naopross
 */

#ifndef SRC_DIAGRAM_BRANCHSTATEMENT_HPP_
#define SRC_DIAGRAM_BRANCHSTATEMENT_HPP_

#include "Statement.hpp"

namespace samb {

class BranchStatement: public Statement {
public:
	BranchStatement(Type t, const std::string& condition, pointer next);

	const std::string& condition() const { return text(); }
	void condition(const std::string& condition) { return text(condition); }

	std::vector<std::string> branches();
	std::size_t branchesCount();

private:
	std::map<std::string, pointer> m_branches;
	std::size_t m_branchesCount = 0;
};

} /* namespace samb */

#endif /* SRC_DIAGRAM_BRANCHSTATEMENT_HPP_ */