| 2475 | } |
| 2476 | |
| 2477 | std::string |
| 2478 | KnobTable::encodeToKnobTableFormat(const std::list<std::vector<std::string> >& table) |
| 2479 | { |
| 2480 | std::stringstream ss; |
| 2481 | |
| 2482 | |
| 2483 | for (std::list<std::vector<std::string> >::const_iterator it = table.begin(); it != table.end(); ++it) { |
| 2484 | // In order to use XML tags, the text inside the tags has to be escaped. |
| 2485 | for (std::size_t c = 0; c < it->size(); ++c) { |
| 2486 | std::string label = getColumnLabel(c); |
| 2487 | ss << "<" << label << ">"; |
| 2488 | std::string value = Project::escapeXML( (*it)[c] ); |
| 2489 | ss << value; |
| 2490 | ss << "</" << label << ">"; |
| 2491 | } |
| 2492 | } |
| 2493 | |
| 2494 | return ss.str(); |
| 2495 | } |
| 2496 | |
| 2497 | void |
| 2498 | KnobTable::setTableSingleCol(const std::list<std::string>& table) |
no test coverage detected