Implementation of the MoveCommandList structure's support functions, MoveCommandList_Initialize(), MoveCommandList_Clear(), and MoveCommandList_Add(), as used in the Null Object Pattern. More...
Go to the source code of this file.
Functions | |
void | MoveCommandList_Initialize (MoveCommandList *commandList) |
Initialize the given MoveCommandList object. This should be the first function called for an uninitialized MoveCommandList object. | |
void | MoveCommandList_Clear (MoveCommandList *commandList) |
Clear the given MoveCommandList, freeing up any allocated resources, so the list can be reused. | |
bool | MoveCommandList_Add (MoveCommandList *commandList, MoveCommand *moveCommand) |
Add a given MoveCommand object to the given MoveCommandList object. The MoveCommandList takes ownership and thus responsibility for freeing the memory of the MoveCommand object. | |
Implementation of the MoveCommandList structure's support functions, MoveCommandList_Initialize(), MoveCommandList_Clear(), and MoveCommandList_Add(), as used in the Null Object Pattern.
Definition in file NullObject_MoveCommandList.c.
bool MoveCommandList_Add | ( | MoveCommandList * | commandList, |
MoveCommand * | moveCommand | ||
) |
Add a given MoveCommand object to the given MoveCommandList object. The MoveCommandList takes ownership and thus responsibility for freeing the memory of the MoveCommand object.
commandList | The MoveCommandList object to add to. |
moveCommand | The MoveCommand to add. |
Definition at line 45 of file NullObject_MoveCommandList.c.
References MoveCommandList::commands, and MoveCommandList::commands_count.
Referenced by _MoveProcessor_ParseMoves().
void MoveCommandList_Clear | ( | MoveCommandList * | commandList | ) |
Clear the given MoveCommandList, freeing up any allocated resources, so the list can be reused.
commandList | The MoveCommandList to clear. |
Definition at line 29 of file NullObject_MoveCommandList.c.
References MoveCommandList::commands, MoveCommandList::commands_count, and MoveCommandList_Initialize().
Referenced by _MoveProcessor_ParseMoves(), MoveProcessor_ExecuteMoveList(), and MoveProcessor_ShowMoveList().
void MoveCommandList_Initialize | ( | MoveCommandList * | commandList | ) |
Initialize the given MoveCommandList object. This should be the first function called for an uninitialized MoveCommandList object.
commandList | The MoveCommandList object to initialize. |
Definition at line 17 of file NullObject_MoveCommandList.c.
References MoveCommandList::commands, and MoveCommandList::commands_count.
Referenced by MoveCommandList_Clear(), MoveProcessor_ExecuteMoveList(), and MoveProcessor_ShowMoveList().