Parsing a input 'pod' xml node.
133 if (strcmp(pod->first_attribute(
"error")->value(),
"true") == 0) {
139 this->
_title = std::string( pod->first_attribute(
"title")->value() );
140 this->
_id = std::string( pod->first_attribute(
"id")->value() );
141 this->
_scanner = std::string( pod->first_attribute(
"scanner")->value() );
142 this->
_position = atoi(pod->first_attribute(
"title")->value());
145 xml_node<>* nodeSubpod = pod->first_node(
"subpod");
146 for(
unsigned int i = 0; i < atoi(pod->first_attribute(
"numsubpods")->value()); i++) {
148 nodeSubpod = nodeSubpod->next_sibling(
"subpod");
152 xml_node<>* nodeStates = pod->first_node(
"states");
153 if (nodeStates !=
nullptr) {
154 unsigned int len = atoi(nodeStates->first_attribute(
"count")->value());
155 nodeStates = nodeStates->first_node(
"state");
156 for(
unsigned int i = 0; i < len; i++) {
158 nodeStates = nodeStates->next_sibling(
"state");
Wolfram API error element.
Definition: WAError.h:20
Contains a particular pod state for a single pod or subpod.
Definition: WAPodState.h:21
std::vector< WAPodState > States
All the valid States returned by the query.
Definition: WAPod.h:51
std::string _id
A unique identifier for a pod, used for selecting specific pods to include or exclude.
Definition: WAPod.h:47
int _position
A number indicating the intended position of the pod in a visual display.
Definition: WAPod.h:48
WAError * _error
Information about the given error; nullptr if no error.
Definition: WAPod.h:44
std::vector< WASubpod > SubPods
All the valid Pods returned by the query.
Definition: WAPod.h:50
std::string _scanner
The name of the scanner that produced this pod. A general guide to the type of data it holds.
Definition: WAPod.h:46
std::string _title
The pod title, used to identify the pod and its contents.
Definition: WAPod.h:45
Wolfram API element.
Definition: WASubpod.h:26