From 62bd9aa4da85ef87c4d9a9bb7911f8a4e0ac9986 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 18 Dec 2017 23:01:33 +0100 Subject: Moved to QtCreator project with QMake --- include/diagram/branchstatement.hpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/diagram/branchstatement.hpp (limited to 'include/diagram/branchstatement.hpp') diff --git a/include/diagram/branchstatement.hpp b/include/diagram/branchstatement.hpp new file mode 100644 index 0000000..b7cc495 --- /dev/null +++ b/include/diagram/branchstatement.hpp @@ -0,0 +1,35 @@ +/* + * BranchStatement.hpp + * + * Created on: Nov 28, 2017 + * Author: naopross + */ + +#ifndef SRC_DIAGRAM_BRANCHSTATEMENT_HPP_ +#define SRC_DIAGRAM_BRANCHSTATEMENT_HPP_ + +#include "Statement.hpp" + +#include + +namespace samb { + +class BranchStatement: public Statement { +public: + BranchStatement(Type t, const std::string& condition, pointer next); + + /* accessors */ + const std::map& branches() const { return m_branches; } + std::size_t branchesCount() const { return m_branchesCount; } + + inline const std::string& condition() const { return text(); } + inline void condition(const std::string& condition) { return text(condition); } + +private: + std::map m_branches; + std::size_t m_branchesCount = 0; +}; + +} /* namespace samb */ + +#endif /* SRC_DIAGRAM_BRANCHSTATEMENT_HPP_ */ -- cgit v1.2.1