| 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( |
nothing calls this directly
no outgoing calls
no test coverage detected