139 std::cerr <<
"RepHandler::RunLocalCallback() error: "
144#if GOOGLE_PROTOBUF_VERSION >= 5028000
146 google::protobuf::DynamicCastMessage<Req>(&_msgReq);
148 google::protobuf::DynamicCastMessage<Rep>(&_msgRep);
149#elif GOOGLE_PROTOBUF_VERSION >= 4022000
151 google::protobuf::internal::DownCast<const Req*>(&_msgReq);
152 auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
153#elif GOOGLE_PROTOBUF_VERSION > 2999999
154 auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
155 auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
158 google::protobuf::internal::down_cast<const Req*>(&_msgReq);
159 auto msgRep = google::protobuf::internal::down_cast<Rep*>(&_msgRep);
163 if (msgReq ==
nullptr || msgRep ==
nullptr)
165 if (msgReq ==
nullptr)
167 if (_msgReq.GetDescriptor() !=
nullptr)
169 std::cerr <<
"RepHandler::RunLocalCallback() error: "
170 <<
"Failed to cast the request of the type "
171 << _msgReq.GetDescriptor()->full_name()
172 <<
" to the specified type" <<
'\n';
176 std::cerr <<
"RepHandler::RunLocalCallback() error: "
177 <<
"Failed to cast the request of an unknown type"
178 <<
" to the specified type" <<
'\n';
181 if (msgRep ==
nullptr)
183 if (_msgRep.GetDescriptor() !=
nullptr)
185 std::cerr <<
"RepHandler::RunLocalCallback() error: "
186 <<
"Failed to cast the response of the type "
187 << _msgRep.GetDescriptor()->full_name()
188 <<
" to the specified type" <<
'\n';
192 std::cerr <<
"RepHandler::RunLocalCallback() error: "
193 <<
"Failed to cast the response of an unknown type"
194 <<
" to the specified type" <<
'\n';
201 return this->cb(*msgReq, *msgRep);