| 218 | enum ClassType { Title, Success, Error }; |
| 219 | |
| 220 | void |
| 221 | table_entry(ostream& os, ClassType type, const string& s, |
| 222 | int width = 0, const string& link = "") |
| 223 | { |
| 224 | static const char* class_types[] = { "title", "success", "error" }; |
| 225 | |
| 226 | os << " <td"; |
| 227 | if (width) |
| 228 | os << " style=\"width:" << width << "%\""; |
| 229 | if (!link.empty()) |
| 230 | os << " class=\"tablecell_" << class_types[type] << "\"><a href=\"#" << link << "\">" << escape(s) << "</a>"; |
| 231 | else |
| 232 | os << " class=\"tablecell_" << class_types[type] << "\">" << escape(s); |
| 233 | os << "</td>\n"; |
| 234 | } |
| 235 | |
| 236 | } // anonymous namespace |
| 237 |
no test coverage detected