235 lines
27 KiB
HTML
235 lines
27 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.9.1"/>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
|
<title>GpgFrontend Project: src/core/module/ModuleManager.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="navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="resize.js"></script>
|
||
|
<script type="text/javascript" src="navtreedata.js"></script>
|
||
|
<script type="text/javascript" src="navtree.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">GpgFrontend Project
|
||
|
</div>
|
||
|
<div id="projectbrief">A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.9.1 -->
|
||
|
<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','.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: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>
|
||
|
</div><!-- top -->
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
<div id="nav-sync" class="sync"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||
|
$(document).ready(function(){initNavTree('ModuleManager_8h_source.html',''); initResizable(); });
|
||
|
/* @license-end */
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<!-- 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 class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">ModuleManager.h</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
||
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#pragma once</span></div>
|
||
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
||
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <mutex></span></div>
|
||
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <vector></span></div>
|
||
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
||
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "core/function/SecureMemoryAllocator.h"</span></div>
|
||
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "core/function/basic/GpgFunctionObject.h"</span></div>
|
||
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "core/module/Event.h"</span></div>
|
||
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include "core/utils/MemoryUtils.h"</span></div>
|
||
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div>
|
||
|
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespaceGpgFrontend_1_1Thread.html"> 39</a></span> <span class="keyword">namespace </span><a class="code" href="namespaceGpgFrontend_1_1Thread.html">GpgFrontend::Thread</a> {</div>
|
||
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">class </span><a class="code" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html">TaskRunner</a>;</div>
|
||
|
<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>  </div>
|
||
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">namespace </span><a class="code" href="namespaceGpgFrontend_1_1Module.html">GpgFrontend::Module</a> {</div>
|
||
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
||
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">using</span> TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>;</div>
|
||
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  </div>
|
||
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">class </span>Event;</div>
|
||
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">class </span>Module;</div>
|
||
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">class </span>GlobalModuleContext;</div>
|
||
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">class </span>ModuleManager;</div>
|
||
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
|
||
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">using</span> EventRefrernce = std::shared_ptr<Event>;</div>
|
||
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="keyword">using</span> ModuleIdentifier = QString;</div>
|
||
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">using</span> ModulePtr = std::shared_ptr<Module>;</div>
|
||
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">using</span> ModuleMangerPtr = std::shared_ptr<ModuleManager>;</div>
|
||
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">using</span> GMCPtr = std::shared_ptr<GlobalModuleContext>;</div>
|
||
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">using</span> Namespace = QString;</div>
|
||
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">using</span> Key = QString;</div>
|
||
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">using</span> LPCallback = std::function<void(Namespace, Key, <span class="keywordtype">int</span>, std::any)>;</div>
|
||
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div>
|
||
|
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1Module_1_1ModuleManager.html"> 61</a></span> <span class="keyword">class </span>GPGFRONTEND_CORE_EXPORT <a class="code" href="classGpgFrontend_1_1Module_1_1ModuleManager.html">ModuleManager</a></div>
|
||
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  : <span class="keyword">public</span> <a class="code" href="classGpgFrontend_1_1SingletonFunctionObject.html">SingletonFunctionObject</a><ModuleManager> {</div>
|
||
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">public</span>:</div>
|
||
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keyword">explicit</span> <a class="code" href="classGpgFrontend_1_1Module_1_1ModuleManager.html">ModuleManager</a>(<span class="keywordtype">int</span> channel);</div>
|
||
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  </div>
|
||
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keyword">virtual</span> ~<a class="code" href="classGpgFrontend_1_1Module_1_1ModuleManager.html">ModuleManager</a>() <span class="keyword">override</span>;</div>
|
||
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div>
|
||
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordtype">void</span> RegisterModule(ModulePtr);</div>
|
||
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  </div>
|
||
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keyword">auto</span> IsModuleActivated(ModuleIdentifier) -> bool;</div>
|
||
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  </div>
|
||
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordtype">void</span> TriggerEvent(EventRefrernce);</div>
|
||
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div>
|
||
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordtype">void</span> ActiveModule(ModuleIdentifier);</div>
|
||
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  </div>
|
||
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">void</span> DeactiveModule(ModuleIdentifier);</div>
|
||
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
|
||
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keyword">auto</span> GetTaskRunner(ModuleIdentifier) -> std::optional<TaskRunnerPtr>;</div>
|
||
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
||
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keyword">auto</span> <a class="code" href="namespaceGpgFrontend_1_1Module.html#a5e4614222306688d8c2f36fd4ae23de3">UpsertRTValue</a>(Namespace, Key, std::any) -> bool;</div>
|
||
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  </div>
|
||
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keyword">auto</span> RetrieveRTValue(Namespace, Key) -> std::optional<std::any>;</div>
|
||
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  </div>
|
||
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keyword">auto</span> ListenRTPublish(QObject*, Namespace, Key, LPCallback) -> bool;</div>
|
||
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div>
|
||
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">auto</span> <a class="code" href="namespaceGpgFrontend_1_1Module.html#a92a4ccb9246f778143ad3e88d2068d7c">ListRTChildKeys</a>(<span class="keyword">const</span> QString&, <span class="keyword">const</span> QString&) -> std::vector<Key>;</div>
|
||
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  </div>
|
||
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keyword">private</span>:</div>
|
||
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keyword">class </span><a class="code" href="classGpgFrontend_1_1Module_1_1ModuleManager_1_1Impl.html">Impl</a>;</div>
|
||
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  SecureUniquePtr<Impl> p_;</div>
|
||
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> };</div>
|
||
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
|
||
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span>... Args></div>
|
||
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">void</span> RegisterModule(Args&&... args) {</div>
|
||
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classGpgFrontend_1_1SingletonFunctionObject.html#ac963fee992753970bfb5c81608d4070f">ModuleManager::GetInstance</a>().RegisterModule(</div>
|
||
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  GpgFrontend::SecureCreateSharedObject<T>(std::forward<Args>(args)...));</div>
|
||
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> }</div>
|
||
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div>
|
||
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span>... Args></div>
|
||
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="keywordtype">void</span> RegisterAndActivateModule(Args&&... args) {</div>
|
||
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keyword">auto</span>& manager = <a class="code" href="classGpgFrontend_1_1SingletonFunctionObject.html#ac963fee992753970bfb5c81608d4070f">ModuleManager::GetInstance</a>();</div>
|
||
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keyword">auto</span> module =</div>
|
||
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  GpgFrontend::SecureCreateSharedObject<T>(std::forward<Args>(args)...);</div>
|
||
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  manager.RegisterModule(module);</div>
|
||
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  manager.ActiveModule(module->GetModuleIdentifier());</div>
|
||
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div>
|
||
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="keyword">template</span> <<span class="keyword">typename</span>... Args></div>
|
||
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="keywordtype">void</span> TriggerEvent(<span class="keyword">const</span> EventIdentifier& event_id, Args&&... args,</div>
|
||
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  Event::EventCallback e_cb = <span class="keyword">nullptr</span>) {</div>
|
||
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="classGpgFrontend_1_1SingletonFunctionObject.html#ac963fee992753970bfb5c81608d4070f">ModuleManager::GetInstance</a>().TriggerEvent(</div>
|
||
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  std::move(MakeEvent(event_id, std::forward<Args>(args)..., e_cb)));</div>
|
||
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> }</div>
|
||
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div>
|
||
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend_1_1Module.html#a9758d9f7ac0d94193aec29be101cee16">IsModuleAcivate</a>(ModuleIdentifier) -> bool;</div>
|
||
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  </div>
|
||
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend_1_1Module.html#a5e4614222306688d8c2f36fd4ae23de3">UpsertRTValue</a>(<span class="keyword">const</span> QString& namespace_,</div>
|
||
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">const</span> QString& key,</div>
|
||
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keyword">const</span> std::any& value) -> bool;</div>
|
||
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  </div>
|
||
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend_1_1Module.html#af88df9c72a7e6ec8dede9afc7234aca7">ListenRTPublishEvent</a>(QObject*, Namespace, Key,</div>
|
||
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  LPCallback) -> bool;</div>
|
||
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  </div>
|
||
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend_1_1Module.html#a92a4ccb9246f778143ad3e88d2068d7c">ListRTChildKeys</a>(<span class="keyword">const</span> QString& namespace_,</div>
|
||
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keyword">const</span> QString& key)</div>
|
||
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  -> std::vector<Key>;</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="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="keyword">auto</span> RetrieveRTValueTyped(<span class="keyword">const</span> QString& namespace_, <span class="keyword">const</span> QString& key)</div>
|
||
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  -> std::optional<T> {</div>
|
||
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keyword">auto</span> any_value =</div>
|
||
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classGpgFrontend_1_1SingletonFunctionObject.html#ac963fee992753970bfb5c81608d4070f">ModuleManager::GetInstance</a>().RetrieveRTValue(namespace_, key);</div>
|
||
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">if</span> (any_value && any_value->type() == <span class="keyword">typeid</span>(T)) {</div>
|
||
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">return</span> std::any_cast<T>(*any_value);</div>
|
||
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  }</div>
|
||
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">return</span> std::nullopt;</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>  </div>
|
||
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> <span class="keyword">auto</span> RetrieveRTValueTypedOrDefault(<span class="keyword">const</span> QString& namespace_,</div>
|
||
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">const</span> QString& key, <span class="keyword">const</span> T& defaultValue)</div>
|
||
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  -> T {</div>
|
||
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keyword">auto</span> any_value =</div>
|
||
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <a class="code" href="classGpgFrontend_1_1SingletonFunctionObject.html#ac963fee992753970bfb5c81608d4070f">ModuleManager::GetInstance</a>().RetrieveRTValue(namespace_, key);</div>
|
||
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">if</span> (any_value && any_value->type() == <span class="keyword">typeid</span>(T)) {</div>
|
||
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">return</span> std::any_cast<T>(*any_value);</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> defaultValue;</div>
|
||
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> }</div>
|
||
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
||
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> } <span class="comment">// namespace GpgFrontend::Module</span></div>
|
||
|
<div class="ttc" id="aclassGpgFrontend_1_1Module_1_1ModuleManager_1_1Impl_html"><div class="ttname"><a href="classGpgFrontend_1_1Module_1_1ModuleManager_1_1Impl.html">GpgFrontend::Module::ModuleManager::Impl</a></div><div class="ttdef"><b>Definition:</b> ModuleManager.cpp:45</div></div>
|
||
|
<div class="ttc" id="aclassGpgFrontend_1_1Module_1_1ModuleManager_html"><div class="ttname"><a href="classGpgFrontend_1_1Module_1_1ModuleManager.html">GpgFrontend::Module::ModuleManager</a></div><div class="ttdef"><b>Definition:</b> ModuleManager.h:62</div></div>
|
||
|
<div class="ttc" id="aclassGpgFrontend_1_1SingletonFunctionObject_html"><div class="ttname"><a href="classGpgFrontend_1_1SingletonFunctionObject.html">GpgFrontend::SingletonFunctionObject</a></div><div class="ttdef"><b>Definition:</b> GpgFunctionObject.h:58</div></div>
|
||
|
<div class="ttc" id="aclassGpgFrontend_1_1SingletonFunctionObject_html_ac963fee992753970bfb5c81608d4070f"><div class="ttname"><a href="classGpgFrontend_1_1SingletonFunctionObject.html#ac963fee992753970bfb5c81608d4070f">GpgFrontend::SingletonFunctionObject< ModuleManager >::GetInstance</a></div><div class="ttdeci">static auto GetInstance(int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> ModuleManager &</div><div class="ttdoc">Get the Instance object.</div><div class="ttdef"><b>Definition:</b> GpgFunctionObject.h:80</div></div>
|
||
|
<div class="ttc" id="aclassGpgFrontend_1_1Thread_1_1TaskRunner_html"><div class="ttname"><a href="classGpgFrontend_1_1Thread_1_1TaskRunner.html">GpgFrontend::Thread::TaskRunner</a></div><div class="ttdef"><b>Definition:</b> TaskRunner.h:37</div></div>
|
||
|
<div class="ttc" id="anamespaceGpgFrontend_1_1Module_html"><div class="ttname"><a href="namespaceGpgFrontend_1_1Module.html">GpgFrontend::Module</a></div><div class="ttdef"><b>Definition:</b> Event.cpp:31</div></div>
|
||
|
<div class="ttc" id="anamespaceGpgFrontend_1_1Module_html_a5e4614222306688d8c2f36fd4ae23de3"><div class="ttname"><a href="namespaceGpgFrontend_1_1Module.html#a5e4614222306688d8c2f36fd4ae23de3">GpgFrontend::Module::UpsertRTValue</a></div><div class="ttdeci">auto UpsertRTValue(const QString &namespace_, const QString &key, const std::any &value) -> bool</div><div class="ttdef"><b>Definition:</b> ModuleManager.cpp:122</div></div>
|
||
|
<div class="ttc" id="anamespaceGpgFrontend_1_1Module_html_a92a4ccb9246f778143ad3e88d2068d7c"><div class="ttname"><a href="namespaceGpgFrontend_1_1Module.html#a92a4ccb9246f778143ad3e88d2068d7c">GpgFrontend::Module::ListRTChildKeys</a></div><div class="ttdeci">auto ListRTChildKeys(const QString &namespace_, const QString &key) -> std::vector< Key ></div><div class="ttdef"><b>Definition:</b> ModuleManager.cpp:133</div></div>
|
||
|
<div class="ttc" id="anamespaceGpgFrontend_1_1Module_html_a9758d9f7ac0d94193aec29be101cee16"><div class="ttname"><a href="namespaceGpgFrontend_1_1Module.html#a9758d9f7ac0d94193aec29be101cee16">GpgFrontend::Module::IsModuleAcivate</a></div><div class="ttdeci">auto IsModuleAcivate(ModuleIdentifier id) -> bool</div><div class="ttdef"><b>Definition:</b> ModuleManager.cpp:118</div></div>
|
||
|
<div class="ttc" id="anamespaceGpgFrontend_1_1Module_html_af88df9c72a7e6ec8dede9afc7234aca7"><div class="ttname"><a href="namespaceGpgFrontend_1_1Module.html#af88df9c72a7e6ec8dede9afc7234aca7">GpgFrontend::Module::ListenRTPublishEvent</a></div><div class="ttdeci">auto ListenRTPublishEvent(QObject *o, Namespace n, Key k, LPCallback c) -> bool</div><div class="ttdef"><b>Definition:</b> ModuleManager.cpp:128</div></div>
|
||
|
<div class="ttc" id="anamespaceGpgFrontend_1_1Thread_html"><div class="ttname"><a href="namespaceGpgFrontend_1_1Thread.html">GpgFrontend::Thread</a></div><div class="ttdef"><b>Definition:</b> ModuleManager.h:39</div></div>
|
||
|
</div><!-- fragment --></div><!-- contents -->
|
||
|
</div><!-- doc-content -->
|
||
|
<!-- start footer part -->
|
||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
<ul>
|
||
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.html">core</a></li><li class="navelem"><a class="el" href="dir_c716e90dc5842b86ea85e72f843b3f55.html">module</a></li><li class="navelem"><b>ModuleManager.h</b></li>
|
||
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|