Website Summary Files Commits Branches @commit @diff @stats
path: root / List / OrderedList.h
diff options
context:
space:
mode:
Commitaa8b39d1ea473224ab7b52aaf580201fbc1dfbbf (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-02 22:00:43 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-02 22:00:43 +0300
Files86facbad2cea98d40f01359cbecc0971caabb519 /List/OrderedList.h
FMI-OOP-P1_TicketSystem-aa8b39d1ea473224ab7b52aaf580201fbc1dfbbf.tar
FMI-OOP-P1_TicketSystem-aa8b39d1ea473224ab7b52aaf580201fbc1dfbbf.tar.gz
FMI-OOP-P1_TicketSystem-aa8b39d1ea473224ab7b52aaf580201fbc1dfbbf.zip
Parent71a17770e7d20b60bb17542c8dc08bf052a446cc (diff)
Autocommit at 02.05.2022 @ 22:00
1 files changed, 16 insertions, 0 deletions
-rw-r--r--List/OrderedList.h16
diff --git a/List/OrderedList.h b/List/OrderedList.h
new file mode 100644
index 0000000..22f05df
--- /dev/null
+++ b/List/OrderedList.h
@@ -0,0 +1,16 @@
+#ifndef HEADER_ORDEREDLIST
+#define HEADER_ORDEREDLIST
+
+#include "List.h"
+
+template <class T>
+class OrderedList : public List<T> {
+public:
+ void add(const T& element) = delete;
+ bool insertAt(const T& element, unsigned index) = delete;
+
+ bool insert(const T& element);
+ // unsigned findIndex(const T& element) const; TODO: binary search
+};
+
+#endif