uvw/classuvw_1_1shared__lib.html
2023-05-22 11:13:58 +02:00

245 lines
14 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" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>uvw: uvw::shared_lib Class 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 id="projectrow">
<td id="projectalign">
<div id="projectname">uvw<span id="projectnumber">&#160;3.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceuvw.html">uvw</a></li><li class="navelem"><a class="el" href="classuvw_1_1shared__lib.html">shared_lib</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classuvw_1_1shared__lib-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">uvw::shared_lib Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div></div>
</div><!--header-->
<div class="contents">
<p>The shared lib class.
<a href="classuvw_1_1shared__lib.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="lib_8h_source.html">lib.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for uvw::shared_lib:</div>
<div class="dyncontent">
<div class="center"><img src="classuvw_1_1shared__lib__inherit__graph.png" border="0" usemap="#auvw_1_1shared__lib_inherit__map" alt="Inheritance graph"/></div>
<map name="auvw_1_1shared__lib_inherit__map" id="auvw_1_1shared__lib_inherit__map">
<area shape="rect" title="The shared lib class." alt="" coords="31,79,142,104"/>
<area shape="rect" href="structuvw_1_1uv__type.html" title=" " alt="" coords="5,5,168,31"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for uvw::shared_lib:</div>
<div class="dyncontent">
<div class="center"><img src="classuvw_1_1shared__lib__coll__graph.png" border="0" usemap="#auvw_1_1shared__lib_coll__map" alt="Collaboration graph"/></div>
<map name="auvw_1_1shared__lib_coll__map" id="auvw_1_1shared__lib_coll__map">
<area shape="rect" title="The shared lib class." alt="" coords="31,79,142,104"/>
<area shape="rect" href="structuvw_1_1uv__type.html" title=" " alt="" coords="5,5,168,31"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1b8410a22b128723fd1157e77b46d964"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classuvw_1_1shared__lib.html#a1b8410a22b128723fd1157e77b46d964">operator bool</a> () const noexcept</td></tr>
<tr class="memdesc:a1b8410a22b128723fd1157e77b46d964"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if the library has been correctly opened. <br /></td></tr>
<tr class="separator:a1b8410a22b128723fd1157e77b46d964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bc1bbcc9de46a9fbb0d9d0c96deed0c"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
<tr class="memitem:a6bc1bbcc9de46a9fbb0d9d0c96deed0c"><td class="memTemplItemLeft" align="right" valign="top">F *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classuvw_1_1shared__lib.html#a6bc1bbcc9de46a9fbb0d9d0c96deed0c">sym</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:a6bc1bbcc9de46a9fbb0d9d0c96deed0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a data pointer from a dynamic library. <br /></td></tr>
<tr class="separator:a6bc1bbcc9de46a9fbb0d9d0c96deed0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5998e6c11cb976ecfdbd610be4ebac45"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classuvw_1_1shared__lib.html#a5998e6c11cb976ecfdbd610be4ebac45">error</a> () const noexcept</td></tr>
<tr class="memdesc:a5998e6c11cb976ecfdbd610be4ebac45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last error message, if any. <br /></td></tr>
<tr class="separator:a5998e6c11cb976ecfdbd610be4ebac45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structuvw_1_1uv__type"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structuvw_1_1uv__type')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="structuvw_1_1uv__type.html">uvw::uv_type&lt; uv_lib_t &gt;</a></td></tr>
<tr class="memitem:ae97ffacc0b381610d8d18a62a957a69c inherit pub_methods_structuvw_1_1uv__type"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structuvw_1_1uv__type.html#ae97ffacc0b381610d8d18a62a957a69c">init</a> ()</td></tr>
<tr class="memdesc:ae97ffacc0b381610d8d18a62a957a69c inherit pub_methods_structuvw_1_1uv__type"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the handle. <br /></td></tr>
<tr class="separator:ae97ffacc0b381610d8d18a62a957a69c inherit pub_methods_structuvw_1_1uv__type"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae03b0ebbae151c6157c5ba6a24a39a7b inherit pub_methods_structuvw_1_1uv__type"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classuvw_1_1loop.html">loop</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structuvw_1_1uv__type.html#ae03b0ebbae151c6157c5ba6a24a39a7b">parent</a> () const noexcept</td></tr>
<tr class="memdesc:ae03b0ebbae151c6157c5ba6a24a39a7b inherit pub_methods_structuvw_1_1uv__type"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the loop from which the resource was originated. <br /></td></tr>
<tr class="separator:ae03b0ebbae151c6157c5ba6a24a39a7b inherit pub_methods_structuvw_1_1uv__type"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06a6cb7ebde27aa348e340b76e49c6ae inherit pub_methods_structuvw_1_1uv__type"><td class="memItemLeft" align="right" valign="top">const uv_lib_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structuvw_1_1uv__type.html#a06a6cb7ebde27aa348e340b76e49c6ae">raw</a> () const noexcept</td></tr>
<tr class="memdesc:a06a6cb7ebde27aa348e340b76e49c6ae inherit pub_methods_structuvw_1_1uv__type"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the underlying raw data structure. <br /></td></tr>
<tr class="separator:a06a6cb7ebde27aa348e340b76e49c6ae inherit pub_methods_structuvw_1_1uv__type"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4b6f395815f2e99302b5f09be23767c inherit pub_methods_structuvw_1_1uv__type"><td class="memItemLeft" align="right" valign="top">uv_lib_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structuvw_1_1uv__type.html#af4b6f395815f2e99302b5f09be23767c">raw</a> () noexcept</td></tr>
<tr class="memdesc:af4b6f395815f2e99302b5f09be23767c inherit pub_methods_structuvw_1_1uv__type"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the underlying raw data structure. <br /></td></tr>
<tr class="separator:af4b6f395815f2e99302b5f09be23767c inherit pub_methods_structuvw_1_1uv__type"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The shared lib class. </p>
<p><code>uvw</code> provides cross platform utilities for loading shared libraries and retrieving symbols from them, by means of the API offered by <code>libuv</code>. </p>
<p class="definition">Definition at line <a class="el" href="lib_8h_source.html#l00020">20</a> of file <a class="el" href="lib_8h_source.html">lib.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a5998e6c11cb976ecfdbd610be4ebac45" name="a5998e6c11cb976ecfdbd610be4ebac45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5998e6c11cb976ecfdbd610be4ebac45">&#9670;&#160;</a></span>error()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const char * uvw::shared_lib::error </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the last error message, if any. </p>
<dl class="section return"><dt>Returns</dt><dd>The last error message, if any. </dd></dl>
</div>
</div>
<a id="a1b8410a22b128723fd1157e77b46d964" name="a1b8410a22b128723fd1157e77b46d964"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b8410a22b128723fd1157e77b46d964">&#9670;&#160;</a></span>operator bool()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uvw::shared_lib::operator bool </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if the library has been correctly opened. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the library is opened, false otherwise. </dd></dl>
</div>
</div>
<a id="a6bc1bbcc9de46a9fbb0d9d0c96deed0c" name="a6bc1bbcc9de46a9fbb0d9d0c96deed0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bc1bbcc9de46a9fbb0d9d0c96deed0c">&#9670;&#160;</a></span>sym()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename F &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">F * uvw::shared_lib::sym </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves a data pointer from a dynamic library. </p>
<p><code>F</code> shall be a valid function type (as an example, <code>void(int)</code>).<br />
It is legal for a symbol to map to <code>nullptr</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The symbol to be retrieved. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A valid function pointer in case of success, <code>nullptr</code> otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="lib_8h_source.html#l00042">42</a> of file <a class="el" href="lib_8h_source.html">lib.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/uvw/<a class="el" href="lib_8h_source.html">lib.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
</small></address>
</body>
</html>