~peekabot-devs/peekabot/peekabot.org

« back to all changes in this revision

Viewing changes to doc/0.8.x/classpeekabot_1_1client_1_1Status.html

  • Committer: Staffan Gimåker
  • Date: 2011-01-30 20:22:14 UTC
  • Revision ID: staffan@gimaker.se-20110130202214-joasm9qvwni8n0g7
Add doxygen documentation for 0.8.x.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
2
<html xmlns="http://www.w3.org/1999/xhtml">
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
5
<title>peekabot: Status Class Reference</title>
 
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
 
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
 
8
</head>
 
9
<body>
 
10
<!-- Generated by Doxygen 1.7.1 -->
 
11
<div class="navigation" id="top">
 
12
  <div class="tabs">
 
13
    <ul class="tablist">
 
14
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
 
15
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
 
16
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
 
17
      <li><a href="files.html"><span>Files</span></a></li>
 
18
    </ul>
 
19
  </div>
 
20
  <div class="tabs2">
 
21
    <ul class="tablist">
 
22
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
 
23
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
 
24
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
 
25
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
 
26
    </ul>
 
27
  </div>
 
28
  <div class="navpath">
 
29
    <ul>
 
30
      <li><b>peekabot</b>      </li>
 
31
      <li><b>client</b>      </li>
 
32
      <li><a class="el" href="classpeekabot_1_1client_1_1Status.html">Status</a>      </li>
 
33
    </ul>
 
34
  </div>
 
35
</div>
 
36
<div class="header">
 
37
  <div class="summary">
 
38
<a href="#pub-methods">Public Member Functions</a>  </div>
 
39
  <div class="headertitle">
 
40
<h1>Status Class Reference</h1>  </div>
 
41
</div>
 
42
<div class="contents">
 
43
<!-- doxytag: class="peekabot::client::Status" -->
 
44
<p>Provides a <em>thread-safe</em> way for surveying the outcome, henceforth referred to as status, of <em>one</em> operation (action).  
 
45
<a href="#_details">More...</a></p>
 
46
<div class="dynheader">
 
47
Inheritance diagram for Status:</div>
 
48
<div class="dyncontent">
 
49
<div class="center"><img src="classpeekabot_1_1client_1_1Status__inherit__graph.png" border="0" usemap="#Status_inherit__map" alt="Inheritance graph"/></div>
 
50
<map name="Status_inherit__map" id="Status_inherit__map">
 
51
<area shape="rect" id="node3" href="classpeekabot_1_1client_1_1Result.html" title="Encapsulates a result from an operation, such as getting an object&#39;s color, executed remotely on ..." alt="" coords="5,83,107,112"/></map>
 
52
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
 
53
 
 
54
<p><a href="classpeekabot_1_1client_1_1Status-members.html">List of all members.</a></p>
 
55
<table class="memberdecls">
 
56
<tr><td colspan="2"><h2><a name="pub-methods"></a>
 
57
Public Member Functions</h2></td></tr>
 
58
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aafde58df1b2a6a91d5b674373be3ffc5"></a><!-- doxytag: member="peekabot::client::Status::Status" ref="aafde58df1b2a6a91d5b674373be3ffc5" args="()" -->
 
59
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#aafde58df1b2a6a91d5b674373be3ffc5">Status</a> ()</td></tr>
 
60
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an unused status object, not initially associated with an operation. <br/></td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#a239c8a58231de2a3407b87ad4b63a40a">Status</a> (boost::shared_ptr&lt; OperationStatus &gt; status)</td></tr>
 
62
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a status object tracking the outcome of the operation associated with the given OperationStatus object.  <a href="#a239c8a58231de2a3407b87ad4b63a40a"></a><br/></td></tr>
 
63
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e08d1186b7c6566c5b0b8a9009df182"></a><!-- doxytag: member="peekabot::client::Status::operator=" ref="a2e08d1186b7c6566c5b0b8a9009df182" args="(boost::shared_ptr&lt; OperationStatus &gt; status)" -->
 
64
<a class="el" href="classpeekabot_1_1client_1_1Status.html">Status</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (boost::shared_ptr&lt; OperationStatus &gt; status)</td></tr>
 
65
<tr><td class="memItemLeft" align="right" valign="top">OperationOutcome&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#a1faa468105426c442f7ac64eba8f6d8d">get_outcome</a> () const </td></tr>
 
66
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the operation's outcome.  <a href="#a1faa468105426c442f7ac64eba8f6d8d"></a><br/></td></tr>
 
