summaryrefslogtreecommitdiff
path: root/Source/Kernel/Library/Vector.class.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/Library/Vector.class.h')
-rw-r--r--Source/Kernel/Library/Vector.class.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/Kernel/Library/Vector.class.h b/Source/Kernel/Library/Vector.class.h
new file mode 100644
index 0000000..9763d2c
--- /dev/null
+++ b/Source/Kernel/Library/Vector.class.h
@@ -0,0 +1,35 @@
+#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, T value);
+ Vector(const Vector<T> &other);
+ ~Vector();
+
+ T& operator[] (u32int index);
+
+ void push(T element);
+ //void push(T& element);
+ void pop();
+
+ T& back();
+ T& front();
+
+ u32int size();
+ bool empty();
+ void clear();
+};
+
+#include "Vector.class.cpp"
+
+#endif