thorvg/docs/html/classtvg_1_1Initializer.html
2022-03-08 19:02:56 +09:00

206 lines
13 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>ThorVG: Initializer</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" />
<link href="doxygen-awesome.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="projectlogo"><img alt="Logo" src="small_logo.svg"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ThorVG
&#160;<span id="projectnumber">v0.8</span>
</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&amp;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&amp;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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>tvg</b></li><li class="navelem"><a class="el" href="classtvg_1_1Initializer.html">Initializer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classtvg_1_1Initializer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Initializer<span class="mlabels"><span class="mlabel">final</span></span><div class="ingroups"><a class="el" href="group__ThorVG.html">ThorVG</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>A class that enables initialization and termination of the TVG engines.
<a href="classtvg_1_1Initializer.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aecd30dc028635b645b0dac5b6facea73"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Initializer.html#aecd30dc028635b645b0dac5b6facea73">init</a> (<a class="el" href="group__ThorVG.html#ga3dfc0651e85484b1011772dd9f8300df">CanvasEngine</a> engine, uint32_t threads) noexcept</td></tr>
<tr class="memdesc:aecd30dc028635b645b0dac5b6facea73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes TVG engines. <a href="classtvg_1_1Initializer.html#aecd30dc028635b645b0dac5b6facea73">More...</a><br /></td></tr>
<tr class="separator:aecd30dc028635b645b0dac5b6facea73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace5ab49a2678becae6e7230420a003df"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Initializer.html#ace5ab49a2678becae6e7230420a003df">term</a> (<a class="el" href="group__ThorVG.html#ga3dfc0651e85484b1011772dd9f8300df">CanvasEngine</a> engine) noexcept</td></tr>
<tr class="memdesc:ace5ab49a2678becae6e7230420a003df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminates TVG engines. <a href="classtvg_1_1Initializer.html#ace5ab49a2678becae6e7230420a003df">More...</a><br /></td></tr>
<tr class="separator:ace5ab49a2678becae6e7230420a003df"><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>A class that enables initialization and termination of the TVG engines. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aecd30dc028635b645b0dac5b6facea73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecd30dc028635b645b0dac5b6facea73">&#9670;&nbsp;</a></span>init()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__ThorVG.html#ga3dfc0651e85484b1011772dd9f8300df">CanvasEngine</a>&#160;</td>
<td class="paramname"><em>engine</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>threads</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes TVG engines. </p>
<p>TVG requires the running-engine environment. TVG runs its own task-scheduler for parallelizing rendering tasks efficiently. You can indicate the number of threads, the count of which is designated <code>threads</code>. In the initialization step, TVG will generate/spawn the threads as set by <code>threads</code> count.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">engine</td><td>The engine types to initialize. This is relative to the <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> types, in which it will be used. For multiple backends bitwise operation is allowed. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">threads</td><td>The number of additional threads. Zero indicates only the main thread is to be used.</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066abc2b4181e818f2e9b52b2bc54dd55907" title="The value returned in case of unsuccessful memory allocation.">Result::FailedAllocation</a></td><td>An internal error possibly with memory allocation. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066ae73a2e92f1c87086c838b442552a4775" title="The value returned in the event of a problem with the arguments given to the API - e....">Result::InvalidArguments</a></td><td>If unknown engine type chosen. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported options.">Result::NonSupport</a></td><td>In case the engine type is not supported on the system. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a88183b946cc5f0e8c96b2e66e1c74a7e" title="The value returned in all other cases.">Result::Unknown</a></td><td>Others.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="classtvg_1_1Initializer.html" title="A class that enables initialization and termination of the TVG engines.">Initializer</a> keeps track of the number of times it was called. Threads count is fixed at the first <a class="el" href="classtvg_1_1Initializer.html#aecd30dc028635b645b0dac5b6facea73" title="Initializes TVG engines.">init()</a> call. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Initializer.html#ace5ab49a2678becae6e7230420a003df" title="Terminates TVG engines.">Initializer::term()</a> </dd></dl>
</div>
</div>
<a id="ace5ab49a2678becae6e7230420a003df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace5ab49a2678becae6e7230420a003df">&#9670;&nbsp;</a></span>term()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> term </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__ThorVG.html#ga3dfc0651e85484b1011772dd9f8300df">CanvasEngine</a>&#160;</td>
<td class="paramname"><em>engine</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Terminates TVG engines. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">engine</td><td>The engine types to terminate. This is relative to the <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> types, in which it will be used. For multiple backends bitwise operation is allowed</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a></td><td>In case there is nothing to be terminated. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066ae73a2e92f1c87086c838b442552a4775" title="The value returned in the event of a problem with the arguments given to the API - e....">Result::InvalidArguments</a></td><td>If unknown engine type chosen. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported options.">Result::NonSupport</a></td><td>In case the engine type is not supported on the system. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a88183b946cc5f0e8c96b2e66e1c74a7e" title="The value returned in all other cases.">Result::Unknown</a></td><td>Others.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classtvg_1_1Initializer.html" title="A class that enables initialization and termination of the TVG engines.">Initializer</a> does own reference counting for multiple calls. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Initializer.html#aecd30dc028635b645b0dac5b6facea73" title="Initializes TVG engines.">Initializer::init()</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>