67
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#a146e37bcbdea065d6cba3ea0c6f73af2">has_completed</a> () const </td></tr>
 
68
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get whether the operation's status is available.  <a href="#a146e37bcbdea065d6cba3ea0c6f73af2"></a><br/></td></tr>
 
69
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#a5c8674792c35aee596f7fcb3e7a1455f">succeeded</a> () const </td></tr>
 
70
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Waits until the operation has completed and returns <code>true</code> if it succeeded.  <a href="#a5c8674792c35aee596f7fcb3e7a1455f"></a><br/></td></tr>
 
71
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#a7b81417e1a230fb8b6f46e5ae68b25d9">failed</a> () const </td></tr>
 
72
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Waits until the operation has completed and returns <code>false</code> if it failed.  <a href="#a7b81417e1a230fb8b6f46e5ae68b25d9"></a><br/></td></tr>
 
73
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#ac73f74a61e39e9e42b5b2b585e8b9b7d">wait_until_completed</a> () const </td></tr>
 
74
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait until <a class="el" href="classpeekabot_1_1client_1_1Status.html#a146e37bcbdea065d6cba3ea0c6f73af2" title="Get whether the operation&#39;s status is available.">has_completed()</a> is <code>true</code>.  <a href="#ac73f74a61e39e9e42b5b2b585e8b9b7d"></a><br/></td></tr>
 
75
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpeekabot_1_1client_1_1Status.html#a150beb1e8252419fd540364902c7c763">get_error_message</a> () const </td></tr>
 
76
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return's the error message in case of failure.  <a href="#a150beb1e8252419fd540364902c7c763"></a><br/></td></tr>
 
77
</table>
 
78
<hr/><a name="_details"></a><h2>Detailed Description</h2>
 
79
<p>Provides a <em>thread-safe</em> way for surveying the outcome, henceforth referred to as status, of <em>one</em> operation (action). </p>
 
80
<p>It provides the "end user" with methods for querying whether a status is yet available and blocking until a status is available.</p>
 
81
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classpeekabot_1_1client_1_1Result.html" title="Encapsulates a result from an operation, such as getting an object&#39;s color, executed remotely on ...">Result</a>, <a class="el" href="classpeekabot_1_1client_1_1DelayedDispatch.html" title="A wrapper class that enables optional status tracking of operations.">DelayedDispatch</a>, OperationStatus </dd></dl>
 
82
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
 
83
<a class="anchor" id="a239c8a58231de2a3407b87ad4b63a40a"></a><!-- doxytag: member="peekabot::client::Status::Status" ref="a239c8a58231de2a3407b87ad4b63a40a" args="(boost::shared_ptr&lt; OperationStatus &gt; status)" -->
 
84
<div class="memitem">
 
85
<div class="memproto">
 
86
      <table class="memname">
 
87
        <tr>
 
88
          <td class="memname"><a class="el" href="classpeekabot_1_1client_1_1Status.html">Status</a> </td>
 
89
          <td>(</td>
 
90
          <td class="paramtype">boost::shared_ptr&lt; OperationStatus &gt;&nbsp;</td>
 
91
          <td class="paramname"> <em>status</em></td>
 
92
          <td>&nbsp;)&nbsp;</td>
 
93
          <td></td>
 
94
        </tr>
 
95
      </table>
 
96
</div>
 
97
<div class="memdoc">
 
98
 
 
99
<p>Create a status object tracking the outcome of the operation associated with the given OperationStatus object. </p>
 
100
<dl><dt><b>Parameters:</b></dt><dd>
 
101
  <table border="0" cellspacing="2" cellpadding="0">
 
102
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The OperationStatus object associated with the operation to track. </td></tr>
 
103
  </table>
 
104
  </dd>
 
105
</dl>
 
106
 
 
107
</div>
 
108
</div>
 
109
<hr/><h2>Member Function Documentation</h2>
 
110
<a class="anchor" id="a7b81417e1a230fb8b6f46e5ae68b25d9"></a><!-- doxytag: member="peekabot::client::Status::failed" ref="a7b81417e1a230fb8b6f46e5ae68b25d9" args="() const " -->
 
111
<div class="memitem">
 
112
<div class="memproto">
 
113
      <table class="memname">
 
114
        <tr>
 
115
          <td class="memname">bool failed </td>
 
116
          <td>(</td>
 
117
          <td class="paramname"></td>
 
118
          <td>&nbsp;)&nbsp;</td>
 
