📄 classppipechannel.html
字号:
</tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPStringArray.html">PStringArray</a> & </td> <td class="mdname" nowrap> <em>argumentList</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPStringToString.html">PStringToString</a> & </td> <td class="mdname" nowrap> <em>environment</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPPipeChannel.html#z213_0">OpenMode</a> </td> <td class="mdname" nowrap> <em>mode</em> = ReadWrite, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>searchPath</em> = TRUE, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>stderrSeparate</em> = FALSE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new pipe channel. This executes the subProgram and transfers data from its stdin/stdout/stderr.<p>See the <a class="el" href="classPPipeChannel.html#z219_0">Open()</a># function for details of various parameters. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>argumentList</em> </td><td>Sub program name or command line. </td></tr><tr><td valign=top><em>environment</em> </td><td>Array of arguments to sub-program. </td></tr><tr><td valign=top><em>mode</em> </td><td>Array of arguments to sub-program. </td></tr><tr><td valign=top><em>searchPath</em> </td><td>Mode for the pipe channel. </td></tr><tr><td valign=top><em>stderrSeparate</em> </td><td>Flag for system PATH to be searched. Standard error is on separate pipe </td></tr></table></dl> </td> </tr></table><a name="z213_6" doxytag="PPipeChannel::~PPipeChannel"></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"> PPipeChannel::~PPipeChannel </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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>Close the pipe channel, killing the sub-process.<p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z219_12" doxytag="PPipeChannel::CanReadAndWrite"></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 PPipeChannel::CanReadAndWrite </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> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Determine if the platform can support simultaneous read and writes from the PPipeChannel (eg MSDOS returns FALSE, Unix returns TRUE).<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if platform supports concurrent multi-processing. </dl> </td> </tr></table><a name="z217_3" doxytag="PPipeChannel::Close"></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"> virtual BOOL PPipeChannel::Close </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>Close the channel. This will kill the sub-program's process (on platforms where that is relevent).<p>For <a class="el" href="classPPipeChannel.html#z213_0s1">WriteOnly</a># or <a class="el" href="classPPipeChannel.html#z213_0s2">ReadWrite</a># mode pipe channels on platforms that do no support concurrent multi-processing and have not yet called the <a class="el" href="classPPipeChannel.html#z219_5">Execute()</a># function this will run the sub-program. <p>Reimplemented from <a class="el" href="classPChannel.html#z53_1">PChannel</a>. </td> </tr></table><a name="z215_0" doxytag="PPipeChannel::Compare"></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"> <a class="el" href="classPObject.html#z199_0">Comparison</a> PPipeChannel::Compare </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> & </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Determine if the two objects refer to the same pipe channel. This actually compares the sub-program names that are passed into the constructor.<p><dl compact><dt><b>Returns: </b></dt><dd> Comparison value of the sub-program strings. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em> </td><td>Another pipe channel to compare against. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPChannel.html#z45_0">PChannel</a>. </td> </tr></table><a name="z219_5" doxytag="PPipeChannel::Execute"></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 PPipeChannel::Execute </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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>Start execution of sub-program for platforms that do not support multi-processing, this will actually run the sub-program passing all data written to the PPipeChannel.<p>For platforms that do support concurrent multi-processing this will close the pipe from the current process to the sub-process.<p>As the sub-program is run immediately and concurrently, this will just give an end of file to the stdin of the remote process. This is often necessary.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if execute was successful. </dl> </td> </tr></table><a name="z217_0" doxytag="PPipeChannel::GetName"></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"> virtual <a class="el" href="classPString.html">PString</a> PPipeChannel::GetName </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>Get the name of the channel.<p><dl compact><dt><b>Returns: </b></dt><dd> string for the sub-program that is run. </dl><p>Reimplemented from <a class="el" href="classPChannel.html#z47_1">PChannel</a>. </td> </tr></table><a name="z219_7" doxytag="PPipeChannel::GetReturnCode"></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"> int PPipeChannel::GetReturnCode </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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>Get the return code from the most recent Close;<p><dl compact><dt><b>Returns: </b></dt><dd> Return code from the closing process </dl> </td> </tr></table><a name="z219_4" doxytag="PPipeChannel::GetSubProgram"></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"> const <a class="el" href="classPFilePath.html">PFilePath</a>& PPipeChannel::GetSubProgram </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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>Get the full file path for the sub-programs executable file.<p><dl compact><dt><b>Returns: </b></dt><dd> file path name for sub-program. </dl> </td> </tr></table><a name="z219_6" doxytag="PPipeChannel::IsRunning"></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 PPipeChannel::IsRunning </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -