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/scope.hpp | 59 ----------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 include/diagram/scope.hpp (limited to 'include/diagram/scope.hpp') diff --git a/include/diagram/scope.hpp b/include/diagram/scope.hpp deleted file mode 100644 index bf85759..0000000 --- a/include/diagram/scope.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Created on: Nov 28, 2017 - * Author: naopross - */ - -#ifndef SRC_DIAGRAM_SCOPE_HPP_ -#define SRC_DIAGRAM_SCOPE_HPP_ - -#include "Statement.hpp" - -namespace samb { - -/* The Scope is a forward-iterable object that contains statements. - * A scope is also a valid type of statement. - * - * The Scope object is used inside other complex types of statements such as - * BranchStatement or a IteratorStatement, to hold the statements within their - * scope. - */ -class Scope : public Statement { -public: - class iterator { - public: - explicit iterator(pointer statement); - ~iterator(); - - iterator& operator++(); - iterator& operator++(int); - - Statement& operator*() const; - Statement::pointer operator->() const; - - private: - Statement::pointer m_current; - }; - - explicit Scope(std::string label); - Scope(std::string label, Statement::pointer first); - ~Scope(); - - iterator insert_after(iterator it, Statement::pointer statement); - iterator erase_after(iterator it); - - /* accessors */ - std::size_t size() const { return m_size; } - - /* iterator */ - iterator begin() { return iterator(m_head); } - iterator end() { return iterator(m_tail); } - -private: - Statement::pointer m_head; - Statement::pointer m_tail; - std::size_t m_size = 0; -}; - -} /* namespace samb */ - -#endif /* SRC_DIAGRAM_SCOPE_HPP_ */ -- cgit v1.2.1