206 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
212 if (!this->UpdateThrottling())
215#if GOOGLE_PROTOBUF_VERSION >= 5028000
216 auto msgPtr = google::protobuf::DynamicCastMessage<T>(&_msg);
217#elif GOOGLE_PROTOBUF_VERSION >= 4022000
218 auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
219#elif GOOGLE_PROTOBUF_VERSION >= 3000000
220 auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
222 auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);
226 if (msgPtr ==
nullptr)
228 if (_msg.GetDescriptor() !=
nullptr)
230 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
231 <<
"Failed to cast the message of the type "
232 << _msg.GetDescriptor()->full_name()
233 <<
" to the specified type" <<
'\n';
237 std::cerr <<
"SubscriptionHandler::RunLocalCallback() error: "
238 <<
"Failed to cast the message of an unknown type"
239 <<
" to the specified type" <<
'\n';
245 this->cb(*msgPtr, _info);