An example Abstract Factory design pattern implementation in C++