14 #ifndef DOUBLE_LINKED_LIST_IMPL_H
15 #define DOUBLE_LINKED_LIST_IMPL_H
23 namespace DoubleLinkedListImpl {
66 throw std::invalid_argument(
"Dereferencing at invalid position");
74 throw std::invalid_argument(
"Dereferencing at invalid position");
86 void swapWithDisjoint(
Node* other);
Implementations of longer template methods of the DoubleLinkedListImpl.h file.
DoubleLinkedList internal Node holding Data.
virtual value_type & operator*()
T value_type
The type of value this Node works on.
virtual bool valid() const
virtual const value_type & operator*() const
virtual ~DataNode()
Destructor for DataNode.
DataNode(const value_type &t, Node< T > *previous=NULL, Node< T > *next=NULL)
Create a DataNode with the given value t, previous and next pointers.
DoubleLinkedList internal Node base class.
virtual const value_type & operator*() const
void moveBefore(Node *other)
Move this node before other by appropriately updating previous and next pointers.
void setPrevious(Node *previous)
Set the Node sequentially before this Node, or NULL for none.
void setNext(Node *next)
Set the Node sequentially after this Node, or NULL for none.
Node(Node *previous=NULL, Node *next=NULL)
Create a Node with the given previous and next pointers.
void swapWith(Node *other)
Swap this node with other by appropriately updating previous and next pointers.
virtual value_type & operator*()
virtual ~Node()
Virtual destructor that does not delete its pointers.
virtual bool valid() const
Node * getPrevious() const
T value_type
The type of value this Node works on.
This file is to be included at the end of Iterator.h.