-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinkedlist.h
More file actions
58 lines (50 loc) · 1.03 KB
/
Copy pathlinkedlist.h
File metadata and controls
58 lines (50 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef LINKED_LIST
#define LINKED_LIST
#include <cstddef>
/**
* @brief Abstract Base Class for List Containers
*
* @tparam T Type parameter
*/
template <class T>
class LinkedList {
public:
virtual ~LinkedList() { }
/**
* @brief returns the size of the list container
*
* @return size_t size of the container
*/
virtual size_t Size() const = 0;
/**
* @brief Inserts the item at the front
*
* @param item item to insert
*/
virtual void InsertAtFront(T item) = 0;
/**
* @brief Inserts the item at the back
*
* @param item item to insert
*/
virtual void InsertAtBack(T item) = 0;
/**
* @brief Deletes one item from the front
*
*/
virtual void DeleteAtFront() = 0;
/**
* @brief Deletes one item from the back
*
*/
virtual void DeleteAtBack() = 0;
/**
* @brief Searches for an item
*
* @param item item to search for
* @return true if the item is found
* @return false othwerwise
*/
virtual bool Search(T item) const = 0;
};
#endif