diff options
Diffstat (limited to '')
-rw-r--r-- | src/diagram/BranchStatement.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/diagram/BranchStatement.hpp b/src/diagram/BranchStatement.hpp new file mode 100644 index 0000000..dacf060 --- /dev/null +++ b/src/diagram/BranchStatement.hpp @@ -0,0 +1,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_ */ |