| 301 | template <typename M, |
| 302 | typename ...P, typename ...PC> |
| 303 | static void handlerN( |
| 304 | T* t, |
| 305 | void (T::*method)(const process::UPID&, PC...), |
| 306 | const process::UPID& sender, |
| 307 | const std::string& data, |
| 308 | MessageProperty<M, P>... p) |
| 309 | { |
| 310 | google::protobuf::Arena arena; |
| 311 | M* m = CHECK_NOTNULL(google::protobuf::Arena::CreateMessage<M>(&arena)); |
| 312 | m->ParseFromString(data); |
| 313 | |
| 314 | if (m->IsInitialized()) { |
| 315 | (t->*method)(sender, google::protobuf::convert((m->*p)())...); |
| 316 | } else { |
| 317 | LOG(WARNING) << "Initialization errors: " |
| 318 | << m->InitializationErrorString(); |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | // Handlers that ignore the sender. |
| 323 | template <typename M> |