54 if (strcmp(query->first_attribute(
"success")->value(),
"false") == 0) {
59 if (strcmp(query->first_attribute(
"error")->value(),
"true") == 0) {
61 rapidxml::xml_node<>* error = query->first_node(
"error");
66 this->
_version = std::string( query->first_attribute(
"version")->value() );
67 this->
_dataTypes = std::string( query->first_attribute(
"datatypes")->value() );
69 .generate = (
float)atof(query->first_attribute(
"parsetiming")->value()) };
73 rapidxml::xml_node<>* node = query->first_node(
"pod");
74 for(
size_t i = 0; i < atoi(query->first_attribute(
"numpods")->value()); i++) {
76 node = node->next_sibling(
"pod");
Wolfram API error element.
Definition: WAError.h:20
Wolfram API element.
Definition: WAPod.h:26
static std::vector< std::string > splitTimedout(const std::string &s)
It stores the pods that are timedout into a vector.
Definition: WAResult.cpp:89
unsigned int getTimedoutNumber()
It returns the number of elements that were timedout.
Definition: WAResult.cpp:121
std::vector< WAPod > _pods
All the results of the query.
Definition: WAResult.h:62
std::string _dataTypes
Categories and types of data represented in the results.
Definition: WAResult.h:55
std::string _version
The version specification of the API on the server that produced this result.
Definition: WAResult.h:56
bool _is_error
The input could be successfully understood or a serious processing error occurred.
Definition: WAResult.h:52
std::vector< std::string > _timedout
Number of pods that are missing because they timed out.
Definition: WAResult.h:59
std::string _try_again
If _timedout > 0 this will contain an URL to perform the next search.
Definition: WAResult.h:60
Timings _timings
Time in seconds required to parse the input and generate the output.
Definition: WAResult.h:57
WAError * _error
Information about the given error.
Definition: WAResult.h:53
Query timings.
Definition: WAResult.h:27
float parse
Time in seconds required to parse the input.
Definition: WAResult.h:28