The node class deals with the fundamental unit of manipulation in our program, the venerable Node.
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.
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() will duplicate the node's contents, except NULL next and prev
tmp = mynode -> copy();
Function | Parameter(s) | Return value |
---|---|---|
notset | notset | notset |
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());
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() 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() 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());