| 138 | } |
| 139 | |
| 140 | static RetFormat ParseDataFormat(std::string& param, const std::string& strReq) |
| 141 | { |
| 142 | const std::string::size_type pos = strReq.rfind('.'); |
| 143 | if (pos == std::string::npos) |
| 144 | { |
| 145 | param = strReq; |
| 146 | return rf_names[0].rf; |
| 147 | } |
| 148 | |
| 149 | param = strReq.substr(0, pos); |
| 150 | const std::string suff(strReq, pos + 1); |
| 151 | |
| 152 | for (const auto& rf_name : rf_names) { |
| 153 | if (suff == rf_name.name) |
| 154 | return rf_name.rf; |
| 155 | } |
| 156 | |
| 157 | /* If no suffix is found, return original string. */ |
| 158 | param = strReq; |
| 159 | return rf_names[0].rf; |
| 160 | } |
| 161 | |
| 162 | static std::string AvailableDataFormatsString() |
| 163 | { |
no outgoing calls
no test coverage detected