Template Class DequeWithLinkedListSTL
Defined in File deque_with_linked_list_stl.h
Class Documentation
-
template<typename T>
class DequeWithLinkedListSTL Deque with STL linked list class with all related functionality.
- Template Parameters:
T – The type of the implementation class.
Public Functions
-
inline void add_first(const T &element)
Adds an element to the front of the deque.
- Parameters:
element – The element to be added.
-
inline void add_last(const T &element)
Adds an element to the back of the deque.
- Parameters:
element – The element to be added.
-
inline T del_first()
Deletes the element at the front of the deque.
- Throws:
std::out_of_range – stating that the “Deque is empty”.
- Returns:
The deleted element from the front.
-
inline T del_last()
Deletes the element at the back of the deque.
- Throws:
std::out_of_range – stating that the “Deque is empty”.
- Returns:
The deleted element from the back.