| 98 | } |
| 99 | |
| 100 | bool DebugOptions::GetDebugAction( |
| 101 | const string& action, TDebugAction::type* type, string* action_param) { |
| 102 | // Either "ACTION_TYPE" or "ACTION_TYPE@<integer value>". |
| 103 | vector<string> tokens = TokenizeDebugActionParams(action); |
| 104 | if (tokens.size() < 1 || tokens.size() > 2) return false; |
| 105 | if (tokens.size() == 2) *action_param = tokens[1]; |
| 106 | for (auto& entry : _TDebugAction_VALUES_TO_NAMES) { |
| 107 | if (iequals(tokens[0], entry.second)) { |
| 108 | *type = static_cast<TDebugAction::type>(entry.first); |
| 109 | return true; |
| 110 | } |
| 111 | } |
| 112 | return false; |
| 113 | } |
| 114 | |
| 115 | |
| 116 | TDebugOptions DebugOptions::ToThrift() const { |
nothing calls this directly
no test coverage detected