Renaming List to more meaningful PointerList.
This commit is contained in:
parent
7050c5586e
commit
015f8ae6d1
12
Nodes.hpp
12
Nodes.hpp
|
@ -41,9 +41,9 @@ public:
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
class List: public std::vector<T*> {
|
class PointerList: public std::vector<T*> {
|
||||||
public:
|
public:
|
||||||
virtual ~List() {
|
virtual ~PointerList() {
|
||||||
for (T *element: *this) {
|
for (T *element: *this) {
|
||||||
delete element;
|
delete element;
|
||||||
}
|
}
|
||||||
|
@ -51,14 +51,14 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class StatementList: public List<Statement>, public Emittable {
|
class StatementList: public PointerList<Statement>, public Emittable {
|
||||||
public:
|
public:
|
||||||
virtual void emit(std::ostream &stream, int indent = 0);
|
virtual void emit(std::ostream &stream, int indent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class ListEmittable: public List<T>, public Emittable {
|
class ListEmittable: public PointerList<T>, public Emittable {
|
||||||
public:
|
public:
|
||||||
virtual void emit(std::ostream &stream, int indent = 0) {
|
virtual void emit(std::ostream &stream, int indent = 0) {
|
||||||
if (this->size() > 0) {
|
if (this->size() > 0) {
|
||||||
|
@ -234,7 +234,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef List<BranchCase> BranchCaseList;
|
typedef PointerList<BranchCase> BranchCaseList;
|
||||||
|
|
||||||
|
|
||||||
class Branch: public Statement {
|
class Branch: public Statement {
|
||||||
|
@ -288,7 +288,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Main> main;
|
std::unique_ptr<Main> main;
|
||||||
List<Function> functions;
|
PointerList<Function> functions;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user