tastytea
d452daac6e
# # Previous commits: #73648eb
2020-11-13 #a028edd
2020-03-21 #0cbf498
2020-03-21 #e6478b1
2020-03-12
445 lines
52 KiB
HTML
445 lines
52 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>mastodonpp: mastodonpp Namespace Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">mastodonpp
|
|
 <span id="projectnumber">0.5.5</span>
|
|
</div>
|
|
<div id="projectbrief">C++ wrapper for the Mastodon and Pleroma APIs.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#enum-members">Enumerations</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">mastodonpp Namespace Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>C++ wrapper for the Mastodon API.
|
|
<a href="namespacemastodonpp.html#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Return type for Requests. <a href="structmastodonpp_1_1answer__type.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1API.html">API</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Holds API endpoints. <a href="classmastodonpp_1_1API.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Connection.html">Connection</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents a connection to an instance. Used for requests. <a href="classmastodonpp_1_1Connection.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLException.html">CURLException</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Exception for libcurl errors. <a href="classmastodonpp_1_1CURLException.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Handles the details of network connections. <a href="classmastodonpp_1_1CURLWrapper.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmastodonpp_1_1event__type.html">event_type</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A stream event. <a href="structmastodonpp_1_1event__type.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmastodonpp_1_1Instance.html">Instance</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Holds the access data of an instance. <a href="classmastodonpp_1_1Instance.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
Typedefs</h2></td></tr>
|
|
<tr class="memitem:ad5d7bf6713e986f130ec200963e0f208"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> = variant< <a class="el" href="classmastodonpp_1_1API.html#a7f74ce81c1f0cbc0ed6ad66b2bd24318">API::endpoint_type</a>, string_view ></td></tr>
|
|
<tr class="memdesc:ad5d7bf6713e986f130ec200963e0f208"><td class="mdescLeft"> </td><td class="mdescRight">An endpoint. Either <a class="el" href="classmastodonpp_1_1API.html#a7f74ce81c1f0cbc0ed6ad66b2bd24318" title="Type for endpoints. Can be API::v1, API::v2, API::oauth, API::other or API::pleroma.">API::endpoint_type</a> or <code>std::string_view</code>. <a href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">More...</a><br /></td></tr>
|
|
<tr class="separator:ad5d7bf6713e986f130ec200963e0f208"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af8b3b89118adeccc71c54dfd36c987f6"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> = map< string_view, variant< string_view, vector< string_view > >></td></tr>
|
|
<tr class="memdesc:af8b3b89118adeccc71c54dfd36c987f6"><td class="mdescLeft"> </td><td class="mdescRight"><code>std::map</code> of parameters for API calls. <a href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">More...</a><br /></td></tr>
|
|
<tr class="separator:af8b3b89118adeccc71c54dfd36c987f6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a63b360bdefd56276e903619eb6a76049"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#a63b360bdefd56276e903619eb6a76049">parameterpair</a> = pair< string_view, variant< string_view, vector< string_view > >></td></tr>
|
|
<tr class="memdesc:a63b360bdefd56276e903619eb6a76049"><td class="mdescLeft"> </td><td class="mdescRight">A single parameter of a parametermap. <a href="namespacemastodonpp.html#a63b360bdefd56276e903619eb6a76049">More...</a><br /></td></tr>
|
|
<tr class="separator:a63b360bdefd56276e903619eb6a76049"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
Enumerations</h2></td></tr>
|
|
<tr class="memitem:a7d60fc71ad0fb1fbd467b37fe1f1f100"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">http_method</a> { <br />
|
|
  <b>GET</b>,
|
|
<b>POST</b>,
|
|
<b>PATCH</b>,
|
|
<b>PUT</b>,
|
|
<br />
|
|
  <b>DELETE</b>
