void TrajectoryAnalysisCommandLineRunner::Impl::RunnerCommandLineModule::writeHelp( const CommandLineHelpContext &context) const { TrajectoryAnalysisModulePointer module(factory_()); TrajectoryAnalysisCommandLineRunner runner(module.get()); runner.writeHelp(context); }
int TrajectoryAnalysisCommandLineRunner::Impl::RunnerCommandLineModule::run( int argc, char *argv[]) { TrajectoryAnalysisModulePointer module(factory_()); TrajectoryAnalysisCommandLineRunner runner(module.get()); return runner.run(argc, argv); }
bool handle_change(const path_element &child, config cfg) { if (aspects_.find(child.id) == aspects_.end()) { return false; } if (!cfg.has_attribute("name")) { cfg["name"] = "composite_aspect"; } cfg["id"] = child.id; factory_(aspects_, cfg, child.id); return true; }
/// @{ void ConnectionAutomaton::handleUnknownStream( StreamId streamId, Payload payload) { // TODO(stupaq): there are some rules about monotonically increasing stream // IDs -- let's forget about them for a moment if (!factory_(streamId, payload)) { connectionOutput_.onNext( Frame_ERROR::invalid("unknown stream " + std::to_string(streamId)) .serializeOut()); disconnect(); } }
void stateful_protocol_strategy_wrapper::Parse( const wchar_t* pData, int charCount, ClientInfoPtr pClientInfo) { purge_dead_clients(); std::weak_ptr<ClientInfo> weak(pClientInfo); ProtocolStrategyPtr strategy; auto strategy_iter = strategies_.find(weak); if (strategy_iter == strategies_.end()) { strategy = factory_(); strategies_.insert(std::make_pair(weak, strategy)); } else { strategy = strategy_iter->second; } strategy->Parse(pData, charCount, pClientInfo); }
void call_factory(t_ptr_vector& vec, const config& cfg) { factory_(vec, cfg); }