From a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 19 Dec 2017 01:54:28 +0100 Subject: Change to Qt5 conding conventions Data structure changes: - Structogram is no longer just a scope, because it needs to store metadata - All structures now use QString instead of std::string, to integrate better in the Qt framework New code: - MainWindow ui code, building layout - MetadataDialog to change the metadata stored in the Structogram - Painter is a widget (still unimplemented) to show the structogram on the GUI --- include/diagram/branchstatement.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/diagram/branchstatement.h (limited to 'include/diagram/branchstatement.h') diff --git a/include/diagram/branchstatement.h b/include/diagram/branchstatement.h new file mode 100644 index 0000000..6c5e416 --- /dev/null +++ b/include/diagram/branchstatement.h @@ -0,0 +1,30 @@ +#ifndef DIAGRAM_BRANCHSTATEMENT_H +#define DIAGRAM_BRANCHSTATEMENT_H + +#include "diagram/statement.h" + +#include +#include + +namespace samb { + +class BranchStatement : public Statement +{ +public: + BranchStatement(Type t, const QString &condition, pointer next); + + /* accessors */ + const std::map& branches() const { return _branches; } + std::size_t branches_count() const { return _branchesCount; } + + inline const QString& condition() const { return text(); } + inline void condition(const QString &condition) { return text(condition); } + +private: + std::map _branches; + std::size_t _branchesCount = 0; +}; + +} /* namespace samb */ + +#endif /* DIAGRAM_BRANCHSTATEMENT_H */ -- cgit v1.2.1