<!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>event.cpp Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.17 --> <center> <a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>event.cpp</h1><a href="event_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 00008 <span class="preprocessor">#include "<a class="code" href="sysconfig_8h.html">sysconfig.h</a>"</span> 00009 <span class="preprocessor">#include "<a class="code" href="event_8h.html">event.h</a>"</span> 00010 <a name="l00020"></a><a class="code" href="classEvent.html#a0">00020</a> <a class="code" href="classEvent.html#a0">Event::Event</a>(<a class="code" href="event_8h.html#a5">Event_T</a> etype, SOCKET eid, <span class="keywordtype">int</span> elen, <span class="keyword">const</span> <span class="keywordtype">char</span>* edata) 00021 : mEventType(etype), mClientId(eid), mDataLen(elen) { 00022 <span class="keywordflow">if</span> (elen && edata) { <span class="comment">// These are optional - may be zeroed out.</span> 00023 <a class="code" href="classEvent.html#m3">mpData</a> = <span class="keyword">new</span> <span class="keywordtype">char</span>[elen + 1]; 00024 memcpy(<a class="code" href="classEvent.html#m3">mpData</a>, edata, elen); 00025 <a class="code" href="classEvent.html#m3">mpData</a>[elen] = <span class="charliteral">'\0'</span>; 00026 } <span class="keywordflow">else</span> { 00027 <a class="code" href="classEvent.html#m3">mpData</a> = NULL; 00028 <a class="code" href="classEvent.html#m2">mDataLen</a> = 0; 00029 } 00030 } 00031 <a name="l00035"></a><a class="code" href="classEvent.html#a1">00035</a> <a class="code" href="classEvent.html#a1">Event::~Event</a>() { 00036 <span class="keywordflow">if</span> (mpData) 00037 <span class="keyword">delete</span>[] <a class="code" href="classEvent.html#m3">mpData</a>; 00038 } 00039 </pre></div><hr><address style="align: right;"><small>Generated on Mon Mar 29 23:12:53 2004 for Paradigm 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.17 </small></address> </body> </html>