classgenericvaluet.html
来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 379 行 · 第 1/2 页
HTML
379 行
<!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>GenericValueT class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.12 --><center><a class="qindex" href="index.html">Main Page</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>GenericValueT Class Reference</h1><code>#include <<a class="el" href="GenericValues_8h-source.html">GenericValues.h</a>></code><p><a href="classGenericValueT-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGenericValueT.html#a0">GenericValueT</a> (const char *strName, void *vAddress, <a class="el" href="GenericValues_8h.html#a4">GenericValueKind</a> type)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGenericValueT.html#a1">~GenericValueT</a> ()</td></tr><tr><td nowrap align=right valign=top>const char * </td><td valign=bottom><a class="el" href="classGenericValueT.html#a2">getName</a> ()</td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classGenericValueT.html#a3">setValue</a> (const char *strValue)</td></tr><tr><td nowrap align=right valign=top>char * </td><td valign=bottom><a class="el" href="classGenericValueT.html#a4">getValue</a> (char *strValue)</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGenericValueT.html#a5">show</a> (ostream &out, const char *strSeparator)</td></tr><tr><td colspan=2><br><h2>Private Attributes</h2></td></tr><tr><td nowrap align=right valign=top>const char * </td><td valign=bottom><a class="el" href="classGenericValueT.html#o0">m_strName</a></td></tr><tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="classGenericValueT.html#o1">m_vAddress</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="GenericValues_8h.html#a4">GenericValueKind</a> </td><td valign=bottom><a class="el" href="classGenericValueT.html#o2">m_type</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class contains a pointer to a variable of a generic type (double, char*, bool, int) and this pointer is associated with a string by which the variable can be reached. Several methods are defined which enable one to access the name and value of the variable. <p><p>Definition at line <a class="el" href="GenericValues_8h-source.html#l00069">69</a> of file <a class="el" href="GenericValues_8h-source.html">GenericValues.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="GenericValueT::GenericValueT"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> GenericValueT::GenericValueT </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>str</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </td> <td class="mdname" nowrap> <em>vAddr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="GenericValues_8h.html#a4">GenericValueKind</a> </td> <td class="mdname" nowrap> <em>t</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Constructor for the GenericValueT class. It creates a GenericValueT object by setting all the private member variables to the values passed to the constructor. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>strName</em> </td><td>a string denoting the name associated with the generic variable to which the class pointer will point (the variable can be reached through this name) </td></tr><tr><td valign=top><em>vAdress</em> </td><td>a (void) pointer to the actual generic variable </td></tr><tr><td valign=top><em>t</em> </td><td>the (generic) type of the variable associated with the class pointer </td></tr></table></dl><p>Definition at line <a class="el" href="GenericValues_8C-source.html#l00068">68</a> of file <a class="el" href="GenericValues_8C-source.html">GenericValues.C</a>.<p>References <a class="el" href="GenericValues_8h-source.html#l00053">GenericValueKind</a>, <a class="el" href="GenericValues_8h-source.html#l00074">m_strName</a>, <a class="el" href="GenericValues_8h-source.html#l00077">m_type</a>, and <a class="el" href="GenericValues_8h-source.html#l00076">m_vAddress</a>. </td> </tr></table><a name="a1" doxytag="GenericValueT::~GenericValueT"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> GenericValueT::~GenericValueT </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Destructor for the GenericValueT class. It destroys a GenericValueT object by freeing all memory allocated to it. <p>Definition at line <a class="el" href="GenericValues_8C-source.html#l00077">77</a> of file <a class="el" href="GenericValues_8C-source.html">GenericValues.C</a>.<p>References <a class="el" href="GenericValues_8h-source.html#l00074">m_strName</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a2" doxytag="GenericValueT::getName"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> const char * GenericValueT::getName </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get method for the 'm_strName' member variable. <dl compact><dt><b>Returns: </b><dd>the name associated with the variable to which the class pointer points </dl><p>Definition at line <a class="el" href="GenericValues_8C-source.html#l00086">86</a> of file <a class="el" href="GenericValues_8C-source.html">GenericValues.C</a>. </td> </tr></table><a name="a4" doxytag="GenericValueT::getValue"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char * GenericValueT::getValue </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname1" valign="top" nowrap> <em>strValue</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method determines the value of the variable associated with this GenericValueT object. The result is converted to a string which is put into the argument to the method (note that enough memory must be allocated for this char*). This same string is also returned by the method. This enables you to use the method as an argument to a function such as 'strcpy'. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>strValue</em> </td><td>a string which after the method call will contain the value of the variable associated with this GenericValueT object </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>a string containing the value of the variable associated with this GenericValueT object. </dl><p>Definition at line <a class="el" href="GenericValues_8C-source.html#l00144">144</a> of file <a class="el" href="GenericValues_8C-source.html">GenericValues.C</a>.<p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?