Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > ea24284f03fd4a8a4b64047514d93f64 > files > 161

lib64kdegames1-devel-3.5.9-2mdv2008.1.x86_64.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!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" lang="en_US" xml:lang="en_US">

<head>
  <title>libkdegames: KGameProcessIO Class Reference (libkdegames)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../..">API Reference</a>
 / <a href=".">libkdegames</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.5.5 -->
<div class="contents">
<h1>KGameProcessIO Class Reference</h1><!-- doxytag: class="KGameProcessIO" --><!-- doxytag: inherits="KGameIO" --><code>#include &lt;<a class="el" href="kgameio_8h-source.html">kgameio.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for KGameProcessIO:</div>
<div class="dynsection">

<p><center><img src="classKGameProcessIO.png" usemap="#KGameProcessIO_map" border="0" alt=""></center>
<map name="KGameProcessIO_map">
<area href="classKGameIO.html" alt="KGameIO" shape="rect" coords="0,0,111,24">
</map>
</div>

<p>
<a href="classKGameProcessIO-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="classKGameProcessIO.html" title="The KGameProcessIO class.">KGameProcessIO</a> class. 
<p>
It is used to create a computer player via a separate process and communicate transparetly with it. Its counterpart is the <a class="el" href="classKGameProcess.html">KGameProcess</a> class which needs to be used by the computer player. See its documentation for the definition of the computer player. <dl class="author" compact><dt><b>Author:</b></dt><dd>Martin Heni &lt;<a href="mailto:martin@heni-online.de">martin@heni-online.de</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="kgameio_8h-source.html#l00323">323</a> of file <a class="el" href="kgameio_8h-source.html">kgameio.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#5a1ec90348d26b912961aa36317fb98c">signalProcessQuery</a> (QDataStream &amp;stream, <a class="el" href="classKGameProcessIO.html">KGameProcessIO</a> *me)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#471cd73cf6737e12192cefef00b221c6">signalIOAdded</a> (<a class="el" href="classKGameIO.html">KGameIO</a> *game, QDataStream &amp;stream, <a class="el" href="classKPlayer.html">KPlayer</a> *p, bool *send)</td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#f8a129777a0080a01c1a6dbe1629e25e">KGameProcessIO</a> (const QString &amp;name)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#187fe65129580678be2950058b3c2b1c">~KGameProcessIO</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#ab06daea67f651f1637798e704529d97">rtti</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#e9f9c2c52d681f863da35ca3e621f362">sendMessage</a> (QDataStream &amp;stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#f6b01bfdb454d86b339e5bb8e6a0b842">sendSystemMessage</a> (QDataStream &amp;stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#823281f4a928a6a1a69f12b82f33d0c6">initIO</a> (<a class="el" href="classKPlayer.html">KPlayer</a> *p)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#dfc88299e5f7efeda143068114e986d8">notifyTurn</a> (bool turn)</td></tr>

<tr><td colspan="2"><br><h2>Protected Slots</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#254ca9286bda893f00fbc2122938611a">receivedMessage</a> (const QByteArray &amp;receiveBuffer)</td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKGameProcessIO.html#4e0f8c82d5edc19b9059f6807060e30a">sendAllMessages</a> (QDataStream &amp;stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, bool usermsg)</td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="f8a129777a0080a01c1a6dbe1629e25e"></a><!-- doxytag: member="KGameProcessIO::KGameProcessIO" ref="f8a129777a0080a01c1a6dbe1629e25e" args="(const QString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KGameProcessIO::KGameProcessIO           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a computer player via a separate process. 
<p>
The process name is given as fully qualified filename. Example: <div class="fragment"><pre class="fragment"> <a class="code" href="classKGameProcessIO.html" title="The KGameProcessIO class.">KGameProcessIO</a> *input;
   input=<span class="keyword">new</span> <a class="code" href="classKGameProcessIO.html#f8a129777a0080a01c1a6dbe1629e25e" title="Creates a computer player via a separate process.">KGameProcessIO</a>(executable_file);
  connect(input,SIGNAL(<a class="code" href="classKGameIO.html#0091d3ba6ae94d70fc83a362087f32a9" title="Signal generated when KPlayer::myTurn changes.">signalPrepareTurn</a>(QDataStream &amp;,<span class="keywordtype">bool</span>,<a class="code" href="classKGameIO.html" title="Base class for IO devices for games.">KGameIO</a> *,<span class="keywordtype">bool</span> *)),
          <span class="keyword">this</span>,SLOT(slotPrepareTurn(QDataStream &amp;,<span class="keywordtype">bool</span>,<a class="code" href="classKGameIO.html" title="Base class for IO devices for games.">KGameIO</a> *,<span class="keywordtype">bool</span> *)));
  connect(input,SIGNAL(<a class="code" href="classKGameProcessIO.html#5a1ec90348d26b912961aa36317fb98c" title="A computer query message is received.">signalProcessQuery</a>(QDataStream &amp;,<a class="code" href="classKGameProcessIO.html" title="The KGameProcessIO class.">KGameProcessIO</a> *)),
          <span class="keyword">this</span>,SLOT(slotProcessQuery(QDataStream &amp;,<a class="code" href="classKGameProcessIO.html" title="The KGameProcessIO class.">KGameProcessIO</a> *)));
