LNode class

The node class deals with the fundamental unit of manipulation in our program, the venerable Node.

Node() constructor

Node *mynode = new Node;
Function Parameter(s) Return value
LNode() none pointer to the newly allocated node

Node() is the parameterless constructor that is responsible for creating a new instance of a node.

LNode() constructor

Overloaded constructor that will accept an initial integer value to be assigned to the newly allocated Node's value member.

LNode *mynode = new Node(4);
Function Parameter(s) Return value
LNode() pointer to the newly allocated node

copy()

copy() will duplicate the node's contents, except NULL next and prev

tmp = mynode -> copy();
Function Parameter(s) Return value
notset notset notset

getNext()

getvalue() will return the value of the current node

Function Parameter(s) Return value
LNode *getNext() no parameters return value in LNode *pointer
location -> setNext(this -> location -> getNext());

getPrev()

getvalue() will return the value of the current node

Function Parameter(s) Return value
LNode *getPrev() no parameters return value in LNode *pointer
location -> setPrev(this -> location -> getPrev());

setNext()

setNext() will set the value of the current node

Function Parameter(s) Return value
LNode *getNext pointer value to set value of current node none that is know
location -> setNext(this -> location -> getNext());

setPrev()

setPrev() will set the value of the current node

Function Parameter(s) Return value
LNode *getPrev pointer value to set value of current node none that is know
location -> setPrev(this -> location -> getPrev());