Implementation of the MoveCommand structure's support functions, MoveCommand_Create() and MoveCommand_Destroy(), as used in the Null Object Pattern. More...
Go to the source code of this file.
Functions | |
MoveCommand * | MoveCommand_Create (char commandToken, const char *commandName, ExecuteFunction executeFunction) |
Create a MoveCommand object and initialize it with the given arguments. | |
void | MoveCommand_Destroy (MoveCommand *moveCommand) |
Destroy the specified MoveCommand object. After this function returns, the pointer to the MoveCommand is no longer valid. | |
Implementation of the MoveCommand structure's support functions, MoveCommand_Create() and MoveCommand_Destroy(), as used in the Null Object Pattern.
Definition in file NullObject_MoveCommand.c.
MoveCommand * MoveCommand_Create | ( | char | commandToken, |
const char * | commandName, | ||
ExecuteFunction | executeFunction | ||
) |
Create a MoveCommand object and initialize it with the given arguments.
commandToken | The character representing the command when it appears in a string. |
commandName | The name of the command. |
executeFunction | The function to call to execute the move command. |
Definition at line 15 of file NullObject_MoveCommand.c.
References MoveCommand::commandName, MoveCommand::commandToken, and MoveCommand::Execute.
Referenced by _MoveProcessor_ParseMoves().
void MoveCommand_Destroy | ( | MoveCommand * | moveCommand | ) |
Destroy the specified MoveCommand object. After this function returns, the pointer to the MoveCommand is no longer valid.
moveCommand | The MoveCommand object to destroy. |
Definition at line 36 of file NullObject_MoveCommand.c.
References MoveCommand::commandName, MoveCommand::commandToken, and MoveCommand::Execute.