Declaration of the Command_Exercise() function as used in the Command Pattern. More...
Go to the source code of this file.
Macros | |
#define | __COMMAND_EXERCISE_H__ |
Functions | |
void | Command_Exercise (void) |
Example of using the Command Pattern. | |
Declaration of the Command_Exercise() function as used in the Command Pattern.
Definition in file c/Command_Exercise.h.
#define __COMMAND_EXERCISE_H__ |
Definition at line 9 of file c/Command_Exercise.h.
void Command_Exercise | ( | void | ) |
Example of using the Command Pattern.
The Command pattern is used to encapsulate an operation or command associated with an object so that the command can be applied to the object at a later time.
In this exercise, an undo list is implemented using Commands that associate commands defined in this file with a text object. The commands are applied to the text object in succession then effectively undone.
Definition at line 185 of file Command_Exercise.c.
References Command_ApplyReplaceCommand(), Command_ApplyReverseCommand(), Command_TextObject_Clear(), Command_TextObject_Initialize(), Command_TextObject_ToString(), and Command_Undo().