<!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> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>GNU CommonC++: ost::Event 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.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</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> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_event.html">Event</a> </div> </div> <div class="contents"> <h1>ost::Event Class Reference</h1><!-- doxytag: class="ost::Event" --> <p>The <a class="el" href="classost_1_1_event.html" title="The Event class implements a feature originally found in the WIN32 API; event notification...">Event</a> class implements a feature originally found in the WIN32 API; event notification. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="thread_8h_source.html">thread.h</a>></code></p> <p><a href="classost_1_1_event-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_event.html#af92ddd30a5b7b2c7af47f6bacf15941a">Event</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_event.html#aff4748ff1779334b3513cbb93d7576e8">~Event</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_event.html#a67e76860dfae2ceb07feae427566ed1a">reset</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Once signaled, the <a class="el" href="classost_1_1_event.html" title="The Event class implements a feature originally found in the WIN32 API; event notification...">Event</a> class must be "reset" before responding to a new signal. <a href="#a67e76860dfae2ceb07feae427566ed1a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_event.html#a1a41fd6223003aaec5381fd2205ff030">signal</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal the event for the waiting thread. <a href="#a1a41fd6223003aaec5381fd2205ff030"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_event.html#abb0e6f5a8787691c2d4cc5bb10fa74e3">wait</a> (<a class="el" href="thread_8h.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timer)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Wait either for the event to be signaled by another thread or for the specified timeout duration. <a href="#abb0e6f5a8787691c2d4cc5bb10fa74e3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_event.html#acd85c211c5e6ef9d33fb9b66a9ac097f">wait</a> (void)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>The <a class="el" href="classost_1_1_event.html" title="The Event class implements a feature originally found in the WIN32 API; event notification...">Event</a> class implements a feature originally found in the WIN32 API; event notification. </p> <p>A target thread waits on a resetable <a class="el" href="classost_1_1_event.html" title="The Event class implements a feature originally found in the WIN32 API; event notification...">Event</a>, and one or more other threads can then signal the waiting thread to resume execution. A timeout can be used to specify a wait duration in milliseconds. The <a class="el" href="classost_1_1_event.html" title="The Event class implements a feature originally found in the WIN32 API; event notification...">Event</a> class must be reset before it can be used again as a trigger. These event objects use a trigger/reset mechanism and are related to low level conditional variables.</p> <dl class="author"><dt><b>Author:</b></dt><dd>: David Sugar <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> synchornization on event notification. </dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="af92ddd30a5b7b2c7af47f6bacf15941a"></a><!-- doxytag: member="ost::Event::Event" ref="af92ddd30a5b7b2c7af47f6bacf15941a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ost::Event::Event </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aff4748ff1779334b3513cbb93d7576e8"></a><!-- doxytag: member="ost::Event::~Event" ref="aff4748ff1779334b3513cbb93d7576e8" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual ost::Event::~Event </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a67e76860dfae2ceb07feae427566ed1a"></a><!-- doxytag: member="ost::Event::reset" ref="a67e76860dfae2ceb07feae427566ed1a" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ost::Event::reset </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Once signaled, the <a class="el" href="classost_1_1_event.html" title="The Event class implements a feature originally found in the WIN32 API; event notification...">Event</a> class must be "reset" before responding to a new signal. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classost_1_1_event.html#a1a41fd6223003aaec5381fd2205ff030" title="Signal the event for the waiting thread.">signal</a> </dd></dl> </div> </div> <a class="anchor" id="a1a41fd6223003aaec5381fd2205ff030"></a><!-- doxytag: member="ost::Event::signal" ref="a1a41fd6223003aaec5381fd2205ff030" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ost::Event::signal </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Signal the event for the waiting thread. </p> </div> </div> <a class="anchor" id="acd85c211c5e6ef9d33fb9b66a9ac097f"></a><!-- doxytag: member="ost::Event::wait" ref="acd85c211c5e6ef9d33fb9b66a9ac097f" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool ost::Event::wait </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="abb0e6f5a8787691c2d4cc5bb10fa74e3"></a><!-- doxytag: member="ost::Event::wait" ref="abb0e6f5a8787691c2d4cc5bb10fa74e3" args="(timeout_t timer)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool ost::Event::wait </td> <td>(</td> <td class="paramtype"><a class="el" href="thread_8h.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> </td> <td class="paramname"> <em>timer</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Wait either for the event to be signaled by another thread or for the specified timeout duration. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classost_1_1_event.html#a1a41fd6223003aaec5381fd2205ff030" title="Signal the event for the waiting thread.">signal</a> </dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if signaled, false if timed out. </dd></dl> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>timer</em> </td><td>timeout in milliseconds to wait for a signal. </td></tr> </table> </dd> </dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="thread_8h_source.html">thread.h</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Nov 12 09:55:47 2010 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>