Migration of QtMvvm from github
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
47 KiB

<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QtMvvm: serviceregistry.h Source File</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" style="display: inline;">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">QtMvvm
&#160;<span id="projectnumber">1.0.0</span>
</div>
<div id="projectbrief">A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel</div>
</td>
</tr>
</tbody>
</table>
<a style="float: right;" target="_blank" href="https://github.com/Skycoder42/QtMvvm">
<img style="padding: 10px;" src="GitHub_Logo.png"/>
</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<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"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_8373e943c4cd41f1987d0cef0f366888.html">mvvmcore</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">serviceregistry.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef QTMVVM_SERVICEREGISTRY_H</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define QTMVVM_SERVICEREGISTRY_H</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;QtCore/qscopedpointer.h&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;QtCore/qvariant.h&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;QtCore/qexception.h&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &quot;QtMvvmCore/qtmvvmcore_global.h&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &quot;QtMvvmCore/injection.h&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_qt_mvvm.html">QtMvvm</a> {</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="keyword">class </span>ServiceRegistryPrivate;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_qt_mvvm_1_1_service_registry.html"> 17</a></span>&#160;<span class="keyword">class </span>Q_MVVMCORE_EXPORT <a class="code" href="class_qt_mvvm_1_1_service_registry.html">ServiceRegistry</a></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;{</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; <a class="code" href="class_qt_mvvm_1_1_service_registry.html">ServiceRegistry</a>(ServiceRegistryPrivate *d_ptr);</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; ~<a class="code" href="class_qt_mvvm_1_1_service_registry.html">ServiceRegistry</a>();</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; <span class="keyword">static</span> <a class="code" href="class_qt_mvvm_1_1_service_registry.html">ServiceRegistry</a>* instance();</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> TInterface&gt;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keywordtype">bool</span> isRegistered() <span class="keyword">const</span>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keywordtype">bool</span> isRegistered(<span class="keyword">const</span> <a class="codeRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qbytearray.html">QByteArray</a> &amp;iid) <span class="keyword">const</span>;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html_a3db366f49af65a3b7b79a5494bb69f19"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html#a3db366f49af65a3b7b79a5494bb69f19">QtMvvm::ServiceRegistry::constructInjected</a></div><div class="ttdeci">TClass * constructInjected(QObject *parent=nullptr)</div><div class="ttdoc">Constructs a new instance of TClass with properties injected. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00219">serviceregistry.h:219</a></div></div>
<div class="ttc" id="qbytearray_html"><div class="ttname"><a href="https://doc.qt.io/qt-5/qbytearray.html">QByteArray</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_dependency_exception_html"><div class="ttname"><a href="class_qt_mvvm_1_1_service_dependency_exception.html">QtMvvm::ServiceDependencyException</a></div><div class="ttdoc">Is thrown if a service could not be created because of a missing dependency to be injected...</div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00128">serviceregistry.h:128</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html_a2fddc2077d76404550f037dfbd9029ca"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html#a2fddc2077d76404550f037dfbd9029ca">QtMvvm::ServiceRegistry::isRegistered</a></div><div class="ttdeci">bool isRegistered() const</div><div class="ttdoc">Checks if a given interface or service is already registered. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00145">serviceregistry.h:145</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_exists_exception_html"><div class="ttname"><a href="class_qt_mvvm_1_1_service_exists_exception.html">QtMvvm::ServiceExistsException</a></div><div class="ttdoc">Is thrown if a service is beeing registered that is already registered. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00082">serviceregistry.h:82</a></div></div>
<div class="ttc" id="qmetaobject_html"><div class="ttname"><a href="https://doc.qt.io/qt-5/qmetaobject.html">QMetaObject</a></div></div>
<div class="ttc" id="class_q_exception_html"><div class="ttname"><a href="https://skycoder42.github.io/QtDataSync/class_q_exception.html">QException</a></div></div>
<div class="ttc" id="qscopedpointer_html"><div class="ttname"><a href="https://doc.qt.io/qt-5/qscopedpointer.html">QScopedPointer&lt; ServiceRegistryPrivate &gt;</a></div></div>
<div class="ttc" id="qbytearraylist_html"><div class="ttname"><a href="https://doc.qt.io/qt-5/qbytearraylist.html">QByteArrayList</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html">QtMvvm::ServiceRegistry</a></div><div class="ttdoc">A singleton to prepare services for dependency injection and to access them. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00017">serviceregistry.h:17</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html_a6d904ac2abf387eb877dae3aad801848"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html#a6d904ac2abf387eb877dae3aad801848">QtMvvm::ServiceRegistry::registerService</a></div><div class="ttdeci">void registerService(const QByteArray &amp;iid, const QMetaObject *metaObject, bool weak=false)</div><div class="ttdoc">Register a service by an iid via their metadata. </div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html_a54085d3bac2c39f58c46165827686a31"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html#a54085d3bac2c39f58c46165827686a31">QtMvvm::ServiceRegistry::service</a></div><div class="ttdeci">TInterface * service()</div><div class="ttdoc">Returns the service for the given interface. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00213">serviceregistry.h:213</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_construction_exception_html"><div class="ttname"><a href="class_qt_mvvm_1_1_service_construction_exception.html">QtMvvm::ServiceConstructionException</a></div><div class="ttdoc">Is thrown in case the construction of a service has failed. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00105">serviceregistry.h:105</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html_abff2c6776647fdb377860a3c3cca9080"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html#abff2c6776647fdb377860a3c3cca9080">QtMvvm::ServiceRegistry::serviceObj</a></div><div class="ttdeci">QObject * serviceObj(const QByteArray &amp;iid)</div><div class="ttdoc">Returns the service for the given iid. </div></div>
<div class="ttc" id="class_q_object_html"><div class="ttname"><a href="https://doc.qt.io/qt-5/class_q_object.html">QObject</a></div></div>
<div class="ttc" id="namespace_qt_mvvm_html"><div class="ttname"><a href="namespace_qt_mvvm.html">QtMvvm</a></div><div class="ttdoc">The primary namespace of the QtMvvm library. </div><div class="ttdef"><b>Definition:</b> <a href="binding_8h_source.html#l00010">binding.h:10</a></div></div>
<div class="ttc" id="class_qt_mvvm_1_1_service_registry_html_abacfa0d81764df255df41e4ccf175ad8"><div class="ttname"><a href="class_qt_mvvm_1_1_service_registry.html#abacfa0d81764df255df41e4ccf175ad8">QtMvvm::ServiceRegistry::registerInterface</a></div><div class="ttdeci">void registerInterface(bool weak=false)</div><div class="ttdoc">Register a service for its interface via the type. </div><div class="ttdef"><b>Definition:</b> <a href="serviceregistry_8h_source.html#l00155">serviceregistry.h:155</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 14 2018 16:19:58 for QtMvvm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>