decorator_pattern::ConcreteDecoratorB

class ConcreteDecoratorB : public decorator_pattern::Decorator

A ConcreteDecorator that adds Feature B to the Component.

Public Functions

inline virtual std::string getDescription() const override

Delegates the getDescription method to the wrapped Component. Marked as pure virtual to enforce implementation in derived classes.

Returns:

A string description.

inline virtual float cost() const override

Delegates the cost method to the wrapped Component. Marked as pure virtual to enforce implementation in derived classes.

Returns:

A float representing the cost.