clone design pattern c++