import abstract factory pattern c++ code