2 #include <samchon/API.hpp> 88 template <
typename T,
typename ... _Args>
89 static auto toTH(
const T &val,
const _Args& ... args) -> std::string
93 size_t size =
sizeof...(args)+1;
95 fetchTX(
"th", str, i, size, val, args...);
99 static auto toTH(
const T &val) -> std::string
103 "\t\t" + toTD(val) +
"\n" +
141 template <
typename T,
typename ... _Args>
142 static auto toTR(
const T &val,
const _Args& ... args) -> std::string
146 size_t size =
sizeof...(args)+1;
148 fetchTX(
"tr", str, i, size, val, args...);
151 template <
typename T>
152 static auto toTR(
const T &val) -> std::string
156 "\t\t" + toTD(val) +
"\n" +
167 virtual auto toHTML()
const->std::string = 0;
170 template <
typename T,
typename ... _Args>
171 static void fetchTX(
const std::string &tag, std::string &str,
size_t &index,
size_t size,
const T &val,
const _Args& ... args)
173 fetchTX(tag, str, index, size, val);
176 fetchTX(tag, str, index, size, args...);
178 template <
typename T>
179 static void fetchTX(
const std::string &tag, std::string &str,
size_t &index,
size_t size,
const T &val)
182 str +=
"\t<" + tag +
">\n";
184 str +=
"\t\t" + toTD(val) +
"\n";
186 if (index == size - 1)
187 str +=
"\t</" + tag +
">";
190 template <
typename T>
191 static auto toTD(
const T &val) -> std::string
193 std::stringstream ss;
195 ss <<
"<td>" << val <<
"</td>";
198 template<>
static auto toTD(
const WeakString &)->std::string;
static auto toTR(const T &val, const _Args &...args) -> std::string
Get a string represents a <tr> tag.
static auto toTH(const T &val, const _Args &...args) -> std::string
Get a string represents a <th> tag.
An interface supporting conversion to html.
Top level namespace of products built from samchon.
A string class only references characeters, reference only.