aboutsummaryrefslogtreecommitdiff
path: root/libcontextsubscriber/doc/html/class_context_subscriber_1_1_queued_invoker.html
blob: 236e88dc9f9ea325837eae05a2b35615b7d7bb70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libcontextsubscriber: ContextSubscriber::QueuedInvoker Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespace_context_subscriber.html">ContextSubscriber</a>::<a class="el" href="class_context_subscriber_1_1_queued_invoker.html">QueuedInvoker</a>
  </div>
</div>
<div class="contents">
<h1>ContextSubscriber::QueuedInvoker Class Reference</h1><!-- doxytag: class="ContextSubscriber::QueuedInvoker" -->A class that can invoke its own methods in a delayed way.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="queuedinvoker_8h-source.html">queuedinvoker.h</a>&gt;</code>
<p>

<p>
<a href="class_context_subscriber_1_1_queued_invoker-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_subscriber_1_1_queued_invoker.html#9e3fb1afd2eea8cb4b588f3d80bf2e3e">queuedCall</a> (const char *method)</td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_subscriber_1_1_queued_invoker.html#15135b7f30c409e3b8d0cd856444803a">QueuedInvoker</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_subscriber_1_1_queued_invoker.html#431ca591c990aa22bffb1cfed4b42aff">queueOnce</a> (const char *method)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the method <em>method</em> to be invoked when the event loop of this object runs next time.  <a href="#431ca591c990aa22bffb1cfed4b42aff"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Slots</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_subscriber_1_1_queued_invoker.html#b58352ea20647142ba50d529fc1b651b">onQueuedCall</a> (const char *method)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Slot which is executed when the event loop of this object runs.  <a href="#b58352ea20647142ba50d529fc1b651b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QMutex&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_subscriber_1_1_queued_invoker.html#ea2e2e6956a76f58083214bbb327a04c">callQueueLock</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Protects the callQueue.  <a href="#ea2e2e6956a76f58083214bbb327a04c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QSet&lt; QString &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_subscriber_1_1_queued_invoker.html#c786085eae3605b42b0e7f3cda99fe32">callQueue</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Methods to be invoked.  <a href="#c786085eae3605b42b0e7f3cda99fe32"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A class that can invoke its own methods in a delayed way. 
<p>
Via the method <a class="el" href="class_context_subscriber_1_1_queued_invoker.html#431ca591c990aa22bffb1cfed4b42aff" title="Sets the method method to be invoked when the event loop of this object runs next...">QueuedInvoker::queueOnce</a>, the given method is set to be invoked when the event loop of the object is entered. Each method is queued at most once. <a class="el" href="class_context_subscriber_1_1_queued_invoker.html" title="A class that can invoke its own methods in a delayed way.">QueuedInvoker</a> sends a signal to itself, and when the signal is processed, the method is invoked.<p>
<a class="el" href="class_context_subscriber_1_1_queued_invoker.html" title="A class that can invoke its own methods in a delayed way.">QueuedInvoker</a> is normally used by subclassing it. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="15135b7f30c409e3b8d0cd856444803a"></a><!-- doxytag: member="ContextSubscriber::QueuedInvoker::QueuedInvoker" ref="15135b7f30c409e3b8d0cd856444803a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ContextSubscriber::QueuedInvoker::QueuedInvoker           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b58352ea20647142ba50d529fc1b651b"></a><!-- doxytag: member="ContextSubscriber::QueuedInvoker::onQueuedCall" ref="b58352ea20647142ba50d529fc1b651b" args="(const char *method)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ContextSubscriber::QueuedInvoker::onQueuedCall           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>method</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Slot which is executed when the event loop of this object runs. 
<p>
Calls all the methods in the queue. 
</div>
</div><p>
<a class="anchor" name="9e3fb1afd2eea8cb4b588f3d80bf2e3e"></a><!-- doxytag: member="ContextSubscriber::QueuedInvoker::queuedCall" ref="9e3fb1afd2eea8cb4b588f3d80bf2e3e" args="(const char *method)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ContextSubscriber::QueuedInvoker::queuedCall           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>method</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="431ca591c990aa22bffb1cfed4b42aff"></a><!-- doxytag: member="ContextSubscriber::QueuedInvoker::queueOnce" ref="431ca591c990aa22bffb1cfed4b42aff" args="(const char *method)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ContextSubscriber::QueuedInvoker::queueOnce           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>method</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the method <em>method</em> to be invoked when the event loop of this object runs next time. 
<p>
If the method was already in the queue, it won't be inserted again. 
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="c786085eae3605b42b0e7f3cda99fe32"></a><!-- doxytag: member="ContextSubscriber::QueuedInvoker::callQueue" ref="c786085eae3605b42b0e7f3cda99fe32" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QSet&lt;QString&gt; <a class="el" href="class_context_subscriber_1_1_queued_invoker.html#c786085eae3605b42b0e7f3cda99fe32">ContextSubscriber::QueuedInvoker::callQueue</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Methods to be invoked. 
<p>

</div>
</div><p>
<a class="anchor" name="ea2e2e6956a76f58083214bbb327a04c"></a><!-- doxytag: member="ContextSubscriber::QueuedInvoker::callQueueLock" ref="ea2e2e6956a76f58083214bbb327a04c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMutex <a class="el" href="class_context_subscriber_1_1_queued_invoker.html#ea2e2e6956a76f58083214bbb327a04c">ContextSubscriber::QueuedInvoker::callQueueLock</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Protects the callQueue. 
<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="queuedinvoker_8h-source.html">queuedinvoker.h</a><li><a class="el" href="mocs_8cpp.html">mocs.cpp</a><li><a class="el" href="queuedinvoker_8cpp.html">queuedinvoker.cpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 23 08:59:23 2009 for libcontextsubscriber by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>