Declaration of the MoveCommand structure along with the support functions, MoveCommand_Create() and MoveCommand_Destroy(), as used in the Null Object Pattern. More...
Go to the source code of this file.
Classes | |
struct | MoveCommand |
Represents a move command. A move command has a name and the command character that represents the command in the initial string of movement commands. More... | |
Macros | |
#define | __NULLOBJECT_MOVECOMMAND_H__ |
Typedefs | |
typedef void(* | ExecuteFunction) (void) |
Alias for a function that executes a move command. | |
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. | |
Declaration of the MoveCommand structure along with the support functions, MoveCommand_Create() and MoveCommand_Destroy(), as used in the Null Object Pattern.
Definition in file NullObject_MoveCommand.h.
#define __NULLOBJECT_MOVECOMMAND_H__ |
Definition at line 9 of file NullObject_MoveCommand.h.
typedef void(* ExecuteFunction) (void) |
Alias for a function that executes a move command.
Definition at line 14 of file NullObject_MoveCommand.h.
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.