| MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHlists.h>
Public Member Functions | |
| ChList () | |
| ~ChList () | |
| dt * | GetHeadData () |
| dt * | GetTailData () |
| ChNode< dt > * | GetHead () |
| ChNode< dt > * | GetTail () |
| ChNode< dt > * | GetNum (int num) |
| int | AddHead (dt *mdata) |
| int | AddTail (dt *mdata) |
| int | RemHead () |
| int | RemTail () |
| int | InsertAfter (ChNode< dt > *mnode, ChNode< dt > *newnode) |
| int | InsertBefore (ChNode< dt > *mnode, ChNode< dt > *newnode) |
| int | InsertAfter (ChNode< dt > *mnode, dt *mdata) |
| int | InsertBefore (ChNode< dt > *mnode, dt *mdata) |
| int | Remove (ChNode< dt > *mnode) |
| int | RemoveAll () |
| int | Kill (ChNode< dt > *mnode) |
| int | KillAll () |
| int | Count () |
Class for linked list.
This linked list class can be used to build lists of pointers to objects. This has a different meaning from STL lists (which are lists of objects), because ours can manage the deletion of all pointed objects.
| ChNode< dt > * chrono::ChList< dt >::GetNum | ( | int | num | ) |
Returns a node at given position in list. Returns null if num exceeds num of nodes. Note: num=1 gets first element,
| int chrono::ChList< dt >::Kill | ( | ChNode< dt > * | mnode | ) |
Removes a node and deletes its data. Note the Kill() commands remove and also use delete(data) to free the objects pointed by nodes!,
| int chrono::ChList< dt >::Remove | ( | ChNode< dt > * | mnode | ) |
Removes a node. Note the Remove() command delete just the Ch_node, not the pointed 'data' object
CHRONO::ENGINE