-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentry.h
34 lines (29 loc) · 1.03 KB
/
entry.h
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
#ifndef ENTRY_H
#define ENTRY_H
#include <string>
#include <vector>
class Entry {
private:
std::string idName = "";
std::string idType = "";
std::string dType = "";
bool isArray = false;
int arraySize = 0;
short scope;
Entry* nextEntry = nullptr;
public:
Entry(std::string idName, std::string idType, std::string dType, bool isArray, int arraySize, short scope)
: idName(idName), idType(idType), dType(dType), isArray(isArray), arraySize(arraySize), scope(scope){};
void setNext(Entry* entry) { nextEntry = entry; }
std::string getIDName(){ return idName; }
std::string getIDType(){ return idType; }
std::string getDType() { return dType; }
void setIsArray() { this->isArray = true; };
bool getIsArray() { return isArray; }
int getArraySize() { return arraySize; }
short getScope() { return scope; }
Entry* getNext() { return nextEntry; }
void setArray(int size){ isArray = true; arraySize = size; }
std::vector<Entry*> parameters;
};
#endif // ENTRY_H