| 27 | } |
| 28 | |
| 29 | OperatePtr CustomAction::toOperate() const { |
| 30 | OperatePtr opt = Action::toOperate(); |
| 31 | opt->sid = "customact"; |
| 32 | opt->aid = "customact"; |
| 33 | opt->editable = true; |
| 34 | opt->setText(this->text); |
| 35 | if (this->bounds.size() >= 4) { |
| 36 | opt->pos = Rect(static_cast<int>(this->bounds[0]), static_cast<int>(this->bounds[1]), |
| 37 | static_cast<int>(this->bounds[2]), static_cast<int>(this->bounds[3])); |
| 38 | } |
| 39 | opt->clear = this->clearText; |
| 40 | opt->throttle = static_cast<float>(this->throttle); |
| 41 | opt->waitTime = this->waitTime; |
| 42 | opt->adbInput = this->adbInput; |
| 43 | opt->allowFuzzing = this->allowFuzzing; |
| 44 | if (opt->act == ActionType::SHELL_EVENT) { |
| 45 | opt->setText(this->command); |
| 46 | } |
| 47 | return opt; |
| 48 | } |
| 49 | |
| 50 | Xpath::Xpath() |
| 51 | : index(-1), operationAND(false) {} |