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

📄 class_name_value_pairs.html

📁 Crypto++是一个非常强大的密码学库,主要是功能全
💻 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>Crypto++: NameValuePairs class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.2 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>NameValuePairs Class Reference</h1><code>#include &lt;<a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>&gt;</code><p><p>Inheritance diagram for NameValuePairs:<p><center><img src="class_name_value_pairs.png" usemap="#NameValuePairs_map" border="0" alt=""></center><map name="NameValuePairs_map"><area href="class_crypto_material.html" alt="CryptoMaterial" shape="rect" coords="675,56,890,80"><area href="class_null_name_value_pairs.html" alt="NullNameValuePairs" shape="rect" coords="900,56,1115,80"><area href="class_a_s_n1_crypto_material.html" alt="ASN1CryptoMaterial" shape="rect" coords="225,112,440,136"><area href="class_generatable_crypto_material.html" alt="GeneratableCryptoMaterial" shape="rect" coords="675,112,890,136"><area href="class_public_key.html" alt="PublicKey" shape="rect" coords="1125,112,1340,136"><area href="class_a_s_n1_key.html" alt="ASN1Key" shape="rect" coords="450,168,665,192"><area href="class_d_l___group_parameters___integer_based.html" alt="DL_GroupParameters_IntegerBased" shape="rect" coords="450,224,665,248"><area href="class_e_s_i_g_n_function.html" alt="ESIGNFunction" shape="rect" coords="450,280,665,304"><area href="class_crypto_parameters.html" alt="CryptoParameters" shape="rect" coords="900,168,1115,192"><area href="class_private_key.html" alt="PrivateKey" shape="rect" coords="900,224,1115,248"><area href="class_e_s_i_g_n_function.html" alt="ESIGNFunction" shape="rect" coords="1350,168,1565,192"><area href="class_l_u_c_function.html" alt="LUCFunction" shape="rect" coords="1350,224,1565,248"><area href="class_rabin_function.html" alt="RabinFunction" shape="rect" coords="1350,280,1565,304"><area href="class_r_w_function.html" alt="RWFunction< r >" shape="rect" coords="1350,336,1565,360"><area href="class_x509_public_key.html" alt="X509PublicKey" shape="rect" coords="1350,392,1565,416"></map><a href="class_name_value_pairs-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>interface for retrieving values given their names <p>This class is used to safely pass a variable number of arbitrarily typed arguments to functions and to read values from keys and crypto parameters. To get a value, you need to know the name and the type of the value. Call <a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha41">GetValueNames()</a> on a NameValuePairs object to obtain a list of value names that it supports. Then look at the <a class="el" href="namespace_name.html">Name</a> namespace documentation to see what the type of each value is, or alternatively, call <a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha42">GetIntValue()</a> with the value name, and if the type is not int, a <a class="el" href="class_name_value_pairs_1_1_value_type_mismatch.html">ValueTypeMismatch</a> exception will be thrown and you can get the actual type from the exception object. <p><p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00218">218</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha37" doxytag="NameValuePairs::GetThisObject"></a>template&lt;class T&gt; bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha37">GetThisObject</a> (T &amp;object) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a copy of this object or a subobject of it <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha38" doxytag="NameValuePairs::GetThisPointer"></a>template&lt;class T&gt; bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha38">GetThisPointer</a> (T *&amp;p) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a pointer to this object, as a pointer to T <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha39" doxytag="NameValuePairs::GetValue"></a>template&lt;class T&gt; bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha39">GetValue</a> (const char *name, T &amp;value) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value, returns true if the name exists <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha40" doxytag="NameValuePairs::GetValueWithDefault"></a>template&lt;class T&gt; T&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha40">GetValueWithDefault</a> (const char *name, T defaultValue) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value, returns the default if the name doesn't exist <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha41" doxytag="NameValuePairs::GetValueNames"></a>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha41">GetValueNames</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a list of value names that can be retrieved <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha42">GetIntValue</a> (const char *name, int &amp;value) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value with type int </em> <a href="#_x_t_r___d_ha42"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha43" doxytag="NameValuePairs::GetIntValueWithDefault"></a>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_ha43">GetIntValueWithDefault</a> (const char *name, int defaultValue) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value with type int, with default <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha44" doxytag="NameValuePairs::GetRequiredParameter"></a>template&lt;class T&gt; void&nbsp;</td><td class="memItemRight" valign=bottom><b>GetRequiredParameter</b> (const char *className, const char *name, T &amp;value) const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha45" doxytag="NameValuePairs::GetRequiredIntParameter"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><b>GetRequiredIntParameter</b> (const char *className, const char *name, int &amp;value) const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x509_public_keya28" doxytag="NameValuePairs::GetVoidValue"></a>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x509_public_keya28">GetVoidValue</a> (const char *name, const std::type_info &amp;valueType, void *pValue) const=0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">to be implemented by derived classes, users should use one of the above functions instead <br><br></td></tr><tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_he0" doxytag="NameValuePairs::ThrowIfTypeMismatch"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_name_value_pairs.html#_x_t_r___d_he0">ThrowIfTypeMismatch</a> (const char *name, const std::type_info &amp;stored, const std::type_info &amp;retrieving)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">used by derived classes to check for type mismatch <br><br></td></tr></table><hr><h2>Member Function Documentation</h2><a name="_x_t_r___d_ha42" doxytag="NameValuePairs::GetIntValue"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool NameValuePairs::GetIntValue </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap> <em>name</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>value</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>get a named value with type int <p>used to ensure we don't accidentally try to get an unsigned int or some other type when we mean int (which is the most common case) <p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00275">275</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>References <a class="el" href="cryptlib_8h-source.html#l00255">GetValue()</a>.<p>Referenced by <a class="el" href="rw_8cpp-source.html#l00144">InvertibleRWFunction&lt; r &gt;::GenerateRandom()</a>, <a class="el" href="rsa_8cpp-source.html#l00102">InvertibleRSAFunction::GenerateRandom()</a>, <a class="el" href="rabin_8cpp-source.html#l00074">InvertibleRabinFunction::GenerateRandom()</a>, <a class="el" href="luc_8cpp-source.html#l00108">InvertibleLUCFunction::GenerateRandom()</a>, <a class="el" href="gfpcrypt_8cpp-source.html#l00142">DL_GroupParameters_IntegerBased::GenerateRandom()</a>, <a class="el" href="gfpcrypt_8cpp-source.html#l00026">DL_GroupParameters_DSA::GenerateRandom()</a>, and <a class="el" href="esign_8cpp-source.html#l00075">InvertibleESIGNFunction::GenerateRandom()</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="cryptlib_8h-source.html">cryptlib.h</a></ul><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:35:12 2003 for Crypto++ by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.2 </small></address></body></html>

⌨️ 快捷键说明

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