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

📄 pasn_8h-source.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
00154     <span class="keyword">virtual</span> <a class="code" href="pasn_8h.html#a1">PASNUnsigned</a> <a class="code" href="classPASNObject.html#a4">GetUnsigned</a> () <span class="keyword">const</span>;00155 00159     <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPASNObject.html#a5">GetString</a> () <span class="keyword">const</span>;00160 00166     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classPASNSequence.html">PASNSequence</a> &amp; <a class="code" href="classPASNObject.html#a6">GetSequence</a>() <span class="keyword">const</span>;00167 00173     <span class="keyword">virtual</span> <a class="code" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> <a class="code" href="classPASNObject.html#a7">GetIPAddress</a> () <span class="keyword">const</span>;00174 00178     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#a8">PrintOn</a>(00179       ostream &amp; strm            <span class="comment">// stream to print on</span>00180     ) <span class="keyword">const</span>;00181 00183     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#a9">Encode</a>(00184       <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer       <span class="comment">// buffer to encode into</span>00185     );00186 00190     <span class="keyword">virtual</span> WORD <a class="code" href="classPASNObject.html#a10">GetEncodedLength</a>();00191 00193     <span class="keyword">virtual</span> <a class="code" href="classPObject.html">PObject</a> * <a class="code" href="classPASNObject.html#a11">Clone</a>() <span class="keyword">const</span>;00194 00196     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#d0">EncodeASNLength</a> (00197       <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,              <span class="comment">// buffer to encode into</span>00198       WORD length                       <span class="comment">// ASN length to encode</span>00199     );00200 00202     <span class="keyword">static</span> WORD <a class="code" href="classPASNObject.html#d1">GetASNLengthLength</a> (00203       WORD length                       <span class="comment">// length to find length of</span>00204     );00205 00209     <span class="keyword">static</span> BOOL <a class="code" href="classPASNObject.html#d2">DecodeASNLength</a> (00210       <span class="keyword">const</span> <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,                <span class="comment">// buffer to decode data from</span>00211       PINDEX &amp; ptr,                     <span class="comment">// ptr to decode from</span>00212       WORD &amp; len                        <span class="comment">// returned length</span>00213     );00214 00216     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#d3">EncodeASNSequenceStart</a> (00217       <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,              <span class="comment">// buffer to encode data into</span>00218       BYTE type,                        <span class="comment">// sequence type</span>00219       WORD length                       <span class="comment">// length of sequence data</span>00220     );00221 00223     <span class="keyword">static</span> WORD <a class="code" href="classPASNObject.html#d4">GetASNSequenceStartLength</a> (00224       WORD length                       <span class="comment">// length of sequence data</span>00225     );00226 00228     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#d5">EncodeASNHeader</a>(00229       <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,              <span class="comment">// buffer to encode into</span>00230       <a class="code" href="classPASNObject.html#s16">PASNObject::ASNType</a> type,         <span class="comment">// ASN type of the object</span>00231       WORD length                       <span class="comment">// length of the object</span>00232     );00233 00235     <span class="keyword">static</span> WORD <a class="code" href="classPASNObject.html#d6">GetASNHeaderLength</a> (00236       WORD length                       <span class="comment">// length of object</span>00237     );00238 00239     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#d7">EncodeASNInteger</a>    (00240       <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,              <span class="comment">// buffer to encode into</span>00241       <a class="code" href="pasn_8h.html#a0">PASNInt</a> data,                     <span class="comment">// value to encode</span>00242       <a class="code" href="classPASNObject.html#s16">PASNObject::ASNType</a> type          <span class="comment">// actual integer type</span>00243     );00244     <span class="comment">// Encode an ASN integer value into the specified buffer */</span>00245 00246     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPASNObject.html#d8">EncodeASNUnsigned</a> (00247       <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,              <span class="comment">// buffer to encode into</span>00248       <a class="code" href="pasn_8h.html#a1">PASNUnsigned</a> data,                <span class="comment">// value to encode</span>00249       <a class="code" href="classPASNObject.html#s16">PASNObject::ASNType</a> type          <span class="comment">// actual integer type</span>00250     );00251     <span class="comment">// Encode an ASN integer value into the specified buffer */</span>00252 00253     <span class="keyword">static</span> WORD <a class="code" href="classPASNObject.html#d9">GetASNIntegerLength</a> (00254       <a class="code" href="pasn_8h.html#a0">PASNInt</a> data                      <span class="comment">// value to get length of</span>00255     );00256     <span class="comment">// Return the length of an encoded ASN integer with the specified value </span>00257 00258     <span class="keyword">static</span> WORD <a class="code" href="classPASNObject.html#d10">GetASNUnsignedLength</a> (00259       <a class="code" href="pasn_8h.html#a1">PASNUnsigned</a> data                 <span class="comment">// value to get length of</span>00260     );00261     <span class="comment">// Return the length of an encoded ASN integer with the specified value </span>00262 00263     <span class="keyword">static</span> BOOL <a class="code" href="classPASNObject.html#d11">DecodeASNInteger</a> (00264       <span class="keyword">const</span> <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,                <span class="comment">// buffer to decode from</span>00265       PINDEX &amp; ptr,                     <span class="comment">// ptr to data in buffer</span>00266       <a class="code" href="pasn_8h.html#a0">PASNInt</a> &amp; value,                  <span class="comment">// returned value</span>00267       <a class="code" href="classPASNObject.html#s16">ASNType</a> type = <a class="code" href="classPASNObject.html#s16s0">Integer</a>            <span class="comment">// actual integer type</span>00268     );00269     <span class="comment">// Decode an ASN integer value in the specified buffer </span>00270 00271     <span class="keyword">static</span> BOOL <a class="code" href="classPASNObject.html#d12">DecodeASNUnsigned</a> (00272       <span class="keyword">const</span> <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer,                <span class="comment">// buffer to decode from</span>00273       PINDEX &amp; ptr,                     <span class="comment">// ptr to data in buffer</span>00274       <a class="code" href="pasn_8h.html#a1">PASNUnsigned</a> &amp; value,             <span class="comment">// returned value</span>00275       <a class="code" href="classPASNObject.html#s16">ASNType</a> type = <a class="code" href="classPASNObject.html#s16s8">TimeTicks</a>          <span class="comment">// actual integer type</span>00276     );00277     <span class="comment">// Decode an ASN integer value in the specified buffer </span>00278 00279   <span class="keyword">protected</span>:00281     <a class="code" href="classPASNObject.html#b0">PASNObject</a>();00282 <a name="l00284"></a><a class="code" href="classPASNObject.html#q0">00284</a>     <span class="keyword">static</span> BYTE <a class="code" href="classPASNObject.html#q0">ASNTypeToType</a>[<a class="code" href="classPASNObject.html#s16s15">ASNTypeMax</a>];00285 00286 };00287 00288 00290 <a name="l00293"></a><a class="code" href="classPASNInteger.html">00293</a> <span class="keyword">class </span><a class="code" href="classPASNInteger.html">PASNInteger</a> : <span class="keyword">public</span> <a class="code" href="classPASNObject.html">PASNObject</a>00294 {00295   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPASNInteger.html">PASNInteger</a>, <a class="code" href="classPASNObject.html">PASNObject</a>)00296   <span class="keyword">public</span>:00297     <a class="code" href="classPASNInteger.html#a0">PASNInteger</a>(<a class="code" href="pasn_8h.html#a0">PASNInt</a> val);00298     <a class="code" href="classPASNInteger.html#a0">PASNInteger</a>(<span class="keyword">const</span> <a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer, PINDEX &amp; ptr);00299 00300     <span class="keywordtype">void</span> <a class="code" href="classPASNInteger.html#a2">PrintOn</a>(ostream &amp; strm) <span class="keyword">const</span>;00301     <span class="keywordtype">void</span> <a class="code" href="classPASNInteger.html#a3">Encode</a>(<a class="code" href="classPBYTEArray.html">PBYTEArray</a> &amp; buffer);00302     WORD <a class="code" href="classPASNInteger.html#a4">GetEncodedLength</a>();00303     <a class="code" href="classPObject.html">PObject</a> * <a class="code" href="classPASNInteger.html#a5">Clone</a>() <span class="keyword">const</span>;00304 00305     <a class="code" href="pasn_8h.html#a0">PASNInt</a> <a class="code" href="classPASNInteger.html#a6">GetInteger</a>() <span class="keyword">const</span>;00306     <a class="code" href="classPString.html">PString</a> <a class="code" href="classPASNInteger.html#a7">GetString</a> () <span class="keyword">const</span>;00307     <a class="code" href="classPASNObject.html#s16">ASNType</a> <a class="code" href="classPASNInteger.html#a8">GetType</a>() <span class="keyword">const</span>;00308     <a class="code" href="classPString.html">PString</a> <a class="code" href="classPASNInteger.html#a9">GetTypeAsString</a>() <span class="keyword">const</span>;00309 00310   <span class="keyword">private</span>:00311     <a class="code" href="pasn_8h.html#a0">PASNInt</a> value;00312 };00313 00314 00316 <a name="l00319"></a><a class="code" href="classPASNString.html">00319</a> <span class="keyword">class </span><a class="code" href="classPASNString.html">PASNString</a> : <span class="keyword">public</span> <a class="code" href="classPASNObject.html">PASNObject</a>00320 {00321   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPASNString.html">PASNString</a>, <a class="code" href="classPASNObject.html">PASNObject</a>)00322   <span class="keyword">public</span>:00323     <a class="code" href="classPASNString.html#a0">PASNString</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; str);

⌨️ 快捷键说明

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