MCPcopy Create free account
hub / github.com/COVESA/vsomeip / create

Method create

test/network_tests/fake_socket_tests/helpers/command_gate.cpp:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12command_gate::command_gate(hidden) { }
13
14std::shared_ptr<command_gate> command_gate::create() {
15 auto ptr = std::make_shared<command_gate>(hidden{});
16 ptr->pipe_ = std::make_shared<data_pipe>(
17 static_cast<data_pipe::local_message_checker_t>([weak_self = std::weak_ptr<command_gate>(ptr)](auto const& _cmd) {
18 if (auto self = weak_self.lock(); self) {
19 return (*self)(_cmd);
20 }
21 return data_pipe_state::OPEN;
22 }));
23 return ptr;
24}
25
26std::shared_ptr<data_pipe> command_gate::get_data_pipe() const {
27 return pipe_;

Callers

nothing calls this directly

Calls 1

lockMethod · 0.80

Tested by

no test coverage detected