119
          <td> const</td>
 
120
        </tr>
 
121
      </table>
 
122
</div>
 
123
<div class="memdoc">
 
124
 
 
125
<p>Waits until the operation has completed and returns <code>false</code> if it failed. </p>
 
126
<p>Note if the operation succeeds but the client is disconnected before the client is notified <a class="el" href="classpeekabot_1_1client_1_1Status.html#a7b81417e1a230fb8b6f46e5ae68b25d9" title="Waits until the operation has completed and returns false if it failed.">failed()</a> will return true, even though the operation didn't really fail.</p>
 
127
<dl class="pre"><dt><b>Precondition:</b></dt><dd>The object is not unused, e.g. it tracks the outcome of an operation.</dd></dl>
 
128
<dl><dt><b>Exceptions:</b></dt><dd>
 
129
  <table border="0" cellspacing="2" cellpadding="0">
 
130
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error</em>&nbsp;</td><td>The status object is unused. </td></tr>
 
131
  </table>
 
132
  </dd>
 
133
</dl>
 
134
 
 
135
</div>
 
136
</div>
 
137
<a class="anchor" id="a150beb1e8252419fd540364902c7c763"></a><!-- doxytag: member="peekabot::client::Status::get_error_message" ref="a150beb1e8252419fd540364902c7c763" args="() const " -->
 
138
<div class="memitem">
 
139
<div class="memproto">
 
140
      <table class="memname">
 
141
        <tr>
 
142
          <td class="memname">std::string get_error_message </td>
 
143
          <td>(</td>
 
144
          <td class="paramname"></td>
 
145
          <td>&nbsp;)&nbsp;</td>
 
146
          <td> const</td>
 
147
        </tr>
 
148
      </table>
 
149
</div>
 
150
<div class="memdoc">
 
151
 
 
152
<p>Return's the error message in case of failure. </p>
 
153
<dl class="pre"><dt><b>Precondition:</b></dt><dd>Defined only when the outcome is <code>OPERATION_FAILED</code>.</dd></dl>
 
154
<dl><dt><b>Exceptions:</b></dt><dd>
 
155
  <table border="0" cellspacing="2" cellpadding="0">
 
156
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error</em>&nbsp;</td><td>The status object is unused. </td></tr>
 
157
  </table>
 
158
  </dd>
 
159
</dl>
 
160
 
 
161
</div>
 
162
</div>
 
163
<a class="anchor" id="a1faa468105426c442f7ac64eba8f6d8d"></a><!-- doxytag: member="peekabot::client::Status::get_outcome" ref="a1faa468105426c442f7ac64eba8f6d8d" args="() const " -->
 
164
<div class="memitem">
 
165
<div class="memproto">
 
166
      <table class="memname">
 
167
        <tr>
 
168
          <td class="memname">OperationOutcome get_outcome </td>
 
169
          <td>(</td>
 
170
          <td class="paramname"></td>
 
171
          <td>&nbsp;)&nbsp;</td>
 
172
          <td> const</td>
 
173
        </tr>
 
174
      </table>
 
175
</div>
 
176
<div class="memdoc">
 
177
 
 
178
<p>Get the operation's outcome. </p>
 
179
<dl class="pre"><dt><b>Precondition:</b></dt><dd>Defined only when <a class="el" href="classpeekabot_1_1client_1_1Status.html#a146e37bcbdea065d6cba3ea0c6f73af2" title="Get whether the operation&#39;s status is available.">has_completed()</a> is <code>true</code>. The object must also not be unused.</dd></dl>
 
180
<dl><dt><b>Exceptions:</b></dt><dd>
 
181
  <table border="0" cellspacing="2" cellpadding="0">
 
182
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error</em>&nbsp;</td><td>Thrown if the preconditions are not met. </td></tr>
 
183
  </table>
 
184
  </dd>
 
185
</dl>
 
186
 
 
187
</div>
 
188
</div>
 
189
<a class="anchor" id="a146e37bcbdea065d6cba3ea0c6f73af2"></a><!-- doxytag: member="peekabot::client::Status::has_completed" ref="a146e37bcbdea065d6cba3ea0c6f73af2" args="() const " -->
 
190
<div class="memitem">
 
191
<div class="memproto">
 
192
      <table class="memname">
 
193
        <tr>
 
194
          <td class="memname">bool has_completed </td>
 
