Design patterns – Command

Command pattern is simply straightforward, and my implementation is one from many other possible variations.

The usual,well-known command pattern is created by having:
– a base class, interface, with a virtual function (usually called execute or similar)

– multiple classes that implement the interface and override the execute function

– a container that keep pointers to base class and call the execute function on a specific object, based on an unique identifier for that command.

The full code can be found at the following link:

You may also like...

Leave a Reply