📄 classtixmlattribute.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>TiXmlAttribute class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><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> </center><hr><h1>TiXmlAttribute Class Reference</h1>An attribute is a name-value pair. <a href="#_details">More...</a><p><code>#include <<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>></code><p><p>Inheritance diagram for TiXmlAttribute:<p><center><img src="classTiXmlAttribute.png" usemap="#TiXmlAttribute_map" border="0" alt=""></center><map name="TiXmlAttribute_map"><area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,90,24"></map><a href="classTiXmlAttribute-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top><a name="a0" doxytag="TiXmlAttribute::TiXmlAttribute"></a> </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a0">TiXmlAttribute</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Construct an empty attribute.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a1" doxytag="TiXmlAttribute::TiXmlAttribute"></a> </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a1">TiXmlAttribute</a> (const std::string &_name, const std::string &_value)</td></tr><tr><td> </td><td><font size=-1><em>std::string constructor.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a2" doxytag="TiXmlAttribute::TiXmlAttribute"></a> </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a2">TiXmlAttribute</a> (const char *_name, const char *_value)</td></tr><tr><td> </td><td><font size=-1><em>Construct an attribute with a name and value.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a3" doxytag="TiXmlAttribute::Name"></a>const char * </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a3">Name</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Return the name of this attribute.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a4" doxytag="TiXmlAttribute::Value"></a>const char * </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a4">Value</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Return the value of this attribute.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a5" doxytag="TiXmlAttribute::IntValue"></a>const int </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a5">IntValue</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Return the value of this attribute, converted to an integer.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a6" doxytag="TiXmlAttribute::DoubleValue"></a>const double </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a6">DoubleValue</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Return the value of this attribute, converted to a double.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a7">QueryIntValue</a> (int *value) const</td></tr><tr><td> </td><td><font size=-1><em>QueryIntValue examines the value string.</em> <a href="#a7"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a8" doxytag="TiXmlAttribute::QueryDoubleValue"></a>int </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a8">QueryDoubleValue</a> (double *value) const</td></tr><tr><td> </td><td><font size=-1><em>QueryDoubleValue examines the value string. See <a class="el" href="classTiXmlAttribute.html#a7">QueryIntValue()</a>.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a9" doxytag="TiXmlAttribute::SetName"></a>void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a9">SetName</a> (const char *_name)</td></tr><tr><td> </td><td><font size=-1><em>Set the name of this attribute.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a10" doxytag="TiXmlAttribute::SetValue"></a>void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a10">SetValue</a> (const char *_value)</td></tr><tr><td> </td><td><font size=-1><em>Set the value.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a11" doxytag="TiXmlAttribute::SetIntValue"></a>void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a11">SetIntValue</a> (int value)</td></tr><tr><td> </td><td><font size=-1><em>Set the value from an integer.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a12" doxytag="TiXmlAttribute::SetDoubleValue"></a>void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a12">SetDoubleValue</a> (double value)</td></tr><tr><td> </td><td><font size=-1><em>Set the value from a double.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a13" doxytag="TiXmlAttribute::SetName"></a>void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a13">SetName</a> (const std::string &_name)</td></tr><tr><td> </td><td><font size=-1><em>STL std::string form.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a14" doxytag="TiXmlAttribute::SetValue"></a>void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a14">SetValue</a> (const std::string &_value)</td></tr><tr><td> </td><td><font size=-1><em>STL std::string form.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a15" doxytag="TiXmlAttribute::Next"></a>TiXmlAttribute * </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a15">Next</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Get the next sibling attribute in the DOM. Returns null at end.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a16" doxytag="TiXmlAttribute::Previous"></a>TiXmlAttribute * </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a16">Previous</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Get the previous sibling attribute in the DOM. Returns null at beginning.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classTiXmlAttribute.html#a21">Print</a> (FILE *cfile, int depth) const</td></tr><tr><td> </td><td><font size=-1><em>All TinyXml classes can print themselves to a filestream.</em> <a href="#a21"></a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>An attribute is a name-value pair.<p>Elements have an arbitrary number of attributes, each with a unique name.<p><dl compact><dt><b>Note: </b></dt><dd>The attributes are not TiXmlNodes, since they are not part of the tinyXML document object model. There are other suggested ways to look at this problem. </dl><p><hr><h2>Member Function Documentation</h2><a name="a21" doxytag="TiXmlAttribute::Print"></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"> virtual void TiXmlAttribute::Print </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">FILE * </td> <td class="mdname" nowrap> <em>cfile</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>depth</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>All TinyXml classes can print themselves to a filestream.<p>This is a formatted print, and will insert tabs and newlines.<p>(For an unformatted stream, use the << operator.) <p>Implements <a class="el" href="classTiXmlBase.html#a2">TiXmlBase</a>. </td> </tr></table><a name="a7" doxytag="TiXmlAttribute::QueryIntValue"></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"> int TiXmlAttribute::QueryIntValue </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int * </td> <td class="mdname1" valign="top" nowrap> <em>value</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>QueryIntValue examines the value string.<p>It is an alternative to the <a class="el" href="classTiXmlAttribute.html#a5">IntValue()</a> method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE.<p>A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other TinyXml calls. </td> </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul><hr><address style="align: right;"><small>Generated on Sun Aug 1 12:06:33 2004 for TinyXml by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -