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

📄 trdlocal_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: trdlocal.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="namespaces.html"><span>Namespaces</span></a></li>    <li><a href="classes.html"><span>Classes</span></a></li>    <li class="current"><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>  </ul></div><h1>trdlocal.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_TRDLOCAL_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_TRDLOCAL_H</span><a name="l00003"></a>00003 <span class="preprocessor"></span><a name="l00004"></a>00004 <span class="preprocessor">#include "config.h"</span><a name="l00005"></a>00005 <a name="l00006"></a>00006 <span class="preprocessor">#ifdef THREADS_AVAILABLE</span><a name="l00007"></a>00007 <span class="preprocessor"></span><a name="l00008"></a>00008 <span class="preprocessor">#include "misc.h"</span><a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="preprocessor">#ifdef HAS_WINTHREADS</span><a name="l00011"></a>00011 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ThreadLocalIndexType;<a name="l00012"></a>00012 <span class="preprocessor">#else</span><a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#include &lt;pthread.h&gt;</span><a name="l00014"></a>00014 <span class="keyword">typedef</span> pthread_key_t ThreadLocalIndexType;<a name="l00015"></a>00015 <span class="preprocessor">#endif</span><a name="l00016"></a>00016 <span class="preprocessor"></span><a name="l00017"></a>00017 NAMESPACE_BEGIN(CryptoPP)<a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="comment">//! thread local storage</span><a name="l00020"></a><a class="code" href="class_thread_local_storage.html">00020</a> <span class="comment"></span>class CRYPTOPP_DLL <a class="code" href="class_thread_local_storage.html" title="thread local storage">ThreadLocalStorage</a> : public <a class="code" href="class_not_copyable.html">NotCopyable</a><a name="l00021"></a>00021 {<a name="l00022"></a>00022 <span class="keyword">public</span>:<span class="comment"></span><a name="l00023"></a>00023 <span class="comment">        //! exception thrown by ThreadLocalStorage class</span><a name="l00024"></a><a class="code" href="class_thread_local_storage_1_1_err.html">00024</a> <span class="comment"></span>        <span class="keyword">class </span><a class="code" href="class_thread_local_storage_1_1_err.html" title="exception thrown by ThreadLocalStorage class">Err</a> : <span class="keyword">public</span> <a class="code" href="class_o_s___error.html" title="error reported by the operating system">OS_Error</a><a name="l00025"></a>00025         {<a name="l00026"></a>00026         <span class="keyword">public</span>:<a name="l00027"></a>00027                 <a class="code" href="class_thread_local_storage_1_1_err.html" title="exception thrown by ThreadLocalStorage class">Err</a>(<span class="keyword">const</span> std::string&amp; operation, <span class="keywordtype">int</span> error);<a name="l00028"></a>00028         };<a name="l00029"></a>00029 <a name="l00030"></a>00030         <a class="code" href="class_thread_local_storage.html" title="thread local storage">ThreadLocalStorage</a>();<a name="l00031"></a>00031         ~<a class="code" href="class_thread_local_storage.html" title="thread local storage">ThreadLocalStorage</a>();<a name="l00032"></a>00032 <a name="l00033"></a>00033         <span class="keywordtype">void</span> SetValue(<span class="keywordtype">void</span> *value);<a name="l00034"></a>00034         <span class="keywordtype">void</span> *GetValue() <span class="keyword">const</span>;<a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="keyword">private</span>:<a name="l00037"></a>00037         ThreadLocalIndexType m_index;<a name="l00038"></a>00038 };<a name="l00039"></a>00039 <a name="l00040"></a>00040 NAMESPACE_END<a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="preprocessor">#endif  // #ifdef THREADS_AVAILABLE</span><a name="l00043"></a>00043 <span class="preprocessor"></span><a name="l00044"></a>00044 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 11:11:25 2007 for Crypto++ by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>

⌨️ 快捷键说明

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