api_generator:c++:add factory interface