1 #ifndef SILICIUM_HTML_HPP
2 #define SILICIUM_HTML_HPP
4 #include <silicium/source/source.hpp>
5 #include <silicium/sink/sink.hpp>
8 #if BOOST_VERSION >= 105300
9 #include <boost/utility/string_ref.hpp>
16 template <
class CharRange>
18 #if !SILICIUM_COMPILER_HAS_AUTO_RETURN_TYPE
22 return std::forward<CharRange>(range);
27 #if !SILICIUM_COMPILER_HAS_AUTO_RETURN_TYPE
36 template <
class CharSink,
class Char>
42 case '&' : append(sink,
"&");
break;
43 case '<' : append(sink,
"<");
break;
44 case '>' : append(sink,
">");
break;
45 case '\'': append(sink,
"'");
break;
46 case '"' : append(sink,
""");
break;
53 template <
class CharSink,
class StringLike>
56 StringLike
const &text)
64 template <
class CharSink,
class StringLike>
67 StringLike
const &name)
73 template <
class CharSink>
80 template <
class CharSink,
class KeyStringLike,
class ValueStringLike>
83 KeyStringLike
const &key,
84 ValueStringLike
const &value)
93 template <
class CharSink,
class StringLike>
96 StringLike
const &name)
102 template <
class CharSink,
class StringLike>
105 StringLike
const &name)
114 template <
class CharSink,
class StringLike>
117 StringLike
const &name)
128 template <
class CharSink>
132 #if BOOST_VERSION >= 105300
148 template <
class ContentMaker>
161 template <
class AttributeMaker,
class ContentMaker>
162 void element(
name_type const &name, AttributeMaker make_attributes, ContentMaker make_content)
171 template <
class AttributeMaker>
180 template <
class KeyStringLike,
class ValueStringLike>
182 KeyStringLike
const &key,
183 ValueStringLike
const &value)
193 template <
class ...Args>
196 element(std::forward<Args>(args)...);
199 template <
class StringLike>
207 template <
class StringLike>
213 template <
class StringLike>
214 void raw(StringLike
const &text)
224 template <
class CharSink>
void close_element(CharSink &&sink, StringLike const &name)
Definition: html.hpp:103
std::remove_reference< T >::type && move(T &&ref)
Definition: move.hpp:10
void element_with_text(name_type const &name, StringLike const &text)
Definition: html.hpp:200
void raw(StringLike const &text)
Definition: html.hpp:214
generator(CharSink out)
Definition: html.hpp:143
void finish_attributes(CharSink &&sink)
Definition: html.hpp:74
void open_attributed_element(CharSink &&sink, StringLike const &name)
Definition: html.hpp:65
Definition: absolute_path.hpp:352
void add_attribute(CharSink &&sink, KeyStringLike const &key, ValueStringLike const &value)
Definition: html.hpp:81
void write_char(CharSink &&sink, Char c)
Definition: html.hpp:37
Definition: absolute_path.hpp:19
void element(name_type const &name, AttributeMaker make_attributes, empty_t)
Definition: html.hpp:172
auto make_c_str_range(C const *str) -> iterator_range< C const * >
Definition: memory_range.hpp:64
void attribute(KeyStringLike const &key, ValueStringLike const &value)
Definition: html.hpp:181
boost::container::string noexcept_string
Definition: noexcept_string.hpp:26
auto make_generator(CharSink &&sink) -> generator< typename std::decay< CharSink >::type >
Definition: html.hpp:225
void element(name_type const &name, empty_t)
Definition: html.hpp:156
noexcept_string name_type
Definition: html.hpp:137
void open_element(CharSink &&sink, StringLike const &name)
Definition: html.hpp:94
void write(StringLike const &text)
Definition: html.hpp:208
void unpaired_element(CharSink &&sink, StringLike const &name)
Definition: html.hpp:115
void element(name_type const &name, AttributeMaker make_attributes, ContentMaker make_content)
Definition: html.hpp:162
generator()
Definition: html.hpp:139
void element(name_type const &name)
Definition: html.hpp:188
auto make_range_from_string_like(CharRange &&range) -> CharRange
Definition: html.hpp:17
void operator()(Args &&...args)
Definition: html.hpp:194
void element(name_type const &name, ContentMaker make_content)
Definition: html.hpp:149
void write_string(CharSink &&sink, StringLike const &text)
Definition: html.hpp:54
struct Si::html::empty_t empty