| 369 | template <typename M, |
| 370 | typename ...P, typename ...PC> |
| 371 | static void _handlerN( |
| 372 | T* t, |
| 373 | void (T::*method)(PC...), |
| 374 | const process::UPID&, |
| 375 | const std::string& data, |
| 376 | MessageProperty<M, P>... p) |
| 377 | { |
| 378 | google::protobuf::Arena arena; |
| 379 | M* m = CHECK_NOTNULL(google::protobuf::Arena::CreateMessage<M>(&arena)); |
| 380 | m->ParseFromString(data); |
| 381 | |
| 382 | if (m->IsInitialized()) { |
| 383 | (t->*method)(google::protobuf::convert((m->*p)())...); |
| 384 | } else { |
| 385 | LOG(WARNING) << "Initialization errors: " |
| 386 | << m->InitializationErrorString(); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | typedef lambda::function< |
| 391 | void(const process::UPID&, const std::string&)> handler; |