Skip to content

Commit

Permalink
Use ctr with property_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyLebedev authored and AnarManafov committed Oct 20, 2021
1 parent c6fbd3d commit ede213a
Showing 1 changed file with 25 additions and 40 deletions.
65 changes: 25 additions & 40 deletions dds-tools-lib/src/Tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,58 +321,43 @@ void CSession::notify(std::istream& _stream)
}
else if (it->second.type() == typeid(SCommanderInfoRequest::ptr_t))
{
processRequest<SCommanderInfoRequest>(it->second,
child,
[&child](SCommanderInfoRequest::ptr_t _request)
{
SCommanderInfoResponseData data;
data.fromPT(child.second);
_request->execResponseCallback(data);
});
processRequest<SCommanderInfoRequest>(
it->second,
child,
[&child](SCommanderInfoRequest::ptr_t _request)
{ _request->execResponseCallback(SCommanderInfoResponseData(child.second)); });
}
else if (it->second.type() == typeid(SAgentInfoRequest::ptr_t))
{
processRequest<SAgentInfoRequest>(it->second,
child,
[&child](SAgentInfoRequest::ptr_t _request)
{
SAgentInfoResponseData data;
data.fromPT(child.second);
_request->execResponseCallback(data);
});
processRequest<SAgentInfoRequest>(
it->second,
child,
[&child](SAgentInfoRequest::ptr_t _request)
{ _request->execResponseCallback(SAgentInfoResponseData(child.second)); });
}
else if (it->second.type() == typeid(SSlotInfoRequest::ptr_t))
{
processRequest<SSlotInfoRequest>(it->second,
child,
[&child](SSlotInfoRequest::ptr_t _request)
{
SSlotInfoResponseData data;
data.fromPT(child.second);
_request->execResponseCallback(data);
});
processRequest<SSlotInfoRequest>(
it->second,
child,
[&child](SSlotInfoRequest::ptr_t _request)
{ _request->execResponseCallback(SSlotInfoResponseData(child.second)); });
}
else if (it->second.type() == typeid(SAgentCountRequest::ptr_t))
{
processRequest<SAgentCountRequest>(it->second,
child,
[&child](SAgentCountRequest::ptr_t _request)
{
SAgentCountResponseData data;
data.fromPT(child.second);
_request->execResponseCallback(data);
});
processRequest<SAgentCountRequest>(
it->second,
child,
[&child](SAgentCountRequest::ptr_t _request)
{ _request->execResponseCallback(SAgentCountResponseData(child.second)); });
}
else if (it->second.type() == typeid(SOnTaskDoneRequest::ptr_t))
{
processRequest<SOnTaskDoneRequest>(it->second,
child,
[&child](SOnTaskDoneRequest::ptr_t _request)
{
SOnTaskDoneResponseData data;
data.fromPT(child.second);
_request->execResponseCallback(data);
});
processRequest<SOnTaskDoneRequest>(
it->second,
child,
[&child](SOnTaskDoneRequest::ptr_t _request)
{ _request->execResponseCallback(SOnTaskDoneResponseData(child.second)); });
}
}
}
Expand Down

0 comments on commit ede213a

Please sign in to comment.