decorator_pattern::Decorator
-
class Decorator : public decorator_pattern::Component
The Decorator class serves as the abstract base class for all decorators.
This class wraps a Component object and delegates the operations while allowing concrete decorators to extend or modify its behavior.
Subclassed by decorator_pattern::ConcreteDecoratorA, decorator_pattern::ConcreteDecoratorB
Public Functions
Constructs the Decorator with a Component to wrap.
- Parameters:
component – The Component to be decorated.