VirtualList Class Reference
#include <VirtualList.h>
![](../class_virtual_list.png)
# Public Member Functions | |
void | constructor () |
Class' constructor. | |
void | destructor () |
Class' destructor. | |
void * | front () |
void * | back () |
VirtualNode | begin () |
VirtualNode | end () |
VirtualNode | find (const void *const data) |
int32 | getDataIndex (const void *const data) |
VirtualNode | getNode (int32 index) |
int32 | getNodeIndex (VirtualNode node) |
void * | getDataAtIndex (int32 index) |
int32 | getCount () |
VirtualNode | pushFront (const void *const data) |
VirtualNode | pushBack (const void *const data) |
VirtualNode | insertAfter (VirtualNode node, const void *const data) |
VirtualNode | insertBefore (VirtualNode node, const void *const data) |
void * | popFront () |
void * | popBack () |
bool | removeNode (VirtualNode node) |
bool | removeData (const void *const data) |
void | reverse () |
Reverse the nodes of the list. | |
void | copy (VirtualList sourceList) |
void | clear () |
Remove all the nodes from the list without deleting the data. | |
void | deleteData () |
Delete all the data and nodes from the list. |
# Protected Attributes | |
VirtualNode | head |
List's first node. | |
VirtualNode | tail |
List's last element. |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
static Object | getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod) |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Detailed Description
Class VirtualList
Inherits from Object
Implements a linked list of non fixed data type elements.
Definition at line 29 of file VirtualList.h.
# Member Function Documentation
# back()
void * VirtualList::back | ( | ) |
Retrieve the last data element of the list.
- Returns
- Last data element
Definition at line 69 of file VirtualList.c.
# begin()
VirtualNode VirtualList::begin | ( | ) |
# clear()
void VirtualList::clear | ( | ) |
Remove all the nodes from the list without deleting the data.
Definition at line 499 of file VirtualList.c.
# constructor()
void VirtualList::constructor | ( | ) |
Class' constructor.
Definition at line 37 of file VirtualList.c.
# copy()
void VirtualList::copy | ( | VirtualList | sourceList | ) |
Copy the elements from the provided list.
- Parameters
-
sourceList List with the elements to copy
Definition at line 476 of file VirtualList.c.
# deleteData()
void VirtualList::deleteData | ( | ) |
Delete all the data and nodes from the list.
Definition at line 518 of file VirtualList.c.
# destructor()
void VirtualList::destructor | ( | ) |
Class' destructor.
Definition at line 49 of file VirtualList.c.
# end()
VirtualNode VirtualList::end | ( | ) |
# find()
VirtualNode VirtualList::find | ( | const void *const | data | ) |
Retrieve the node that holds the provided data.
- Parameters
-
data Pointer to the data to look for
- Returns
- Node that holds the provided data
Definition at line 90 of file VirtualList.c.
# front()
void * VirtualList::front | ( | ) |
Retrieve the first data element of the list.
- Returns
- First data element
Definition at line 62 of file VirtualList.c.
# getCount()
int32 VirtualList::getCount | ( | ) |
Retrieve the number of nodes in the list.
- Returns
- Number of nodes in the list
Definition at line 197 of file VirtualList.c.
# getDataAtIndex()
void * VirtualList::getDataAtIndex | ( | int32 | index | ) |
Retrieve the data at the provided index in the list.
- Parameters
-
index Index within the list
- Returns
- Data at index in the linked list
Definition at line 173 of file VirtualList.c.
# getDataIndex()
int32 VirtualList::getDataIndex | ( | const void *const | data | ) |
Retrieve the index of the node holding the provided data pointer.
- Parameters
-
data Pointer to the data to look for
- Returns
- The index of the data in the linked list
Definition at line 149 of file VirtualList.c.
# getNode()
VirtualNode VirtualList::getNode | ( | int32 | index | ) |
Retrieve the node at provided position within the list.
- Parameters
-
index Index within the list
- Returns
- Node at the provided index
Definition at line 101 of file VirtualList.c.
# getNodeIndex()
int32 VirtualList::getNodeIndex | ( | VirtualNode | node | ) |
Retrieve the index of the provided node.
- Parameters
-
node Node to look for
- Returns
- The index of the node in the linked list
Definition at line 161 of file VirtualList.c.
# insertAfter()
VirtualNode VirtualList::insertAfter | ( | VirtualNode | node, |
const void *const | data ) |
Add a new node to the list with the provided data after the provided node.
- Parameters
-
node Reference node data Pointer to the data to insert into the list
- Returns
- Node holding the data
Definition at line 275 of file VirtualList.c.
# insertBefore()
VirtualNode VirtualList::insertBefore | ( | VirtualNode | node, |
const void *const | data ) |
Add a new node to the list with the provided data before the provided node.
- Parameters
-
node Reference node data Pointer to the data to insert into the list
- Returns
- Node holding the data
Definition at line 316 of file VirtualList.c.
# popBack()
void * VirtualList::popBack | ( | ) |
Remove the last node of the list.
- Returns
- Pointer to the data hold by the removed node
Definition at line 387 of file VirtualList.c.
# popFront()
void * VirtualList::popFront | ( | ) |
Remove the first node of the list.
- Returns
- Pointer to the data hold by the removed node
Definition at line 356 of file VirtualList.c.
# pushBack()
VirtualNode VirtualList::pushBack | ( | const void *const | data | ) |
Add a new node to the end of the list with the provided data.
- Parameters
-
data Pointer to the data to insert into the list
- Returns
- Node holding the data
Definition at line 247 of file VirtualList.c.
# pushFront()
VirtualNode VirtualList::pushFront | ( | const void *const | data | ) |
Add a new node to the start of the list with the provided data.
- Parameters
-
data Pointer to the data to insert into the list
- Returns
- Node holding the data
Definition at line 219 of file VirtualList.c.
# removeData()
bool VirtualList::removeData | ( | const void *const | data | ) |
Remove the provided data from the list.
- Parameters
-
data Pointer to the data to remove from the list
- Returns
- True if the data was successfully removed
Definition at line 439 of file VirtualList.c.
# removeNode()
bool VirtualList::removeNode | ( | VirtualNode | node | ) |
Remove the provided node from the list.
- Parameters
-
node Node to remove
- Returns
- True if the node was successfully removed
Definition at line 418 of file VirtualList.c.
# reverse()
void VirtualList::reverse | ( | ) |
Reverse the nodes of the list.
Definition at line 446 of file VirtualList.c.
# Member Data Documentation
# head
|
protected |
List's first node.
Definition at line 34 of file VirtualList.h.
# tail
|
protected |
List's last element.
Definition at line 37 of file VirtualList.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Misc/Lists/VirtualList.h
- VUEngine-Core/source/Misc/Lists/VirtualList.c