| 94 | }; |
| 95 | |
| 96 | std::unique_ptr<GraphClientImpl> NewLocalGraphClientImpl( |
| 97 | const GraphConfig& config) { |
| 98 | std::unique_ptr<GraphClientImpl> graph_client_impl; |
| 99 | graph_client_impl.reset(new LocalGraphClientImpl()); |
| 100 | if (!dynamic_cast<LocalGraphClientImpl*>(graph_client_impl.get()) |
| 101 | ->Init(config)) { |
| 102 | DXERROR("Failed to new local graph client impl."); |
| 103 | graph_client_impl.reset(); |
| 104 | } |
| 105 | return graph_client_impl; |
| 106 | } |
| 107 | |
| 108 | } // namespace embedx |