From 35831ff8dc30c9884a7c3340414f005a0d4ada10 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 12 May 2022 20:21:09 +0300 Subject: Completely reworked documentation --- docs/html/OrderedList_8hpp_source.html | 121 +++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 docs/html/OrderedList_8hpp_source.html (limited to 'docs/html/OrderedList_8hpp_source.html') diff --git a/docs/html/OrderedList_8hpp_source.html b/docs/html/OrderedList_8hpp_source.html new file mode 100644 index 0000000..ea5a0e4 --- /dev/null +++ b/docs/html/OrderedList_8hpp_source.html @@ -0,0 +1,121 @@ + + + + + + + +FMI Ticket System: src/Generic/List/OrderedList.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
OrderedList.hpp
+
+
+Go to the documentation of this file.
1#ifndef HEADER_ORDEREDLIST
+
2#define HEADER_ORDEREDLIST
+
3
+
8#include "List.hpp"
+
9
+
15template <typename T>
+
16class OrderedList : public List<T> {
+
17public:
+ +
19 OrderedList(const T* elements, unsigned elementsCount);
+
20
+
24 void add(T element) = delete;
+
28 void insertAt(T element, unsigned index) = delete;
+
29
+
31 void insert(T element);
+
32};
+
33
+
34template <typename T>
+ +
36
+
37template <typename T>
+
38OrderedList<T>::OrderedList(const T* elements, unsigned elementsCount) : List<T>::List(elements, elementsCount) {}
+
39
+
44template <typename T>
+
45void OrderedList<T>::insert(T element) {
+ +
47
+
48 unsigned insertionInd = 0;
+
49 while (insertionInd < List<T>::count && List<T>::elements[insertionInd].compare(element) < 0)
+
50 insertionInd++;
+
51
+
52 List<T>::insertAt(element, insertionInd);
+
53}
+
54
+
55#endif
+
Stores declaration and definition of templated class List.
+
Templated class that stores an array of elements in dynamic memory.
Definition: List.hpp:22
+
void insertAt(const T &element, unsigned index)
Inserts element at given index.
Definition: List.hpp:132
+
Inherits List, but contains it's elements in a sorted manner.
Definition: OrderedList.hpp:16
+
void insert(T element)
Inserts an element at a sorted position.
Definition: OrderedList.hpp:45
+
void insertAt(T element, unsigned index)=delete
+
void add(T element)=delete
+
+ + + + -- cgit v1.3.1-26-gb76a