195
          <td>(</td>
 
196
          <td class="paramname"></td>
 
197
          <td>&nbsp;)&nbsp;</td>
 
198
          <td> const</td>
 
199
        </tr>
 
200
      </table>
 
201
</div>
 
202
<div class="memdoc">
 
203
 
 
204
<p>Get whether the operation's status is available. </p>
 
205
<dl class="pre"><dt><b>Precondition:</b></dt><dd>The object is not unused, e.g. it tracks the outcome of an operation.</dd></dl>
 
206
<dl><dt><b>Exceptions:</b></dt><dd>
 
207
  <table border="0" cellspacing="2" cellpadding="0">
 
208
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error</em>&nbsp;</td><td>The status object is unused. </td></tr>
 
209
  </table>
 
210
  </dd>
 
211
</dl>
 
212
 
 
213
</div>
 
214
</div>
 
215
<a class="anchor" id="a5c8674792c35aee596f7fcb3e7a1455f"></a><!-- doxytag: member="peekabot::client::Status::succeeded" ref="a5c8674792c35aee596f7fcb3e7a1455f" args="() const " -->
 
216
<div class="memitem">
 
217
<div class="memproto">
 
218
      <table class="memname">
 
219
        <tr>
 
220
          <td class="memname">bool succeeded </td>
 
221
          <td>(</td>
 
222
          <td class="paramname"></td>
 
223
          <td>&nbsp;)&nbsp;</td>
 
224
          <td> const</td>
 
225
        </tr>
 
226
      </table>
 
227
</div>
 
228
<div class="memdoc">
 
229
 
 
230
<p>Waits until the operation has completed and returns <code>true</code> if it succeeded. </p>
 
231
<dl class="pre"><dt><b>Precondition:</b></dt><dd>The object is not unused, e.g. it tracks the outcome of an operation.</dd></dl>
 
232
<dl><dt><b>Exceptions:</b></dt><dd>
 
233
  <table border="0" cellspacing="2" cellpadding="0">
 
234
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error</em>&nbsp;</td><td>The status object is unused. </td></tr>
 
235
  </table>
 
236
  </dd>
 
237
</dl>
 
238
 
 
239
</div>
 
240
</div>
 
241
<a class="anchor" id="ac73f74a61e39e9e42b5b2b585e8b9b7d"></a><!-- doxytag: member="peekabot::client::Status::wait_until_completed" ref="ac73f74a61e39e9e42b5b2b585e8b9b7d" args="() const " -->
 
242
<div class="memitem">
 
243
<div class="memproto">
 
244
      <table class="memname">
 
245
        <tr>
 
246
          <td class="memname">bool wait_until_completed </td>
 
247
          <td>(</td>
 
248
          <td class="paramname"></td>
 
249
          <td>&nbsp;)&nbsp;</td>
 
250
          <td> const</td>
 
251
        </tr>
 
252
      </table>
 
253
</div>
 
254
<div class="memdoc">
 
255
 
 
256
<p>Wait until <a class="el" href="classpeekabot_1_1client_1_1Status.html#a146e37bcbdea065d6cba3ea0c6f73af2" title="Get whether the operation&#39;s status is available.">has_completed()</a> is <code>true</code>. </p>
 
257
<p>If the operation outcome is already available the method will return promptly.</p>
 
258
<dl class="pre"><dt><b>Precondition:</b></dt><dd>The object is not unused, e.g. it tracks the outcome of an operation.</dd></dl>
 
259
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns <code>true</code> if the client was disconnected before a response was received, <code>false</code> otherwise.</dd></dl>
 
260
<dl><dt><b>Exceptions:</b></dt><dd>
 
261
  <table border="0" cellspacing="2" cellpadding="0">
 
262
    <tr><td valign="top"></td><td valign="top"><em>std::logic_error</em>&nbsp;</td><td>The status object is unused. </td></tr>
 
263
  </table>
 
264
  </dd>
 
265
</dl>
 
266
 
 
267
</div>
 
268
</div>
 
269
<hr/>The documentation for this class was generated from the following files:<ul>
 
270
<li>src/client/<a class="el" href="Status_8hh_source.html">Status.hh</a></li>
 
271
<li>src/client/Status.cc</li>
 
272
</ul>
 
273
</div>
 
274
<hr class="footer"/><address class="footer"><small>Generated on Sun Jan 30 2011 for peekabot by&nbsp;
 
275
<a href="http://www.doxygen.org/index.html">
 
276
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
 
277
</body>
 
278
</html>