From b0f046461b44a0c4002ea667a726403ff4a1a701 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 4 May 2022 10:58:48 +0300 Subject: Moved templated stuff into hpp files and added a blank main.cpp file --- src/List/List.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/List/List.h (limited to 'src/List/List.h') diff --git a/src/List/List.h b/src/List/List.h deleted file mode 100644 index 23e3ee5..0000000 --- a/src/List/List.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef HEADER_LIST -#define HEADER_LIST - -#include "istream" -#include "ostream" - -template -class List { - T* elements; - unsigned length; - unsigned count; - - void resize(); - void free(); - void copyFrom(const List& other); - -public: - List(const T* elements, unsigned elementsCount); - void add(const T& element); - bool insertAt(const T& element, unsigned index); - bool removeAt(unsigned index); - unsigned findIndex(const T& element) const; - bool contain(const T& element) const; - T& operator[](unsigned index); - const T& operator[](unsigned index) const; - - std::istream& read(std::istream& istr); - std::ostream& write(std::ostream& ostr) const; - - unsigned get_length() const; - unsigned get_count() const; - - List(); - List& operator=(const List& other); - List(const List& other); - ~List(); - - List(List&& other); - List& operator=(List&& other); -}; - -#endif -- cgit v1.3.1-26-gb76a