flyweight_pattern::ConcreteFlyweight

class ConcreteFlyweight : public flyweight_pattern::Flyweight

ConcreteFlyweight implements the Flyweight interface.

It contains the intrinsic state, which is shared between multiple objects.

Public Functions

inline explicit ConcreteFlyweight(const std::string &state)

Constructor to initialize the intrinsic state.

Parameters:

state – The intrinsic state of the Flyweight.

inline virtual void operation(const std::string &extrinsicState) const override

Implements the Flyweight operation using both intrinsic and extrinsic states.

Parameters:

extrinsicState – The extrinsic state passed by the client.