Declaration of the Decorator_Exercise() function as used in the Decorator Pattern. More...
Go to the source code of this file.
Macros | |
#define | __DECORATOR_EXERCISE_H__ |
Functions | |
void | Decorator_Exercise (void) |
Example of using the Decorator Pattern. | |
Declaration of the Decorator_Exercise() function as used in the Decorator Pattern.
Definition in file c/Decorator_Exercise.h.
#define __DECORATOR_EXERCISE_H__ |
Definition at line 9 of file c/Decorator_Exercise.h.
void Decorator_Exercise | ( | void | ) |
Example of using the Decorator Pattern.
The Decorator pattern is used when some data element at run time needs to have its behavior altered. This is supported by providing wrapper functions called decorators that take an instance of the data element and return the data element. Each wrapper function alters the data element and returns it so it can be passed to the next wrapper function.
Definition at line 97 of file Decorator_Exercise.c.
References DynamicString_Clear(), DynamicString_Initialize(), DynamicString_Set(), RedForegroundDecorator(), DynamicString::string, UnderlineDecorator(), and WhiteBackgroundDecorator().