</pre></div><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the filename of the process to start </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00252">252</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="187fe65129580678be2950058b3c2b1c"></a><!-- doxytag: member="KGameProcessIO::~KGameProcessIO" ref="187fe65129580678be2950058b3c2b1c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KGameProcessIO::~KGameProcessIO           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Deletes the process input devices. 
<p>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00278">278</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="ab06daea67f651f1637798e704529d97"></a><!-- doxytag: member="KGameProcessIO::rtti" ref="ab06daea67f651f1637798e704529d97" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KGameProcessIO::rtti           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The idendification of the IO. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>ProcessIO </dd></dl>

<p>Implements <a class="el" href="classKGameIO.html#88a4154d5e130823ee152c0e0258cc62">KGameIO</a>.</p>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00294">294</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="e9f9c2c52d681f863da35ca3e621f362"></a><!-- doxytag: member="KGameProcessIO::sendMessage" ref="e9f9c2c52d681f863da35ca3e621f362" args="(QDataStream &amp;stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::sendMessage           </td>
          <td>(</td>
          <td class="paramtype">QDataStream &amp;&nbsp;</td>
          <td class="paramname"> <em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>msgid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_UINT32&nbsp;</td>
          <td class="paramname"> <em>receiver</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_UINT32&nbsp;</td>
          <td class="paramname"> <em>sender</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send a message to the process. 
<p>
This is analogous to the sendMessage commands of <a class="el" href="classKGame.html" title="The main KDE game object.">KGame</a>. It will result in a signal of the computer player on which you can react in the process player.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>stream</em>&nbsp;</td><td>- the actual data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>msgid</em>&nbsp;</td><td>- the id of the message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>receiver</em>&nbsp;</td><td>- not used </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sender</em>&nbsp;</td><td>- who send the message </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00346">346</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="f6b01bfdb454d86b339e5bb8e6a0b842"></a><!-- doxytag: member="KGameProcessIO::sendSystemMessage" ref="f6b01bfdb454d86b339e5bb8e6a0b842" args="(QDataStream &amp;stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::sendSystemMessage           </td>
          <td>(</td>
          <td class="paramtype">QDataStream &amp;&nbsp;</td>
          <td class="paramname"> <em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>msgid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_UINT32&nbsp;</td>
          <td class="paramname"> <em>receiver</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_UINT32&nbsp;</td>
          <td class="paramname"> <em>sender</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send a system message to the process. 
<p>
This is analogous to the sendMessage commands of <a class="el" href="classKGame.html" title="The main KDE game object.">KGame</a>. It will result in a signal of the computer player on which you can react in the process player.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>stream</em>&nbsp;</td><td>- the actual data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>msgid</em>&nbsp;</td><td>- the id of the message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>receiver</em>&nbsp;</td><td>- not used </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sender</em>&nbsp;</td><td>- who send the message </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00341">341</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="823281f4a928a6a1a69f12b82f33d0c6"></a><!-- doxytag: member="KGameProcessIO::initIO" ref="823281f4a928a6a1a69f12b82f33d0c6" args="(KPlayer *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::initIO           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classKPlayer.html">KPlayer</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Init this device by setting the player and e.g. 
<p>
sending an init message to the device. Calling this function will emit the IOAdded signal on which you can react and initilise the computer player. This function is called automatically when adding the IO to a player. 
<p>Reimplemented from <a class="el" href="classKGameIO.html#b34ff5dafad0412c1ee871ed1dd8dba8">KGameIO</a>.</p>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00299">299</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="dfc88299e5f7efeda143068114e986d8"></a><!-- doxytag: member="KGameProcessIO::notifyTurn" ref="dfc88299e5f7efeda143068114e986d8" args="(bool turn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::notifyTurn           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>turn</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Notifies the IO device that the player's setTurn had been called Called by <a class="el" href="classKPlayer.html" title="Base class for a game player.">KPlayer</a>. 
<p>
You can react on the <a class="el" href="classKGameIO.html#0091d3ba6ae94d70fc83a362087f32a9">signalPrepareTurn</a> to prepare a message for the process, i.e. either update it on the changes made to the game since the last turn or the initIO has been called or transmit your gamestatus now.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>turn</em>&nbsp;</td><td>is true/false </td></tr>
  </table>
</dl>

<p>Reimplemented from <a class="el" href="classKGameIO.html#20bf262118d7420385351c1339b4c40f">KGameIO</a>.</p>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00321">321</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="4e0f8c82d5edc19b9059f6807060e30a"></a><!-- doxytag: member="KGameProcessIO::sendAllMessages" ref="4e0f8c82d5edc19b9059f6807060e30a" args="(QDataStream &amp;stream, int msgid, Q_UINT32 receiver, Q_UINT32 sender, bool usermsg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::sendAllMessages           </td>
          <td>(</td>
          <td class="paramtype">QDataStream &amp;&nbsp;</td>
          <td class="paramname"> <em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>msgid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_UINT32&nbsp;</td>
          <td class="paramname"> <em>receiver</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_UINT32&nbsp;</td>
          <td class="paramname"> <em>sender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>usermsg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Internal ~ombined function for all message handling. 
<p>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00351">351</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="254ca9286bda893f00fbc2122938611a"></a><!-- doxytag: member="KGameProcessIO::receivedMessage" ref="254ca9286bda893f00fbc2122938611a" args="(const QByteArray &amp;receiveBuffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::receivedMessage           </td>
          <td>(</td>
          <td class="paramtype">const QByteArray &amp;&nbsp;</td>
          <td class="paramname"> <em>receiveBuffer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Internal message handler to receive data from the process. 
<p>

<p>Definition at line <a class="el" href="kgameio_8cpp-source.html#l00381">381</a> of file <a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="5a1ec90348d26b912961aa36317fb98c"></a><!-- doxytag: member="KGameProcessIO::signalProcessQuery" ref="5a1ec90348d26b912961aa36317fb98c" args="(QDataStream &amp;stream, KGameProcessIO *me)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::signalProcessQuery           </td>
          <td>(</td>
          <td class="paramtype">QDataStream &amp;&nbsp;</td>
          <td class="paramname"> <em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classKGameProcessIO.html">KGameProcessIO</a> *&nbsp;</td>
          <td class="paramname"> <em>me</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A computer query message is received. 
<p>
This is a 'dummy' message sent by the process if it needs to communicate with us. It is not forwarded over the network. Reacting to this message allows you to 'answer' questions of the process, e.g. sending addition data which the process needs to calculate a move.<p>
Example: <div class="fragment"><pre class="fragment">  <span class="keywordtype">void</span> GameWindow::slotProcessQuery(QDataStream &amp;stream,<a class="code" href="classKGameProcessIO.html" title="The KGameProcessIO class.">KGameProcessIO</a> *reply)
  {
    <span class="keywordtype">int</span> no;
    stream &gt;&gt; no;  <span class="comment">// We assume the process sends us an integer question numner</span>
    <span class="keywordflow">if</span> (no==1)     <span class="comment">// but YOU have to do this in the process player</span>
    {
      QByteArray buffer;
      QDataStream out(buffer,IO_WriteOnly);
      reply-&gt;<a class="code" href="classKGameProcessIO.html#f6b01bfdb454d86b339e5bb8e6a0b842" title="Send a system message to the process.">sendSystemMessage</a>(out,4242,0,0);  <span class="comment">// lets reply something...</span>
    }
  }
</pre></div> 
</div>
</div><p>
<a class="anchor" name="471cd73cf6737e12192cefef00b221c6"></a><!-- doxytag: member="KGameProcessIO::signalIOAdded" ref="471cd73cf6737e12192cefef00b221c6" args="(KGameIO *game, QDataStream &amp;stream, KPlayer *p, bool *send)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KGameProcessIO::signalIOAdded           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classKGameIO.html">KGameIO</a> *&nbsp;</td>
          <td class="paramname"> <em>game</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QDataStream &amp;&nbsp;</td>
          <td class="paramname"> <em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classKPlayer.html">KPlayer</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&nbsp;</td>
          <td class="paramname"> <em>send</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal generated when the computer player is added. 
<p>
You can use this to communicated with the process and e.g. send initialisation information to the process.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>game</em>&nbsp;</td><td>the <a class="el" href="classKGameIO.html" title="Base class for IO devices for games.">KGameIO</a> object itself </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stream</em>&nbsp;</td><td>the stream into which the move will be written </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>the player itself </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>send</em>&nbsp;</td><td>set this to false if no move should be generated </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="kgameio_8h-source.html">kgameio.h</a><li><a class="el" href="kgameio_8cpp-source.html">kgameio.cpp</a></ul>
</div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>libkdegames</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKCanvasRootPixmap.html">kcanvasrootpixmap</option>,  <option value="classKCardDialog.html">kcarddialog</option>,  <option value="classKChat.html">kchat</option>,  <option value="classKChatBase.html">kchatbase</option>,  <option value="classKChatBaseText.html">kchatbasetext</option>,  <option value="classKExtHighscore_1_1Item.html">kexthighscore::item</option>,  <option value="classKExtHighscore_1_1ItemArray.html">kexthighscore::itemarray</option>,  <option value="classKExtHighscore_1_1Manager.html">kexthighscore::manager</option>,  <option value="classKExtHighscore_1_1MultiplayerScores.html">kexthighscore::multiplayerscores</option>,  <option value="classKExtHighscore_1_1Score.html">kexthighscore::score</option>,  <option value="classKGame.html">kgame</option>,  <option value="classKGameChat.html">kgamechat</option>,  <option value="classKGameComputerIO.html">kgamecomputerio</option>,  <option value="classKGameConnectDialog.html">kgameconnectdialog</option>,  <option value="classKGameDialog.html">kgamedialog</option>,  <option value="classKGameDialogChatConfig.html">kgamedialogchatconfig</option>,  <option value="classKGameDialogConfig.html">kgamedialogconfig</option>,  <option value="classKGameErrorDialog.html">kgameerrordialog</option>,  <option value="classKGameErrorMessageDialog.html">kgameerrormessagedialog</option>,  <option value="classKGameIO.html">kgameio</option>,  <option value="classKGameKeyIO.html">kgamekeyio</option>,  <option value="classKGameLCD.html">kgamelcd</option>,  <option value="classKGameLCDClock.html">kgamelcdclock</option>,  <option value="classKGameLCDList.html">kgamelcdlist</option>,  <option value="classKGameMisc.html">kgamemisc</option>,  <option value="classKGameMouseIO.html">kgamemouseio</option>,  <option value="classKGameNetwork.html">kgamenetwork</option>,  <option value="classKGameProcess.html">kgameprocess</option>,  <option value="classKGameProcessIO.html">kgameprocessio</option>,  <option value="classKGameProgress.html">kgameprogress</option>,  <option value="classKGameProperty.html">kgameproperty</option>,  <option value="classKGamePropertyBase.html">kgamepropertybase</option>,  <option value="classKGamePropertyHandler.html">kgamepropertyhandler</option>,  <option value="classKGameSequence.html">kgamesequence</option>,  <option value="classKGrid2D_1_1Generic.html">kgrid2d::generic</option>,  <option value="classKGrid2D_1_1Hexagonal.html">kgrid2d::hexagonal</option>,  <option value="classKGrid2D_1_1HexagonalBase.html">kgrid2d::hexagonalbase</option>,  <option value="classKGrid2D_1_1Square.html">kgrid2d::square</option>,  <option value="classKGrid2D_1_1SquareBase.html">kgrid2d::squarebase</option>,  <option value="classKHighscore.html">khighscore</option>,  <option value="classKMessageClient.html">kmessageclient</option>,  <option value="classKMessageDirect.html">kmessagedirect</option>,  <option value="classKMessageIO.html">kmessageio</option>,  <option value="classKMessageServer.html">kmessageserver</option>,  <option value="classKMessageServerSocket.html">kmessageserversocket</option>,  <option value="classKMessageSocket.html">kmessagesocket</option>,  <option value="classKPlayer.html">kplayer</option>,  <option value="classKScoreDialog.html">kscoredialog</option>,  <option value="classKStdGameAction.html">kstdgameaction</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../libkdegames/html/index.html">libkdegames</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>