|
|
<br />
|
|
}</td></tr>
|
|
<tr class="memdesc:a7d60fc71ad0fb1fbd467b37fe1f1f100"><td class="mdescLeft"> </td><td class="mdescRight">The HTTP method. <a href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">More...</a><br /></td></tr>
|
|
<tr class="separator:a7d60fc71ad0fb1fbd467b37fe1f1f100"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a4e42b93c60074920fb731ab6ba797935"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935">unescape_html</a> (string html)</td></tr>
|
|
<tr class="memdesc:a4e42b93c60074920fb731ab6ba797935"><td class="mdescLeft"> </td><td class="mdescRight">Replaces HTML entities with UTF-8 characters. <a href="namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935">More...</a><br /></td></tr>
|
|
<tr class="separator:a4e42b93c60074920fb731ab6ba797935"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9a5182698aabe03eb3a682b40053083d"><td class="memItemLeft" align="right" valign="top">std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemastodonpp.html#a9a5182698aabe03eb3a682b40053083d">operator<<</a> (std::ostream &out, const <a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> &answer)</td></tr>
|
|
<tr class="separator:a9a5182698aabe03eb3a682b40053083d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>C++ wrapper for the Mastodon API. </p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
</div><h2 class="groupheader">Typedef Documentation</h2>
|
|
<a id="ad5d7bf6713e986f130ec200963e0f208"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad5d7bf6713e986f130ec200963e0f208">◆ </a></span>endpoint_variant</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">using <a class="el" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">mastodonpp::endpoint_variant</a> = typedef variant<<a class="el" href="classmastodonpp_1_1API.html#a7f74ce81c1f0cbc0ed6ad66b2bd24318">API::endpoint_type</a>, string_view></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>An endpoint. Either <a class="el" href="classmastodonpp_1_1API.html#a7f74ce81c1f0cbc0ed6ad66b2bd24318" title="Type for endpoints. Can be API::v1, API::v2, API::oauth, API::other or API::pleroma.">API::endpoint_type</a> or <code>std::string_view</code>. </p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af8b3b89118adeccc71c54dfd36c987f6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af8b3b89118adeccc71c54dfd36c987f6">◆ </a></span>parametermap</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">using <a class="el" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">mastodonpp::parametermap</a> = typedef map<string_view, variant<string_view, vector<string_view> >></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p><code>std::map</code> of parameters for API calls. </p>
|
|
<p>Note that arrays always have to be specified as vectors, even if they have only 1 element. To send a file, use “<code>@file:</code>” followed by the file name as value.</p>
|
|
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> parameters</div>
|
|
<div class="line"> {</div>
|
|
<div class="line"> {<span class="stringliteral">"poll[expires_in]"</span>, <span class="stringliteral">"86400"</span>},</div>
|
|
<div class="line"> {<span class="stringliteral">"poll[options]"</span>, vector<string_view>{<span class="stringliteral">"Yes"</span>, <span class="stringliteral">"No"</span>, <span class="stringliteral">"Maybe"</span>}},</div>
|
|
<div class="line"> {<span class="stringliteral">"status"</span>, <span class="stringliteral">"How is the weather?"</span>}</div>
|
|
<div class="line"> };</div>
|
|
</div><!-- fragment --><dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a63b360bdefd56276e903619eb6a76049"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a63b360bdefd56276e903619eb6a76049">◆ </a></span>parameterpair</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">using <a class="el" href="namespacemastodonpp.html#a63b360bdefd56276e903619eb6a76049">mastodonpp::parameterpair</a> = typedef pair<string_view, variant<string_view, vector<string_view> >></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>A single parameter of a parametermap. </p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
|
<a id="a7d60fc71ad0fb1fbd467b37fe1f1f100"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7d60fc71ad0fb1fbd467b37fe1f1f100">◆ </a></span>http_method</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">mastodonpp::http_method</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The HTTP method. </p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  GET, <span class="comment">// NOLINT(readability-identifier-naming)</span></div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  POST, <span class="comment">// NOLINT(readability-identifier-naming)</span></div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  PATCH, <span class="comment">// NOLINT(readability-identifier-naming)</span></div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  PUT, <span class="comment">// NOLINT(readability-identifier-naming)</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  DELETE <span class="comment">// NOLINT(readability-identifier-naming)</span></div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> };</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="a9a5182698aabe03eb3a682b40053083d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9a5182698aabe03eb3a682b40053083d">◆ </a></span>operator<<()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::ostream& mastodonpp::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::ostream & </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structmastodonpp_1_1answer__type.html">answer_type</a> & </td>
|
|
<td class="paramname"><em>answer</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section since"><dt>Since</dt><dd>0.1.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  out << answer.body;</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">return</span> out;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a4e42b93c60074920fb731ab6ba797935"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4e42b93c60074920fb731ab6ba797935">◆ </a></span>unescape_html()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">string mastodonpp::unescape_html </td>
|
|
<td>(</td>
|
|
<td class="paramtype">string </td>
|
|
<td class="paramname"><em>html</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Replaces HTML entities with UTF-8 characters. </p>
|
|
<p>Supports named and numbered entities, decimal and hexadecimal.</p>
|
|
<p>Example: </p><div class="fragment"><div class="line"><span class="comment">// Will output: 2€ = 2€ = 2€</span></div>
|
|
<div class="line">std::cout << <a class="code" href="namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935">mastodonpp::unescape_html</a>(<span class="stringliteral">"2&euro; = 2&#8364; = 2&#x20ac;"</span>);</div>
|
|
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">html</td><td>The HTML to unescape.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.4.0 </dd></dl>
|
|
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordtype">string</span> buffer{move(html)};</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordtype">string</span> output;</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  </div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="comment">// Source: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="comment">// entity_references#Character_entity_references_in_HTML</span></div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">const</span> map<string_view, char32_t></div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  names{{<span class="stringliteral">"exclamation"</span>, 0x0021}, {<span class="stringliteral">"quot"</span>, 0x0022}, {<span class="stringliteral">"percent"</span>, 0x0025},</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  {<span class="stringliteral">"amp"</span>, 0x0026}, {<span class="stringliteral">"apos"</span>, 0x0027}, {<span class="stringliteral">"add"</span>, 0x002B},</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  {<span class="stringliteral">"lt"</span>, 0x003C}, {<span class="stringliteral">"equal"</span>, 0x003D}, {<span class="stringliteral">"gt"</span>, 0x003E},</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  {<span class="stringliteral">"nbsp"</span>, 0x00A0}, {<span class="stringliteral">"iexcl"</span>, 0x00A1}, {<span class="stringliteral">"cent"</span>, 0x00A2},</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {<span class="stringliteral">"pound"</span>, 0x00A3}, {<span class="stringliteral">"curren"</span>, 0x00A4}, {<span class="stringliteral">"yen"</span>, 0x00A5},</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  {<span class="stringliteral">"brvbar"</span>, 0x00A6}, {<span class="stringliteral">"sect"</span>, 0x00A7}, {<span class="stringliteral">"uml"</span>, 0x00A8},</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  {<span class="stringliteral">"copy"</span>, 0x00A9}, {<span class="stringliteral">"ordf"</span>, 0x00AA}, {<span class="stringliteral">"laquo"</span>, 0x00AB},</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  {<span class="stringliteral">"not"</span>, 0x00AC}, {<span class="stringliteral">"shy"</span>, 0x00AD}, {<span class="stringliteral">"reg"</span>, 0x00AE},</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  {<span class="stringliteral">"macr"</span>, 0x00AF}, {<span class="stringliteral">"deg"</span>, 0x00B0}, {<span class="stringliteral">"plusmn"</span>, 0x00B1},</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {<span class="stringliteral">"sup2"</span>, 0x00B2}, {<span class="stringliteral">"sup3"</span>, 0x00B3}, {<span class="stringliteral">"acute"</span>, 0x00B4},</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  {<span class="stringliteral">"micro"</span>, 0x00B5}, {<span class="stringliteral">"para"</span>, 0x00B6}, {<span class="stringliteral">"middot"</span>, 0x00B7},</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  {<span class="stringliteral">"cedil"</span>, 0x00B8}, {<span class="stringliteral">"sup1"</span>, 0x00B9}, {<span class="stringliteral">"ordm"</span>, 0x00BA},</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  {<span class="stringliteral">"raquo"</span>, 0x00BB}, {<span class="stringliteral">"frac14"</span>, 0x00BC}, {<span class="stringliteral">"frac12"</span>, 0x00BD},</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  {<span class="stringliteral">"frac34"</span>, 0x00BE}, {<span class="stringliteral">"iquest"</span>, 0x00BF}, {<span class="stringliteral">"Agrave"</span>, 0x00C0},</div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {<span class="stringliteral">"Aacute"</span>, 0x00C1}, {<span class="stringliteral">"Acirc"</span>, 0x00C2}, {<span class="stringliteral">"Atilde"</span>, 0x00C3},</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  {<span class="stringliteral">"Auml"</span>, 0x00C4}, {<span class="stringliteral">"Aring"</span>, 0x00C5}, {<span class="stringliteral">"AElig"</span>, 0x00C6},</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  {<span class="stringliteral">"Ccedil"</span>, 0x00C7}, {<span class="stringliteral">"Egrave"</span>, 0x00C8}, {<span class="stringliteral">"Eacute"</span>, 0x00C9},</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  {<span class="stringliteral">"Ecirc"</span>, 0x00CA}, {<span class="stringliteral">"Euml"</span>, 0x00CB}, {<span class="stringliteral">"Igrave"</span>, 0x00CC},</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {<span class="stringliteral">"Iacute"</span>, 0x00CD}, {<span class="stringliteral">"Icirc"</span>, 0x00CE}, {<span class="stringliteral">"Iuml"</span>, 0x00CF},</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  {<span class="stringliteral">"ETH"</span>, 0x00D0}, {<span class="stringliteral">"Ntilde"</span>, 0x00D1}, {<span class="stringliteral">"Ograve"</span>, 0x00D2},</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {<span class="stringliteral">"Oacute"</span>, 0x00D3}, {<span class="stringliteral">"Ocirc"</span>, 0x00D4}, {<span class="stringliteral">"Otilde"</span>, 0x00D5},</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {<span class="stringliteral">"Ouml"</span>, 0x00D6}, {<span class="stringliteral">"times"</span>, 0x00D7}, {<span class="stringliteral">"Oslash"</span>, 0x00D8},</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {<span class="stringliteral">"Ugrave"</span>, 0x00D9}, {<span class="stringliteral">"Uacute"</span>, 0x00DA}, {<span class="stringliteral">"Ucirc"</span>, 0x00DB},</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  {<span class="stringliteral">"Uuml"</span>, 0x00DC}, {<span class="stringliteral">"Yacute"</span>, 0x00DD}, {<span class="stringliteral">"THORN"</span>, 0x00DE},</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  {<span class="stringliteral">"szlig"</span>, 0x00DF}, {<span class="stringliteral">"agrave"</span>, 0x00E0}, {<span class="stringliteral">"aacute"</span>, 0x00E1},</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  {<span class="stringliteral">"acirc"</span>, 0x00E2}, {<span class="stringliteral">"atilde"</span>, 0x00E3}, {<span class="stringliteral">"auml"</span>, 0x00E4},</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {<span class="stringliteral">"aring"</span>, 0x00E5}, {<span class="stringliteral">"aelig"</span>, 0x00E6}, {<span class="stringliteral">"ccedil"</span>, 0x00E7},</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  {<span class="stringliteral">"egrave"</span>, 0x00E8}, {<span class="stringliteral">"eacute"</span>, 0x00E9}, {<span class="stringliteral">"ecirc"</span>, 0x00EA},</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {<span class="stringliteral">"euml"</span>, 0x00EB}, {<span class="stringliteral">"igrave"</span>, 0x00EC}, {<span class="stringliteral">"iacute"</span>, 0x00ED},</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {<span class="stringliteral">"icirc"</span>, 0x00EE}, {<span class="stringliteral">"iuml"</span>, 0x00EF}, {<span class="stringliteral">"eth"</span>, 0x00F0},</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  {<span class="stringliteral">"ntilde"</span>, 0x00F1}, {<span class="stringliteral">"ograve"</span>, 0x00F2}, {<span class="stringliteral">"oacute"</span>, 0x00F3},</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {<span class="stringliteral">"ocirc"</span>, 0x00F4}, {<span class="stringliteral">"otilde"</span>, 0x00F5}, {<span class="stringliteral">"ouml"</span>, 0x00F6},</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {<span class="stringliteral">"divide"</span>, 0x00F7}, {<span class="stringliteral">"oslash"</span>, 0x00F8}, {<span class="stringliteral">"ugrave"</span>, 0x00F9},</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  {<span class="stringliteral">"uacute"</span>, 0x00FA}, {<span class="stringliteral">"ucirc"</span>, 0x00FB}, {<span class="stringliteral">"uuml"</span>, 0x00FC},</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {<span class="stringliteral">"yacute"</span>, 0x00FD}, {<span class="stringliteral">"thorn"</span>, 0x00FE}, {<span class="stringliteral">"yuml"</span>, 0x00FF},</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  {<span class="stringliteral">"OElig"</span>, 0x0152}, {<span class="stringliteral">"oelig"</span>, 0x0153}, {<span class="stringliteral">"Scaron"</span>, 0x0160},</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  {<span class="stringliteral">"scaron"</span>, 0x0161}, {<span class="stringliteral">"Yuml"</span>, 0x0178}, {<span class="stringliteral">"fnof"</span>, 0x0192},</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  {<span class="stringliteral">"circ"</span>, 0x02C6}, {<span class="stringliteral">"tilde"</span>, 0x02DC}, {<span class="stringliteral">"Alpha"</span>, 0x0391},</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {<span class="stringliteral">"Beta"</span>, 0x0392}, {<span class="stringliteral">"Gamma"</span>, 0x0393}, {<span class="stringliteral">"Delta"</span>, 0x0394},</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  {<span class="stringliteral">"Epsilon"</span>, 0x0395}, {<span class="stringliteral">"Zeta"</span>, 0x0396}, {<span class="stringliteral">"Eta"</span>, 0x0397},</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  {<span class="stringliteral">"Theta"</span>, 0x0398}, {<span class="stringliteral">"Iota"</span>, 0x0399}, {<span class="stringliteral">"Kappa"</span>, 0x039A},</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {<span class="stringliteral">"Lambda"</span>, 0x039B}, {<span class="stringliteral">"Mu"</span>, 0x039C}, {<span class="stringliteral">"Nu"</span>, 0x039D},</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {<span class="stringliteral">"Xi"</span>, 0x039E}, {<span class="stringliteral">"Omicron"</span>, 0x039F}, {<span class="stringliteral">"Pi"</span>, 0x03A0},</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {<span class="stringliteral">"Rho"</span>, 0x03A1}, {<span class="stringliteral">"Sigma"</span>, 0x03A3}, {<span class="stringliteral">"Tau"</span>, 0x03A4},</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {<span class="stringliteral">"Upsilon"</span>, 0x03A5}, {<span class="stringliteral">"Phi"</span>, 0x03A6}, {<span class="stringliteral">"Chi"</span>, 0x03A7},</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {<span class="stringliteral">"Psi"</span>, 0x03A8}, {<span class="stringliteral">"Omega"</span>, 0x03A9}, {<span class="stringliteral">"alpha"</span>, 0x03B1},</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  {<span class="stringliteral">"beta"</span>, 0x03B2}, {<span class="stringliteral">"gamma"</span>, 0x03B3}, {<span class="stringliteral">"delta"</span>, 0x03B4},</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  {<span class="stringliteral">"epsilon"</span>, 0x03B5}, {<span class="stringliteral">"zeta"</span>, 0x03B6}, {<span class="stringliteral">"eta"</span>, 0x03B7},</div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  {<span class="stringliteral">"theta"</span>, 0x03B8}, {<span class="stringliteral">"iota"</span>, 0x03B9}, {<span class="stringliteral">"kappa"</span>, 0x03BA},</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  {<span class="stringliteral">"lambda"</span>, 0x03BB}, {<span class="stringliteral">"mu"</span>, 0x03BC}, {<span class="stringliteral">"nu"</span>, 0x03BD},</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {<span class="stringliteral">"xi"</span>, 0x03BE}, {<span class="stringliteral">"omicron"</span>, 0x03BF}, {<span class="stringliteral">"pi"</span>, 0x03C0},</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  {<span class="stringliteral">"rho"</span>, 0x03C1}, {<span class="stringliteral">"sigmaf"</span>, 0x03C2}, {<span class="stringliteral">"sigma"</span>, 0x03C3},</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  {<span class="stringliteral">"tau"</span>, 0x03C4}, {<span class="stringliteral">"upsilon"</span>, 0x03C5}, {<span class="stringliteral">"phi"</span>, 0x03C6},</div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  {<span class="stringliteral">"chi"</span>, 0x03C7}, {<span class="stringliteral">"psi"</span>, 0x03C8}, {<span class="stringliteral">"omega"</span>, 0x03C9},</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  {<span class="stringliteral">"thetasym"</span>, 0x03D1}, {<span class="stringliteral">"upsih"</span>, 0x03D2}, {<span class="stringliteral">"piv"</span>, 0x03D6},</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  {<span class="stringliteral">"ensp"</span>, 0x2002}, {<span class="stringliteral">"emsp"</span>, 0x2003}, {<span class="stringliteral">"thinsp"</span>, 0x2009},</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {<span class="stringliteral">"zwnj"</span>, 0x200C}, {<span class="stringliteral">"zwj"</span>, 0x200D}, {<span class="stringliteral">"lrm"</span>, 0x200E},</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  {<span class="stringliteral">"rlm"</span>, 0x200F}, {<span class="stringliteral">"ndash"</span>, 0x2013}, {<span class="stringliteral">"mdash"</span>, 0x2014},</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  {<span class="stringliteral">"horbar"</span>, 0x2015}, {<span class="stringliteral">"lsquo"</span>, 0x2018}, {<span class="stringliteral">"rsquo"</span>, 0x2019},</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  {<span class="stringliteral">"sbquo"</span>, 0x201A}, {<span class="stringliteral">"ldquo"</span>, 0x201C}, {<span class="stringliteral">"rdquo"</span>, 0x201D},</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  {<span class="stringliteral">"bdquo"</span>, 0x201E}, {<span class="stringliteral">"dagger"</span>, 0x2020}, {<span class="stringliteral">"Dagger"</span>, 0x2021},</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {<span class="stringliteral">"bull"</span>, 0x2022}, {<span class="stringliteral">"hellip"</span>, 0x2026}, {<span class="stringliteral">"permil"</span>, 0x2030},</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  {<span class="stringliteral">"prime"</span>, 0x2032}, {<span class="stringliteral">"Prime"</span>, 0x2033}, {<span class="stringliteral">"lsaquo"</span>, 0x2039},</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  {<span class="stringliteral">"rsaquo"</span>, 0x203A}, {<span class="stringliteral">"oline"</span>, 0x203E}, {<span class="stringliteral">"frasl"</span>, 0x2044},</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  {<span class="stringliteral">"euro"</span>, 0x20AC}, {<span class="stringliteral">"image"</span>, 0x2111}, {<span class="stringliteral">"weierp"</span>, 0x2118},</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  {<span class="stringliteral">"real"</span>, 0x211C}, {<span class="stringliteral">"trade"</span>, 0x2122}, {<span class="stringliteral">"alefsym"</span>, 0x2135},</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  {<span class="stringliteral">"larr"</span>, 0x2190}, {<span class="stringliteral">"uarr"</span>, 0x2191}, {<span class="stringliteral">"rarr"</span>, 0x2192},</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {<span class="stringliteral">"darr"</span>, 0x2193}, {<span class="stringliteral">"harr"</span>, 0x2194}, {<span class="stringliteral">"crarr"</span>, 0x21B5},</div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {<span class="stringliteral">"lArr"</span>, 0x21D0}, {<span class="stringliteral">"uArr"</span>, 0x21D1}, {<span class="stringliteral">"rArr"</span>, 0x21D2},</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  {<span class="stringliteral">"dArr"</span>, 0x21D3}, {<span class="stringliteral">"hArr"</span>, 0x21D4}, {<span class="stringliteral">"forall"</span>, 0x2200},</div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {<span class="stringliteral">"part"</span>, 0x2202}, {<span class="stringliteral">"exist"</span>, 0x2203}, {<span class="stringliteral">"empty"</span>, 0x2205},</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  {<span class="stringliteral">"nabla"</span>, 0x2207}, {<span class="stringliteral">"isin"</span>, 0x2208}, {<span class="stringliteral">"notin"</span>, 0x2209},</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  {<span class="stringliteral">"ni"</span>, 0x220B}, {<span class="stringliteral">"prod"</span>, 0x220F}, {<span class="stringliteral">"sum"</span>, 0x2211},</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  {<span class="stringliteral">"minus"</span>, 0x2212}, {<span class="stringliteral">"lowast"</span>, 0x2217}, {<span class="stringliteral">"radic"</span>, 0x221A},</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {<span class="stringliteral">"prop"</span>, 0x221D}, {<span class="stringliteral">"infin"</span>, 0x221E}, {<span class="stringliteral">"ang"</span>, 0x2220},</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  {<span class="stringliteral">"and"</span>, 0x2227}, {<span class="stringliteral">"or"</span>, 0x2228}, {<span class="stringliteral">"cap"</span>, 0x2229},</div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  {<span class="stringliteral">"cup"</span>, 0x222A}, {<span class="stringliteral">"int"</span>, 0x222B}, {<span class="stringliteral">"there4"</span>, 0x2234},</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  {<span class="stringliteral">"sim"</span>, 0x223C}, {<span class="stringliteral">"cong"</span>, 0x2245}, {<span class="stringliteral">"asymp"</span>, 0x2248},</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  {<span class="stringliteral">"ne"</span>, 0x2260}, {<span class="stringliteral">"equiv"</span>, 0x2261}, {<span class="stringliteral">"le"</span>, 0x2264},</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  {<span class="stringliteral">"ge"</span>, 0x2265}, {<span class="stringliteral">"sub"</span>, 0x2282}, {<span class="stringliteral">"sup"</span>, 0x2283},</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  {<span class="stringliteral">"nsub"</span>, 0x2284}, {<span class="stringliteral">"sube"</span>, 0x2286}, {<span class="stringliteral">"supe"</span>, 0x2287},</div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  {<span class="stringliteral">"oplus"</span>, 0x2295}, {<span class="stringliteral">"otimes"</span>, 0x2297}, {<span class="stringliteral">"perp"</span>, 0x22A5},</div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  {<span class="stringliteral">"sdot"</span>, 0x22C5}, {<span class="stringliteral">"lceil"</span>, 0x2308}, {<span class="stringliteral">"rceil"</span>, 0x2309},</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {<span class="stringliteral">"lfloor"</span>, 0x230A}, {<span class="stringliteral">"rfloor"</span>, 0x230B}, {<span class="stringliteral">"lang"</span>, 0x2329},</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  {<span class="stringliteral">"rang"</span>, 0x232A}, {<span class="stringliteral">"loz"</span>, 0x25CA}, {<span class="stringliteral">"spades"</span>, 0x2660},</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  {<span class="stringliteral">"clubs"</span>, 0x2663}, {<span class="stringliteral">"hearts"</span>, 0x2665}, {<span class="stringliteral">"diams"</span>, 0x2666}};</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="comment">// Used to convert number to utf-8 char.</span></div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  wstring_convert<codecvt_utf8<char32_t>, char32_t> u8c;</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="comment">// Matches numbered entities between 1 and 8 digits, decimal or hexadecimal,</span></div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="comment">// or named entities.</span></div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keyword">const</span> regex re_entity{<span class="stringliteral">"&(#(x)?([[:alnum:]]{1,8})"</span></div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="stringliteral">"|[^;[:space:][:punct:]]+);"</span>};</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  smatch match;</div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  </div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">while</span> (regex_search(buffer, match, re_entity))</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  {</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  output += match.prefix().str();</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">try</span></div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  {</div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// clang-format off</span></div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keyword">const</span> char32_t codepoint{[&match, &names]</div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  {</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="comment">// clang-format on</span></div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// If it doesn't start with a '#' it is a named entity.</span></div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordflow">if</span> (match[1].str()[0] != <span class="charliteral">'#'</span>)</div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  {</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> names.at(match[1].str());</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="comment">// 'x' after '#' means the number is hexadecimal.</span></div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">if</span> (match[2].length() == 1)</div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  {</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>char32_t<span class="keyword">></span>(</div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  stoul(match[3].str(), <span class="keyword">nullptr</span>, 16));</div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="comment">// '#' without 'x' means the number is decimal.</span></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>char32_t<span class="keyword">></span>(</div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  stoul(match[3].str(), <span class="keyword">nullptr</span>, 10));</div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  }()};</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  output += u8c.to_bytes(codepoint);</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  }</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::out_of_range &) <span class="comment">// Named entity could not be found.</span></div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  {</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  output += match.str();</div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  }</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  buffer = match.suffix().str();</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  }</div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  output += buffer;</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  </div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">return</span> output;</div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> }</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<div class="ttc" id="anamespacemastodonpp_html_af8b3b89118adeccc71c54dfd36c987f6"><div class="ttname"><a href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">mastodonpp::parametermap</a></div><div class="ttdeci">map< string_view, variant< string_view, vector< string_view > >> parametermap</div><div class="ttdoc">std::map of parameters for API calls.</div><div class="ttdef"><b>Definition:</b> types.hpp:64</div></div>
|
|
<div class="ttc" id="anamespacemastodonpp_html_a4e42b93c60074920fb731ab6ba797935"><div class="ttname"><a href="namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935">mastodonpp::unescape_html</a></div><div class="ttdeci">string unescape_html(string html)</div><div class="ttdoc">Replaces HTML entities with UTF-8 characters.</div><div class="ttdef"><b>Definition:</b> helpers.cpp:39</div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|