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/classOrderedList.html | 287 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 docs/html/classOrderedList.html (limited to 'docs/html/classOrderedList.html') diff --git a/docs/html/classOrderedList.html b/docs/html/classOrderedList.html new file mode 100644 index 0000000..d3d44d3 --- /dev/null +++ b/docs/html/classOrderedList.html @@ -0,0 +1,287 @@ + + + + + + + +FMI Ticket System: OrderedList< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
OrderedList< T > Class Template Reference
+
+
+ +

Inherits List, but contains it's elements in a sorted manner. + More...

+ +

#include <OrderedList.hpp>

+
+Inheritance diagram for OrderedList< T >:
+
+
+ + +List< T > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+ OrderedList (const T *elements, unsigned elementsCount)
 
void add (T element)=delete
 
void insertAt (T element, unsigned index)=delete
 
void insert (T element)
 Inserts an element at a sorted position. More...
 
- Public Member Functions inherited from List< T >
+ List (const T *elements, unsigned elementsCount)
 Copies all elements in given array.
 
void add (const T &element)
 Adds an element. More...
 
void insertAt (const T &element, unsigned index)
 Inserts element at given index. More...
 
bool removeAt (unsigned index)
 Removes element at index. More...
 
unsigned findIndex (const T &element) const
 Finds the index of element. More...
 
bool contain (const T &element) const
 
+T & operator[] (unsigned index)
 Returns reference to element at index.
 
+const T & operator[] (unsigned index) const
 Returns constant reference to element at index.
 
+List< T > & operator+= (const List< T > other)
 Appends elements from other list.
 
std::istream & read (std::istream &istr)
 Reads from stream. More...
 
std::ostream & write (std::ostream &ostr) const
 Writes to stream. More...
 
unsigned get_length () const
 Returns the length. More...
 
unsigned get_count () const
 Returns the count. More...
 
+List & operator= (const List &other)
 
+ List (const List &other)
 
+ List (List &&other)
 
+List & operator= (List &&other)
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from List< T >
+void resize ()
 
+void free ()
 
+void copyFrom (const List &other)
 
- Protected Attributes inherited from List< T >
+T * elements
 
+unsigned length
 
+unsigned count
 
+

Detailed Description

+
template<typename T>
+class OrderedList< T >

Inherits List, but contains it's elements in a sorted manner.

+
Warning
Outside those defined in List, insert() requires the type to have defined a "compare" of functions.
+
See also
insert()
+

Member Function Documentation

+ +

◆ add()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
void OrderedList< T >::add (T element)
+
+delete
+
+
Warning
Function is deleted, use insert() instead
+
See also
insert()
+ +
+
+ +

◆ insert()

+ +
+
+
+template<typename T >
+ + + + + + + + +
void OrderedList< T >::insert (T element)
+
+ +

Inserts an element at a sorted position.

+
Warning
The function depends on the type having a function "compare" defined, which takes two elements and returns a number <0 if elem1 < elem2, >0 if elem1 > elem2, 0 if elem1 == elem2
+
Note
Insertion is done linearly
+ +
+
+ +

◆ insertAt()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void OrderedList< T >::insertAt (T element,
unsigned index 
)
+
+delete
+
+
Warning
Function is deleted, use insert() instead
+
See also
insert()
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + -- cgit v1.3.1-26-gb76a