summaryrefslogtreecommitdiff
path: root/src/MemoryData.cpp
blob: fa7f024d9f4c478d5d07b2b4f1c2840b6fbdc570 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "MemoryData.h"
#include <cstring>

MemoryData::Type MemoryData::get_type() const {
	return this->type;
}

MemoryData::MemoryData() : type(TNone) {}

MemoryData* MemoryData::clone() {
	return new MemoryData(*this);
}

Name::Name() : value() {
	this->type = TName;
}

Name::Name(string& str) : value(str) {
	this->type = TName;
}

MemoryData* Name::clone() {
	return new Name(*this);
}

Int::Int(int num) : value(num) {
	this->type = TInt;
}

MemoryData* Int::clone() {
	return new Int(*this);
}

Function::Function(list<string> argNames, int scopeStart, int scopeEnd) : argumentNames(argNames), scopeStart(scopeStart), scopeEnd(scopeEnd) {
	this->type = TFunc;
}

MemoryData* Function::clone() {
	return new Function(*this);
}