Website Summary Files Commits Branches @commit @diff @stats
path: root / src / List / List.h
diff options
context:
space:
mode:
1 files changed, 27 insertions, 0 deletions
-rw-r--r--src/List/List.h27
diff --git a/src/List/List.h b/src/List/List.h
new file mode 100644
index 0000000..c6f074d
--- /dev/null
+++ b/src/List/List.h
@@ -0,0 +1,27 @@
+#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