boost::variant<
string,
shared_ptr<DownstreamState>,
+ ClientState*,
std::unordered_map<string, double>
>
>
if (const auto dsValue = boost::get<shared_ptr<DownstreamState>>(&*ret)) {
cout<<(*dsValue)->getName()<<endl;
}
+ else if (const auto csValue = boost::get<ClientState*>(&*ret)) {
+ cout<<(*csValue)->local.toStringWithPort()<<endl;
+ }
else if (const auto strValue = boost::get<string>(&*ret)) {
cout<<*strValue<<endl;
}
boost::variant<
string,
shared_ptr<DownstreamState>,
+ ClientState*,
std::unordered_map<string, double>
>
>
>(withReturn ? ("return "+line) : line);
if(ret) {
- if (const auto dsValue = boost::get<shared_ptr<DownstreamState>>(&*ret)) {
- response=(*dsValue)->getName()+"\n";
- }
- else if (const auto strValue = boost::get<string>(&*ret)) {
- response=*strValue+"\n";
- }
+ if (const auto dsValue = boost::get<shared_ptr<DownstreamState>>(&*ret)) {
+ response=(*dsValue)->getName()+"\n";
+ }
+ else if (const auto csValue = boost::get<ClientState*>(&*ret)) {
+ response=(*csValue)->local.toStringWithPort()+"\n";
+ }
+ else if (const auto strValue = boost::get<string>(&*ret)) {
+ response=*strValue+"\n";
+ }
else if(const auto um = boost::get<std::unordered_map<string, double> >(&*ret)) {
using namespace json11;
Json::object o;