diff options
Diffstat (limited to '')
-rw-r--r-- | src/diagram/Statement.cpp | 15 |
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 */ |