File: Poco.ActiveResult.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (140 lines) | stat: -rw-r--r-- 11,283 bytes parent folder | download | duplicates (2)
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
<!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>
<title>Class Poco::ActiveResult</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="template">template &lt; class RT &gt;</h1>
<h1 class="symbol">class ActiveResult</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Threading<br />
<b>Header:</b> Poco/ActiveResult.h</p>
<h2>Description</h2>
<div class="description">
<p>Creates an <a href="Poco.ActiveResultHolder.html" title="class Poco::ActiveResultHolder">ActiveResultHolder</a>. Pauses the caller until the result becomes available. Waits up to the specified interval for the result to become available. Returns true if the result became available, false otherwise. Waits up to the specified interval for the result to become available. Throws a <a href="Poco.TimeoutException.html" title="class Poco::TimeoutException">TimeoutException</a> if the result did not became available. Notifies the invoking thread that the result became available. Returns true if the active method failed (and threw an exception). Information about the exception can be obtained by calling <a href="Poco.ActiveResult.html#3462" title="Poco::ActiveResult::error()">error</a>(). If the active method threw an exception, a textual representation of the exception is returned. An empty string is returned if the active method completed successfully. If the active method threw an exception, a clone of the exception object is returned, otherwise null. Sets the exception. Sets the exception. This class holds the result of an asynchronous method invocation (see class <a href="Poco.ActiveMethod.html" title="class Poco::ActiveMethod">ActiveMethod</a>). It is used to pass the  result from the execution thread back to the invocation thread.  </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.ActiveResult.html#3460" title="Poco::ActiveResult::available()">available</a>, <a href="Poco.ActiveResult.html#3452" title="Poco::ActiveResult::data()">data</a>, <a href="Poco.ActiveResult.html#3462" title="Poco::ActiveResult::error()">error</a>, <a href="Poco.ActiveResult.html#3463" title="Poco::ActiveResult::exception()">exception</a>, <a href="Poco.ActiveResult.html#3461" title="Poco::ActiveResult::failed()">failed</a>, <a href="Poco.ActiveResult.html#3464" title="Poco::ActiveResult::notify()">notify</a>, <a href="Poco.ActiveResult.html#3448" title="Poco::ActiveResult::operator =()">operator&nbsp;=</a>, <a href="Poco.ActiveResult.html#3450" title="Poco::ActiveResult::swap()">swap</a>, <a href="Poco.ActiveResult.html#3456" title="Poco::ActiveResult::tryWait()">tryWait</a>, <a href="Poco.ActiveResult.html#3455" title="Poco::ActiveResult::wait()">wait</a></p>
<h2>Types</h2>
<h3><a name="3442">ActiveResultHolderType</a></h3>
<p class="decl">typedef <a href="Poco.ActiveResultHolder.html" title="class Poco::ActiveResultHolder">ActiveResultHolder</a> &lt; <a href="Poco.ActiveResult.html#3441" title="Poco::ActiveResult::ResultType">ResultType</a> &gt; <a href="Poco.ActiveResult.html#3442" title="Poco::ActiveResult::ActiveResultHolderType">ActiveResultHolderType</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="3441">ResultType</a></h3>
<p class="decl">typedef RT <a href="Poco.ActiveResult.html#3441" title="Poco::ActiveResult::ResultType">ResultType</a>;</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="3443">ActiveResult</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.ActiveResult.html#3442" title="Poco::ActiveResult::ActiveResultHolderType">ActiveResultHolderType</a> * pHolder<br />);</p>
<div class="description">
<p>Creates the active result. For internal use only. </p>
</div>
<h3><a name="3445">ActiveResult</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a> &amp; result<br />);</p>
<div class="description">
<p>Copy constructor. </p>
</div>
<h2>Destructor</h2>
<h3><a name="3447">~ActiveResult</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">~<a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a>();</p>
<div class="description">
<p>Destroys the result. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="3460">available</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool available() const;</p>
<div class="description">
<p>Returns true if a result is available. </p>
</div>
<h3><a name="3452">data</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.ActiveResult.html#3441" title="Poco::ActiveResult::ResultType">ResultType</a> &amp; data() const;</p>
<div class="description">
<p>Returns a reference to the result data. </p>
</div>
<h3><a name="3453">data</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void data(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.ActiveResult.html#3441" title="Poco::ActiveResult::ResultType">ResultType</a> * pValue<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3465">data</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.ActiveResult.html#3441" title="Poco::ActiveResult::ResultType">ResultType</a> &amp; data();</p>
<div class="description">
<p>Returns a non-const reference to the result data. For internal use only. </p>
</div>
<h3><a name="3462">error</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::string error() const;</p>
<div class="description">
<p>If the active method threw an exception, a textual representation of the exception is returned. An empty string is returned if the active method completed successfully. </p>
</div>
<h3><a name="3466">error</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void error(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; msg<br />);</p>
<div class="description">
<p>Sets the failed flag and the exception message. </p>
</div>
<h3><a name="3468">error</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void error(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Exception.html" title="class Poco::Exception">Exception</a> &amp; exc<br />);</p>
<div class="description">
<p>Sets the failed flag and the exception message. </p>
</div>
<h3><a name="3463">exception</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Exception.html" title="class Poco::Exception">Exception</a> * exception() const;</p>
<div class="description">
<p>If the active method threw an exception, a clone of the exception object is returned, otherwise null. </p>
</div>
<h3><a name="3461">failed</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool failed() const;</p>
<div class="description">
<p>Returns true if the active method failed (and threw an exception). Information about the exception can be obtained by calling <a href="Poco.ActiveResult.html#3462" title="Poco::ActiveResult::error()">error</a>(). </p>
</div>
<h3><a name="3464">notify</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void notify();</p>
<div class="description">
<p>Notifies the invoking thread that the result became available. For internal use only. </p>
</div>
<h3><a name="3448">operator =</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a> &amp; result<br />);</p>
<div class="description">
<p>Assignment operator. </p>
</div>
<h3><a name="3450">swap</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void swap(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.ActiveResult.html" title="class Poco::ActiveResult">ActiveResult</a> &amp; result<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="3456">tryWait</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool tryWait(<br />&nbsp;&nbsp;&nbsp;&nbsp;long milliseconds<br />);</p>
<div class="description">
<p>Waits up to the specified interval for the result to become available. Returns true if the result became available, false otherwise. </p>
</div>
<h3><a name="3455">wait</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void wait();</p>
<div class="description">
<p>Pauses the caller until the result becomes available. </p>
</div>
<h3><a name="3458">wait</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void wait(<br />&nbsp;&nbsp;&nbsp;&nbsp;long milliseconds<br />);</p>
<div class="description">
<p>Waits up to the specified interval for the result to become available. Throws a <a href="Poco.TimeoutException.html" title="class Poco::TimeoutException">TimeoutException</a> if the result did not became available. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>