Cpp dynamic factory based on POCO