Website Summary Files Commits Branches @commit @diff @stats
path: root / src / List / List.h
blob: 0f256e5c0b99dd8f47706291f1e3b731bf1e5878 (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
#ifndef HEADER_LIST
#define HEADER_LIST

template <class T>
class List {
	T* elements;
	unsigned length;
	unsigned count;

	void resize();
	void free();
	void copyFrom(const List& other);

public:
	void add(const T& element);
	bool removeAt(unsigned index);
	T& operator[](unsigned index);

	List();
	List& operator=(const List& other);
	List(const List& other);
	~List();

	List(List&& other);
	List& operator=(List&& other);
};

#endif