⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ptypes.h.html

📁 PTypes是一个扩充了多线程和网络功能的STL库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--Syntax highlighting generated by Web C Plus Plus software v0.8.2Webcpp Copyright (C)2001, (C)2002, (C)2003 Jeffrey Bakker under the GNU GPLGet webcpp at http://webcpp.sf.net--><html><head><title>ptypes.h</title><style type="text/css">/*Webcpp v0.8.1 compatible StyleSheethttp://webcpp.sf.netTheme: ide-msvcpp*/body{background-color: #ffffff}.webcpp a:link    {color:#000000}.webcpp a:visited {color:#008000}.webcpp a:active  {color:#0000ff}.webcpp a:hover   {color:#0000ff}.webcpp pre{color: #000000}.webcpp font{font-size:100%}.webcpp .symbols{color: #000000}.webcpp .preproc{color: #0000ff}.webcpp .integer{color: #000000}.webcpp .floatpt{color: #000000}.webcpp .dblquot{color: #000000}.webcpp .sinquot{color: #000000}.webcpp .keyword{color: #0000ff;}.webcpp .keytype{color: #0000ff;}.webcpp .comment{color: #008000;}</style></head><body bgcolor="#FFFFFF" leftmargin="40" marginwidth="40"> <p><a href="../htsrc.html">Index</a><hr noshade></p><div class="webcpp"><pre><font CLASS=preproc>#ifndef</font> __PTYPES_H__ <font CLASS=preproc>#define</font> __PTYPES_H__ <font CLASS=preproc>#ifndef</font> __PPORT_H__ <font CLASS=preproc>#include</font> <font CLASS=dblquot>"pport.h"</font> <font CLASS=preproc>#endif</font> <font CLASS=preproc>#include</font> &lt;string.h&gt; PTYPES_BEGIN<font CLASS=preproc>#ifdef</font> _MSC_VER <font CLASS=preproc>#pragma</font> pack(push, <font CLASS=integer>4</font>) <font CLASS=comment>// disable "non dll-interface class '...' used as base for dll-interface class '...'" warning</font><font CLASS=preproc>#pragma</font> warning(disable : <font CLASS=integer>4275</font>) <font CLASS=comment>// disable "conditional expression constant" warning</font><font CLASS=preproc>#pragma</font> warning(push) <font CLASS=preproc>#pragma</font> warning(disable : <font CLASS=integer>4127</font>) <font CLASS=preproc>#endif</font> <font CLASS=keytype>int</font>   __PFASTCALL pincrement(<font CLASS=keytype>int</font>* target);<font CLASS=keytype>int</font>   __PFASTCALL pdecrement(<font CLASS=keytype>int</font>* target);<font CLASS=keytype>int</font>   __PFASTCALL pexchange(<font CLASS=keytype>int</font>* target, <font CLASS=keytype>int</font> value);<font CLASS=keytype>void</font>* __PFASTCALL pexchange(<font CLASS=keytype>void</font>** target, <font CLASS=keytype>void</font>* value);<font CLASS=keyword>template</font> &lt;<font CLASS=keyword>class</font> T&gt; <font CLASS=keyword>inline</font> T* tpexchange(T** target, T* value)    { <font CLASS=keyword>return</font> (T*)pexchange((<font CLASS=keytype>void</font>**)target, (<font CLASS=keytype>void</font>*)value); }<font CLASS=preproc>#if</font> (__GNUC__ <font CLASS=symbols>==</font> <font CLASS=integer>3</font>) &amp;&amp; (__GNUC_MINOR__ &gt;<font CLASS=symbols>=</font> <font CLASS=integer>3</font>) <font CLASS=preproc>#</font>  define VARIANT_TYPECAST_HACK <font CLASS=preproc>#endif</font> <font CLASS=comment>// -------------------------------------------------------------------- //</font><font CLASS=comment>// --- string class --------------------------------------------------- //</font><font CLASS=comment>// -------------------------------------------------------------------- //</font><font CLASS=comment>// dynamic string class with thread-safe ref-counted buffer</font><font CLASS=keyword>struct</font> _strrec {    <font CLASS=keytype>int</font> refcount;    <font CLASS=keytype>int</font> length;};<font CLASS=keyword>typedef</font> _strrec* _pstrrec;<font CLASS=preproc>#define</font> STR_BASE(x)      (_pstrrec(x)<font CLASS=symbols>-</font><font CLASS=integer>1</font>) <font CLASS=preproc>#define</font> STR_REFCOUNT(x)  (STR_BASE(x)<font CLASS=symbols>-</font>&gt;refcount) <font CLASS=preproc>#define</font> STR_LENGTH(x)    (STR_BASE(x)<font CLASS=symbols>-</font>&gt;length) 

⌨️ 快捷键说明

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