| 337 | } |
| 338 | |
| 339 | void AsyncScriptExecutor::GetElementIdList(const Json::Value& json_object) { |
| 340 | LOG(TRACE) << "Entering AsyncScriptExecutor::GetElementIdList"; |
| 341 | if (json_object.isArray()) { |
| 342 | for (unsigned int i = 0; i < json_object.size(); ++i) { |
| 343 | GetElementIdList(json_object[i]); |
| 344 | } |
| 345 | } else if (json_object.isObject()) { |
| 346 | if (json_object.isMember(JSON_ELEMENT_PROPERTY_NAME)) { |
| 347 | // Capture the ID of any element in the arg list, and |
| 348 | std::string element_id; |
| 349 | element_id = json_object[JSON_ELEMENT_PROPERTY_NAME].asString(); |
| 350 | this->element_id_list_.push_back(element_id); |
| 351 | } else { |
| 352 | std::vector<std::string> property_names = json_object.getMemberNames(); |
| 353 | std::vector<std::string>::const_iterator it = property_names.begin(); |
| 354 | for (; it != property_names.end(); ++it) { |
| 355 | this->GetElementIdList(json_object[*it]); |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | void AsyncScriptExecutor::TransferReturnedElements() { |
| 362 | LOG(TRACE) << "Entering AsyncScriptExecutor::TransferReturnedElements"; |