288 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
294 if (!this->UpdateThrottling())
297#if GOOGLE_PROTOBUF_VERSION >= 5028000
298 auto msgPtr = google::protobuf::DynamicCastMessage<T>(&_msg);
299#elif GOOGLE_PROTOBUF_VERSION >= 4022000
300 auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
301#elif GOOGLE_PROTOBUF_VERSION >= 3000000
302 auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
304 auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);
308 if (msgPtr ==
nullptr)
310 if (_msg.GetDescriptor() !=
nullptr)
312 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
313 <<
"Failed to cast the message of the type "
314 << _msg.GetDescriptor()->full_name()
315 <<
" to the specified type" <<
'\n';
319 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
320 <<
"Failed to cast the message of an unknown type"
321 <<
" to the specified type" <<
'\n';
327 this->cb(*msgPtr, _info);