libwolfram20

◆ getPod()

bool WAResult::getPod ( const char *  title,
WAPod pod 
)

Returns a Pod matching the title.

Warning
If _pods contains pods with the same title it will return the first one
Parameters
[in]titleTitle to search on the getted Pods
[out]podPod with the specified title
Return values
TRUEPod found
FALSEPod not found
152 {
153 std::vector<WAPod>::iterator it;
154 for (it = begin(this->_pods); it != end(this->_pods); it++) {
155 std::string cur_title = it->getTitle();
156 if (strcmp(cur_title.c_str(), title) == 0) {
157 // same title
158 *pod = *it;
159 return true;
160 }
161 }
162
163 return false;
164}
std::vector< WAPod > _pods
All the results of the query.
Definition: WAResult.h:62