classsoccercommand.html

来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 1,201 行 · 第 1/5 页

HTML
1,201
字号
<!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>SoccerCommand class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.12 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>SoccerCommand  Class Reference</h1><code>#include &lt;<a class="el" href="SoccerTypes_8h-source.html">SoccerTypes.h</a>&gt;</code><p>Collaboration diagram for SoccerCommand:<p><center><img src="classSoccerCommand__coll__graph.gif" border="0" usemap="#SoccerCommand__coll__map" alt="Collaboration graph"></center><map name="SoccerCommand__coll__map"><area href="classServerSettings.html" shape="rect" coords="15,166,106,185" alt=""><area href="classGenericValues.html" shape="rect" coords="15,97,106,115" alt=""><area href="classGenericValueT.html" shape="rect" coords="14,14,107,33" alt=""><area href="classTime.html" shape="rect" coords="130,166,170,185" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classSoccerCommand-members.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>&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a0">SoccerCommand</a> (<a class="el" href="SoccerTypes_8h.html#a247">CommandT</a> com=CMD_ILLEGAL, double d1=<a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>, double d2=<a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>, double d3=<a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a1">SoccerCommand</a> (<a class="el" href="SoccerTypes_8h.html#a247">CommandT</a> com, char *msg)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a2">makeCommand</a> (<a class="el" href="SoccerTypes_8h.html#a247">CommandT</a> com, double d1=<a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>, double d2=<a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>, double d3=<a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a3">makeCommand</a> (<a class="el" href="SoccerTypes_8h.html#a247">CommandT</a> com, <a class="el" href="SoccerTypes_8h.html#a244">ViewAngleT</a> v, <a class="el" href="SoccerTypes_8h.html#a245">ViewQualityT</a> q)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a4">makeCommand</a> (<a class="el" href="SoccerTypes_8h.html#a247">CommandT</a> com, char *msg)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a5">isIllegal</a> ()</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a6">show</a> (ostream &amp;os)</td></tr><tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#a7">getCommandString</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>, <a class="el" href="classServerSettings.html">ServerSettings</a> *ss)</td></tr><tr><td colspan=2><br><h2>Public Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classTime.html">Time</a>&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m0">time</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="SoccerTypes_8h.html#a247">CommandT</a>&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m1">commandType</a></td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m2">dAngle</a></td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m3">dPower</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="SoccerTypes_8h.html#a245">ViewQualityT</a>&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m4">vq</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="SoccerTypes_8h.html#a244">ViewAngleT</a>&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m5">va</a></td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m6">dX</a></td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m7">dY</a></td></tr><tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m8">str</a> [MAX_SAY_MSG]</td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#m9">iTimes</a></td></tr><tr><td colspan=2><br><h2>Private Methods</h2></td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c0">makeCatchCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c1">makeChangeViewCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c2">makeDashCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c3">makeKickCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c4">makeMoveCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c5">makeSayCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c6">makeSenseBodyCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c7">makeTurnCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c8">makeTurnNeckCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#c9">makeChangePlayerCommand</a> (char *<a class="el" href="classSoccerCommand.html#m8">str</a>)</td></tr><tr><td colspan=2><br><h2>Private Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classServerSettings.html">ServerSettings</a> *&nbsp;</td><td valign=bottom><a class="el" href="classSoccerCommand.html#o0">SS</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class resembles a SoccerCommand that contains all the information about a command that can be sent to the server, but the format is independent from the server implementation. A SoccerCommand can be created and before it is sent to the server, be converted to the actual string representation understood by the server. <p><p>Definition at line <a class="el" href="SoccerTypes_8h-source.html#l00467">467</a> of file <a class="el" href="SoccerTypes_8h-source.html">SoccerTypes.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="SoccerCommand::SoccerCommand"></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"> SoccerCommand::SoccerCommand </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="SoccerTypes_8h.html#a247">CommandT</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>com</em> = CMD_ILLEGAL, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>d1</em> = <a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>d2</em> = <a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>d3</em> = <a class="el" href="SoccerTypes_8h.html#a19">UnknownDoubleValue</a></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This is a constructor for the SoccerCommand class. It creates a command using the passed arguments (with all default illegal values). Depending on the specified CommandT the parameters are used in different ways. See the method makeCommand for an explanation of these values. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>com</em>&nbsp;</td><td>commandType for this SoccerCommand </td></tr><tr><td valign=top><em>d1</em>&nbsp;</td><td>1st argument, meaning depends on com (default UnknownDoubleValue) </td></tr><tr><td valign=top><em>d2</em>&nbsp;</td><td>2nd argument, meaning depends on com (default UnknownDoubleValue) </td></tr><tr><td valign=top><em>d3</em>&nbsp;</td><td>3rd argument, meaning depends on com (default UnknownDoubleValue) </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>SoccerCommand with the specified parameters. </dl><p>Definition at line <a class="el" href="SoccerTypes_8C-source.html#l00442">442</a> of file <a class="el" href="SoccerTypes_8C-source.html">SoccerTypes.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a247a184">CMD_CHANGEVIEW</a>, <a class="el" href="namespace_3globalScope_4.html#a247a189">CMD_SAY</a>, <a class="el" href="SoccerTypes_8h-source.html#l00295">CommandT</a>, <a class="el" href="SoccerTypes_8h-source.html#l00489">commandType</a>, <a class="el" href="SoccerTypes_8h-source.html#l00490">dAngle</a>, <a class="el" href="SoccerTypes_8h-source.html#l00491">dPower</a>, <a class="el" href="SoccerTypes_8h-source.html#l00497">iTimes</a>, <a class="el" href="SoccerTypes_8C-source.html#l00483">makeCommand</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00496">str</a>, <a class="el" href="SoccerTypes_8h-source.html#l00088">UnknownDoubleValue</a>, <a class="el" href="SoccerTypes_8h-source.html#l00493">va</a>, <a class="el" href="namespace_3globalScope_4.html#a244a173">VA_ILLEGAL</a>, <a class="el" href="SoccerTypes_8h-source.html#l00271">ViewAngleT</a>, <a class="el" href="SoccerTypes_8h-source.html#l00280">ViewQualityT</a>, <a class="el" href="SoccerTypes_8h-source.html#l00492">vq</a>, and <a class="el" href="namespace_3globalScope_4.html#a245a176">VQ_ILLEGAL</a>.    </td>  </tr></table><a name="a1" doxytag="SoccerCommand::SoccerCommand"></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"> SoccerCommand::SoccerCommand </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="SoccerTypes_8h.html#a247">CommandT</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>com</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>char *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>msg</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This is a constructor for the SoccerCommand when the commandType is a say message. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>com</em>&nbsp;</td><td>commandType for this SoccerCommand (must be CMD_SAY). </td></tr><tr><td valign=top><em>msg</em>&nbsp;</td><td>message for this SoccerCommand </td></tr></table></dl><p>Definition at line <a class="el" href="SoccerTypes_8C-source.html#l00462">462</a> of file <a class="el" href="SoccerTypes_8C-source.html">SoccerTypes.C</a>.<p>References <a class="el" href="SoccerTypes_8h-source.html#l00295">CommandT</a>, and <a class="el" href="SoccerTypes_8C-source.html#l00483">makeCommand</a>().    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a7" doxytag="SoccerCommand::getCommandString"></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"> char * SoccerCommand::getCommandString </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>str</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classServerSettings.html">ServerSettings</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>ss</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method returns a command string that is understood by the server from a SoccerCommand. The resulting string is put in the second argument and returned by the method. A reference to <a class="el" href="classServerSettings.html">ServerSettings</a> is passed as the second argument to check whether the values in the SoccerCommand are legal. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em>&nbsp;</td><td>resulting string (enough space for MAX_MSG should be allocated) </td></tr><tr><td valign=top><em>ss</em>&nbsp;</td><td>reference to serversettings class. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>resulting string </dl><p>Definition at line <a class="el" href="SoccerTypes_8C-source.html#l00604">604</a> of file <a class="el" href="SoccerTypes_8C-source.html">SoccerTypes.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a247a185">CMD_CATCH</a>, <a class="el" href="namespace_3globalScope_4.html#a247a190">CMD_CHANGEPLAYER</a>, <a class="el" href="namespace_3globalScope_4.html#a247a184">CMD_CHANGEVIEW</a>, <a class="el" href="namespace_3globalScope_4.html#a247a181">CMD_DASH</a>, <a class="el" href="namespace_3globalScope_4.html#a247a180">CMD_ILLEGAL</a>, <a class="el" href="namespace_3globalScope_4.html#a247a186">CMD_KICK</a>, <a class="el" href="namespace_3globalScope_4.html#a247a187">CMD_MOVE</a>, <a class="el" href="namespace_3globalScope_4.html#a247a189">CMD_SAY</a>, <a class="el" href="namespace_3globalScope_4.html#a247a188">CMD_SENSEBODY</a>, <a class="el" href="namespace_3globalScope_4.html#a247a182">CMD_TURN</a>, <a class="el" href="namespace_3globalScope_4.html#a247a183">CMD_TURNNECK</a>, <a class="el" href="SoccerTypes_8h-source.html#l00489">commandType</a>, <a class="el" href="SoccerTypes_8C-source.html#l00639">makeCatchCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00816">makeChangePlayerCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00657">makeChangeViewCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00678">makeDashCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00699">makeKickCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00719">makeMoveCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00741">makeSayCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00758">makeSenseBodyCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00770">makeTurnCommand</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00791">makeTurnNeckCommand</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00469">SS</a>, and <a class="el" href="SoccerTypes_8h-source.html#l00496">str</a>.<p>Referenced by <a class="el" href="ActHandler_8C-source.html#l00204">ActHandler::sendCommand</a>(), <a class="el" href="ActHandler_8C-source.html#l00233">ActHandler::sendCommandDirect</a>(), and <a class="el" href="ActHandler_8C-source.html#l00102">ActHandler::sendCommands</a>().    </td>  </tr></table><a name="a5" doxytag="SoccerCommand::isIllegal"></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"> bool SoccerCommand::isIllegal </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?