MCPcopy Create free account
hub / github.com/3rdparty/libprocess / handlerM

Method handlerM

include/process/protobuf.hpp:256–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254 // Handlers that take the sender as the first argument.
255 template <typename M>
256 static void handlerM(
257 T* t,
258 void (T::*method)(const process::UPID&, const M&),
259 const process::UPID& sender,
260 const std::string& data)
261 {
262 google::protobuf::Arena arena;
263 M* m = CHECK_NOTNULL(google::protobuf::Arena::CreateMessage<M>(&arena));
264 m->ParseFromString(data);
265
266 if (m->IsInitialized()) {
267 (t->*method)(sender, *m);
268 } else {
269 LOG(WARNING) << "Initialization errors: "
270 << m->InitializationErrorString();
271 }
272 }
273
274 template <typename M>
275 static void handlerMutM(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected