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/statement.hpp | 67 ------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 include/diagram/statement.hpp (limited to 'include/diagram/statement.hpp') diff --git a/include/diagram/statement.hpp b/include/diagram/statement.hpp deleted file mode 100644 index ab8c5b7..0000000 --- a/include/diagram/statement.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Statement.h - * - * Created on: Nov 23, 2017 - * Author: naopross - */ - -#ifndef SRC_DIAGRAM_STATEMENT_H_ -#define SRC_DIAGRAM_STATEMENT_H_ - -#include -#include - -namespace samb { - -/* Possible types of statement, according to the NS diagram paper - * - * PROCESS : a statement that does something - * SCOPE : simple scope to isolate variables - * DECISION : splits the program in 2 branches based on a condition - * SWITCH : splits the program in n branches depending on a value - * WHILE : check first loop - * UNTIL : check last loop - * PARALLEL : parallel operations - */ - -/* This struct is a statement (link) of the iterable object Scope - * (linked list), that is also a common interface for the various types of - * statements. - */ -class Statement { -public: - using pointer = std::shared_ptr; - - enum Type { - PROCESS, - SCOPE, - DECISION, - SWITCH, - WHILE, - UNTIL, - PARALLEL, - }; - - const Type type; - - Statement(Type t, const std::string& text); - Statement(Type t, const std::string& text, pointer next); - virtual ~Statement(); - - bool operator==(const Statement& other) const; - - /* accessors */ - void next(pointer next) { m_next = next; } - pointer next() const { return m_next; } - - void text(const std::string& text) { m_text = text; } - const std::string& text() const { return m_text; } - -private: - std::string m_text; - pointer m_next; -}; - -} /* namespace samb */ - -#endif /* SRC_DIAGRAM_STATEMENT_H_ */ -- cgit v1.2.1