aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/Statement.cpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-11-26 23:36:26 +0100
committerNao Pross <naopross@thearcway.org>2017-11-26 23:36:26 +0100
commit7f7e6fe30ef4f9ba4507b89174676f57c42c0000 (patch)
treed6fc1ae62972568a1021c940f372903cda57cceb /src/diagram/Statement.cpp
parentFirst commit (diff)
downloadOrbitingYeti-7f7e6fe30ef4f9ba4507b89174676f57c42c0000.tar.gz
OrbitingYeti-7f7e6fe30ef4f9ba4507b89174676f57c42c0000.zip
Implementation for Structogram iterator and Statement type
The interator is not (yet) aware of the scope in which it is iterating.
Diffstat (limited to '')
-rw-r--r--src/diagram/Statement.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/diagram/Statement.cpp b/src/diagram/Statement.cpp
index 75770db..60be094 100644
--- a/src/diagram/Statement.cpp
+++ b/src/diagram/Statement.cpp
@@ -5,8 +5,21 @@
* Author: naopross
*/
-#include "../diagram/Statement.h"
+#include "Statement.hpp"
namespace samb {
+Statement::pointer Statement::makeStatement(Statement::Type t) {
+ return std::make_shared<Statement>(Statement(t, "", nullptr, nullptr));
+}
+
+bool Statement::operator==(const Statement& other) {
+ return (this->type == other.type) && (this->text == other.text) &&
+ (this->next == other.next) && (this->scope == other.scope);
+}
+
+
+Statement::Statement(Type t, std::string txt, Statement::pointer p, Statement::pointer s): type(t), text(txt), next(p), scope(s) {}
+Statement::~Statement() {}
+
} /* namespace samb */