I have a question about the XmlRpcValue class and its struct type. Is it possible to step through the struct from the beginning to the end, without having to know the keys.
The problem is that I don't know what the answer struct is containing, so I just want to check the size and iterate through each element.
If I could access the underlaying map I could to something like this:
XmlRpcValue noArg, result;
if (client.execute("getMonitorData", noArg, result))
{
map<string, XmlRpcValue>::iterator it;
for (it=result.begin(); it != result.end(); it++)
{
cout << (*it)->second << endl; //
}
}
Or is there another way to do something similar?
Br,
Anttu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I have a question about the XmlRpcValue class and its struct type. Is it possible to step through the struct from the beginning to the end, without having to know the keys.
The problem is that I don't know what the answer struct is containing, so I just want to check the size and iterate through each element.
If I could access the underlaying map I could to something like this:
XmlRpcValue noArg, result;
if (client.execute("getMonitorData", noArg, result))
{
map<string, XmlRpcValue>::iterator it;
for (it=result.begin(); it != result.end(); it++)
{
cout << (*it)->second << endl; //
}
}
Or is there another way to do something similar?
Br,
Anttu