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 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>OmniEvents::EventQueue class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
<hr><h1>OmniEvents::EventQueue Class Reference</h1>The <a class="el" href="a00049.html">EventQueue</a> is a circular buffer, that contains _size-1 events.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="a00158.html">EventQueue.h</a>></code>
<p>
<a href="a00011.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="a00049.html#a0">EventQueue</a> (long size=1023)</td></tr>
<tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="a00049.html#a1">~EventQueue</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="a00049.html#a2">setFilter</a> (<a class="el" href="a00051.html">Filter</a> *filter)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="a00049.html#a3">append</a> (CORBA::Any *event)</td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>long </td><td valign=bottom><a class="el" href="a00049.html#o0">_next</a></td></tr>
<tr><td> </td><td><font size=-1><em>Always points to the next slot to which an event will be written.</em> <a href="#o0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>long </td><td valign=bottom><a class="el" href="a00049.html#o1">_size</a></td></tr>
<tr><td nowrap align=right valign=top>CORBA::Any ** </td><td valign=bottom><a class="el" href="a00049.html#o2">_queue</a></td></tr>
<tr><td nowrap align=right valign=top>auto_ptr< <a class="el" href="a00051.html">Filter</a> > </td><td valign=bottom><a class="el" href="a00049.html#o3">_filter</a></td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="a00049.html#l0">Reader</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="a00049.html">EventQueue</a> is a circular buffer, that contains _size-1 events.
<p>
Events are stored as pointers to CORBA::Any. The <a class="el" href="a00050.html">Reader</a> class is a mix-in for classes that need to consume events from the queue. Readers that cannot keep up with the flow of messages into the queue will skip _size events whenever the back of the queue catches up with them. This implements the usual 'fresh business first' pattern for deciding what to discard.
<p>
Events are not scavenged from the queue. This means that once the queue has filled up, it will never contain fewer than _size-1 events. This strategy is usually somewhat wasteful of memory, but guarantees that the worst-case memory usage will never rise above the defined maximum.
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00056">56</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
<a name="a0" doxytag="OmniEvents::EventQueue::EventQueue"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OmniEvents::EventQueue::EventQueue </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">long </td>
<td class="mdname1" valign="top" nowrap> <em>size</em> = 1023 </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00157.html#l00043">43</a> of file <a class="el" href="a00157.html">EventQueue.cc</a>.
<p>
References <a class="el" href="a00158.html#l00092">_queue</a>, <a class="el" href="a00158.html#l00091">_size</a>, and <a class="el" href="a00175.html#l00049">DB</a>. </td>
</tr>
</table>
<a name="a1" doxytag="OmniEvents::EventQueue::~EventQueue"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> OmniEvents::EventQueue::~EventQueue </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00157.html#l00057">57</a> of file <a class="el" href="a00157.html">EventQueue.cc</a>.
<p>
References <a class="el" href="a00158.html#l00092">_queue</a>, and <a class="el" href="a00158.html#l00091">_size</a>. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="OmniEvents::EventQueue::append"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void OmniEvents::EventQueue::append </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CORBA::Any * </td>
<td class="mdname1" valign="top" nowrap> <em>event</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00078">78</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.
<p>
References <a class="el" href="a00158.html#l00093">_filter</a>, <a class="el" href="a00158.html#l00090">_next</a>, <a class="el" href="a00158.html#l00092">_queue</a>, and <a class="el" href="a00158.html#l00091">_size</a>.
<p>
Referenced by <a class="el" href="a00143.html#l00095">OmniEvents::ConsumerAdmin_i::send</a>(). </td>
</tr>
</table>
<a name="a2" doxytag="OmniEvents::EventQueue::setFilter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void OmniEvents::EventQueue::setFilter </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a00051.html">Filter</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>filter</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00072">72</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.
<p>
References <a class="el" href="a00158.html#l00093">_filter</a>.
<p>
Referenced by <a class="el" href="a00143.html#l00057">OmniEvents::ConsumerAdmin_i::ConsumerAdmin_i</a>(). </td>
</tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a name="l0" doxytag="OmniEvents::EventQueue::Reader"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> friend class Reader<code> [friend]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00095">95</a> of file <a class="el" href="a00158.html">EventQueue.h</a>. </td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="o3" doxytag="OmniEvents::EventQueue::_filter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> auto_ptr<<a class="el" href="a00051.html">Filter</a>> OmniEvents::EventQueue::_filter<code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00093">93</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.
<p>
Referenced by <a class="el" href="a00158.html#l00078">append</a>(), and <a class="el" href="a00158.html#l00072">setFilter</a>(). </td>
</tr>
</table>
<a name="o0" doxytag="OmniEvents::EventQueue::_next"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> long OmniEvents::EventQueue::_next<code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Always points to the next slot to which an event will be written.
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00090">90</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.
<p>
Referenced by <a class="el" href="a00158.html#l00078">append</a>(), and <a class="el" href="a00157.html#l00078">OmniEvents::EventQueue::Reader::moreEvents</a>(). </td>
</tr>
</table>
<a name="o2" doxytag="OmniEvents::EventQueue::_queue"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> CORBA::Any** OmniEvents::EventQueue::_queue<code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00092">92</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.
<p>
Referenced by <a class="el" href="a00158.html#l00078">append</a>(), <a class="el" href="a00157.html#l00043">EventQueue</a>(), <a class="el" href="a00157.html#l00084">OmniEvents::EventQueue::Reader::nextEvent</a>(), and <a class="el" href="a00157.html#l00057">~EventQueue</a>(). </td>
</tr>
</table>
<a name="o1" doxytag="OmniEvents::EventQueue::_size"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> long OmniEvents::EventQueue::_size<code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a00158.html#l00091">91</a> of file <a class="el" href="a00158.html">EventQueue.h</a>.
<p>
Referenced by <a class="el" href="a00158.html#l00078">append</a>(), <a class="el" href="a00157.html#l00043">EventQueue</a>(), <a class="el" href="a00157.html#l00084">OmniEvents::EventQueue::Reader::nextEvent</a>(), and <a class="el" href="a00157.html#l00057">~EventQueue</a>(). </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a00158.html">EventQueue.h</a><li><a class="el" href="a00157.html">EventQueue.cc</a></ul>
<hr><address align="right"><small>Generated on Fri Nov 19 17:42:33 2004 for OmniEvents by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>
|