aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/Statement.cpp
blob: 60be0940c07315636f2aac6fc1f4e36bf2fe87c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Statement.cpp
 *
 *  Created on: Nov 23, 2017
 *      Author: naopross
 */

#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 */