| 69 | } |
| 70 | |
| 71 | static RetFormat ParseDataFormat(std::string& param, const std::string& strReq) |
| 72 | { |
| 73 | const std::string::size_type pos = strReq.rfind('.'); |
| 74 | if (pos == std::string::npos) |
| 75 | { |
| 76 | param = strReq; |
| 77 | return rf_names[0].rf; |
| 78 | } |
| 79 | |
| 80 | param = strReq.substr(0, pos); |
| 81 | const std::string suff(strReq, pos + 1); |
| 82 | |
| 83 | for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++) |
| 84 | if (suff == rf_names[i].name) |
| 85 | return rf_names[i].rf; |
| 86 | |
| 87 | /* If no suffix is found, return original string. */ |
| 88 | param = strReq; |
| 89 | return rf_names[0].rf; |
| 90 | } |
| 91 | |
| 92 | static std::string AvailableDataFormatsString() |
| 93 | { |
no outgoing calls
no test coverage detected