208 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
214 if (!this->UpdateThrottling())
217#if GOOGLE_PROTOBUF_VERSION >= 5028000
218 auto msgPtr = google::protobuf::DynamicCastMessage<T>(&_msg);
219#elif GOOGLE_PROTOBUF_VERSION >= 4022000
220 auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
221#elif GOOGLE_PROTOBUF_VERSION >= 3000000
222 auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
224 auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);
228 if (msgPtr ==
nullptr)
230 if (_msg.GetDescriptor() !=
nullptr)
232 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
233 <<
"Failed to cast the message of the type "
234 << _msg.GetDescriptor()->full_name()
235 <<
" to the specified type" <<
'\n';
239 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
240 <<
"Failed to cast the message of an unknown type"
241 <<
" to the specified type" <<
'\n';
247 this->cb(*msgPtr, _info);