7#ifndef __COMMAND_OBJECTS_H__
8#define __COMMAND_OBJECTS_H__
Command * Command_Create_No_Parameters(const char *commandName, Command_TextObject *receiver, no_parameter_operation operation)
Create a new Command object with the given parameters, creating a command that uses no additional par...
void(* no_parameter_operation)(Command_TextObject *source)
Alias for a function type representing an operation applied to a Command_TextObject that uses no addi...
Command * Command_Create_Two_Parameters(const char *commandName, Command_TextObject *receiver, two_parameter_operation operation, const char *arg1, const char *arg2)
Create a new Command object with the given parameters, creating a command that uses two additional pa...
void(* two_parameter_operation)(Command_TextObject *source, const char *argument1, const char *argument2)
Alias for a function type representing an operation applied to a Command_TextObject using two paramet...
void Command_Execute(Command *commandObject)
Execute the given command on the Command_TextObject it knows about.
const char * Command_ToString(Command *commandObject)
Convert the given command object to a string representation.
void Command_Destroy(Command *commandObject)
Destroy the given command object, releasing it and any associated resources.
Declaration of the Command_TextObject structure and associated functions as used in the Command Patte...
Container for a string. Need to use a structure to keep the starting text and the current text togeth...
Represents an operation that can be applied to a Command_TextObject. Can hold one of two kinds of ope...
two_parameter_operation operation_two_parameters
Two parameter operation to apply to the receiver.
const char * argument1
The first argument to a two parameter operation.
const char * commandName
Easy-to-read command name.
no_parameter_operation operation_no_parameters
No parameter operation to apply to the receiver.
Command_TextObject * receiver
The receiver of the command.
const char * argument2
The second argument to a two parameter operation.