libwolfram20
WAPod.h
Go to the documentation of this file.
1
10#ifndef WAPOD_H
11#define WAPOD_H
12
13#include <string>
14#include <vector>
15
16#include <rapidxml/rapidxml_utils.hpp>
17
18#include "WASubpod.h"
19#include "WAPodState.h"
20#include "WAError.h"
21
26class WAPod {
27public:
28 WAPod();
29 WAPod(rapidxml::xml_node<>* pod);
30 WAPod(const WAPod &old);
31 ~WAPod();
32
33 std::string getTitle();
34 std::string getScanner();
35 int getPosition();
36 std::string getID();
37 bool isError();
39
40 std::vector<WASubpod> getSubpods();
41 std::vector<WAPodState> getStates();
42
43private:
45 std::string _title;
46 std::string _scanner;
47 std::string _id;
49
50 std::vector<WASubpod> SubPods;
51 std::vector<WAPodState> States;
52
53 void parse(rapidxml::xml_node<>* pod);
54};
55
56#endif // WAPOD_H
Wolfram API error element.
Wolfram Pod States.
Wolfram API subpod.
Wolfram API error element.
Definition: WAError.h:20
std::string getTitle()
Returns a 'title' attribute of Pod.
Definition: WAPod.cpp:58
std::string getScanner()
Returns a 'scanner' attribute of Pod.
Definition: WAPod.cpp:67
int getPosition()
Returns a 'position' attribute of Pod.
Definition: WAPod.cpp:76
std::vector< WASubpod > getSubpods()
Returns all the getted subpods.
Definition: WAPod.cpp:94
WAError * getError()
It provides information about what happened.
Definition: WAPod.cpp:121
WAPod()
Default constructor.
Definition: WAPod.cpp:16
bool isError()
It checks if the results contains valid data.
Definition: WAPod.cpp:112
std::vector< WAPodState > getStates()
Returns all the getted states.
Definition: WAPod.cpp:103
std::string getID()
Returns a 'id' attribute of Pod.
Definition: WAPod.cpp:85
~WAPod()
Destructor.
Definition: WAPod.cpp:33
void parse(rapidxml::xml_node<> *pod)
Parsing a input 'pod' xml node.
Definition: WAPod.cpp:131
Wolfram API element.
Definition: WAPod.h:26
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