summaryrefslogtreecommitdiff
path: root/Source/Kernel/Library/Vector.class.h
blob: ca86c2af75d4bc3daf757044b28c0697bcd57dbb (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
#ifndef DEF_VECTOR_CLASS
#define DEF_VECTOR_CLASS

#include <Core/common.wtf.h>

template <typename T>
class Vector {
	private:
	T *m_data;
	u32int m_size;

	public:
	Vector();
	Vector(u32int size);
	Vector(u32int size, const T& value);
	Vector(const Vector<T> &other);
	Vector<T>& operator= (const Vector<T> &other);
	~Vector();

	T& operator[] (u32int index);
	
	void push(const T& element);
	//void push(T& element);
	void pop();

	T& back();
	T& front();

	u32int size();
	bool empty();
	void clear();
};

#include "Vector.class.cpp"

#endif