📄 qchannel_8h-source.html
字号:
<!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>qchannel.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</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> </center><hr><h1>qchannel.h</h1><a href="qchannel_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * qchannel.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Class for implementing a serial queue channel in memory.</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 2001 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Contributor(s): ______________________________________.</span>00025 <span class="comment"> *</span>00026 <span class="comment"> * $Log: qchannel.h,v $</span>00027 <span class="comment"> * Revision 1.2 2002/09/16 01:08:59 robertj</span>00028 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00029 <span class="comment"> * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00030 <span class="comment"> *</span>00031 <span class="comment"> * Revision 1.1 2001/07/10 03:07:07 robertj</span>00032 <span class="comment"> * Added queue channel and delay channel classes to ptclib.</span>00033 <span class="comment"> *</span>00034 <span class="comment"> */</span>00035 00036 <span class="preprocessor">#ifndef _QCHANNEL_H</span>00037 <span class="preprocessor"></span><span class="preprocessor">#define _QCHANNEL_H</span>00038 <span class="preprocessor"></span>00039 00040 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00041 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00043 <span class="preprocessor"></span>00044 <a name="l00058"></a><a class="code" href="classPQueueChannel.html">00058</a> <span class="keyword">class </span><a class="code" href="classPQueueChannel.html">PQueueChannel</a> : <span class="keyword">public</span> <a class="code" href="classPChannel.html">PChannel</a>00059 {00060 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPQueueChannel.html">PQueueChannel</a>, <a class="code" href="classPChannel.html">PChannel</a>);00061 <span class="keyword">public</span>:00066 <a class="code" href="classPQueueChannel.html#z499_0">PQueueChannel</a>(00067 PINDEX <a class="code" href="classPQueueChannel.html#n2">queueSize</a> = 0 00068 );00069 00072 <a class="code" href="classPQueueChannel.html#z499_1">~PQueueChannel</a>();00074 00075 00089 <span class="keyword">virtual</span> BOOL <a class="code" href="classPQueueChannel.html#z501_0">Read</a>(00090 <span class="keywordtype">void</span> * buf, 00091 PINDEX len 00092 );00093 00103 <span class="keyword">virtual</span> BOOL <a class="code" href="classPQueueChannel.html#z501_1">Write</a>(00104 <span class="keyword">const</span> <span class="keywordtype">void</span> * buf, 00105 PINDEX len 00106 );00107 00111 <span class="keyword">virtual</span> BOOL <a class="code" href="classPQueueChannel.html#z501_2">Close</a>();00113 00114 00119 <span class="keyword">virtual</span> BOOL <a class="code" href="classPQueueChannel.html#z503_0">Open</a>(00120 PINDEX <a class="code" href="classPQueueChannel.html#n2">queueSize</a> 00121 );00122 <a name="l00124"></a><a class="code" href="classPQueueChannel.html#z503_1">00124</a> PINDEX <a class="code" href="classPQueueChannel.html#z503_1">GetSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPQueueChannel.html#n2">queueSize</a>; }00125 <a name="l00127"></a><a class="code" href="classPQueueChannel.html#z503_2">00127</a> PINDEX <a class="code" href="classPQueueChannel.html#z503_2">GetLength</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPQueueChannel.html#n3">queueLength</a>; }00129 00130 <span class="keyword">protected</span>:<a name="l00131"></a><a class="code" href="classPQueueChannel.html#n0">00131</a> <a class="code" href="classPMutex.html">PMutex</a> <a class="code" href="classPQueueChannel.html#n0">mutex</a>;<a name="l00132"></a><a class="code" href="classPQueueChannel.html#n1">00132</a> BYTE * <a class="code" href="classPQueueChannel.html#n1">queueBuffer</a>;<a name="l00133"></a><a class="code" href="classPQueueChannel.html#n2">00133</a> PINDEX <a class="code" href="classPQueueChannel.html#n2">queueSize</a>, <a class="code" href="classPQueueChannel.html#n3">queueLength</a>, <a class="code" href="classPQueueChannel.html#n4">enqueuePos</a>, <a class="code" href="classPQueueChannel.html#n5">dequeuePos</a>;<a name="l00134"></a><a class="code" href="classPQueueChannel.html#n6">00134</a> <a class="code" href="classPSyncPoint.html">PSyncPoint</a> <a class="code" href="classPQueueChannel.html#n6">unempty</a>;<a name="l00135"></a><a class="code" href="classPQueueChannel.html#n7">00135</a> <a class="code" href="classPSyncPoint.html">PSyncPoint</a> <a class="code" href="classPQueueChannel.html#n7">unfull</a>;00136 };00137 00138 00139 <span class="preprocessor">#endif // _QCHANNEL_H</span>00140 <span class="preprocessor"></span>00141 00142 <span class="comment">// End Of File ///////////////////////////////////////////////////////////////</span></pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:11 2004 for PWLib 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.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -