aboutsummaryrefslogtreecommitdiffstats
path: root/include/diagram/scope.h
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-12-19 01:54:28 +0100
committerNao Pross <naopross@thearcway.org>2017-12-19 01:54:28 +0100
commita7e74749a1c4edb2f8bc34c79e9bd1562de86ee9 (patch)
tree4282a5dfa9ef7d77823e3e8ef02a193c91e719d6 /include/diagram/scope.h
parentMoved to QtCreator project with QMake (diff)
downloadOrbitingYeti-a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9.tar.gz
OrbitingYeti-a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9.zip
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
Diffstat (limited to '')
-rw-r--r--include/diagram/scope.h (renamed from include/diagram/scope.hpp)34
1 files changed, 16 insertions, 18 deletions
diff --git a/include/diagram/scope.hpp b/include/diagram/scope.h
index bf85759..63698dd 100644
--- a/include/diagram/scope.hpp
+++ b/include/diagram/scope.h
@@ -1,12 +1,9 @@
-/*
- * Created on: Nov 28, 2017
- * Author: naopross
- */
+#ifndef DIAGRAM_SCOPE_H
+#define DIAGRAM_SCOPE_H
-#ifndef SRC_DIAGRAM_SCOPE_HPP_
-#define SRC_DIAGRAM_SCOPE_HPP_
+#include "diagram/statement.h"
-#include "Statement.hpp"
+#include <QString>
namespace samb {
@@ -17,7 +14,8 @@ namespace samb {
* BranchStatement or a IteratorStatement, to hold the statements within their
* scope.
*/
-class Scope : public Statement {
+class Scope : public Statement
+{
public:
class iterator {
public:
@@ -31,27 +29,27 @@ public:
Statement::pointer operator->() const;
private:
- Statement::pointer m_current;
+ Statement::pointer _current;
};
- explicit Scope(std::string label);
- Scope(std::string label, Statement::pointer first);
- ~Scope();
+ explicit Scope(const QString &label);
+ Scope(const QString &label, Statement::pointer first);
+ virtual ~Scope();
iterator insert_after(iterator it, Statement::pointer statement);
iterator erase_after(iterator it);
/* accessors */
- std::size_t size() const { return m_size; }
+ std::size_t size() const { return _size; }
/* iterator */
- iterator begin() { return iterator(m_head); }
- iterator end() { return iterator(m_tail); }
+ iterator begin() { return iterator(_head); }
+ iterator end() { return iterator(_tail); }
private:
- Statement::pointer m_head;
- Statement::pointer m_tail;
- std::size_t m_size = 0;
+ Statement::pointer _head;
+ Statement::pointer _tail;
+ std::size_t _size = 0;
};
} /* namespace samb */