182 std::cerr <<
"RepHandler::RunLocalCallback() error: "
187#if GOOGLE_PROTOBUF_VERSION >= 5028000
189 google::protobuf::DynamicCastMessage<Req>(&_msgReq);
191 google::protobuf::DynamicCastMessage<Rep>(&_msgRep);
192#elif GOOGLE_PROTOBUF_VERSION >= 4022000
194 google::protobuf::internal::DownCast<const Req*>(&_msgReq);
195 auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
196#elif GOOGLE_PROTOBUF_VERSION > 2999999
197 auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
198 auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
201 google::protobuf::internal::down_cast<const Req*>(&_msgReq);
202 auto msgRep = google::protobuf::internal::down_cast<Rep*>(&_msgRep);
206 if (msgReq ==
nullptr || msgRep ==
nullptr)
208 if (msgReq ==
nullptr)
210 if (_msgReq.GetDescriptor() !=
nullptr)
212 std::cerr <<
"RepHandler::RunLocalCallback() error: "
213 <<
"Failed to cast the request of the type "
214 << _msgReq.GetDescriptor()->full_name()
215 <<
" to the specified type" <<
'\n';
219 std::cerr <<
"RepHandler::RunLocalCallback() error: "
220 <<
"Failed to cast the request of an unknown type"
221 <<
" to the specified type" <<
'\n';
224 if (msgRep ==
nullptr)
226 if (_msgRep.GetDescriptor() !=
nullptr)
228 std::cerr <<
"RepHandler::RunLocalCallback() error: "
229 <<
"Failed to cast the response of the type "
230 << _msgRep.GetDescriptor()->full_name()
231 <<
" to the specified type" <<
'\n';
235 std::cerr <<
"RepHandler::RunLocalCallback() error: "
236 <<
"Failed to cast the response of an unknown type"
237 <<
" to the specified type" <<
'\n';
244 return this->cb(*msgReq, *msgRep);