composite_pattern::Component
-
class Component
The Component interface declares common operations for both simple and complex objects.
Subclassed by composite_pattern::Composite, composite_pattern::Leaf
Public Functions
-
virtual void operation() const = 0
Performs the operation for the component.
Adds a child component (only meaningful for Composite).
Removes a child component (only meaningful for Composite).
-
inline virtual bool isComposite() const
Checks if the component is a composite.
- Returns:
True if composite, otherwise false.
-
virtual void operation() const = 0